airflow.providers.asana.hooks.asana
¶
Connect to Asana.
Module Contents¶
Classes¶
Wrapper around Asana Python client library. |
- class airflow.providers.asana.hooks.asana.AsanaHook(conn_id=default_conn_name, *args, **kwargs)[source]¶
Bases:
airflow.hooks.base.BaseHook
Wrapper around Asana Python client library.
- create_task(self, task_name, params)[source]¶
Creates an Asana task.
- Parameters
task_name (str) -- Name of the new task
params (Optional[dict]) -- Other task attributes, such as due_on, parent, and notes. For a complete list of possible parameters, see https://developers.asana.com/docs/create-a-task
- Returns
A dict of attributes of the created task, including its gid
- Return type
- find_task(self, params)[source]¶
Retrieves a list of Asana tasks that match search parameters.
- Parameters
params (Optional[dict]) -- Attributes that matching tasks should have. For a list of possible parameters, see https://developers.asana.com/docs/get-multiple-tasks
- Returns
A list of dicts containing attributes of matching Asana tasks
- Return type
- update_task(self, task_id, params)[source]¶
Updates an existing Asana task.
- Parameters
task_id (str) -- Asana GID of task to update
params (dict) -- New values of the task's attributes. For a list of possible parameters, see https://developers.asana.com/docs/update-a-task
- Returns
A dict containing the updated task's attributes
- Return type
- create_project(self, params)[source]¶
Creates a new project.
- Parameters
params (dict) -- Attributes that the new project should have. See https://developers.asana.com/docs/create-a-project#create-a-project-parameters for a list of possible parameters.
- Returns
A dict containing the new project's attributes, including its GID.
- Return type
- find_project(self, params)[source]¶
Retrieves a list of Asana projects that match search parameters.
- Parameters
params (dict) -- Attributes which matching projects should have. See https://developers.asana.com/docs/get-multiple-projects for a list of possible parameters.
- Returns
A list of dicts containing attributes of matching Asana projects
- Return type
- update_project(self, project_id, params)[source]¶
Updates an existing project.
- Parameters
project_id (str) -- Asana GID of the project to update
params (dict) -- New attributes that the project should have. See https://developers.asana.com/docs/update-a-project#update-a-project-parameters for a list of possible parameters
- Returns
A dict containing the updated project's attributes
- Return type