Skip to content

Commit 2ca9247

Browse files
Updated Python SDK: v5.0.9
1 parent 4e750df commit 2ca9247

14 files changed

+234
-234
lines changed

README.md

Lines changed: 193 additions & 193 deletions
Large diffs are not rendered by default.

asana/api/memberships_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,14 +447,14 @@ def get_membership_with_http_info(self, membership_gid, opts, **kwargs): # noqa
447447
def get_memberships(self, opts, **kwargs): # noqa: E501
448448
"""Get multiple memberships # noqa: E501
449449
450-
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
450+
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
451451
This method makes a synchronous HTTP request by default. To make an
452452
asynchronous HTTP request, please pass async_req=True
453453
>>> thread = api.get_memberships(async_req=True)
454454
>>> result = thread.get()
455455
456456
:param async_req bool
457-
:param str parent: Globally unique identifier for `goal` or `project`.
457+
:param str parent: Globally unique identifier for `goal`, `project`, or `portfolio`.
458458
:param str member: Globally unique identifier for `team` or `user`.
459459
:param int limit: Results per page. The number of objects to return per page. The value must be between 1 and 100.
460460
: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.*
@@ -473,14 +473,14 @@ def get_memberships(self, opts, **kwargs): # noqa: E501
473473
def get_memberships_with_http_info(self, opts, **kwargs): # noqa: E501
474474
"""Get multiple memberships # noqa: E501
475475
476-
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
476+
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
477477
This method makes a synchronous HTTP request by default. To make an
478478
asynchronous HTTP request, please pass async_req=True
479479
>>> thread = api.get_memberships_with_http_info(async_req=True)
480480
>>> result = thread.get()
481481
482482
:param async_req bool
483-
:param str parent: Globally unique identifier for `goal` or `project`.
483+
:param str parent: Globally unique identifier for `goal`, `project`, or `portfolio`.
484484
:param str member: Globally unique identifier for `team` or `user`.
485485
:param int limit: Results per page. The number of objects to return per page. The value must be between 1 and 100.
486486
: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.*

asana/api/webhooks_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self, api_client=None):
3535
def create_webhook(self, body, opts, **kwargs): # noqa: E501
3636
"""Establish a webhook # noqa: E501
3737
38-
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
38+
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
3939
This method makes a synchronous HTTP request by default. To make an
4040
asynchronous HTTP request, please pass async_req=True
4141
>>> thread = api.create_webhook(body, async_req=True)
@@ -58,7 +58,7 @@ def create_webhook(self, body, opts, **kwargs): # noqa: E501
5858
def create_webhook_with_http_info(self, body, opts, **kwargs): # noqa: E501
5959
"""Establish a webhook # noqa: E501
6060
61-
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
61+
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
6262
This method makes a synchronous HTTP request by default. To make an
6363
asynchronous HTTP request, please pass async_req=True
6464
>>> thread = api.create_webhook_with_http_info(body, async_req=True)

asana/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7878
self.default_headers[header_name] = header_value
7979
self.cookie = cookie
8080
# Set default User-Agent.
81-
self.user_agent = 'Swagger-Codegen/5.0.8/python'
81+
self.user_agent = 'Swagger-Codegen/5.0.9/python'
8282
# Add custom header
8383
self.default_headers['X-Asana-Client-Lib'] = urlencode(
8484
{
8585
'language': 'Python',
86-
'version': '5.0.8',
86+
'version': '5.0.9',
8787
'language_version': platform.python_version(),
8888
'os': platform.system(),
8989
'os_version': platform.release()

asana/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,5 +258,5 @@ def to_debug_report(self):
258258
"OS: {env}\n"\
259259
"Python Version: {pyversion}\n"\
260260
"Version of the API: 1.0\n"\
261-
"SDK Package Version: 5.0.8".\
261+
"SDK Package Version: 5.0.9".\
262262
format(env=sys.platform, pyversion=sys.version)

docs/MembershipsApi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ dict
162162

163163
Get multiple memberships
164164

165-
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.
165+
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.
166166

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

@@ -179,7 +179,7 @@ api_client = asana.ApiClient(configuration)
179179
# create an instance of the API class
180180
memberships_api_instance = asana.MembershipsApi(api_client)
181181
opts = {
182-
'parent': "159874", # str | Globally unique identifier for `goal` or `project`.
182+
'parent': "159874", # str | Globally unique identifier for `goal`, `project`, or `portfolio`.
183183
'member': "1061493", # str | Globally unique identifier for `team` or `user`.
184184
'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100.
185185
'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.*
@@ -199,7 +199,7 @@ except ApiException as e:
199199

200200
Name | Type | Description | Notes
201201
------------- | ------------- | ------------- | -------------
202-
**parent** | **str**| Globally unique identifier for &#x60;goal&#x60; or &#x60;project&#x60;. | [optional]
202+
**parent** | **str**| Globally unique identifier for &#x60;goal&#x60;, &#x60;project&#x60;, or &#x60;portfolio&#x60;. | [optional]
203203
**member** | **str**| Globally unique identifier for &#x60;team&#x60; or &#x60;user&#x60;. | [optional]
204204
**limit** | **int**| Results per page. The number of objects to return per page. The value must be between 1 and 100. | [optional]
205205
**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]

docs/MembershipsApi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ MembershipsApi:
7474
# create an instance of the API class
7575
memberships_api_instance = asana.MembershipsApi(api_client)
7676
opts = {
77-
'parent': "159874", # str | Globally unique identifier for `goal` or `project`.
77+
'parent': "159874", # str | Globally unique identifier for `goal`, `project`, or `portfolio`.
7878
'member': "1061493", # str | Globally unique identifier for `team` or `user`.
7979
'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100.
8080
'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.*

0 commit comments

Comments
 (0)