# Asana Tasks


# OpenAsanaToDo

class

prefect.tasks.asana.asana_task.OpenAsanaToDo

(name=None, notes=None, project=None, token=None, **kwargs)[source]

Task for opening / creating new Asana tasks using the Asana REST API.

Args:

  • project (str; , required): The GID of the project the task will be posted to; can also be provided to the run method
  • name (str, optional): the name of the task to create; can also be provided to the run method
  • notes (str, optional): the contents of the task; can also be provided to the run method
  • token (str): an Asana Personal Access Token
  • **kwargs (Any, optional): additional keyword arguments to pass to the standard Task init method

methods:                                                                                                                                                       

prefect.tasks.asana.asana_task.OpenAsanaToDo.run

(name=None, notes=None, project=None, token=None)[source]

Run method for this Task. Invoked by calling this Task after initialization within a Flow context, or by using Task.bind.

Args:

  • name (str, optional): the name of the task to create; can also be provided at initialization
  • project (str; , required): The GID of the project the task will be posted to; can also be provided at initialization
  • notes (str, optional): the contents of the task; can also be provided at initialization
  • token (str): an ASANA Personal Access Token
Raises:
  • ValueError: if no project is provided
  • ValueError: if no access token is provided
  • ValueError: if no result is returned
Returns:
  • The result object with details of the new asana task



This documentation was auto-generated from commit bd9182e
on July 31, 2024 at 18:02 UTC