Skip to content

Commit

Permalink
Updated Python SDK: v5.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
asana-publish-client-libraries[bot] committed Aug 22, 2024
1 parent 4e750df commit 2ca9247
Show file tree
Hide file tree
Showing 14 changed files with 234 additions and 234 deletions.
386 changes: 193 additions & 193 deletions README.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions asana/api/memberships_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,14 +447,14 @@ def get_membership_with_http_info(self, membership_gid, opts, **kwargs): # noqa
def get_memberships(self, opts, **kwargs): # noqa: E501
"""Get multiple memberships # noqa: E501
Returns compact `goal_membership` or `project_membership` records. The possible types for `parent` in this request are `goal` or `project`. An additional member (user GID or team GID) can be passed in to filter to a specific membership. # noqa: E501
Returns compact `goal_membership`, `project_membership`, or `portfolio_membership` records. The possible types for `parent` in this request are `goal`, `project`, or `portfolio`. An additional member (user GID or team GID) can be passed in to filter to a specific membership. Teams are not supported for portfolios yet. # 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_memberships(async_req=True)
>>> result = thread.get()
:param async_req bool
:param str parent: Globally unique identifier for `goal` or `project`.
:param str parent: Globally unique identifier for `goal`, `project`, or `portfolio`.
:param str member: Globally unique identifier for `team` or `user`.
: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 @@ -473,14 +473,14 @@ def get_memberships(self, opts, **kwargs): # noqa: E501
def get_memberships_with_http_info(self, opts, **kwargs): # noqa: E501
"""Get multiple memberships # noqa: E501
Returns compact `goal_membership` or `project_membership` records. The possible types for `parent` in this request are `goal` or `project`. An additional member (user GID or team GID) can be passed in to filter to a specific membership. # noqa: E501
Returns compact `goal_membership`, `project_membership`, or `portfolio_membership` records. The possible types for `parent` in this request are `goal`, `project`, or `portfolio`. An additional member (user GID or team GID) can be passed in to filter to a specific membership. Teams are not supported for portfolios yet. # 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_memberships_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param str parent: Globally unique identifier for `goal` or `project`.
:param str parent: Globally unique identifier for `goal`, `project`, or `portfolio`.
:param str member: Globally unique identifier for `team` or `user`.
: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/webhooks_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_webhook(self, body, opts, **kwargs): # noqa: E501
"""Establish a webhook # noqa: E501
Establishing a webhook is a two-part process. First, a simple HTTP POST request initiates the creation similar to creating any other resource. Next, in the middle of this request comes the confirmation handshake. When a webhook is created, we will send a test POST to the target with an `X-Hook-Secret` header. The target must respond with a `200 OK` or `204 No Content` and a matching `X-Hook-Secret` header to confirm that this webhook subscription is indeed expected. We strongly recommend storing this secret to be used to verify future webhook event signatures. The POST request to create the webhook will then return with the status of the request. If you do not acknowledge the webhook’s confirmation handshake it will fail to setup, and you will receive an error in response to your attempt to create it. This means you need to be able to receive and complete the webhook *while* the POST request is in-flight (in other words, have a server that can handle requests asynchronously). Invalid hostnames like localhost will recieve a 403 Forbidden status code. ``` # Request curl -H \"Authorization: Bearer <personal_access_token>\" \\ -X POST https://app.asana.com/api/1.0/webhooks \\ -d \"resource=8675309\" \\ -d \"target=https://example.com/receive-webhook/7654\" ``` ``` # Handshake sent to https://example.com/ POST /receive-webhook/7654 X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81 ``` ``` # Handshake response sent by example.com HTTP/1.1 200 X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81 ``` ``` # Response HTTP/1.1 201 { \"data\": { \"gid\": \"43214\", \"resource\": { \"gid\": \"8675309\", \"name\": \"Bugs\" }, \"target\": \"https://example.com/receive-webhook/7654\", \"active\": false, \"last_success_at\": null, \"last_failure_at\": null, \"last_failure_content\": null }, \"X-Hook-Secret\": \"b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81\" } ``` # noqa: E501
Establishing a webhook is a two-part process. First, a simple HTTP POST request initiates the creation similar to creating any other resource. Next, in the middle of this request comes the confirmation handshake. When a webhook is created, we will send a test POST to the target with an `X-Hook-Secret` header. The target must respond with a `200 OK` or `204 No Content` and a matching `X-Hook-Secret` header to confirm that this webhook subscription is indeed expected. We strongly recommend storing this secret to be used to verify future webhook event signatures. The POST request to create the webhook will then return with the status of the request. If you do not acknowledge the webhook’s confirmation handshake it will fail to setup, and you will receive an error in response to your attempt to create it. This means you need to be able to receive and complete the webhook *while* the POST request is in-flight (in other words, have a server that can handle requests asynchronously). Invalid hostnames like localhost will receive a 403 Forbidden status code. ``` # Request curl -H \"Authorization: Bearer <personal_access_token>\" \\ -X POST https://app.asana.com/api/1.0/webhooks \\ -d \"resource=8675309\" \\ -d \"target=https://example.com/receive-webhook/7654\" ``` ``` # Handshake sent to https://example.com/ POST /receive-webhook/7654 X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81 ``` ``` # Handshake response sent by example.com HTTP/1.1 200 X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81 ``` ``` # Response HTTP/1.1 201 { \"data\": { \"gid\": \"43214\", \"resource\": { \"gid\": \"8675309\", \"name\": \"Bugs\" }, \"target\": \"https://example.com/receive-webhook/7654\", \"active\": false, \"last_success_at\": null, \"last_failure_at\": null, \"last_failure_content\": null }, \"X-Hook-Secret\": \"b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81\" } ``` # 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_webhook(body, async_req=True)
Expand All @@ -58,7 +58,7 @@ def create_webhook(self, body, opts, **kwargs): # noqa: E501
def create_webhook_with_http_info(self, body, opts, **kwargs): # noqa: E501
"""Establish a webhook # noqa: E501
Establishing a webhook is a two-part process. First, a simple HTTP POST request initiates the creation similar to creating any other resource. Next, in the middle of this request comes the confirmation handshake. When a webhook is created, we will send a test POST to the target with an `X-Hook-Secret` header. The target must respond with a `200 OK` or `204 No Content` and a matching `X-Hook-Secret` header to confirm that this webhook subscription is indeed expected. We strongly recommend storing this secret to be used to verify future webhook event signatures. The POST request to create the webhook will then return with the status of the request. If you do not acknowledge the webhook’s confirmation handshake it will fail to setup, and you will receive an error in response to your attempt to create it. This means you need to be able to receive and complete the webhook *while* the POST request is in-flight (in other words, have a server that can handle requests asynchronously). Invalid hostnames like localhost will recieve a 403 Forbidden status code. ``` # Request curl -H \"Authorization: Bearer <personal_access_token>\" \\ -X POST https://app.asana.com/api/1.0/webhooks \\ -d \"resource=8675309\" \\ -d \"target=https://example.com/receive-webhook/7654\" ``` ``` # Handshake sent to https://example.com/ POST /receive-webhook/7654 X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81 ``` ``` # Handshake response sent by example.com HTTP/1.1 200 X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81 ``` ``` # Response HTTP/1.1 201 { \"data\": { \"gid\": \"43214\", \"resource\": { \"gid\": \"8675309\", \"name\": \"Bugs\" }, \"target\": \"https://example.com/receive-webhook/7654\", \"active\": false, \"last_success_at\": null, \"last_failure_at\": null, \"last_failure_content\": null }, \"X-Hook-Secret\": \"b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81\" } ``` # noqa: E501
Establishing a webhook is a two-part process. First, a simple HTTP POST request initiates the creation similar to creating any other resource. Next, in the middle of this request comes the confirmation handshake. When a webhook is created, we will send a test POST to the target with an `X-Hook-Secret` header. The target must respond with a `200 OK` or `204 No Content` and a matching `X-Hook-Secret` header to confirm that this webhook subscription is indeed expected. We strongly recommend storing this secret to be used to verify future webhook event signatures. The POST request to create the webhook will then return with the status of the request. If you do not acknowledge the webhook’s confirmation handshake it will fail to setup, and you will receive an error in response to your attempt to create it. This means you need to be able to receive and complete the webhook *while* the POST request is in-flight (in other words, have a server that can handle requests asynchronously). Invalid hostnames like localhost will receive a 403 Forbidden status code. ``` # Request curl -H \"Authorization: Bearer <personal_access_token>\" \\ -X POST https://app.asana.com/api/1.0/webhooks \\ -d \"resource=8675309\" \\ -d \"target=https://example.com/receive-webhook/7654\" ``` ``` # Handshake sent to https://example.com/ POST /receive-webhook/7654 X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81 ``` ``` # Handshake response sent by example.com HTTP/1.1 200 X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81 ``` ``` # Response HTTP/1.1 201 { \"data\": { \"gid\": \"43214\", \"resource\": { \"gid\": \"8675309\", \"name\": \"Bugs\" }, \"target\": \"https://example.com/receive-webhook/7654\", \"active\": false, \"last_success_at\": null, \"last_failure_at\": null, \"last_failure_content\": null }, \"X-Hook-Secret\": \"b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81\" } ``` # 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_webhook_with_http_info(body, 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/5.0.8/python'
self.user_agent = 'Swagger-Codegen/5.0.9/python'
# Add custom header
self.default_headers['X-Asana-Client-Lib'] = urlencode(
{
'language': 'Python',
'version': '5.0.8',
'version': '5.0.9',
'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: 5.0.8".\
"SDK Package Version: 5.0.9".\
format(env=sys.platform, pyversion=sys.version)
6 changes: 3 additions & 3 deletions docs/MembershipsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ dict

Get multiple memberships

Returns compact `goal_membership` or `project_membership` records. The possible types for `parent` in this request are `goal` or `project`. An additional member (user GID or team GID) can be passed in to filter to a specific membership.
Returns compact `goal_membership`, `project_membership`, or `portfolio_membership` records. The possible types for `parent` in this request are `goal`, `project`, or `portfolio`. An additional member (user GID or team GID) can be passed in to filter to a specific membership. Teams are not supported for portfolios yet.

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

Expand All @@ -179,7 +179,7 @@ api_client = asana.ApiClient(configuration)
# create an instance of the API class
memberships_api_instance = asana.MembershipsApi(api_client)
opts = {
'parent': "159874", # str | Globally unique identifier for `goal` or `project`.
'parent': "159874", # str | Globally unique identifier for `goal`, `project`, or `portfolio`.
'member': "1061493", # str | Globally unique identifier for `team` or `user`.
'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 @@ -199,7 +199,7 @@ except ApiException as e:

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**parent** | **str**| Globally unique identifier for &#x60;goal&#x60; or &#x60;project&#x60;. | [optional]
**parent** | **str**| Globally unique identifier for &#x60;goal&#x60;, &#x60;project&#x60;, or &#x60;portfolio&#x60;. | [optional]
**member** | **str**| Globally unique identifier for &#x60;team&#x60; or &#x60;user&#x60;. | [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/MembershipsApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ MembershipsApi:
# create an instance of the API class
memberships_api_instance = asana.MembershipsApi(api_client)
opts = {
'parent': "159874", # str | Globally unique identifier for `goal` or `project`.
'parent': "159874", # str | Globally unique identifier for `goal`, `project`, or `portfolio`.
'member': "1061493", # str | Globally unique identifier for `team` or `user`.
'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
Loading

0 comments on commit 2ca9247

Please sign in to comment.