Skip to content

Commit

Permalink
Updated Python SDK: v5.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jv-asana authored and actions-user committed Dec 16, 2023
1 parent 476d27d commit fd3bbde
Show file tree
Hide file tree
Showing 7 changed files with 206 additions and 198 deletions.
372 changes: 186 additions & 186 deletions README.md

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions asana/api/projects_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client

def add_custom_field_setting_for_project(self, body, project_gid, **kwargs): # noqa: E501
def add_custom_field_setting_for_project(self, body, project_gid, opts, **kwargs): # noqa: E501
"""Add a custom field to a project # noqa: E501
Custom fields are associated with projects by way of custom field settings. This method creates a setting for the project. # noqa: E501
Expand All @@ -44,18 +44,19 @@ def add_custom_field_setting_for_project(self, body, project_gid, **kwargs): #
:param async_req bool
:param dict body: Information about the custom field setting. (required)
:param str project_gid: Globally unique identifier for the project. (required)
: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.
:return: CustomFieldSettingResponseData
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = kwargs.get("_return_http_data_only", True)
if kwargs.get('async_req'):
return self.add_custom_field_setting_for_project_with_http_info(body, project_gid, **kwargs) # noqa: E501
return self.add_custom_field_setting_for_project_with_http_info(body, project_gid, opts, **kwargs) # noqa: E501
else:
(data) = self.add_custom_field_setting_for_project_with_http_info(body, project_gid, **kwargs) # noqa: E501
(data) = self.add_custom_field_setting_for_project_with_http_info(body, project_gid, opts, **kwargs) # noqa: E501
return data

def add_custom_field_setting_for_project_with_http_info(self, body, project_gid, **kwargs): # noqa: E501
def add_custom_field_setting_for_project_with_http_info(self, body, project_gid, opts, **kwargs): # noqa: E501
"""Add a custom field to a project # noqa: E501
Custom fields are associated with projects by way of custom field settings. This method creates a setting for the project. # noqa: E501
Expand All @@ -67,6 +68,7 @@ def add_custom_field_setting_for_project_with_http_info(self, body, project_gid,
:param async_req bool
:param dict body: Information about the custom field setting. (required)
:param str project_gid: Globally unique identifier for the project. (required)
: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.
:return: CustomFieldSettingResponseData
If the method is called asynchronously,
returns the request thread.
Expand Down Expand Up @@ -102,6 +104,7 @@ def add_custom_field_setting_for_project_with_http_info(self, body, project_gid,
path_params['project_gid'] = project_gid # noqa: E501

query_params = {}
query_params = opts


header_params = kwargs.get("header_params", {})
Expand Down
4 changes: 2 additions & 2 deletions asana/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'Swagger-Codegen/5.0.2/python'
self.user_agent = 'Swagger-Codegen/5.0.3/python'
# Add custom header
self.default_headers['X-Asana-Client-Lib'] = urlencode(
{
'language': 'Python',
'version': '5.0.2',
'version': '5.0.3',
'language_version': platform.python_version(),
'os': platform.system(),
'os_version': platform.release()
Expand Down
2 changes: 1 addition & 1 deletion asana/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,5 +256,5 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 1.0\n"\
"SDK Package Version: 5.0.2".\
"SDK Package Version: 5.0.3".\
format(env=sys.platform, pyversion=sys.version)
7 changes: 5 additions & 2 deletions docs/ProjectsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ api_client = asana.ApiClient(configuration)
projects_api_instance = asana.ProjectsApi(api_client)
body = {"data": {"param1": "value1", "param2": "value2",}} # dict | Information about the custom field setting.
project_gid = "1331" # str | Globally unique identifier for the project.

opts = {
'opt_fields': "custom_field,custom_field.asana_created_field,custom_field.created_by,custom_field.created_by.name,custom_field.currency_code,custom_field.custom_label,custom_field.custom_label_position,custom_field.date_value,custom_field.date_value.date,custom_field.date_value.date_time,custom_field.description,custom_field.display_value,custom_field.enabled,custom_field.enum_options,custom_field.enum_options.color,custom_field.enum_options.enabled,custom_field.enum_options.name,custom_field.enum_value,custom_field.enum_value.color,custom_field.enum_value.enabled,custom_field.enum_value.name,custom_field.format,custom_field.has_notifications_enabled,custom_field.is_formula_field,custom_field.is_global_to_workspace,custom_field.is_value_read_only,custom_field.multi_enum_values,custom_field.multi_enum_values.color,custom_field.multi_enum_values.enabled,custom_field.multi_enum_values.name,custom_field.name,custom_field.number_value,custom_field.people_value,custom_field.people_value.name,custom_field.precision,custom_field.resource_subtype,custom_field.text_value,custom_field.type,is_important,parent,parent.name,project,project.name", # list[str] | 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.
}

try:
# Add a custom field to a project
api_response = projects_api_instance.add_custom_field_setting_for_project(body, project_gid)
api_response = projects_api_instance.add_custom_field_setting_for_project(body, project_gid, opts)
pprint(api_response)
except ApiException as e:
print("Exception when calling ProjectsApi->add_custom_field_setting_for_project: %s\n" % e)
Expand All @@ -62,6 +64,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **Dict**| Information about the custom field setting. |
**project_gid** | **str**| Globally unique identifier for the project. |
**opt_fields** | **Dict**| 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. | [optional]

### Return type

Expand Down
6 changes: 4 additions & 2 deletions docs/ProjectsApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ ProjectsApi:
projects_api_instance = asana.ProjectsApi(api_client)
body = {"data": {"param1": "value1", "param2": "value2",}} # dict | Information about the custom field setting.
project_gid = "1331" # str | Globally unique identifier for the project.
opts = {
'opt_fields': "custom_field,custom_field.asana_created_field,custom_field.created_by,custom_field.created_by.name,custom_field.currency_code,custom_field.custom_label,custom_field.custom_label_position,custom_field.date_value,custom_field.date_value.date,custom_field.date_value.date_time,custom_field.description,custom_field.display_value,custom_field.enabled,custom_field.enum_options,custom_field.enum_options.color,custom_field.enum_options.enabled,custom_field.enum_options.name,custom_field.enum_value,custom_field.enum_value.color,custom_field.enum_value.enabled,custom_field.enum_value.name,custom_field.format,custom_field.has_notifications_enabled,custom_field.is_formula_field,custom_field.is_global_to_workspace,custom_field.is_value_read_only,custom_field.multi_enum_values,custom_field.multi_enum_values.color,custom_field.multi_enum_values.enabled,custom_field.multi_enum_values.name,custom_field.name,custom_field.number_value,custom_field.people_value,custom_field.people_value.name,custom_field.precision,custom_field.resource_subtype,custom_field.text_value,custom_field.type,is_important,parent,parent.name,project,project.name", # list[str] | 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.
}
try:
# Add a custom field to a project
api_response = projects_api_instance.add_custom_field_setting_for_project(body, project_gid)
api_response = projects_api_instance.add_custom_field_setting_for_project(body, project_gid, opts)
pprint(api_response)
except ApiException as e:
print("Exception when calling ProjectsApi->add_custom_field_setting_for_project: %s\n" % e)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "asana"
VERSION = "5.0.2"
VERSION = "5.0.3"
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
LONG_DESCRIPTION = readme.read()
# To install the library, run the following
Expand Down

0 comments on commit fd3bbde

Please sign in to comment.