Skip to content

Commit 1f47580

Browse files
authored
Merge pull request #134 from Asana/openapi-sync
Generated from OpenAPI
2 parents 9b54ab9 + 8d5b6d1 commit 1f47580

9 files changed

Lines changed: 196 additions & 7 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.10.8
1+
0.10.9

asana/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__title__ = 'asana'
2-
__version__ = '0.10.8'
2+
__version__ = '0.10.9'
33
__license__ = 'MIT'
44
__copyright__ = 'Copyright 2016 Asana, Inc.'
55

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# coding=utf-8
2+
class _ProjectBriefs:
3+
4+
def __init__(self, client=None):
5+
self.client = client
6+
7+
def create_project_brief(self, project_gid, params=None, **options):
8+
"""Create a project brief
9+
:param str project_gid: (required) Globally unique identifier for the project.
10+
:param Object params: Parameters for the request
11+
:param **options
12+
- 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.
13+
- 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.
14+
:return: Object
15+
"""
16+
if params is None:
17+
params = {}
18+
path = "/projects/{project_gid}/project_briefs".replace("{project_gid}", project_gid)
19+
return self.client.post(path, params, **options)
20+
21+
def delete_project_brief(self, project_brief_gid, params=None, **options):
22+
"""Delete a project brief
23+
:param str project_brief_gid: (required) Globally unique identifier for the project brief.
24+
:param Object params: Parameters for the request
25+
:param **options
26+
- 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.
27+
- 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.
28+
:return: Object
29+
"""
30+
if params is None:
31+
params = {}
32+
path = "/project_briefs/{project_brief_gid}".replace("{project_brief_gid}", project_brief_gid)
33+
return self.client.delete(path, params, **options)
34+
35+
def get_project_brief(self, project_brief_gid, params=None, **options):
36+
"""Get a project brief
37+
:param str project_brief_gid: (required) Globally unique identifier for the project brief.
38+
:param Object params: Parameters for the request
39+
:param **options
40+
- 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.
41+
- 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.
42+
:return: Object
43+
"""
44+
if params is None:
45+
params = {}
46+
path = "/project_briefs/{project_brief_gid}".replace("{project_brief_gid}", project_brief_gid)
47+
return self.client.get(path, params, **options)
48+
49+
def update_project_brief(self, project_brief_gid, params=None, **options):
50+
"""Update a project brief
51+
:param str project_brief_gid: (required) Globally unique identifier for the project brief.
52+
:param Object params: Parameters for the request
53+
:param **options
54+
- 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.
55+
- 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.
56+
:return: Object
57+
"""
58+
if params is None:
59+
params = {}
60+
path = "/project_briefs/{project_brief_gid}".replace("{project_brief_gid}", project_brief_gid)
61+
return self.client.put(path, params, **options)
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# coding=utf-8
2+
class _StatusUpdates:
3+
4+
def __init__(self, client=None):
5+
self.client = client
6+
7+
def create_status_for_object(self, params=None, **options):
8+
"""Create a status update
9+
:param Object params: Parameters for the request
10+
:param **options
11+
- 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.'
12+
- limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
13+
- 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.
14+
- 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.
15+
:return: Object
16+
"""
17+
if params is None:
18+
params = {}
19+
path = "/status_updates"
20+
return self.client.post(path, params, **options)
21+
22+
def delete_status(self, status_gid, params=None, **options):
23+
"""Delete a status update
24+
:param str status_gid: (required) The status update to get.
25+
:param Object params: Parameters for the request
26+
:param **options
27+
- 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.
28+
- 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.
29+
:return: Object
30+
"""
31+
if params is None:
32+
params = {}
33+
path = "/status_updates/{status_gid}".replace("{status_gid}", status_gid)
34+
return self.client.delete(path, params, **options)
35+
36+
def get_status(self, status_gid, params=None, **options):
37+
"""Get a status update
38+
:param str status_gid: (required) The status update to get.
39+
:param Object params: Parameters for the request
40+
:param **options
41+
- 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.
42+
- 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.
43+
:return: Object
44+
"""
45+
if params is None:
46+
params = {}
47+
path = "/status_updates/{status_gid}".replace("{status_gid}", status_gid)
48+
return self.client.get(path, params, **options)
49+
50+
def get_statuses_for_object(self, params=None, **options):
51+
"""Get status updates from an object
52+
:param Object params: Parameters for the request
53+
- parent {str}: (required) Globally unique identifier for object to fetch statuses from.
54+
- created_since {datetime}: Only return statuses that have been created since the given time.
55+
:param **options
56+
- 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.'
57+
- limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
58+
- 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.
59+
- 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.
60+
:return: Object
61+
"""
62+
if params is None:
63+
params = {}
64+
path = "/status_updates"
65+
return self.client.get_collection(path, params, **options)

