Skip to content

Commit

Permalink
Updated Python SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
jv-asana authored and actions-user committed Aug 3, 2023
1 parent 735c35e commit 6a23ba3
Show file tree
Hide file tree
Showing 72 changed files with 713 additions and 713 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Python client library for Asana

- API version: 1.0
- Package version: 4.0.2
- Package version: 4.0.3

## Requirements.

Expand Down
4 changes: 2 additions & 2 deletions asana/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'Swagger-Codegen/4.0.2/python'
self.user_agent = 'Swagger-Codegen/4.0.3/python'
# Add custom header
self.default_headers['X-Asana-Client-Lib'] = urlencode(
{
'language': 'Python',
'version': '4.0.2',
'version': '4.0.3',
'language_version': platform.python_version(),
'os': platform.system(),
'os_version': platform.release()
Expand Down
2 changes: 1 addition & 1 deletion asana/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,5 +249,5 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 1.0\n"\
"SDK Package Version: 4.0.2".\
"SDK Package Version: 4.0.3".\
format(env=sys.platform, pyversion=sys.version)
16 changes: 8 additions & 8 deletions docs/AttachmentsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ connect_to_app = true # bool | (optional)
opt_fields = ["connected_to_app","created_at","download_url","host","name","parent","parent.name","parent.resource_subtype","permanent_url","resource_subtype","size","view_url"] # 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. (optional)

try:
# Upload an attachment
api_response = api_instance.create_attachment_for_object(resource_subtype=resource_subtype, file=file, parent=parent, url=url, name=name, connect_to_app=connect_to_app, opt_fields=opt_fields)
# Upload an attachment
api_response = api_instance.create_attachment_for_object(resource_subtype=resource_subtype, file=file, parent=parent, url=url, name=name, connect_to_app=connect_to_app, opt_fields=opt_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentsApi->create_attachment_for_object: %s\n" % e)
Expand Down Expand Up @@ -93,8 +93,8 @@ api_instance = asana.AttachmentsApi(asana.ApiClient(configuration))
attachment_gid = '12345' # str | Globally unique identifier for the attachment.

try:
# Delete an attachment
api_response = api_instance.delete_attachment(attachment_gid)
# Delete an attachment
api_response = api_instance.delete_attachment(attachment_gid)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentsApi->delete_attachment: %s\n" % e)
Expand Down Expand Up @@ -144,8 +144,8 @@ attachment_gid = '12345' # str | Globally unique identifier for the attachment.
opt_fields = ["connected_to_app","created_at","download_url","host","name","parent","parent.name","parent.resource_subtype","permanent_url","resource_subtype","size","view_url"] # 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. (optional)

try:
# Get an attachment
api_response = api_instance.get_attachment(attachment_gid, opt_fields=opt_fields)
# Get an attachment
api_response = api_instance.get_attachment(attachment_gid, opt_fields=opt_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentsApi->get_attachment: %s\n" % e)
Expand Down Expand Up @@ -198,8 +198,8 @@ offset = 'eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9' # str | Offset token. An offset
opt_fields = ["connected_to_app","created_at","download_url","host","name","offset","parent","parent.name","parent.resource_subtype","path","permanent_url","resource_subtype","size","uri","view_url"] # 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. (optional)

try:
# Get attachments from an object
api_response = api_instance.get_attachments_for_object(parent, limit=limit, offset=offset, opt_fields=opt_fields)
# Get attachments from an object
api_response = api_instance.get_attachments_for_object(parent, limit=limit, offset=offset, opt_fields=opt_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentsApi->get_attachments_for_object: %s\n" % e)
Expand Down
16 changes: 8 additions & 8 deletions docs/AttachmentsApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ AttachmentsApi:
opt_fields = ["connected_to_app","created_at","download_url","host","name","parent","parent.name","parent.resource_subtype","permanent_url","resource_subtype","size","view_url"] # 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. (optional)
try:
# Upload an attachment
api_response = api_instance.create_attachment_for_object(resource_subtype=resource_subtype, file=file, parent=parent, url=url, name=name, connect_to_app=connect_to_app, opt_fields=opt_fields)
# Upload an attachment
api_response = api_instance.create_attachment_for_object(resource_subtype=resource_subtype, file=file, parent=parent, url=url, name=name, connect_to_app=connect_to_app, opt_fields=opt_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentsApi->create_attachment_for_object: %s\n" % e)
Expand All @@ -38,8 +38,8 @@ AttachmentsApi:
attachment_gid = '12345' # str | Globally unique identifier for the attachment.
try:
# Delete an attachment
api_response = api_instance.delete_attachment(attachment_gid)
# Delete an attachment
api_response = api_instance.delete_attachment(attachment_gid)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentsApi->delete_attachment: %s\n" % e)
Expand All @@ -58,8 +58,8 @@ AttachmentsApi:
opt_fields = ["connected_to_app","created_at","download_url","host","name","parent","parent.name","parent.resource_subtype","permanent_url","resource_subtype","size","view_url"] # 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. (optional)
try:
# Get an attachment
api_response = api_instance.get_attachment(attachment_gid, opt_fields=opt_fields)
# Get an attachment
api_response = api_instance.get_attachment(attachment_gid, opt_fields=opt_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentsApi->get_attachment: %s\n" % e)
Expand All @@ -80,8 +80,8 @@ AttachmentsApi:
opt_fields = ["connected_to_app","created_at","download_url","host","name","offset","parent","parent.name","parent.resource_subtype","path","permanent_url","resource_subtype","size","uri","view_url"] # 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. (optional)
try:
# Get attachments from an object
api_response = api_instance.get_attachments_for_object(parent, limit=limit, offset=offset, opt_fields=opt_fields)
# Get attachments from an object
api_response = api_instance.get_attachments_for_object(parent, limit=limit, offset=offset, opt_fields=opt_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentsApi->get_attachments_for_object: %s\n" % e)
4 changes: 2 additions & 2 deletions docs/AuditLogAPIApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ limit = 50 # int | Results per page. The number of objects to return per page. T
offset = 'eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9' # 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.' (optional)

try:
# Get audit log events
api_response = api_instance.get_audit_log_events(workspace_gid, start_at=start_at, end_at=end_at, event_type=event_type, actor_type=actor_type, actor_gid=actor_gid, resource_gid=resource_gid, limit=limit, offset=offset)
# Get audit log events
api_response = api_instance.get_audit_log_events(workspace_gid, start_at=start_at, end_at=end_at, event_type=event_type, actor_type=actor_type, actor_gid=actor_gid, resource_gid=resource_gid, limit=limit, offset=offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuditLogAPIApi->get_audit_log_events: %s\n" % e)
Expand Down
4 changes: 2 additions & 2 deletions docs/AuditLogAPIApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ AuditLogAPIApi:
offset = 'eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9' # 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.' (optional)
try:
# Get audit log events
api_response = api_instance.get_audit_log_events(workspace_gid, start_at=start_at, end_at=end_at, event_type=event_type, actor_type=actor_type, actor_gid=actor_gid, resource_gid=resource_gid, limit=limit, offset=offset)
# Get audit log events
api_response = api_instance.get_audit_log_events(workspace_gid, start_at=start_at, end_at=end_at, event_type=event_type, actor_type=actor_type, actor_gid=actor_gid, resource_gid=resource_gid, limit=limit, offset=offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuditLogAPIApi->get_audit_log_events: %s\n" % e)
4 changes: 2 additions & 2 deletions docs/BatchAPIApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ body = asana.BatchBody({"param1": "value1", "param2": "value2",}) # BatchBody |
opt_fields = ["body","headers","status_code"] # 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. (optional)

try:
# Submit parallel requests
api_response = api_instance.create_batch_request(body, opt_fields=opt_fields)
# Submit parallel requests
api_response = api_instance.create_batch_request(body, opt_fields=opt_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling BatchAPIApi->create_batch_request: %s\n" % e)
Expand Down
4 changes: 2 additions & 2 deletions docs/BatchAPIApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ BatchAPIApi:
opt_fields = ["body","headers","status_code"] # 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. (optional)
try:
# Submit parallel requests
api_response = api_instance.create_batch_request(body, opt_fields=opt_fields)
# Submit parallel requests
api_response = api_instance.create_batch_request(body, opt_fields=opt_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling BatchAPIApi->create_batch_request: %s\n" % e)
8 changes: 4 additions & 4 deletions docs/CustomFieldSettingsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ offset = 'eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9' # str | Offset token. An offset
opt_fields = ["custom_field","custom_field.asana_created_field","custom_field.created_by","custom_field.created_by.name","custom_field.currency_code","custom_field.custom_label","custom_field.custom_label_position","custom_field.date_value","custom_field.date_value.date","custom_field.date_value.date_time","custom_field.description","custom_field.display_value","custom_field.enabled","custom_field.enum_options","custom_field.enum_options.color","custom_field.enum_options.enabled","custom_field.enum_options.name","custom_field.enum_value","custom_field.enum_value.color","custom_field.enum_value.enabled","custom_field.enum_value.name","custom_field.format","custom_field.has_notifications_enabled","custom_field.is_formula_field","custom_field.is_global_to_workspace","custom_field.is_value_read_only","custom_field.multi_enum_values","custom_field.multi_enum_values.color","custom_field.multi_enum_values.enabled","custom_field.multi_enum_values.name","custom_field.name","custom_field.number_value","custom_field.people_value","custom_field.people_value.name","custom_field.precision","custom_field.resource_subtype","custom_field.text_value","custom_field.type","is_important","offset","parent","parent.name","path","project","project.name","uri"] # 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. (optional)

try:
# Get a portfolio's custom fields
api_response = api_instance.get_custom_field_settings_for_portfolio(portfolio_gid, limit=limit, offset=offset, opt_fields=opt_fields)
# Get a portfolio's custom fields
api_response = api_instance.get_custom_field_settings_for_portfolio(portfolio_gid, limit=limit, offset=offset, opt_fields=opt_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomFieldSettingsApi->get_custom_field_settings_for_portfolio: %s\n" % e)
Expand Down Expand Up @@ -88,8 +88,8 @@ offset = 'eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9' # str | Offset token. An offset
opt_fields = ["custom_field","custom_field.asana_created_field","custom_field.created_by","custom_field.created_by.name","custom_field.currency_code","custom_field.custom_label","custom_field.custom_label_position","custom_field.date_value","custom_field.date_value.date","custom_field.date_value.date_time","custom_field.description","custom_field.display_value","custom_field.enabled","custom_field.enum_options","custom_field.enum_options.color","custom_field.enum_options.enabled","custom_field.enum_options.name","custom_field.enum_value","custom_field.enum_value.color","custom_field.enum_value.enabled","custom_field.enum_value.name","custom_field.format","custom_field.has_notifications_enabled","custom_field.is_formula_field","custom_field.is_global_to_workspace","custom_field.is_value_read_only","custom_field.multi_enum_values","custom_field.multi_enum_values.color","custom_field.multi_enum_values.enabled","custom_field.multi_enum_values.name","custom_field.name","custom_field.number_value","custom_field.people_value","custom_field.people_value.name","custom_field.precision","custom_field.resource_subtype","custom_field.text_value","custom_field.type","is_important","offset","parent","parent.name","path","project","project.name","uri"] # 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. (optional)

try:
# Get a project's custom fields
api_response = api_instance.get_custom_field_settings_for_project(project_gid, limit=limit, offset=offset, opt_fields=opt_fields)
# Get a project's custom fields
api_response = api_instance.get_custom_field_settings_for_project(project_gid, limit=limit, offset=offset, opt_fields=opt_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomFieldSettingsApi->get_custom_field_settings_for_project: %s\n" % e)
Expand Down
8 changes: 4 additions & 4 deletions docs/CustomFieldSettingsApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ CustomFieldSettingsApi:
opt_fields = ["custom_field","custom_field.asana_created_field","custom_field.created_by","custom_field.created_by.name","custom_field.currency_code","custom_field.custom_label","custom_field.custom_label_position","custom_field.date_value","custom_field.date_value.date","custom_field.date_value.date_time","custom_field.description","custom_field.display_value","custom_field.enabled","custom_field.enum_options","custom_field.enum_options.color","custom_field.enum_options.enabled","custom_field.enum_options.name","custom_field.enum_value","custom_field.enum_value.color","custom_field.enum_value.enabled","custom_field.enum_value.name","custom_field.format","custom_field.has_notifications_enabled","custom_field.is_formula_field","custom_field.is_global_to_workspace","custom_field.is_value_read_only","custom_field.multi_enum_values","custom_field.multi_enum_values.color","custom_field.multi_enum_values.enabled","custom_field.multi_enum_values.name","custom_field.name","custom_field.number_value","custom_field.people_value","custom_field.people_value.name","custom_field.precision","custom_field.resource_subtype","custom_field.text_value","custom_field.type","is_important","offset","parent","parent.name","path","project","project.name","uri"] # 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. (optional)
try:
# Get a portfolio's custom fields
api_response = api_instance.get_custom_field_settings_for_portfolio(portfolio_gid, limit=limit, offset=offset, opt_fields=opt_fields)
# Get a portfolio's custom fields
api_response = api_instance.get_custom_field_settings_for_portfolio(portfolio_gid, limit=limit, offset=offset, opt_fields=opt_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomFieldSettingsApi->get_custom_field_settings_for_portfolio: %s\n" % e)
Expand All @@ -38,8 +38,8 @@ CustomFieldSettingsApi:
opt_fields = ["custom_field","custom_field.asana_created_field","custom_field.created_by","custom_field.created_by.name","custom_field.currency_code","custom_field.custom_label","custom_field.custom_label_position","custom_field.date_value","custom_field.date_value.date","custom_field.date_value.date_time","custom_field.description","custom_field.display_value","custom_field.enabled","custom_field.enum_options","custom_field.enum_options.color","custom_field.enum_options.enabled","custom_field.enum_options.name","custom_field.enum_value","custom_field.enum_value.color","custom_field.enum_value.enabled","custom_field.enum_value.name","custom_field.format","custom_field.has_notifications_enabled","custom_field.is_formula_field","custom_field.is_global_to_workspace","custom_field.is_value_read_only","custom_field.multi_enum_values","custom_field.multi_enum_values.color","custom_field.multi_enum_values.enabled","custom_field.multi_enum_values.name","custom_field.name","custom_field.number_value","custom_field.people_value","custom_field.people_value.name","custom_field.precision","custom_field.resource_subtype","custom_field.text_value","custom_field.type","is_important","offset","parent","parent.name","path","project","project.name","uri"] # 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. (optional)
try:
# Get a project's custom fields
api_response = api_instance.get_custom_field_settings_for_project(project_gid, limit=limit, offset=offset, opt_fields=opt_fields)
# Get a project's custom fields
api_response = api_instance.get_custom_field_settings_for_project(project_gid, limit=limit, offset=offset, opt_fields=opt_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomFieldSettingsApi->get_custom_field_settings_for_project: %s\n" % e)
Loading

0 comments on commit 6a23ba3

Please sign in to comment.