From d58abb351c159b618db3dc0930334d5747fd72eb Mon Sep 17 00:00:00 2001 From: John Vu Date: Wed, 24 Apr 2024 16:41:59 -0700 Subject: [PATCH] Update v3 to v3.2.3 + Add important message to README.md --- README.md | 16 ++-- VERSION | 2 +- asana/resources/__init__.py | 10 ++- asana/resources/allocations.py | 6 ++ asana/resources/gen/__init__.py | 11 ++- asana/resources/gen/allocations.py | 77 ++++++++++++++++++++ asana/resources/gen/attachments.py | 7 +- asana/resources/gen/audit_log_api.py | 2 +- asana/resources/gen/batch_api.py | 2 +- asana/resources/gen/custom_field_settings.py | 8 +- asana/resources/gen/custom_fields.py | 21 ++---- asana/resources/gen/events.py | 4 +- asana/resources/gen/goal_relationships.py | 11 +-- asana/resources/gen/goals.py | 24 +++--- asana/resources/gen/jobs.py | 2 +- asana/resources/gen/memberships.py | 27 ++++--- asana/resources/gen/organization_exports.py | 6 +- asana/resources/gen/portfolio_memberships.py | 10 +-- asana/resources/gen/portfolios.py | 23 +++--- asana/resources/gen/project_briefs.py | 7 +- asana/resources/gen/project_memberships.py | 6 +- asana/resources/gen/project_statuses.py | 9 +-- asana/resources/gen/project_templates.py | 25 +++++-- asana/resources/gen/projects.py | 44 ++++++----- asana/resources/gen/rules.py | 17 +++++ asana/resources/gen/sections.py | 13 ++-- asana/resources/gen/status_updates.py | 23 +++--- asana/resources/gen/stories.py | 13 ++-- asana/resources/gen/tags.py | 27 +++---- asana/resources/gen/task_templates.py | 62 ++++++++++++++++ asana/resources/gen/tasks.py | 73 ++++++++++--------- asana/resources/gen/team_memberships.py | 14 ++-- asana/resources/gen/teams.py | 28 +++---- asana/resources/gen/time_periods.py | 6 +- asana/resources/gen/time_tracking_entries.py | 76 +++++++++++++++++++ asana/resources/gen/typeahead.py | 4 +- asana/resources/gen/user_task_lists.py | 4 +- asana/resources/gen/users.py | 20 ++--- asana/resources/gen/webhooks.py | 11 ++- asana/resources/gen/workspace_memberships.py | 10 +-- asana/resources/gen/workspaces.py | 11 ++- asana/resources/rules.py | 6 ++ asana/resources/task_templates.py | 6 ++ asana/resources/time_tracking_entries.py | 6 ++ asana/version.py | 2 +- samples/allocations_sample.yaml | 41 +++++++++++ samples/memberships_sample.yaml | 8 ++ samples/project_templates_sample.yaml | 8 ++ samples/rules_sample.yaml | 9 +++ samples/status_updates_sample.yaml | 4 +- samples/task_templates_sample.yaml | 33 +++++++++ samples/tasks_sample.yaml | 8 ++ samples/teams_sample.yaml | 2 +- samples/time_tracking_entries_sample.yaml | 41 +++++++++++ 54 files changed, 673 insertions(+), 273 deletions(-) create mode 100644 asana/resources/allocations.py create mode 100644 asana/resources/gen/allocations.py create mode 100644 asana/resources/gen/rules.py create mode 100644 asana/resources/gen/task_templates.py create mode 100644 asana/resources/gen/time_tracking_entries.py create mode 100644 asana/resources/rules.py create mode 100644 asana/resources/task_templates.py create mode 100644 asana/resources/time_tracking_entries.py create mode 100644 samples/allocations_sample.yaml create mode 100644 samples/rules_sample.yaml create mode 100644 samples/task_templates_sample.yaml create mode 100644 samples/time_tracking_entries_sample.yaml diff --git a/README.md b/README.md index e1b215b7..4288a8eb 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# asana [![Build][github-actions-image]][github-actions-url] [![PyPi Version][pypi-image]][pypi-url] +# asana -> **Warning** -> Python client library version `>4.X.X` is currently in BETA and subject to change. Please use v3.2.X for stable / production environments `pip install asana` or `pip install asana==3.2.2`. If you have feedback on the new version, please your feedback [here](https://form.asana.com/?k=C4sELCq6hAUsoWEY0kJwAA&d=15793206719). - -> You can try out our new python beta by installing version [v4.0.11](https://github.com/Asana/python-asana/tree/v4.0.11) (`pip install asana==4.0.11`) +> **Important:** +> Versions 3.X.X and earlier of this package are no longer supported. For new features and support, please upgrade to [the latest version](https://pypi.org/project/asana/). +> +>To view sample code for version 3, select the `python-sdk-v3` tab on a specific endpoint's page in the [Asana API reference](https://developers.asana.com/reference/rest-api-reference), or check the [v3 samples](https://github.com/Asana/python-asana/tree/v3.2.3/samples) directory on GitHub. Python client library for Asana. @@ -174,10 +174,4 @@ Run `deploy.py [major|minor|patch]`. See `deploy.py -h` for additional info. GitHub Actions will automatically build and deploy the tagged release to [PyPI](https://pypi.org/). -[github-actions-url]: https://github.com/Asana/python-asana/actions -[github-actions-image]: https://github.com/Asana/python-asana/workflows/Build/badge.svg - -[pypi-url]: https://pypi.python.org/pypi/asana/ -[pypi-image]: https://img.shields.io/pypi/v/asana.svg?style=flat-square - [asana-docs]: https://developers.asana.com/docs diff --git a/VERSION b/VERSION index acf9bf09..06eda28a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.2.2 \ No newline at end of file +3.2.3 \ No newline at end of file diff --git a/asana/resources/__init__.py b/asana/resources/__init__.py index 58f3953f..d1091046 100644 --- a/asana/resources/__init__.py +++ b/asana/resources/__init__.py @@ -1,4 +1,5 @@ from . import ( + allocations, attachments, audit_log_api, batch_api, @@ -11,24 +12,27 @@ memberships, message, organization_exports, - portfolios, portfolio_memberships, + portfolios, project_briefs, project_memberships, project_statuses, project_templates, projects, + rules, sections, status_updates, stories, tags, + task_templates, tasks, + team_memberships, teams, time_periods, - team_memberships, + time_tracking_entries, typeahead, - users, user_task_lists, + users, webhooks, workspace_memberships, workspaces diff --git a/asana/resources/allocations.py b/asana/resources/allocations.py new file mode 100644 index 00000000..f860451e --- /dev/null +++ b/asana/resources/allocations.py @@ -0,0 +1,6 @@ + +from .gen.allocations import _Allocations + +class Allocations(_Allocations): + """Allocations resource""" + pass diff --git a/asana/resources/gen/__init__.py b/asana/resources/gen/__init__.py index 2786f20b..d1091046 100644 --- a/asana/resources/gen/__init__.py +++ b/asana/resources/gen/__init__.py @@ -1,31 +1,38 @@ from . import ( + allocations, attachments, audit_log_api, batch_api, custom_field_settings, custom_fields, events, + goal_relationships, goals, jobs, + memberships, + message, organization_exports, - portfolios, portfolio_memberships, + portfolios, project_briefs, project_memberships, project_statuses, project_templates, projects, + rules, sections, status_updates, stories, tags, + task_templates, tasks, team_memberships, teams, time_periods, + time_tracking_entries, typeahead, - users, user_task_lists, + users, webhooks, workspace_memberships, workspaces diff --git a/asana/resources/gen/allocations.py b/asana/resources/gen/allocations.py new file mode 100644 index 00000000..3833cedf --- /dev/null +++ b/asana/resources/gen/allocations.py @@ -0,0 +1,77 @@ +# coding=utf-8 +class _Allocations: + + def __init__(self, client=None): + self.client = client + + def create_allocation(self, params=None, **options): + """Create an allocation + :param Object params: Parameters for the request + :param **options + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/allocations" + return self.client.post(path, params, **options) + + def delete_allocation(self, allocation_gid, params=None, **options): + """Delete an allocation + :param str allocation_gid: (required) Globally unique identifier for the allocation. + :param Object params: Parameters for the request + :param **options + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/allocations/{allocation_gid}".replace("{allocation_gid}", allocation_gid) + return self.client.delete(path, params, **options) + + def get_allocation(self, allocation_gid, params=None, **options): + """Get an allocation + :param str allocation_gid: (required) Globally unique identifier for the allocation. + :param Object params: Parameters for the request + :param **options + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/allocations/{allocation_gid}".replace("{allocation_gid}", allocation_gid) + return self.client.get(path, params, **options) + + def get_allocations(self, params=None, **options): + """Get multiple allocations + :param Object params: Parameters for the request + - parent {str}: Globally unique identifier for the project to filter allocations by. + - assignee {str}: Globally unique identifier for the user the allocation is assigned to. + - workspace {str}: Globally unique identifier for the workspace. + :param **options + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* + - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/allocations" + return self.client.get_collection(path, params, **options) + + def update_allocation(self, allocation_gid, params=None, **options): + """Update an allocation + :param str allocation_gid: (required) Globally unique identifier for the allocation. + :param Object params: Parameters for the request + :param **options + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/allocations/{allocation_gid}".replace("{allocation_gid}", allocation_gid) + return self.client.put(path, params, **options) diff --git a/asana/resources/gen/attachments.py b/asana/resources/gen/attachments.py index cb5f2998..c8f29a67 100644 --- a/asana/resources/gen/attachments.py +++ b/asana/resources/gen/attachments.py @@ -9,7 +9,6 @@ def delete_attachment(self, attachment_gid, params=None, **options): :param str attachment_gid: (required) Globally unique identifier for the attachment. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -23,7 +22,7 @@ def get_attachment(self, attachment_gid, params=None, **options): :param str attachment_gid: (required) Globally unique identifier for the attachment. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -37,9 +36,9 @@ def get_attachments_for_object(self, params=None, **options): :param Object params: Parameters for the request - parent {str}: (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a `project`, `project_brief`, or `task`. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/audit_log_api.py b/asana/resources/gen/audit_log_api.py index 36c81cc3..3ca421af 100644 --- a/asana/resources/gen/audit_log_api.py +++ b/asana/resources/gen/audit_log_api.py @@ -15,7 +15,7 @@ def get_audit_log_events(self, workspace_gid, params=None, **options): - actor_gid {str}: Filter to events triggered by the actor with this ID. - resource_gid {str}: Filter to events with this resource ID. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. :return: Object """ diff --git a/asana/resources/gen/batch_api.py b/asana/resources/gen/batch_api.py index 3652b3d3..afc8bc7b 100644 --- a/asana/resources/gen/batch_api.py +++ b/asana/resources/gen/batch_api.py @@ -8,7 +8,7 @@ def create_batch_request(self, params=None, **options): """Submit parallel requests :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/custom_field_settings.py b/asana/resources/gen/custom_field_settings.py index 563a68c3..cd6db687 100644 --- a/asana/resources/gen/custom_field_settings.py +++ b/asana/resources/gen/custom_field_settings.py @@ -9,9 +9,9 @@ def get_custom_field_settings_for_portfolio(self, portfolio_gid, params=None, ** :param str portfolio_gid: (required) Globally unique identifier for the portfolio. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -25,9 +25,9 @@ def get_custom_field_settings_for_project(self, project_gid, params=None, **opti :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/custom_fields.py b/asana/resources/gen/custom_fields.py index ba1a673e..c0d59f0c 100644 --- a/asana/resources/gen/custom_fields.py +++ b/asana/resources/gen/custom_fields.py @@ -8,9 +8,7 @@ def create_custom_field(self, params=None, **options): """Create a custom field :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -24,9 +22,7 @@ def create_enum_option_for_custom_field(self, custom_field_gid, params=None, **o :param str custom_field_gid: (required) Globally unique identifier for the custom field. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -40,7 +36,6 @@ def delete_custom_field(self, custom_field_gid, params=None, **options): :param str custom_field_gid: (required) Globally unique identifier for the custom field. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -54,7 +49,7 @@ def get_custom_field(self, custom_field_gid, params=None, **options): :param str custom_field_gid: (required) Globally unique identifier for the custom field. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -68,9 +63,9 @@ def get_custom_fields_for_workspace(self, workspace_gid, params=None, **options) :param str workspace_gid: (required) Globally unique identifier for the workspace or organization. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -84,7 +79,7 @@ def insert_enum_option_for_custom_field(self, custom_field_gid, params=None, **o :param str custom_field_gid: (required) Globally unique identifier for the custom field. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -98,7 +93,7 @@ def update_custom_field(self, custom_field_gid, params=None, **options): :param str custom_field_gid: (required) Globally unique identifier for the custom field. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -112,7 +107,7 @@ def update_enum_option(self, enum_option_gid, params=None, **options): :param str enum_option_gid: (required) Globally unique identifier for the enum option. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/events.py b/asana/resources/gen/events.py index 5ba54075..b8cd7676 100644 --- a/asana/resources/gen/events.py +++ b/asana/resources/gen/events.py @@ -7,10 +7,10 @@ def __init__(self, client=None): def get_events(self, params=None, **options): """Get events on a resource :param Object params: Parameters for the request - - resource {str}: (required) A resource ID to subscribe to. The resource can be a task or project. + - resource {str}: (required) A resource ID to subscribe to. The resource can be a task, project, or goal. - sync {str}: A sync token received from the last request, or none on first sync. Events will be returned from the point in time that the sync token was generated. *Note: On your first request, omit the sync token. The response will be the same as for an expired sync token, and will include a new valid sync token.If the sync token is too old (which may happen from time to time) the API will return a `412 Precondition Failed` error, and include a fresh sync token in the response.* :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/goal_relationships.py b/asana/resources/gen/goal_relationships.py index e5ee197c..c73d3927 100644 --- a/asana/resources/gen/goal_relationships.py +++ b/asana/resources/gen/goal_relationships.py @@ -9,7 +9,7 @@ def add_supporting_relationship(self, goal_gid, params=None, **options): :param str goal_gid: (required) Globally unique identifier for the goal. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -23,7 +23,7 @@ def get_goal_relationship(self, goal_relationship_gid, params=None, **options): :param str goal_relationship_gid: (required) Globally unique identifier for the goal relationship. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -38,7 +38,9 @@ def get_goal_relationships(self, params=None, **options): - supported_goal {str}: (required) Globally unique identifier for the supported goal in the goal relationship. - resource_subtype {str}: If provided, filter to goal relationships with a given resource_subtype. :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* + - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -52,7 +54,6 @@ def remove_supporting_relationship(self, goal_gid, params=None, **options): :param str goal_gid: (required) Globally unique identifier for the goal. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -66,7 +67,7 @@ def update_goal_relationship(self, goal_relationship_gid, params=None, **options :param str goal_relationship_gid: (required) Globally unique identifier for the goal relationship. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/goals.py b/asana/resources/gen/goals.py index 79e47743..9a050a82 100644 --- a/asana/resources/gen/goals.py +++ b/asana/resources/gen/goals.py @@ -9,7 +9,7 @@ def add_followers(self, goal_gid, params=None, **options): :param str goal_gid: (required) Globally unique identifier for the goal. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -22,9 +22,7 @@ def create_goal(self, params=None, **options): """Create a goal :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -38,7 +36,7 @@ def create_goal_metric(self, goal_gid, params=None, **options): :param str goal_gid: (required) Globally unique identifier for the goal. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -52,7 +50,6 @@ def delete_goal(self, goal_gid, params=None, **options): :param str goal_gid: (required) Globally unique identifier for the goal. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -66,7 +63,7 @@ def get_goal(self, goal_gid, params=None, **options): :param str goal_gid: (required) Globally unique identifier for the goal. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -80,14 +77,15 @@ def get_goals(self, params=None, **options): :param Object params: Parameters for the request - portfolio {str}: Globally unique identifier for supporting portfolio. - project {str}: Globally unique identifier for supporting project. + - task {str}: Globally unique identifier for supporting task. - is_workspace_level {bool}: Filter to goals with is_workspace_level set to query value. Must be used with the workspace parameter. - team {str}: Globally unique identifier for the team. - workspace {str}: Globally unique identifier for the workspace. - time_periods {list[str]}: Globally unique identifiers for the time periods. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -101,7 +99,7 @@ def get_parent_goals_for_goal(self, goal_gid, params=None, **options): :param str goal_gid: (required) Globally unique identifier for the goal. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -115,7 +113,7 @@ def remove_followers(self, goal_gid, params=None, **options): :param str goal_gid: (required) Globally unique identifier for the goal. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -129,7 +127,7 @@ def update_goal(self, goal_gid, params=None, **options): :param str goal_gid: (required) Globally unique identifier for the goal. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -143,7 +141,7 @@ def update_goal_metric(self, goal_gid, params=None, **options): :param str goal_gid: (required) Globally unique identifier for the goal. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/jobs.py b/asana/resources/gen/jobs.py index 2c1d7027..b8e145bf 100644 --- a/asana/resources/gen/jobs.py +++ b/asana/resources/gen/jobs.py @@ -9,7 +9,7 @@ def get_job(self, job_gid, params=None, **options): :param str job_gid: (required) Globally unique identifier for the job. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/memberships.py b/asana/resources/gen/memberships.py index 64a222a9..a2a0cf1d 100644 --- a/asana/resources/gen/memberships.py +++ b/asana/resources/gen/memberships.py @@ -8,7 +8,6 @@ def create_membership(self, params=None, **options): """Create a membership :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -22,7 +21,6 @@ def delete_membership(self, membership_gid, params=None, **options): :param str membership_gid: (required) Globally unique identifier for the membership. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -31,17 +29,29 @@ def delete_membership(self, membership_gid, params=None, **options): path = "/memberships/{membership_gid}".replace("{membership_gid}", membership_gid) return self.client.delete(path, params, **options) + def get_membership(self, membership_gid, params=None, **options): + """Get a membership + :param str membership_gid: (required) Globally unique identifier for the membership. + :param Object params: Parameters for the request + :param **options + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/memberships/{membership_gid}".replace("{membership_gid}", membership_gid) + return self.client.get(path, params, **options) + def get_memberships(self, params=None, **options): """Get multiple memberships :param Object params: Parameters for the request - - parent {str}: Globally unique identifier for `project`, `portfolio`, `team`, `goal`, and `workspace`. + - parent {str}: Globally unique identifier for `goal` or `project`. - member {str}: Globally unique identifier for `team` or `user`. - - resource_subtype {str}: The resource_subtype to filter on. Must be provided with `member` and `workspace` if `parent` is not provided. Valid values include `team_membership`, `workspace_membership`, `portfolio_membership` - - workspace {str}: The workspace to filter on. Must be provided with `member` and `resource_subtype` if `parent` is not provided. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - limit {int}: Pagination limit for the request. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* + - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -55,7 +65,6 @@ def update_membership(self, membership_gid, params=None, **options): :param str membership_gid: (required) Globally unique identifier for the membership. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/organization_exports.py b/asana/resources/gen/organization_exports.py index 0c196941..f2cb2968 100644 --- a/asana/resources/gen/organization_exports.py +++ b/asana/resources/gen/organization_exports.py @@ -8,9 +8,7 @@ def create_organization_export(self, params=None, **options): """Create an organization export request :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -24,7 +22,7 @@ def get_organization_export(self, organization_export_gid, params=None, **option :param str organization_export_gid: (required) Globally unique identifier for the organization export. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/portfolio_memberships.py b/asana/resources/gen/portfolio_memberships.py index bbae489d..06b1dd1a 100644 --- a/asana/resources/gen/portfolio_memberships.py +++ b/asana/resources/gen/portfolio_memberships.py @@ -9,7 +9,7 @@ def get_portfolio_membership(self, portfolio_membership_gid, params=None, **opti :param str portfolio_membership_gid: (required) :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -25,9 +25,9 @@ def get_portfolio_memberships(self, params=None, **options): - workspace {str}: The workspace to filter results on. - user {str}: A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -42,9 +42,9 @@ def get_portfolio_memberships_for_portfolio(self, portfolio_gid, params=None, ** :param Object params: Parameters for the request - user {str}: A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/portfolios.py b/asana/resources/gen/portfolios.py index 5ec3d557..11f55ca2 100644 --- a/asana/resources/gen/portfolios.py +++ b/asana/resources/gen/portfolios.py @@ -22,7 +22,6 @@ def add_item_for_portfolio(self, portfolio_gid, params=None, **options): :param str portfolio_gid: (required) Globally unique identifier for the portfolio. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -36,7 +35,7 @@ def add_members_for_portfolio(self, portfolio_gid, params=None, **options): :param str portfolio_gid: (required) Globally unique identifier for the portfolio. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -49,7 +48,7 @@ def create_portfolio(self, params=None, **options): """Create a portfolio :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -63,7 +62,6 @@ def delete_portfolio(self, portfolio_gid, params=None, **options): :param str portfolio_gid: (required) Globally unique identifier for the portfolio. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -77,9 +75,9 @@ def get_items_for_portfolio(self, portfolio_gid, params=None, **options): :param str portfolio_gid: (required) Globally unique identifier for the portfolio. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -93,7 +91,7 @@ def get_portfolio(self, portfolio_gid, params=None, **options): :param str portfolio_gid: (required) Globally unique identifier for the portfolio. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -106,11 +104,11 @@ def get_portfolios(self, params=None, **options): """Get multiple portfolios :param Object params: Parameters for the request - workspace {str}: (required) The workspace or organization to filter portfolios on. - - owner {str}: The user who owns the portfolio. Currently, API users can only get a list of portfolios that they themselves own. + - owner {str}: The user who owns the portfolio. Currently, API users can only get a list of portfolios that they themselves own, unless the request is made from a Service Account. In the case of a Service Account, if this parameter is specified, then all portfolios owned by this parameter are returned. Otherwise, all portfolios across the workspace are returned. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -137,7 +135,6 @@ def remove_item_for_portfolio(self, portfolio_gid, params=None, **options): :param str portfolio_gid: (required) Globally unique identifier for the portfolio. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -151,7 +148,7 @@ def remove_members_for_portfolio(self, portfolio_gid, params=None, **options): :param str portfolio_gid: (required) Globally unique identifier for the portfolio. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -165,7 +162,7 @@ def update_portfolio(self, portfolio_gid, params=None, **options): :param str portfolio_gid: (required) Globally unique identifier for the portfolio. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/project_briefs.py b/asana/resources/gen/project_briefs.py index 4d59ff55..d1415025 100644 --- a/asana/resources/gen/project_briefs.py +++ b/asana/resources/gen/project_briefs.py @@ -9,7 +9,7 @@ def create_project_brief(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -23,7 +23,6 @@ def delete_project_brief(self, project_brief_gid, params=None, **options): :param str project_brief_gid: (required) Globally unique identifier for the project brief. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -37,7 +36,7 @@ def get_project_brief(self, project_brief_gid, params=None, **options): :param str project_brief_gid: (required) Globally unique identifier for the project brief. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -51,7 +50,7 @@ def update_project_brief(self, project_brief_gid, params=None, **options): :param str project_brief_gid: (required) Globally unique identifier for the project brief. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/project_memberships.py b/asana/resources/gen/project_memberships.py index a78c0af5..e75b46bf 100644 --- a/asana/resources/gen/project_memberships.py +++ b/asana/resources/gen/project_memberships.py @@ -9,7 +9,7 @@ def get_project_membership(self, project_membership_gid, params=None, **options) :param str project_membership_gid: (required) :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -24,9 +24,9 @@ def get_project_memberships_for_project(self, project_gid, params=None, **option :param Object params: Parameters for the request - user {str}: A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/project_statuses.py b/asana/resources/gen/project_statuses.py index 94e9af82..1f802add 100644 --- a/asana/resources/gen/project_statuses.py +++ b/asana/resources/gen/project_statuses.py @@ -9,7 +9,7 @@ def create_project_status_for_project(self, project_gid, params=None, **options) :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -23,7 +23,6 @@ def delete_project_status(self, project_status_gid, params=None, **options): :param str project_status_gid: (required) The project status update to get. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -37,7 +36,7 @@ def get_project_status(self, project_status_gid, params=None, **options): :param str project_status_gid: (required) The project status update to get. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -51,9 +50,9 @@ def get_project_statuses_for_project(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/project_templates.py b/asana/resources/gen/project_templates.py index 87c99d29..98ccaa6f 100644 --- a/asana/resources/gen/project_templates.py +++ b/asana/resources/gen/project_templates.py @@ -4,12 +4,25 @@ class _ProjectTemplates: def __init__(self, client=None): self.client = client + def delete_project_template(self, project_template_gid, params=None, **options): + """Delete a project template + :param str project_template_gid: (required) Globally unique identifier for the project template. + :param Object params: Parameters for the request + :param **options + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/project_templates/{project_template_gid}".replace("{project_template_gid}", project_template_gid) + return self.client.delete(path, params, **options) + def get_project_template(self, project_template_gid, params=None, **options): """Get a project template :param str project_template_gid: (required) Globally unique identifier for the project template. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -24,9 +37,9 @@ def get_project_templates(self, params=None, **options): - workspace {str}: The workspace to filter results on. - team {str}: The team to filter projects on. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -40,9 +53,9 @@ def get_project_templates_for_team(self, team_gid, params=None, **options): :param str team_gid: (required) Globally unique identifier for the team. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -56,7 +69,7 @@ def instantiate_project(self, project_template_gid, params=None, **options): :param str project_template_gid: (required) Globally unique identifier for the project template. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/projects.py b/asana/resources/gen/projects.py index f93fba92..f76bacce 100644 --- a/asana/resources/gen/projects.py +++ b/asana/resources/gen/projects.py @@ -9,6 +9,7 @@ def add_custom_field_setting_for_project(self, project_gid, params=None, **optio :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -22,7 +23,7 @@ def add_followers_for_project(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -36,7 +37,7 @@ def add_members_for_project(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -49,7 +50,7 @@ def create_project(self, params=None, **options): """Create a project :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -63,7 +64,7 @@ def create_project_for_team(self, team_gid, params=None, **options): :param str team_gid: (required) Globally unique identifier for the team. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -77,7 +78,7 @@ def create_project_for_workspace(self, workspace_gid, params=None, **options): :param str workspace_gid: (required) Globally unique identifier for the workspace or organization. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -91,7 +92,6 @@ def delete_project(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -105,7 +105,7 @@ def duplicate_project(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -119,7 +119,7 @@ def get_project(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -135,9 +135,9 @@ def get_projects(self, params=None, **options): - team {str}: The team to filter projects on. - archived {bool}: Only return projects whose `archived` field takes on the value of this parameter. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -151,9 +151,9 @@ def get_projects_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -168,9 +168,9 @@ def get_projects_for_team(self, team_gid, params=None, **options): :param Object params: Parameters for the request - archived {bool}: Only return projects whose `archived` field takes on the value of this parameter. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -185,9 +185,9 @@ def get_projects_for_workspace(self, workspace_gid, params=None, **options): :param Object params: Parameters for the request - archived {bool}: Only return projects whose `archived` field takes on the value of this parameter. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -201,9 +201,7 @@ def get_task_counts_for_project(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -217,7 +215,7 @@ def project_save_as_template(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -244,7 +242,7 @@ def remove_followers_for_project(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -258,7 +256,7 @@ def remove_members_for_project(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -272,7 +270,7 @@ def update_project(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/rules.py b/asana/resources/gen/rules.py new file mode 100644 index 00000000..a23e38e1 --- /dev/null +++ b/asana/resources/gen/rules.py @@ -0,0 +1,17 @@ +# coding=utf-8 +class _Rules: + + def __init__(self, client=None): + self.client = client + + def trigger_rule(self, rule_trigger_gid, params=None, **options): + """Trigger a rule + :param str rule_trigger_gid: (required) The ID of the incoming web request trigger. This value is a path parameter that is automatically generated for the API endpoint. + :param Object params: Parameters for the request + :param **options + :return: Object + """ + if params is None: + params = {} + path = "/rule_triggers/{rule_trigger_gid}/run".replace("{rule_trigger_gid}", rule_trigger_gid) + return self.client.post(path, params, **options) diff --git a/asana/resources/gen/sections.py b/asana/resources/gen/sections.py index 043ac4c0..340b8419 100644 --- a/asana/resources/gen/sections.py +++ b/asana/resources/gen/sections.py @@ -9,7 +9,6 @@ def add_task_for_section(self, section_gid, params=None, **options): :param str section_gid: (required) The globally unique identifier for the section. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -23,7 +22,7 @@ def create_section_for_project(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -37,7 +36,6 @@ def delete_section(self, section_gid, params=None, **options): :param str section_gid: (required) The globally unique identifier for the section. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -51,7 +49,7 @@ def get_section(self, section_gid, params=None, **options): :param str section_gid: (required) The globally unique identifier for the section. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -65,9 +63,9 @@ def get_sections_for_project(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -81,7 +79,6 @@ def insert_section_for_project(self, project_gid, params=None, **options): :param str project_gid: (required) Globally unique identifier for the project. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -95,7 +92,7 @@ def update_section(self, section_gid, params=None, **options): :param str section_gid: (required) The globally unique identifier for the section. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/status_updates.py b/asana/resources/gen/status_updates.py index ef89bd5d..58bb62c3 100644 --- a/asana/resources/gen/status_updates.py +++ b/asana/resources/gen/status_updates.py @@ -8,9 +8,9 @@ def create_status_for_object(self, params=None, **options): """Create a status update :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -19,32 +19,31 @@ def create_status_for_object(self, params=None, **options): path = "/status_updates" return self.client.post(path, params, **options) - def delete_status(self, status_gid, params=None, **options): + def delete_status(self, status_update_gid, params=None, **options): """Delete a status update - :param str status_gid: (required) The status update to get. + :param str status_update_gid: (required) The status update to get. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ if params is None: params = {} - path = "/status_updates/{status_gid}".replace("{status_gid}", status_gid) + path = "/status_updates/{status_update_gid}".replace("{status_update_gid}", status_update_gid) return self.client.delete(path, params, **options) - def get_status(self, status_gid, params=None, **options): + def get_status(self, status_update_gid, params=None, **options): """Get a status update - :param str status_gid: (required) The status update to get. + :param str status_update_gid: (required) The status update to get. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ if params is None: params = {} - path = "/status_updates/{status_gid}".replace("{status_gid}", status_gid) + path = "/status_updates/{status_update_gid}".replace("{status_update_gid}", status_update_gid) return self.client.get(path, params, **options) def get_statuses_for_object(self, params=None, **options): @@ -53,9 +52,9 @@ def get_statuses_for_object(self, params=None, **options): - parent {str}: (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a project, portfolio, or goal. - created_since {datetime}: Only return statuses that have been created since the given time. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/stories.py b/asana/resources/gen/stories.py index d0dd73ed..726dcfc7 100644 --- a/asana/resources/gen/stories.py +++ b/asana/resources/gen/stories.py @@ -9,7 +9,7 @@ def create_story_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -23,7 +23,6 @@ def delete_story(self, story_gid, params=None, **options): :param str story_gid: (required) Globally unique identifier for the story. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -37,9 +36,9 @@ def get_stories_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -53,9 +52,7 @@ def get_story(self, story_gid, params=None, **options): :param str story_gid: (required) Globally unique identifier for the story. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -69,7 +66,7 @@ def update_story(self, story_gid, params=None, **options): :param str story_gid: (required) Globally unique identifier for the story. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/tags.py b/asana/resources/gen/tags.py index 52fd7988..15cbffdc 100644 --- a/asana/resources/gen/tags.py +++ b/asana/resources/gen/tags.py @@ -8,7 +8,7 @@ def create_tag(self, params=None, **options): """Create a tag :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -22,7 +22,7 @@ def create_tag_for_workspace(self, workspace_gid, params=None, **options): :param str workspace_gid: (required) Globally unique identifier for the workspace or organization. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -36,9 +36,6 @@ def delete_tag(self, tag_gid, params=None, **options): :param str tag_gid: (required) Globally unique identifier for the tag. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -52,9 +49,7 @@ def get_tag(self, tag_gid, params=None, **options): :param str tag_gid: (required) Globally unique identifier for the tag. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -68,9 +63,9 @@ def get_tags(self, params=None, **options): :param Object params: Parameters for the request - workspace {str}: The workspace to filter tags on. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -84,9 +79,9 @@ def get_tags_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -100,9 +95,9 @@ def get_tags_for_workspace(self, workspace_gid, params=None, **options): :param str workspace_gid: (required) Globally unique identifier for the workspace or organization. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -116,9 +111,7 @@ def update_tag(self, tag_gid, params=None, **options): :param str tag_gid: (required) Globally unique identifier for the tag. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/task_templates.py b/asana/resources/gen/task_templates.py new file mode 100644 index 00000000..a8e4d215 --- /dev/null +++ b/asana/resources/gen/task_templates.py @@ -0,0 +1,62 @@ +# coding=utf-8 +class _TaskTemplates: + + def __init__(self, client=None): + self.client = client + + def delete_task_template(self, task_template_gid, params=None, **options): + """Delete a task template + :param str task_template_gid: (required) Globally unique identifier for the task template. + :param Object params: Parameters for the request + :param **options + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/task_templates/{task_template_gid}".replace("{task_template_gid}", task_template_gid) + return self.client.delete(path, params, **options) + + def get_task_template(self, task_template_gid, params=None, **options): + """Get a task template + :param str task_template_gid: (required) Globally unique identifier for the task template. + :param Object params: Parameters for the request + :param **options + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/task_templates/{task_template_gid}".replace("{task_template_gid}", task_template_gid) + return self.client.get(path, params, **options) + + def get_task_templates(self, params=None, **options): + """Get multiple task templates + :param Object params: Parameters for the request + - project {str}: The project to filter task templates on. + :param **options + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* + - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/task_templates" + return self.client.get_collection(path, params, **options) + + def instantiate_task(self, task_template_gid, params=None, **options): + """Instantiate a task from a task template + :param str task_template_gid: (required) Globally unique identifier for the task template. + :param Object params: Parameters for the request + :param **options + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/task_templates/{task_template_gid}/instantiateTask".replace("{task_template_gid}", task_template_gid) + return self.client.post(path, params, **options) diff --git a/asana/resources/gen/tasks.py b/asana/resources/gen/tasks.py index 1b100d28..43ac5fb8 100644 --- a/asana/resources/gen/tasks.py +++ b/asana/resources/gen/tasks.py @@ -9,7 +9,6 @@ def add_dependencies_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -23,7 +22,6 @@ def add_dependents_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -37,7 +35,7 @@ def add_followers_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -51,7 +49,6 @@ def add_project_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -65,7 +62,6 @@ def add_tag_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -79,7 +75,7 @@ def create_subtask_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -92,7 +88,7 @@ def create_task(self, params=None, **options): """Create a task :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -106,7 +102,6 @@ def delete_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -120,7 +115,7 @@ def duplicate_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -134,9 +129,9 @@ def get_dependencies_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -150,9 +145,9 @@ def get_dependents_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -166,9 +161,9 @@ def get_subtasks_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -182,7 +177,7 @@ def get_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -191,6 +186,19 @@ def get_task(self, task_gid, params=None, **options): path = "/tasks/{task_gid}".replace("{task_gid}", task_gid) return self.client.get(path, params, **options) + def get_task_for_custom_id(self, workspace_gid, custom_id, params=None, **options): + """Get a task for a given custom ID + :param str workspace_gid: (required) Globally unique identifier for the workspace or organization. + :param str custom_id: (required) Generated custom ID for a task. + :param Object params: Parameters for the request + :param **options + :return: Object + """ + if params is None: + params = {} + path = "/workspaces/{workspace_gid}/tasks/custom_id/{custom_id}".replace("{workspace_gid}", workspace_gid).replace("{custom_id}", custom_id) + return self.client.get(path, params, **options) + def get_tasks(self, params=None, **options): """Get multiple tasks :param Object params: Parameters for the request @@ -201,9 +209,9 @@ def get_tasks(self, params=None, **options): - completed_since {datetime}: Only return tasks that are either incomplete or that have been completed since this time. - modified_since {datetime}: Only return tasks that have been modified since the given time. *Note: A task is considered “modified” if any of its properties change, or associations between it and other objects are modified (e.g. a task being added to a project). A task is not considered modified just because another object it is associated with (e.g. a subtask) is modified. Actions that count as modifying the task include assigning, renaming, completing, and adding stories.* :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -218,9 +226,9 @@ def get_tasks_for_project(self, project_gid, params=None, **options): :param Object params: Parameters for the request - completed_since {str}: Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword *now*. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -233,10 +241,11 @@ def get_tasks_for_section(self, section_gid, params=None, **options): """Get tasks from a section :param str section_gid: (required) The globally unique identifier for the section. :param Object params: Parameters for the request + - completed_since {str}: Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword *now*. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -250,9 +259,9 @@ def get_tasks_for_tag(self, tag_gid, params=None, **options): :param str tag_gid: (required) Globally unique identifier for the tag. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -267,9 +276,9 @@ def get_tasks_for_user_task_list(self, user_task_list_gid, params=None, **option :param Object params: Parameters for the request - completed_since {str}: Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword *now*. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -283,7 +292,6 @@ def remove_dependencies_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -297,7 +305,6 @@ def remove_dependents_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -311,7 +318,7 @@ def remove_follower_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -325,7 +332,6 @@ def remove_project_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -339,7 +345,6 @@ def remove_tag_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -405,7 +410,7 @@ def search_tasks_for_workspace(self, workspace_gid, params=None, **options): - sort_by {str}: One of `due_date`, `created_at`, `completed_at`, `likes`, or `modified_at`, defaults to `modified_at` - sort_ascending {bool}: Default `false` :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -419,7 +424,7 @@ def set_parent_for_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -433,7 +438,7 @@ def update_task(self, task_gid, params=None, **options): :param str task_gid: (required) The task to operate on. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/team_memberships.py b/asana/resources/gen/team_memberships.py index ef3ba93c..4b12305d 100644 --- a/asana/resources/gen/team_memberships.py +++ b/asana/resources/gen/team_memberships.py @@ -9,7 +9,7 @@ def get_team_membership(self, team_membership_gid, params=None, **options): :param str team_membership_gid: (required) :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -25,9 +25,9 @@ def get_team_memberships(self, params=None, **options): - user {str}: A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. This parameter must be used with the workspace parameter. - workspace {str}: Globally unique identifier for the workspace. This parameter must be used with the user parameter. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -41,9 +41,9 @@ def get_team_memberships_for_team(self, team_gid, params=None, **options): :param str team_gid: (required) Globally unique identifier for the team. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -58,9 +58,9 @@ def get_team_memberships_for_user(self, user_gid, params=None, **options): :param Object params: Parameters for the request - workspace {str}: (required) Globally unique identifier for the workspace. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/teams.py b/asana/resources/gen/teams.py index 459f0b34..c1ad51f4 100644 --- a/asana/resources/gen/teams.py +++ b/asana/resources/gen/teams.py @@ -9,7 +9,7 @@ def add_user_for_team(self, team_gid, params=None, **options): :param str team_gid: (required) Globally unique identifier for the team. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -22,9 +22,7 @@ def create_team(self, params=None, **options): """Create a team :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -38,9 +36,7 @@ def get_team(self, team_gid, params=None, **options): :param str team_gid: (required) Globally unique identifier for the team. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -55,9 +51,9 @@ def get_teams_for_user(self, user_gid, params=None, **options): :param Object params: Parameters for the request - organization {str}: (required) The workspace or organization to filter teams on. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -71,9 +67,9 @@ def get_teams_for_workspace(self, workspace_gid, params=None, **options): :param str workspace_gid: (required) Globally unique identifier for the workspace or organization. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -87,7 +83,6 @@ def remove_user_for_team(self, team_gid, params=None, **options): :param str team_gid: (required) Globally unique identifier for the team. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -96,17 +91,16 @@ def remove_user_for_team(self, team_gid, params=None, **options): path = "/teams/{team_gid}/removeUser".replace("{team_gid}", team_gid) return self.client.post(path, params, **options) - def update_team(self, params=None, **options): + def update_team(self, team_gid, params=None, **options): """Update a team + :param str team_gid: (required) Globally unique identifier for the team. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ if params is None: params = {} - path = "/teams" + path = "/teams/{team_gid}".replace("{team_gid}", team_gid) return self.client.put(path, params, **options) diff --git a/asana/resources/gen/time_periods.py b/asana/resources/gen/time_periods.py index a1471b9f..095989c4 100644 --- a/asana/resources/gen/time_periods.py +++ b/asana/resources/gen/time_periods.py @@ -9,7 +9,7 @@ def get_time_period(self, time_period_gid, params=None, **options): :param str time_period_gid: (required) Globally unique identifier for the time period. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -25,9 +25,9 @@ def get_time_periods(self, params=None, **options): - end_on {date}: ISO 8601 date string - workspace {str}: (required) Globally unique identifier for the workspace. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/time_tracking_entries.py b/asana/resources/gen/time_tracking_entries.py new file mode 100644 index 00000000..9f9249a9 --- /dev/null +++ b/asana/resources/gen/time_tracking_entries.py @@ -0,0 +1,76 @@ +# coding=utf-8 +class _TimeTrackingEntries: + + def __init__(self, client=None): + self.client = client + + def create_time_tracking_entry(self, task_gid, params=None, **options): + """Create a time tracking entry + :param str task_gid: (required) The task to operate on. + :param Object params: Parameters for the request + :param **options + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/tasks/{task_gid}/time_tracking_entries".replace("{task_gid}", task_gid) + return self.client.post(path, params, **options) + + def delete_time_tracking_entry(self, time_tracking_entry_gid, params=None, **options): + """Delete a time tracking entry + :param str time_tracking_entry_gid: (required) Globally unique identifier for the time tracking entry. + :param Object params: Parameters for the request + :param **options + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/time_tracking_entries/{time_tracking_entry_gid}".replace("{time_tracking_entry_gid}", time_tracking_entry_gid) + return self.client.delete(path, params, **options) + + def get_time_tracking_entries_for_task(self, task_gid, params=None, **options): + """Get time tracking entries for a task + :param str task_gid: (required) The task to operate on. + :param Object params: Parameters for the request + :param **options + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* + - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/tasks/{task_gid}/time_tracking_entries".replace("{task_gid}", task_gid) + return self.client.get_collection(path, params, **options) + + def get_time_tracking_entry(self, time_tracking_entry_gid, params=None, **options): + """Get a time tracking entry + :param str time_tracking_entry_gid: (required) Globally unique identifier for the time tracking entry. + :param Object params: Parameters for the request + :param **options + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/time_tracking_entries/{time_tracking_entry_gid}".replace("{time_tracking_entry_gid}", time_tracking_entry_gid) + return self.client.get(path, params, **options) + + def update_time_tracking_entry(self, time_tracking_entry_gid, params=None, **options): + """Update a time tracking entry + :param str time_tracking_entry_gid: (required) Globally unique identifier for the time tracking entry. + :param Object params: Parameters for the request + :param **options + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. + - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. + :return: Object + """ + if params is None: + params = {} + path = "/time_tracking_entries/{time_tracking_entry_gid}".replace("{time_tracking_entry_gid}", time_tracking_entry_gid) + return self.client.put(path, params, **options) diff --git a/asana/resources/gen/typeahead.py b/asana/resources/gen/typeahead.py index c23110cf..ba7a9e9d 100644 --- a/asana/resources/gen/typeahead.py +++ b/asana/resources/gen/typeahead.py @@ -8,12 +8,12 @@ def typeahead_for_workspace(self, workspace_gid, params=None, **options): """Get objects via typeahead :param str workspace_gid: (required) Globally unique identifier for the workspace or organization. :param Object params: Parameters for the request - - resource_type {str}: (required) The type of values the typeahead should return. You can choose from one of the following: `custom_field`, `project`, `project_template`, `portfolio`, `tag`, `task`, and `user`. Note that unlike in the names of endpoints, the types listed here are in singular form (e.g. `task`). Using multiple types is not yet supported. + - resource_type {str}: (required) The type of values the typeahead should return. You can choose from one of the following: `custom_field`, `goal`, `project`, `project_template`, `portfolio`, `tag`, `task`, `team`, and `user`. Note that unlike in the names of endpoints, the types listed here are in singular form (e.g. `task`). Using multiple types is not yet supported. - type {str}: *Deprecated: new integrations should prefer the resource_type field.* - query {str}: The string that will be used to search for relevant objects. If an empty string is passed in, the API will return results. - count {int}: The number of results to return. The default is 20 if this parameter is omitted, with a minimum of 1 and a maximum of 100. If there are fewer results found than requested, all will be returned. :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/user_task_lists.py b/asana/resources/gen/user_task_lists.py index b59a9d56..150c0af1 100644 --- a/asana/resources/gen/user_task_lists.py +++ b/asana/resources/gen/user_task_lists.py @@ -9,7 +9,7 @@ def get_user_task_list(self, user_task_list_gid, params=None, **options): :param str user_task_list_gid: (required) Globally unique identifier for the user task list. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -24,7 +24,7 @@ def get_user_task_list_for_user(self, user_gid, params=None, **options): :param Object params: Parameters for the request - workspace {str}: (required) The workspace in which to get the user task list. :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/users.py b/asana/resources/gen/users.py index 55538f6e..5e49152e 100644 --- a/asana/resources/gen/users.py +++ b/asana/resources/gen/users.py @@ -11,7 +11,9 @@ def get_favorites_for_user(self, user_gid, params=None, **options): - resource_type {str}: (required) The resource type of favorites to be returned. - workspace {str}: (required) The workspace in which to get favorites. :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* + - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -25,7 +27,7 @@ def get_user(self, user_gid, params=None, **options): :param str user_gid: (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -40,24 +42,24 @@ def get_users(self, params=None, **options): - workspace {str}: The workspace or organization ID to filter users on. - team {str}: The team ID to filter users on. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ if params is None: params = {} path = "/users" - return self.client.get_collection(path, params, **options) + return self.client.get(path, params, **options) def get_users_for_team(self, team_gid, params=None, **options): """Get users in a team :param str team_gid: (required) Globally unique identifier for the team. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -71,8 +73,8 @@ def get_users_for_workspace(self, workspace_gid, params=None, **options): :param str workspace_gid: (required) Globally unique identifier for the workspace or organization. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/webhooks.py b/asana/resources/gen/webhooks.py index 29a59840..06f48268 100644 --- a/asana/resources/gen/webhooks.py +++ b/asana/resources/gen/webhooks.py @@ -8,7 +8,7 @@ def create_webhook(self, params=None, **options): """Establish a webhook :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -22,7 +22,6 @@ def delete_webhook(self, webhook_gid, params=None, **options): :param str webhook_gid: (required) Globally unique identifier for the webhook. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -36,7 +35,7 @@ def get_webhook(self, webhook_gid, params=None, **options): :param str webhook_gid: (required) Globally unique identifier for the webhook. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -51,9 +50,9 @@ def get_webhooks(self, params=None, **options): - workspace {str}: (required) The workspace to query for webhooks in. - resource {str}: Only return webhooks for the given resource. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -67,7 +66,7 @@ def update_webhook(self, webhook_gid, params=None, **options): :param str webhook_gid: (required) Globally unique identifier for the webhook. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/workspace_memberships.py b/asana/resources/gen/workspace_memberships.py index ec84ddb7..c229a23b 100644 --- a/asana/resources/gen/workspace_memberships.py +++ b/asana/resources/gen/workspace_memberships.py @@ -9,7 +9,7 @@ def get_workspace_membership(self, workspace_membership_gid, params=None, **opti :param str workspace_membership_gid: (required) :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -23,9 +23,9 @@ def get_workspace_memberships_for_user(self, user_gid, params=None, **options): :param str user_gid: (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -40,9 +40,9 @@ def get_workspace_memberships_for_workspace(self, workspace_gid, params=None, ** :param Object params: Parameters for the request - user {str}: A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/gen/workspaces.py b/asana/resources/gen/workspaces.py index 0250dffd..9c57f051 100644 --- a/asana/resources/gen/workspaces.py +++ b/asana/resources/gen/workspaces.py @@ -9,7 +9,7 @@ def add_user_for_workspace(self, workspace_gid, params=None, **options): :param str workspace_gid: (required) Globally unique identifier for the workspace or organization. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -23,7 +23,7 @@ def get_workspace(self, workspace_gid, params=None, **options): :param str workspace_gid: (required) Globally unique identifier for the workspace or organization. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -36,9 +36,9 @@ def get_workspaces(self, params=None, **options): """Get multiple workspaces :param Object params: Parameters for the request :param **options - - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' + - offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.* - limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100. - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -52,7 +52,6 @@ def remove_user_for_workspace(self, workspace_gid, params=None, **options): :param str workspace_gid: (required) Globally unique identifier for the workspace or organization. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ @@ -66,7 +65,7 @@ def update_workspace(self, workspace_gid, params=None, **options): :param str workspace_gid: (required) Globally unique identifier for the workspace or organization. :param Object params: Parameters for the request :param **options - - opt_fields {list[str]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. + - opt_fields {list[str]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. - opt_pretty {bool}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. :return: Object """ diff --git a/asana/resources/rules.py b/asana/resources/rules.py new file mode 100644 index 00000000..2200d70d --- /dev/null +++ b/asana/resources/rules.py @@ -0,0 +1,6 @@ + +from .gen.rules import _Rules + +class Rules(_Rules): + """Rules resource""" + pass diff --git a/asana/resources/task_templates.py b/asana/resources/task_templates.py new file mode 100644 index 00000000..22198720 --- /dev/null +++ b/asana/resources/task_templates.py @@ -0,0 +1,6 @@ + +from .gen.task_templates import _TaskTemplates + +class TaskTemplates(_TaskTemplates): + """TaskTemplates resource""" + pass diff --git a/asana/resources/time_tracking_entries.py b/asana/resources/time_tracking_entries.py new file mode 100644 index 00000000..ac9bdc15 --- /dev/null +++ b/asana/resources/time_tracking_entries.py @@ -0,0 +1,6 @@ + +from .gen.time_tracking_entries import _TimeTrackingEntries + +class TimeTrackingEntries(_TimeTrackingEntries): + """TimeTrackingEntries resource""" + pass diff --git a/asana/version.py b/asana/version.py index 29e4a941..32206102 100644 --- a/asana/version.py +++ b/asana/version.py @@ -1 +1 @@ -__version__ = '3.2.2' +__version__ = '3.2.3' diff --git a/samples/allocations_sample.yaml b/samples/allocations_sample.yaml new file mode 100644 index 00000000..2e9a40d9 --- /dev/null +++ b/samples/allocations_sample.yaml @@ -0,0 +1,41 @@ +allocations: + create_allocation: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.allocations.create_allocation({'field': 'value', 'field': 'value'}, opt_pretty=True) + delete_allocation: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.allocations.delete_allocation(allocation_gid, opt_pretty=True) + get_allocation: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.allocations.get_allocation(allocation_gid, {'param': 'value', 'param': 'value'}, opt_pretty=True) + get_allocations: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.allocations.get_allocations({'param': 'value', 'param': 'value'}, opt_pretty=True) + update_allocation: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.allocations.update_allocation(allocation_gid, {'field': 'value', 'field': 'value'}, opt_pretty=True) diff --git a/samples/memberships_sample.yaml b/samples/memberships_sample.yaml index c60224b7..1f4054ad 100644 --- a/samples/memberships_sample.yaml +++ b/samples/memberships_sample.yaml @@ -15,6 +15,14 @@ memberships: result = client.memberships.delete_membership(membership_gid, opt_pretty=True) + get_membership: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.memberships.get_membership(membership_gid, {'param': 'value', 'param': 'value'}, opt_pretty=True) get_memberships: >- import asana diff --git a/samples/project_templates_sample.yaml b/samples/project_templates_sample.yaml index ae4b37d5..8369bf6b 100644 --- a/samples/project_templates_sample.yaml +++ b/samples/project_templates_sample.yaml @@ -1,4 +1,12 @@ projecttemplates: + delete_project_template: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.project_templates.delete_project_template(project_template_gid, opt_pretty=True) get_project_template: >- import asana diff --git a/samples/rules_sample.yaml b/samples/rules_sample.yaml new file mode 100644 index 00000000..e814ded9 --- /dev/null +++ b/samples/rules_sample.yaml @@ -0,0 +1,9 @@ +rules: + trigger_rule: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.rules.trigger_rule(rule_trigger_gid, {'field': 'value', 'field': 'value'}, opt_pretty=True) diff --git a/samples/status_updates_sample.yaml b/samples/status_updates_sample.yaml index 9da2ba90..ecb73d17 100644 --- a/samples/status_updates_sample.yaml +++ b/samples/status_updates_sample.yaml @@ -14,7 +14,7 @@ statusupdates: client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') - result = client.status_updates.delete_status(status_gid, opt_pretty=True) + result = client.status_updates.delete_status(status_update_gid, opt_pretty=True) get_status: >- import asana @@ -22,7 +22,7 @@ statusupdates: client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') - result = client.status_updates.get_status(status_gid, {'param': 'value', 'param': 'value'}, opt_pretty=True) + result = client.status_updates.get_status(status_update_gid, {'param': 'value', 'param': 'value'}, opt_pretty=True) get_statuses_for_object: >- import asana diff --git a/samples/task_templates_sample.yaml b/samples/task_templates_sample.yaml new file mode 100644 index 00000000..3461fecc --- /dev/null +++ b/samples/task_templates_sample.yaml @@ -0,0 +1,33 @@ +tasktemplates: + delete_task_template: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.task_templates.delete_task_template(task_template_gid, opt_pretty=True) + get_task_template: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.task_templates.get_task_template(task_template_gid, {'param': 'value', 'param': 'value'}, opt_pretty=True) + get_task_templates: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.task_templates.get_task_templates({'param': 'value', 'param': 'value'}, opt_pretty=True) + instantiate_task: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.task_templates.instantiate_task(task_template_gid, {'field': 'value', 'field': 'value'}, opt_pretty=True) diff --git a/samples/tasks_sample.yaml b/samples/tasks_sample.yaml index b551a3dc..3ab6b4c0 100644 --- a/samples/tasks_sample.yaml +++ b/samples/tasks_sample.yaml @@ -103,6 +103,14 @@ tasks: result = client.tasks.get_task(task_gid, {'param': 'value', 'param': 'value'}, opt_pretty=True) + get_task_for_custom_id: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.tasks.get_task_for_custom_id(workspace_gid, custom_id, {'param': 'value', 'param': 'value'}, opt_pretty=True) get_tasks: >- import asana diff --git a/samples/teams_sample.yaml b/samples/teams_sample.yaml index d2e09aca..ba4c6426 100644 --- a/samples/teams_sample.yaml +++ b/samples/teams_sample.yaml @@ -54,4 +54,4 @@ teams: client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') - result = client.teams.update_team({'field': 'value', 'field': 'value'}, opt_pretty=True) + result = client.teams.update_team(team_gid, {'field': 'value', 'field': 'value'}, opt_pretty=True) diff --git a/samples/time_tracking_entries_sample.yaml b/samples/time_tracking_entries_sample.yaml new file mode 100644 index 00000000..627f4b26 --- /dev/null +++ b/samples/time_tracking_entries_sample.yaml @@ -0,0 +1,41 @@ +timetrackingentries: + create_time_tracking_entry: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.time_tracking_entries.create_time_tracking_entry(task_gid, {'field': 'value', 'field': 'value'}, opt_pretty=True) + delete_time_tracking_entry: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.time_tracking_entries.delete_time_tracking_entry(time_tracking_entry_gid, opt_pretty=True) + get_time_tracking_entries_for_task: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.time_tracking_entries.get_time_tracking_entries_for_task(task_gid, {'param': 'value', 'param': 'value'}, opt_pretty=True) + get_time_tracking_entry: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.time_tracking_entries.get_time_tracking_entry(time_tracking_entry_gid, {'param': 'value', 'param': 'value'}, opt_pretty=True) + update_time_tracking_entry: >- + import asana + + + client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN') + + + result = client.time_tracking_entries.update_time_tracking_entry(time_tracking_entry_gid, {'field': 'value', 'field': 'value'}, opt_pretty=True)