diff --git a/VERSION b/VERSION index 6348c0f3..a9888155 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.10.6 \ No newline at end of file +0.10.7 \ No newline at end of file diff --git a/asana/__init__.py b/asana/__init__.py index 3b02dd73..89d01982 100644 --- a/asana/__init__.py +++ b/asana/__init__.py @@ -1,5 +1,5 @@ __title__ = 'asana' -__version__ = '0.10.6' +__version__ = '0.10.7' __license__ = 'MIT' __copyright__ = 'Copyright 2016 Asana, Inc.' diff --git a/asana/resources/gen/webhooks.py b/asana/resources/gen/webhooks.py index b1aea36f..29a59840 100644 --- a/asana/resources/gen/webhooks.py +++ b/asana/resources/gen/webhooks.py @@ -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) diff --git a/asana/version.py b/asana/version.py index cde6c824..ce4fc4d7 100644 --- a/asana/version.py +++ b/asana/version.py @@ -1 +1 @@ -VERSION = '0.10.6' +VERSION = '0.10.7' diff --git a/samples/webhooks_sample.yaml b/samples/webhooks_sample.yaml index c0640080..7cd66242 100644 --- a/samples/webhooks_sample.yaml +++ b/samples/webhooks_sample.yaml @@ -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) diff --git a/setup.py b/setup.py index 495b5406..068cc9c1 100755 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name='asana', - version='0.10.6', + version='0.10.7', description='Asana API client', license='MIT', classifiers=[