Skip to content

Commit

Permalink
Updated Python SDK: v5.0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
1 parent a902cda commit f19e4b3
Show file tree
Hide file tree
Showing 17 changed files with 259 additions and 259 deletions.
386 changes: 193 additions & 193 deletions README.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions asana/api/allocations_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,15 +452,15 @@ def get_allocation_with_http_info(self, allocation_gid, opts, **kwargs): # noqa
def get_allocations(self, opts, **kwargs): # noqa: E501
"""Get multiple allocations # noqa: E501
Returns a list of allocations filtered to a specific project or user. # noqa: E501
Returns a list of allocations filtered to a specific project, user or placeholder. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_allocations(async_req=True)
>>> result = thread.get()
:param async_req bool
:param str parent: Globally unique identifier for the project to filter allocations by.
:param str assignee: Globally unique identifier for the user the allocation is assigned to.
:param str assignee: Globally unique identifier for the user or placeholder the allocation is assigned to.
:param str workspace: Globally unique identifier for the workspace.
:param int limit: Results per page. The number of objects to return per page. The value must be between 1 and 100.
:param str offset: 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.*
Expand All @@ -479,15 +479,15 @@ def get_allocations(self, opts, **kwargs): # noqa: E501
def get_allocations_with_http_info(self, opts, **kwargs): # noqa: E501
"""Get multiple allocations # noqa: E501
Returns a list of allocations filtered to a specific project or user. # noqa: E501
Returns a list of allocations filtered to a specific project, user or placeholder. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_allocations_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param str parent: Globally unique identifier for the project to filter allocations by.
:param str assignee: Globally unique identifier for the user the allocation is assigned to.
:param str assignee: Globally unique identifier for the user or placeholder the allocation is assigned to.
:param str workspace: Globally unique identifier for the workspace.
:param int limit: Results per page. The number of objects to return per page. The value must be between 1 and 100.
:param str offset: 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.*
Expand Down
4 changes: 2 additions & 2 deletions asana/api/attachments_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, api_client=None):
def create_attachment_for_object(self, opts, **kwargs): # noqa: E501
"""Upload an attachment # noqa: E501
Upload an attachment. This method uploads an attachment on an object and returns the compact record for the created attachment object. This is possible by either: - Providing the URL of the external resource being attached, or - Downloading the file content first and then uploading it as any other attachment. Note that it is not possible to attach files from third party services such as Dropbox, Box, Vimeo & Google Drive via the API The 100MB size limit on attachments in Asana is enforced on this endpoint. This endpoint expects a multipart/form-data encoded request containing the full contents of the file to be uploaded. Requests made should follow the HTTP/1.1 specification that line terminators are of the form `CRLF` or `\\r\\n` outlined [here](http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-01#Basic-Rules) in order for the server to reliably and properly handle the request. # noqa: E501
Upload an attachment. This method uploads an attachment on an object and returns the compact record for the created attachment object. This is possible by either: - Providing the URL of the external resource being attached, or - Downloading the file content first and then uploading it as any other attachment. Note that it is not possible to attach files from third party services such as Dropbox, Box, Vimeo & Google Drive via the API The 100MB size limit on attachments in Asana is enforced on this endpoint. This endpoint expects a multipart/form-data encoded request containing the full contents of the file to be uploaded. Requests made should follow the HTTP/1.1 specification that line terminators are of the form `CRLF` or `\\r\\n` outlined [here](http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-01#Basic-Rules) in order for the server to reliably and properly handle the request. For file names that contain non-ASCII characters, the file name should be URL-encoded. For example, a file named `résumé.pdf` should be encoded as `r%C3%A9sum%C3%A9.pdf` and the `filename` parameter in the `Content-Disposition` header should be set to the encoded file name. Below is an example of a cURL request with the `Content-Disposition` header: ``` export ASANA_PAT=\"<YOUR_ASANA_PERSONAL_ACCESS_TOKEN>\" export PARENT_ID=\"<PARENT_GID>\" export ENCODED_NAME=\"r%C3%A9sum%C3%A9.pdf\" curl --location 'https://app.asana.com/api/1.0/attachments' \\ --header 'Content-Type: multipart/form-data' \\ --header 'Accept: application/json' \\ --header \"Authorization: Bearer $ASANA_PAT\" \\ --form \"parent=$PARENT_ID\" \\ --form \"file=@/Users/exampleUser/Downloads/résumé.pdf;headers=\\\"Content-Disposition: form-data; name=\"file\"; filename=\"$ENCODED_NAME.pdf\"; filename*=UTF-8''$ENCODED_NAME.pdf\\\"\" ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_attachment_for_object(async_req=True)
Expand Down Expand Up @@ -63,7 +63,7 @@ def create_attachment_for_object(self, opts, **kwargs): # noqa: E501
def create_attachment_for_object_with_http_info(self, opts, **kwargs): # noqa: E501
"""Upload an attachment # noqa: E501
Upload an attachment. This method uploads an attachment on an object and returns the compact record for the created attachment object. This is possible by either: - Providing the URL of the external resource being attached, or - Downloading the file content first and then uploading it as any other attachment. Note that it is not possible to attach files from third party services such as Dropbox, Box, Vimeo & Google Drive via the API The 100MB size limit on attachments in Asana is enforced on this endpoint. This endpoint expects a multipart/form-data encoded request containing the full contents of the file to be uploaded. Requests made should follow the HTTP/1.1 specification that line terminators are of the form `CRLF` or `\\r\\n` outlined [here](http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-01#Basic-Rules) in order for the server to reliably and properly handle the request. # noqa: E501
Upload an attachment. This method uploads an attachment on an object and returns the compact record for the created attachment object. This is possible by either: - Providing the URL of the external resource being attached, or - Downloading the file content first and then uploading it as any other attachment. Note that it is not possible to attach files from third party services such as Dropbox, Box, Vimeo & Google Drive via the API The 100MB size limit on attachments in Asana is enforced on this endpoint. This endpoint expects a multipart/form-data encoded request containing the full contents of the file to be uploaded. Requests made should follow the HTTP/1.1 specification that line terminators are of the form `CRLF` or `\\r\\n` outlined [here](http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-01#Basic-Rules) in order for the server to reliably and properly handle the request. For file names that contain non-ASCII characters, the file name should be URL-encoded. For example, a file named `résumé.pdf` should be encoded as `r%C3%A9sum%C3%A9.pdf` and the `filename` parameter in the `Content-Disposition` header should be set to the encoded file name. Below is an example of a cURL request with the `Content-Disposition` header: ``` export ASANA_PAT=\"<YOUR_ASANA_PERSONAL_ACCESS_TOKEN>\" export PARENT_ID=\"<PARENT_GID>\" export ENCODED_NAME=\"r%C3%A9sum%C3%A9.pdf\" curl --location 'https://app.asana.com/api/1.0/attachments' \\ --header 'Content-Type: multipart/form-data' \\ --header 'Accept: application/json' \\ --header \"Authorization: Bearer $ASANA_PAT\" \\ --form \"parent=$PARENT_ID\" \\ --form \"file=@/Users/exampleUser/Downloads/résumé.pdf;headers=\\\"Content-Disposition: form-data; name=\"file\"; filename=\"$ENCODED_NAME.pdf\"; filename*=UTF-8''$ENCODED_NAME.pdf\\\"\" ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_attachment_for_object_with_http_info(async_req=True)
Expand Down
4 changes: 2 additions & 2 deletions asana/api/users_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, api_client=None):
def get_favorites_for_user(self, user_gid, resource_type, workspace, opts, **kwargs): # noqa: E501
"""Get a user's favorites # noqa: E501
Returns all of a user's favorites in the given workspace, of the given type. Results are given in order (The same order as Asana's sidebar). # noqa: E501
Returns all of a user's favorites within a specified workspace and of a given type. The results are ordered exactly as they appear in the user's Asana sidebar in the web application. Note that this endpoint currently only returns favorites for the current user (i.e., the user associated with the authentication token). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_favorites_for_user(user_gid, resource_type, workspace, async_req=True)
Expand All @@ -62,7 +62,7 @@ def get_favorites_for_user(self, user_gid, resource_type, workspace, opts, **kwa
def get_favorites_for_user_with_http_info(self, user_gid, resource_type, workspace, opts, **kwargs): # noqa: E501
"""Get a user's favorites # noqa: E501
Returns all of a user's favorites in the given workspace, of the given type. Results are given in order (The same order as Asana's sidebar). # noqa: E501
Returns all of a user's favorites within a specified workspace and of a given type. The results are ordered exactly as they appear in the user's Asana sidebar in the web application. Note that this endpoint currently only returns favorites for the current user (i.e., the user associated with the authentication token). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_favorites_for_user_with_http_info(user_gid, resource_type, workspace, async_req=True)
Expand Down
4 changes: 2 additions & 2 deletions asana/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,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/3.0.12/python'
self.user_agent = 'Swagger-Codegen/5.0.11/python'
# Add custom header
self.default_headers['X-Asana-Client-Lib'] = urlencode(
{
'language': 'Python',
'version': '3.0.12',
'version': '5.0.11',
'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 @@ -258,5 +258,5 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 1.0\n"\
"SDK Package Version: 3.0.12".\
"SDK Package Version: 5.0.11".\
format(env=sys.platform, pyversion=sys.version)
6 changes: 3 additions & 3 deletions docs/AllocationsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ dict

Get multiple allocations

Returns a list of allocations filtered to a specific project or user.
Returns a list of allocations filtered to a specific project, user or placeholder.

([more information](https://developers.asana.com/reference/getallocations))

Expand All @@ -182,7 +182,7 @@ api_client = asana.ApiClient(configuration)
allocations_api_instance = asana.AllocationsApi(api_client)
opts = {
'parent': "77688", # str | Globally unique identifier for the project to filter allocations by.
'assignee': "12345", # str | Globally unique identifier for the user the allocation is assigned to.
'assignee': "12345", # str | Globally unique identifier for the user or placeholder the allocation is assigned to.
'workspace': "98765", # str | Globally unique identifier for the workspace.
'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100.
'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.*
Expand All @@ -203,7 +203,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**parent** | **str**| Globally unique identifier for the project to filter allocations by. | [optional]
**assignee** | **str**| Globally unique identifier for the user the allocation is assigned to. | [optional]
**assignee** | **str**| Globally unique identifier for the user or placeholder the allocation is assigned to. | [optional]
**workspace** | **str**| Globally unique identifier for the workspace. | [optional]
**limit** | **int**| Results per page. The number of objects to return per page. The value must be between 1 and 100. | [optional]
**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.* | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/AllocationsApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ AllocationsApi:
allocations_api_instance = asana.AllocationsApi(api_client)
opts = {
'parent': "77688", # str | Globally unique identifier for the project to filter allocations by.
'assignee': "12345", # str | Globally unique identifier for the user the allocation is assigned to.
'assignee': "12345", # str | Globally unique identifier for the user or placeholder the allocation is assigned to.
'workspace': "98765", # str | Globally unique identifier for the workspace.
'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100.
'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.*
Expand Down
2 changes: 1 addition & 1 deletion docs/AttachmentsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Method | HTTP request | Description

Upload an attachment

Upload an attachment. This method uploads an attachment on an object and returns the compact record for the created attachment object. This is possible by either: - Providing the URL of the external resource being attached, or - Downloading the file content first and then uploading it as any other attachment. Note that it is not possible to attach files from third party services such as Dropbox, Box, Vimeo & Google Drive via the API The 100MB size limit on attachments in Asana is enforced on this endpoint. This endpoint expects a multipart/form-data encoded request containing the full contents of the file to be uploaded. Requests made should follow the HTTP/1.1 specification that line terminators are of the form `CRLF` or `\\r\\n` outlined [here](http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-01#Basic-Rules) in order for the server to reliably and properly handle the request.
Upload an attachment. This method uploads an attachment on an object and returns the compact record for the created attachment object. This is possible by either: - Providing the URL of the external resource being attached, or - Downloading the file content first and then uploading it as any other attachment. Note that it is not possible to attach files from third party services such as Dropbox, Box, Vimeo & Google Drive via the API The 100MB size limit on attachments in Asana is enforced on this endpoint. This endpoint expects a multipart/form-data encoded request containing the full contents of the file to be uploaded. Requests made should follow the HTTP/1.1 specification that line terminators are of the form `CRLF` or `\\r\\n` outlined [here](http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-01#Basic-Rules) in order for the server to reliably and properly handle the request. For file names that contain non-ASCII characters, the file name should be URL-encoded. For example, a file named `résumé.pdf` should be encoded as `r%C3%A9sum%C3%A9.pdf` and the `filename` parameter in the `Content-Disposition` header should be set to the encoded file name. Below is an example of a cURL request with the `Content-Disposition` header: ``` export ASANA_PAT=\"<YOUR_ASANA_PERSONAL_ACCESS_TOKEN>\" export PARENT_ID=\"<PARENT_GID>\" export ENCODED_NAME=\"r%C3%A9sum%C3%A9.pdf\" curl --location 'https://app.asana.com/api/1.0/attachments' \\ --header 'Content-Type: multipart/form-data' \\ --header 'Accept: application/json' \\ --header \"Authorization: Bearer $ASANA_PAT\" \\ --form \"parent=$PARENT_ID\" \\ --form \"file=@/Users/exampleUser/Downloads/résumé.pdf;headers=\\\"Content-Disposition: form-data; name=\"file\"; filename=\"$ENCODED_NAME.pdf\"; filename*=UTF-8''$ENCODED_NAME.pdf\\\"\" ```

([more information](https://developers.asana.com/reference/createattachmentforobject))

Expand Down
Loading

0 comments on commit f19e4b3

Please sign in to comment.