Skip to content

Commit 05bc2b9

Browse files
aw-asanaactions-user
authored andcommitted
Updated Python SDK: v4.0.8
1 parent f38865f commit 05bc2b9

19 files changed

+330
-43
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Python client library for Asana
44

55
- API version: 1.0
6-
- Package version: 4.0.7
6+
- Package version: 4.0.8
77

88
## Requirements.
99

asana/api/tasks_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1683,6 +1683,7 @@ def get_tasks_for_section(self, section_gid, **kwargs): # noqa: E501
16831683
:param str section_gid: The globally unique identifier for the section. (required)
16841684
:param int limit: Results per page. The number of objects to return per page. The value must be between 1 and 100.
16851685
: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.'
1686+
:param str completed_since: Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword *now*.
16861687
:param list[str] opt_fields: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
16871688
:return: TaskResponseArray
16881689
If the method is called asynchronously,
@@ -1708,13 +1709,14 @@ def get_tasks_for_section_with_http_info(self, section_gid, **kwargs): # noqa:
17081709
:param str section_gid: The globally unique identifier for the section. (required)
17091710
:param int limit: Results per page. The number of objects to return per page. The value must be between 1 and 100.
17101711
: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.'
1712+
:param str completed_since: Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword *now*.
17111713
:param list[str] opt_fields: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
17121714
:return: TaskResponseArray
17131715
If the method is called asynchronously,
17141716
returns the request thread.
17151717
"""
17161718

1717-
all_params = ['section_gid', 'limit', 'offset', 'opt_fields'] # noqa: E501
1719+
all_params = ['section_gid', 'limit', 'offset', 'completed_since', 'opt_fields'] # noqa: E501
17181720
all_params.append('async_req')
17191721
all_params.append('header_params')
17201722
all_params.append('_return_http_data_only')
@@ -1746,6 +1748,8 @@ def get_tasks_for_section_with_http_info(self, section_gid, **kwargs): # noqa:
17461748
query_params.append(('limit', params['limit'])) # noqa: E501
17471749
if 'offset' in params:
17481750
query_params.append(('offset', params['offset'])) # noqa: E501
1751+
if 'completed_since' in params:
1752+
query_params.append(('completed_since', params['completed_since'])) # noqa: E501
17491753
if 'opt_fields' in params:
17501754
query_params.append(('opt_fields', params['opt_fields'])) # noqa: E501
17511755
collection_formats['opt_fields'] = 'csv' # noqa: E501

asana/api_client.py

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

asana/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,5 +249,5 @@ def to_debug_report(self):
249249
"OS: {env}\n"\
250250
"Python Version: {pyversion}\n"\
251251
"Version of the API: 1.0\n"\
252-
"SDK Package Version: 4.0.7".\
252+
"SDK Package Version: 4.0.8".\
253253
format(env=sys.platform, pyversion=sys.version)

asana/models/project_base.py

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ class ProjectBase(object):
4646
'notes': 'str',
4747
'public': 'bool',
4848
'start_on': 'date',
49-
'default_access_level': 'str'
49+
'default_access_level': 'str',
50+
'minimum_access_level_for_customization': 'str',
51+
'minimum_access_level_for_sharing': 'str'
5052
}
5153

5254
attribute_map = {
@@ -68,10 +70,12 @@ class ProjectBase(object):
6870
'notes': 'notes',
6971
'public': 'public',
7072
'start_on': 'start_on',
71-
'default_access_level': 'default_access_level'
73+
'default_access_level': 'default_access_level',
74+
'minimum_access_level_for_customization': 'minimum_access_level_for_customization',
75+
'minimum_access_level_for_sharing': 'minimum_access_level_for_sharing'
7276
}
7377

74-
def __init__(self, gid=None, resource_type=None, name=None, archived=None, color=None, created_at=None, current_status=None, current_status_update=None, custom_field_settings=None, default_view=None, due_date=None, due_on=None, html_notes=None, members=None, modified_at=None, notes=None, public=None, start_on=None, default_access_level=None): # noqa: E501
78+
def __init__(self, gid=None, resource_type=None, name=None, archived=None, color=None, created_at=None, current_status=None, current_status_update=None, custom_field_settings=None, default_view=None, due_date=None, due_on=None, html_notes=None, members=None, modified_at=None, notes=None, public=None, start_on=None, default_access_level=None, minimum_access_level_for_customization=None, minimum_access_level_for_sharing=None): # noqa: E501
7579
"""ProjectBase - a model defined in Swagger""" # noqa: E501
7680
self._gid = None
7781
self._resource_type = None
@@ -92,6 +96,8 @@ def __init__(self, gid=None, resource_type=None, name=None, archived=None, color
9296
self._public = None
9397
self._start_on = None
9498
self._default_access_level = None
99+
self._minimum_access_level_for_customization = None
100+
self._minimum_access_level_for_sharing = None
95101
self.discriminator = None
96102
if gid is not None:
97103
self.gid = gid
@@ -131,6 +137,10 @@ def __init__(self, gid=None, resource_type=None, name=None, archived=None, color
131137
self.start_on = start_on
132138
if default_access_level is not None:
133139
self.default_access_level = default_access_level
140+
if minimum_access_level_for_customization is not None:
141+
self.minimum_access_level_for_customization = minimum_access_level_for_customization
142+
if minimum_access_level_for_sharing is not None:
143+
self.minimum_access_level_for_sharing = minimum_access_level_for_sharing
134144

135145
@property
136146
def gid(self):
@@ -583,6 +593,64 @@ def default_access_level(self, default_access_level):
583593

584594
self._default_access_level = default_access_level
585595

596+
@property
597+
def minimum_access_level_for_customization(self):
598+
"""Gets the minimum_access_level_for_customization of this ProjectBase. # noqa: E501
599+
600+
The minimum access level needed for project members to modify this project's workflow and appearance. # noqa: E501
601+
602+
:return: The minimum_access_level_for_customization of this ProjectBase. # noqa: E501
603+
:rtype: str
604+
"""
605+
return self._minimum_access_level_for_customization
606+
607+
@minimum_access_level_for_customization.setter
608+
def minimum_access_level_for_customization(self, minimum_access_level_for_customization):
609+
"""Sets the minimum_access_level_for_customization of this ProjectBase.
610+
611+
The minimum access level needed for project members to modify this project's workflow and appearance. # noqa: E501
612+
613+
:param minimum_access_level_for_customization: The minimum_access_level_for_customization of this ProjectBase. # noqa: E501
614+
:type: str
615+
"""
616+
allowed_values = ["admin", "editor"] # noqa: E501
617+
if minimum_access_level_for_customization not in allowed_values:
618+
raise ValueError(
619+
"Invalid value for `minimum_access_level_for_customization` ({0}), must be one of {1}" # noqa: E501
620+
.format(minimum_access_level_for_customization, allowed_values)
621+
)
622+
623+
self._minimum_access_level_for_customization = minimum_access_level_for_customization
624+
625+
@property
626+
def minimum_access_level_for_sharing(self):
627+
"""Gets the minimum_access_level_for_sharing of this ProjectBase. # noqa: E501
628+
629+
The minimum access level needed for project members to share the project and manage project memberships. # noqa: E501
630+
631+
:return: The minimum_access_level_for_sharing of this ProjectBase. # noqa: E501
632+
:rtype: str
633+
"""
634+
return self._minimum_access_level_for_sharing
635+
636+
@minimum_access_level_for_sharing.setter
637+
def minimum_access_level_for_sharing(self, minimum_access_level_for_sharing):
638+
"""Sets the minimum_access_level_for_sharing of this ProjectBase.
639+
640+
The minimum access level needed for project members to share the project and manage project memberships. # noqa: E501
641+
642+
:param minimum_access_level_for_sharing: The minimum_access_level_for_sharing of this ProjectBase. # noqa: E501
643+
:type: str
644+
"""
645+
allowed_values = ["admin", "editor"] # noqa: E501
646+
if minimum_access_level_for_sharing not in allowed_values:
647+
raise ValueError(
648+
"Invalid value for `minimum_access_level_for_sharing` ({0}), must be one of {1}" # noqa: E501
649+
.format(minimum_access_level_for_sharing, allowed_values)
650+
)
651+
652+
self._minimum_access_level_for_sharing = minimum_access_level_for_sharing
653+
586654
def to_dict(self):
587655
"""Returns the model properties as a dict"""
588656
result = {}

asana/models/project_request.py

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ class ProjectRequest(object):
4747
'public': 'bool',
4848
'start_on': 'date',
4949
'default_access_level': 'str',
50+
'minimum_access_level_for_customization': 'str',
51+
'minimum_access_level_for_sharing': 'str',
5052
'custom_fields': 'dict(str, str)',
5153
'followers': 'str',
5254
'owner': 'str',
@@ -74,14 +76,16 @@ class ProjectRequest(object):
7476
'public': 'public',
7577
'start_on': 'start_on',
7678
'default_access_level': 'default_access_level',
79+
'minimum_access_level_for_customization': 'minimum_access_level_for_customization',
80+
'minimum_access_level_for_sharing': 'minimum_access_level_for_sharing',
7781
'custom_fields': 'custom_fields',
7882
'followers': 'followers',
7983
'owner': 'owner',
8084
'team': 'team',
8185
'workspace': 'workspace'
8286
}
8387

84-
def __init__(self, gid=None, resource_type=None, name=None, archived=None, color=None, created_at=None, current_status=None, current_status_update=None, custom_field_settings=None, default_view=None, due_date=None, due_on=None, html_notes=None, members=None, modified_at=None, notes=None, public=None, start_on=None, default_access_level=None, custom_fields=None, followers=None, owner=None, team=None, workspace=None): # noqa: E501
88+
def __init__(self, gid=None, resource_type=None, name=None, archived=None, color=None, created_at=None, current_status=None, current_status_update=None, custom_field_settings=None, default_view=None, due_date=None, due_on=None, html_notes=None, members=None, modified_at=None, notes=None, public=None, start_on=None, default_access_level=None, minimum_access_level_for_customization=None, minimum_access_level_for_sharing=None, custom_fields=None, followers=None, owner=None, team=None, workspace=None): # noqa: E501
8589
"""ProjectRequest - a model defined in Swagger""" # noqa: E501
8690
self._gid = None
8791
self._resource_type = None
@@ -102,6 +106,8 @@ def __init__(self, gid=None, resource_type=None, name=None, archived=None, color
102106
self._public = None
103107
self._start_on = None
104108
self._default_access_level = None
109+
self._minimum_access_level_for_customization = None
110+
self._minimum_access_level_for_sharing = None
105111
self._custom_fields = None
106112
self._followers = None
107113
self._owner = None
@@ -146,6 +152,10 @@ def __init__(self, gid=None, resource_type=None, name=None, archived=None, color
146152
self.start_on = start_on
147153
if default_access_level is not None:
148154
self.default_access_level = default_access_level
155+
if minimum_access_level_for_customization is not None:
156+
self.minimum_access_level_for_customization = minimum_access_level_for_customization
157+
if minimum_access_level_for_sharing is not None:
158+
self.minimum_access_level_for_sharing = minimum_access_level_for_sharing
149159
if custom_fields is not None:
150160
self.custom_fields = custom_fields
151161
if followers is not None:
@@ -608,6 +618,64 @@ def default_access_level(self, default_access_level):
608618

609619
self._default_access_level = default_access_level
610620

621+
@property
622+
def minimum_access_level_for_customization(self):
623+
"""Gets the minimum_access_level_for_customization of this ProjectRequest. # noqa: E501
624+
625+
The minimum access level needed for project members to modify this project's workflow and appearance. # noqa: E501
626+
627+
:return: The minimum_access_level_for_customization of this ProjectRequest. # noqa: E501
628+
:rtype: str
629+
"""
630+
return self._minimum_access_level_for_customization
631+
632+
@minimum_access_level_for_customization.setter
633+
def minimum_access_level_for_customization(self, minimum_access_level_for_customization):
634+
"""Sets the minimum_access_level_for_customization of this ProjectRequest.
635+
636+
The minimum access level needed for project members to modify this project's workflow and appearance. # noqa: E501
637+
638+
:param minimum_access_level_for_customization: The minimum_access_level_for_customization of this ProjectRequest. # noqa: E501
639+
:type: str
640+
"""
641+
allowed_values = ["admin", "editor"] # noqa: E501
642+
if minimum_access_level_for_customization not in allowed_values:
643+
raise ValueError(
644+
"Invalid value for `minimum_access_level_for_customization` ({0}), must be one of {1}" # noqa: E501
645+
.format(minimum_access_level_for_customization, allowed_values)
646+
)
647+
648+
self._minimum_access_level_for_customization = minimum_access_level_for_customization
649+
650+
@property
651+
def minimum_access_level_for_sharing(self):
652+
"""Gets the minimum_access_level_for_sharing of this ProjectRequest. # noqa: E501
653+
654+
The minimum access level needed for project members to share the project and manage project memberships. # noqa: E501
655+
656+
:return: The minimum_access_level_for_sharing of this ProjectRequest. # noqa: E501
657+
:rtype: str
658+
"""
659+
return self._minimum_access_level_for_sharing
660+
661+
@minimum_access_level_for_sharing.setter
662+
def minimum_access_level_for_sharing(self, minimum_access_level_for_sharing):
663+
"""Sets the minimum_access_level_for_sharing of this ProjectRequest.
664+
665+
The minimum access level needed for project members to share the project and manage project memberships. # noqa: E501
666+
667+
:param minimum_access_level_for_sharing: The minimum_access_level_for_sharing of this ProjectRequest. # noqa: E501
668+
:type: str
669+
"""
670+
allowed_values = ["admin", "editor"] # noqa: E501
671+
if minimum_access_level_for_sharing not in allowed_values:
672+
raise ValueError(
673+
"Invalid value for `minimum_access_level_for_sharing` ({0}), must be one of {1}" # noqa: E501
674+
.format(minimum_access_level_for_sharing, allowed_values)
675+
)
676+
677+
self._minimum_access_level_for_sharing = minimum_access_level_for_sharing
678+
611679
@property
612680
def custom_fields(self):
613681
"""Gets the custom_fields of this ProjectRequest. # noqa: E501

0 commit comments

Comments
 (0)