asana/resources/gen/tasks.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,15 +366,12 @@ def search_tasks_for_workspace(self, workspace_gid, params=None, **options):
366366
- tags_not {str}: Comma-separated list of tag IDs
367367
- tags_all {str}: Comma-separated list of tag IDs
368368
- teams_any {str}: Comma-separated list of team IDs
369-
- followers_any {str}: Comma-separated list of user identifiers
370369
- followers_not {str}: Comma-separated list of user identifiers
371370
- created_by_any {str}: Comma-separated list of user identifiers
372371
- created_by_not {str}: Comma-separated list of user identifiers
373372
- assigned_by_any {str}: Comma-separated list of user identifiers
374373
- assigned_by_not {str}: Comma-separated list of user identifiers
375-
- liked_by_any {str}: Comma-separated list of user identifiers
376374
- liked_by_not {str}: Comma-separated list of user identifiers
377-
- commented_on_by_any {str}: Comma-separated list of user identifiers
378375
- commented_on_by_not {str}: Comma-separated list of user identifiers
379376
- due_on_before {date}: ISO 8601 date string
380377
- due_on_after {date}: ISO 8601 date string

asana/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '0.10.8'
1+
VERSION = '0.10.9'

samples/project_briefs_sample.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
projectbriefs:
2+
create_project_brief: >-
3+
import asana
4+
5+
6+
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
7+
8+
9+
result = client.project_briefs.create_project_brief(project_gid, {'field': 'value', 'field': 'value'}, opt_pretty=True)
10+
delete_project_brief: >-
11+
import asana
12+
13+
14+
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
15+
16+
17+
result = client.project_briefs.delete_project_brief(project_brief_gid, opt_pretty=True)
18+
get_project_brief: >-
19+
import asana
20+
21+
22+
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
23+
24+
25+
result = client.project_briefs.get_project_brief(project_brief_gid, {'param': 'value', 'param': 'value'}, opt_pretty=True)
26+
update_project_brief: >-
27+
import asana
28+
29+
30+
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
31+
32+
33+
result = client.project_briefs.update_project_brief(project_brief_gid, {'field': 'value', 'field': 'value'}, opt_pretty=True)

samples/status_updates_sample.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
statusupdates:
2+
create_status_for_object: >-
3+
import asana
4+
5+
6+
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
7+
8+
9+
result = client.status_updates.create_status_for_object({'field': 'value', 'field': 'value'}, opt_pretty=True)
10+
delete_status: >-
11+
import asana
12+
13+
14+
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
15+
16+
17+
result = client.status_updates.delete_status(status_gid, opt_pretty=True)
18+
get_status: >-
19+
import asana
20+
21+
22+
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
23+
24+
25+
result = client.status_updates.get_status(status_gid, {'param': 'value', 'param': 'value'}, opt_pretty=True)
26+
get_statuses_for_object: >-
27+
import asana
28+
29+
30+
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
31+
32+
33+
result = client.status_updates.get_statuses_for_object({'param': 'value', 'param': 'value'}, opt_pretty=True)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name='asana',
13-
version='0.10.8',
13+
version='0.10.9',
1414
description='Asana API client',
1515
license='MIT',
1616
classifiers=[

0 commit comments

Comments
 (0)