Skip to content

Commit

Permalink
Merge pull request #130 from Asana/openapi-sync
Browse files Browse the repository at this point in the history
Generated from OpenAPI
  • Loading branch information
aw-asana authored Sep 28, 2021
2 parents 5f441ab + 94510dd commit 8b3f067
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.6
0.10.7
2 changes: 1 addition & 1 deletion asana/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = 'asana'
__version__ = '0.10.6'
__version__ = '0.10.7'
__license__ = 'MIT'
__copyright__ = 'Copyright 2016 Asana, Inc.'

Expand Down
14 changes: 14 additions & 0 deletions asana/resources/gen/webhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,17 @@ def get_webhooks(self, params=None, **options):
params = {}
path = "/webhooks"
return self.client.get_collection(path, params, **options)

def update_webhook(self, webhook_gid, params=None, **options):
"""Update a webhook
: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
"""
if params is None:
params = {}
path = "/webhooks/{webhook_gid}".replace("{webhook_gid}", webhook_gid)
return self.client.put(path, params, **options)
2 changes: 1 addition & 1 deletion asana/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '0.10.6'
VERSION = '0.10.7'
8 changes: 8 additions & 0 deletions samples/webhooks_sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ webhooks:
result = client.webhooks.get_webhooks({'param': 'value', 'param': 'value'}, opt_pretty=True)
update_webhook: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.webhooks.update_webhook(webhook_gid, {'field': 'value', 'field': 'value'}, opt_pretty=True)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='asana',
version='0.10.6',
version='0.10.7',
description='Asana API client',
license='MIT',
classifiers=[
Expand Down

0 comments on commit 8b3f067

Please sign in to comment.