| :py:mod:`airflow.providers.asana.hooks.asana` |
| ============================================= |
| |
| .. py:module:: airflow.providers.asana.hooks.asana |
| |
| .. autoapi-nested-parse:: |
| |
| Connect to Asana. |
| |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.asana.hooks.asana.AsanaHook |
| |
| |
| |
| |
| .. py:class:: AsanaHook(conn_id = default_conn_name, *args, **kwargs) |
| |
| Bases: :py:obj:`airflow.hooks.base.BaseHook` |
| |
| Wrapper around Asana Python client library. |
| |
| .. py:attribute:: conn_name_attr |
| :annotation: = asana_conn_id |
| |
| |
| |
| .. py:attribute:: default_conn_name |
| :annotation: = asana_default |
| |
| |
| |
| .. py:attribute:: conn_type |
| :annotation: = asana |
| |
| |
| |
| .. py:attribute:: hook_name |
| :annotation: = Asana |
| |
| |
| |
| .. py:method:: get_conn() |
| |
| Returns connection for the hook. |
| |
| |
| .. py:method:: get_connection_form_widgets() |
| :staticmethod: |
| |
| Returns connection widgets to add to connection form |
| |
| |
| .. py:method:: get_ui_field_behaviour() |
| :staticmethod: |
| |
| Returns custom field behaviour |
| |
| |
| .. py:method:: client() |
| |
| Instantiates python-asana Client |
| |
| |
| .. py:method:: create_task(task_name, params) |
| |
| Creates an Asana task. |
| |
| :param task_name: Name of the new task |
| :param params: 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 |
| :return: A dict of attributes of the created task, including its gid |
| |
| |
| .. py:method:: delete_task(task_id) |
| |
| Deletes an Asana task. |
| |
| :param task_id: Asana GID of the task to delete |
| :return: A dict containing the response from Asana |
| |
| |
| .. py:method:: find_task(params) |
| |
| Retrieves a list of Asana tasks that match search parameters. |
| |
| :param params: Attributes that matching tasks should have. For a list of possible parameters, |
| see https://developers.asana.com/docs/get-multiple-tasks |
| :return: A list of dicts containing attributes of matching Asana tasks |
| |
| |
| .. py:method:: update_task(task_id, params) |
| |
| Updates an existing Asana task. |
| |
| :param task_id: Asana GID of task to update |
| :param params: New values of the task's attributes. For a list of possible parameters, see |
| https://developers.asana.com/docs/update-a-task |
| :return: A dict containing the updated task's attributes |
| |
| |
| .. py:method:: create_project(params) |
| |
| Creates a new project. |
| |
| :param params: 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. |
| :return: A dict containing the new project's attributes, including its GID. |
| |
| |
| .. py:method:: find_project(params) |
| |
| Retrieves a list of Asana projects that match search parameters. |
| |
| :param params: Attributes which matching projects should have. See |
| https://developers.asana.com/docs/get-multiple-projects |
| for a list of possible parameters. |
| :return: A list of dicts containing attributes of matching Asana projects |
| |
| |
| .. py:method:: update_project(project_id, params) |
| |
| Updates an existing project. |
| |
| :param project_id: Asana GID of the project to update |
| :param params: 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 |
| :return: A dict containing the updated project's attributes |
| |
| |
| .. py:method:: delete_project(project_id) |
| |
| Deletes a project. |
| |
| :param project_id: Asana GID of the project to delete |
| :return: A dict containing the response from Asana |
| |
| |
| |