From 7354899493f6448bed5698ad6ade1dbebcf39379 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 7 Sep 2018 22:37:09 -0700 Subject: TODO and comment --- python/README_codegen.md | 10 + python/fatcat_client/api/default_api.py | 1948 ++++++++++++++++++------ python/tests/codegen_tests/test_default_api.py | 60 + 3 files changed, 1559 insertions(+), 459 deletions(-) (limited to 'python') diff --git a/python/README_codegen.md b/python/README_codegen.md index 393fae32..0d072dde 100644 --- a/python/README_codegen.md +++ b/python/README_codegen.md @@ -80,6 +80,11 @@ Class | Method | HTTP request | Description *DefaultApi* | [**create_release_batch**](docs/DefaultApi.md#create_release_batch) | **POST** /release/batch | *DefaultApi* | [**create_work**](docs/DefaultApi.md#create_work) | **POST** /work | *DefaultApi* | [**create_work_batch**](docs/DefaultApi.md#create_work_batch) | **POST** /work/batch | +*DefaultApi* | [**delete_container**](docs/DefaultApi.md#delete_container) | **DELETE** /container/{id} | +*DefaultApi* | [**delete_creator**](docs/DefaultApi.md#delete_creator) | **DELETE** /creator/{id} | +*DefaultApi* | [**delete_file**](docs/DefaultApi.md#delete_file) | **DELETE** /file/{id} | +*DefaultApi* | [**delete_release**](docs/DefaultApi.md#delete_release) | **DELETE** /release/{id} | +*DefaultApi* | [**delete_work**](docs/DefaultApi.md#delete_work) | **DELETE** /work/{id} | *DefaultApi* | [**get_changelog**](docs/DefaultApi.md#get_changelog) | **GET** /changelog | *DefaultApi* | [**get_changelog_entry**](docs/DefaultApi.md#get_changelog_entry) | **GET** /changelog/{id} | *DefaultApi* | [**get_container**](docs/DefaultApi.md#get_container) | **GET** /container/{id} | @@ -103,6 +108,11 @@ Class | Method | HTTP request | Description *DefaultApi* | [**lookup_creator**](docs/DefaultApi.md#lookup_creator) | **GET** /creator/lookup | *DefaultApi* | [**lookup_file**](docs/DefaultApi.md#lookup_file) | **GET** /file/lookup | *DefaultApi* | [**lookup_release**](docs/DefaultApi.md#lookup_release) | **GET** /release/lookup | +*DefaultApi* | [**update_container**](docs/DefaultApi.md#update_container) | **PUT** /container/{id} | +*DefaultApi* | [**update_creator**](docs/DefaultApi.md#update_creator) | **PUT** /creator/{id} | +*DefaultApi* | [**update_file**](docs/DefaultApi.md#update_file) | **PUT** /file/{id} | +*DefaultApi* | [**update_release**](docs/DefaultApi.md#update_release) | **PUT** /release/{id} | +*DefaultApi* | [**update_work**](docs/DefaultApi.md#update_work) | **PUT** /work/{id} | ## Documentation For Models diff --git a/python/fatcat_client/api/default_api.py b/python/fatcat_client/api/default_api.py index a0298750..23c8d7ca 100644 --- a/python/fatcat_client/api/default_api.py +++ b/python/fatcat_client/api/default_api.py @@ -1245,43 +1245,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_changelog(self, **kwargs): # noqa: E501 - """get_changelog # noqa: E501 + def delete_container(self, id, **kwargs): # noqa: E501 + """delete_container # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_changelog(async=True) + >>> thread = api.delete_container(id, async=True) >>> result = thread.get() :param async bool - :param int limit: - :return: list[ChangelogEntry] + :param str id: (required) + :param str editgroup: + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_changelog_with_http_info(**kwargs) # noqa: E501 + return self.delete_container_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_changelog_with_http_info(**kwargs) # noqa: E501 + (data) = self.delete_container_with_http_info(id, **kwargs) # noqa: E501 return data - def get_changelog_with_http_info(self, **kwargs): # noqa: E501 - """get_changelog # noqa: E501 + def delete_container_with_http_info(self, id, **kwargs): # noqa: E501 + """delete_container # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_changelog_with_http_info(async=True) + >>> thread = api.delete_container_with_http_info(id, async=True) >>> result = thread.get() :param async bool - :param int limit: - :return: list[ChangelogEntry] + :param str id: (required) + :param str editgroup: + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ - all_params = ['limit'] # noqa: E501 + all_params = ['id', 'editgroup'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1292,18 +1294,24 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_changelog" % key + " to method delete_container" % key ) params[key] = val del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete_container`") # noqa: E501 collection_formats = {} path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 + if 'editgroup' in params: + query_params.append(('editgroup', params['editgroup'])) # noqa: E501 header_params = {} @@ -1323,14 +1331,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/changelog', 'GET', + '/container/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[ChangelogEntry]', # noqa: E501 + response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1338,43 +1346,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_changelog_entry(self, id, **kwargs): # noqa: E501 - """get_changelog_entry # noqa: E501 + def delete_creator(self, id, **kwargs): # noqa: E501 + """delete_creator # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_changelog_entry(id, async=True) + >>> thread = api.delete_creator(id, async=True) >>> result = thread.get() :param async bool - :param int id: (required) - :return: ChangelogEntry + :param str id: (required) + :param str editgroup: + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_changelog_entry_with_http_info(id, **kwargs) # noqa: E501 + return self.delete_creator_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_changelog_entry_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.delete_creator_with_http_info(id, **kwargs) # noqa: E501 return data - def get_changelog_entry_with_http_info(self, id, **kwargs): # noqa: E501 - """get_changelog_entry # noqa: E501 + def delete_creator_with_http_info(self, id, **kwargs): # noqa: E501 + """delete_creator # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_changelog_entry_with_http_info(id, async=True) + >>> thread = api.delete_creator_with_http_info(id, async=True) >>> result = thread.get() :param async bool - :param int id: (required) - :return: ChangelogEntry + :param str id: (required) + :param str editgroup: + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ - all_params = ['id'] # noqa: E501 + all_params = ['id', 'editgroup'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1385,14 +1395,14 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_changelog_entry" % key + " to method delete_creator" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_changelog_entry`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_creator`") # noqa: E501 collection_formats = {} @@ -1401,6 +1411,8 @@ class DefaultApi(object): path_params['id'] = params['id'] # noqa: E501 query_params = [] + if 'editgroup' in params: + query_params.append(('editgroup', params['editgroup'])) # noqa: E501 header_params = {} @@ -1420,14 +1432,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/changelog/{id}', 'GET', + '/creator/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ChangelogEntry', # noqa: E501 + response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1435,45 +1447,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_container(self, id, **kwargs): # noqa: E501 - """get_container # noqa: E501 + def delete_file(self, id, **kwargs): # noqa: E501 + """delete_file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_container(id, async=True) + >>> thread = api.delete_file(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. - :return: ContainerEntity + :param str editgroup: + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_container_with_http_info(id, **kwargs) # noqa: E501 + return self.delete_file_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_container_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.delete_file_with_http_info(id, **kwargs) # noqa: E501 return data - def get_container_with_http_info(self, id, **kwargs): # noqa: E501 - """get_container # noqa: E501 + def delete_file_with_http_info(self, id, **kwargs): # noqa: E501 + """delete_file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_container_with_http_info(id, async=True) + >>> thread = api.delete_file_with_http_info(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. - :return: ContainerEntity + :param str editgroup: + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ - all_params = ['id', 'expand'] # noqa: E501 + all_params = ['id', 'editgroup'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1484,14 +1496,14 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_container" % key + " to method delete_file" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_container`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_file`") # noqa: E501 collection_formats = {} @@ -1500,8 +1512,8 @@ class DefaultApi(object): path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 + if 'editgroup' in params: + query_params.append(('editgroup', params['editgroup'])) # noqa: E501 header_params = {} @@ -1521,14 +1533,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/container/{id}', 'GET', + '/file/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ContainerEntity', # noqa: E501 + response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1536,45 +1548,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_container_history(self, id, **kwargs): # noqa: E501 - """get_container_history # noqa: E501 + def delete_release(self, id, **kwargs): # noqa: E501 + """delete_release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_container_history(id, async=True) + >>> thread = api.delete_release(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :param int limit: - :return: list[EntityHistoryEntry] + :param str editgroup: + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_container_history_with_http_info(id, **kwargs) # noqa: E501 + return self.delete_release_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_container_history_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.delete_release_with_http_info(id, **kwargs) # noqa: E501 return data - def get_container_history_with_http_info(self, id, **kwargs): # noqa: E501 - """get_container_history # noqa: E501 + def delete_release_with_http_info(self, id, **kwargs): # noqa: E501 + """delete_release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_container_history_with_http_info(id, async=True) + >>> thread = api.delete_release_with_http_info(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :param int limit: - :return: list[EntityHistoryEntry] + :param str editgroup: + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ - all_params = ['id', 'limit'] # noqa: E501 + all_params = ['id', 'editgroup'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1585,14 +1597,14 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_container_history" % key + " to method delete_release" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_container_history`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_release`") # noqa: E501 collection_formats = {} @@ -1601,8 +1613,8 @@ class DefaultApi(object): path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 + if 'editgroup' in params: + query_params.append(('editgroup', params['editgroup'])) # noqa: E501 header_params = {} @@ -1622,14 +1634,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/container/{id}/history', 'GET', + '/release/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[EntityHistoryEntry]', # noqa: E501 + response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1637,45 +1649,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_creator(self, id, **kwargs): # noqa: E501 - """get_creator # noqa: E501 + def delete_work(self, id, **kwargs): # noqa: E501 + """delete_work # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_creator(id, async=True) + >>> thread = api.delete_work(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. - :return: CreatorEntity + :param str editgroup: + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_creator_with_http_info(id, **kwargs) # noqa: E501 + return self.delete_work_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_creator_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.delete_work_with_http_info(id, **kwargs) # noqa: E501 return data - def get_creator_with_http_info(self, id, **kwargs): # noqa: E501 - """get_creator # noqa: E501 + def delete_work_with_http_info(self, id, **kwargs): # noqa: E501 + """delete_work # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_creator_with_http_info(id, async=True) + >>> thread = api.delete_work_with_http_info(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. - :return: CreatorEntity + :param str editgroup: + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ - all_params = ['id', 'expand'] # noqa: E501 + all_params = ['id', 'editgroup'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1686,14 +1698,14 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_creator" % key + " to method delete_work" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_creator`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_work`") # noqa: E501 collection_formats = {} @@ -1702,8 +1714,8 @@ class DefaultApi(object): path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 + if 'editgroup' in params: + query_params.append(('editgroup', params['editgroup'])) # noqa: E501 header_params = {} @@ -1723,14 +1735,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/creator/{id}', 'GET', + '/work/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='CreatorEntity', # noqa: E501 + response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1738,45 +1750,43 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_creator_history(self, id, **kwargs): # noqa: E501 - """get_creator_history # noqa: E501 + def get_changelog(self, **kwargs): # noqa: E501 + """get_changelog # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_creator_history(id, async=True) + >>> thread = api.get_changelog(async=True) >>> result = thread.get() :param async bool - :param str id: (required) :param int limit: - :return: list[EntityHistoryEntry] + :return: list[ChangelogEntry] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_creator_history_with_http_info(id, **kwargs) # noqa: E501 + return self.get_changelog_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_creator_history_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.get_changelog_with_http_info(**kwargs) # noqa: E501 return data - def get_creator_history_with_http_info(self, id, **kwargs): # noqa: E501 - """get_creator_history # noqa: E501 + def get_changelog_with_http_info(self, **kwargs): # noqa: E501 + """get_changelog # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_creator_history_with_http_info(id, async=True) + >>> thread = api.get_changelog_with_http_info(async=True) >>> result = thread.get() :param async bool - :param str id: (required) :param int limit: - :return: list[EntityHistoryEntry] + :return: list[ChangelogEntry] If the method is called asynchronously, returns the request thread. """ - all_params = ['id', 'limit'] # noqa: E501 + all_params = ['limit'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1787,20 +1797,14 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_creator_history" % key + " to method get_changelog" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_creator_history`") # noqa: E501 collection_formats = {} path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 query_params = [] if 'limit' in params: @@ -1824,14 +1828,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/creator/{id}/history', 'GET', + '/changelog', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[EntityHistoryEntry]', # noqa: E501 + response_type='list[ChangelogEntry]', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1839,38 +1843,38 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_creator_releases(self, id, **kwargs): # noqa: E501 - """get_creator_releases # noqa: E501 + def get_changelog_entry(self, id, **kwargs): # noqa: E501 + """get_changelog_entry # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_creator_releases(id, async=True) + >>> thread = api.get_changelog_entry(id, async=True) >>> result = thread.get() :param async bool - :param str id: (required) - :return: list[ReleaseEntity] + :param int id: (required) + :return: ChangelogEntry If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_creator_releases_with_http_info(id, **kwargs) # noqa: E501 + return self.get_changelog_entry_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_creator_releases_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.get_changelog_entry_with_http_info(id, **kwargs) # noqa: E501 return data - def get_creator_releases_with_http_info(self, id, **kwargs): # noqa: E501 - """get_creator_releases # noqa: E501 + def get_changelog_entry_with_http_info(self, id, **kwargs): # noqa: E501 + """get_changelog_entry # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_creator_releases_with_http_info(id, async=True) + >>> thread = api.get_changelog_entry_with_http_info(id, async=True) >>> result = thread.get() :param async bool - :param str id: (required) - :return: list[ReleaseEntity] + :param int id: (required) + :return: ChangelogEntry If the method is called asynchronously, returns the request thread. """ @@ -1886,14 +1890,14 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_creator_releases" % key + " to method get_changelog_entry" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_creator_releases`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_changelog_entry`") # noqa: E501 collection_formats = {} @@ -1921,14 +1925,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/creator/{id}/releases', 'GET', + '/changelog/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[ReleaseEntity]', # noqa: E501 + response_type='ChangelogEntry', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1936,43 +1940,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_editgroup(self, id, **kwargs): # noqa: E501 - """get_editgroup # noqa: E501 + def get_container(self, id, **kwargs): # noqa: E501 + """get_container # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_editgroup(id, async=True) + >>> thread = api.get_container(id, async=True) >>> result = thread.get() :param async bool - :param str id: base32-encoded unique identifier (required) - :return: Editgroup + :param str id: (required) + :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. + :return: ContainerEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_editgroup_with_http_info(id, **kwargs) # noqa: E501 + return self.get_container_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_editgroup_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.get_container_with_http_info(id, **kwargs) # noqa: E501 return data - def get_editgroup_with_http_info(self, id, **kwargs): # noqa: E501 - """get_editgroup # noqa: E501 + def get_container_with_http_info(self, id, **kwargs): # noqa: E501 + """get_container # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_editgroup_with_http_info(id, async=True) + >>> thread = api.get_container_with_http_info(id, async=True) >>> result = thread.get() :param async bool - :param str id: base32-encoded unique identifier (required) - :return: Editgroup + :param str id: (required) + :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. + :return: ContainerEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['id'] # noqa: E501 + all_params = ['id', 'expand'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1983,23 +1989,15 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_editgroup" % key + " to method get_container" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_editgroup`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_container`") # noqa: E501 - if ('id' in params and - len(params['id']) > 26): - raise ValueError("Invalid value for parameter `id` when calling `get_editgroup`, length must be less than or equal to `26`") # noqa: E501 - if ('id' in params and - len(params['id']) < 26): - raise ValueError("Invalid value for parameter `id` when calling `get_editgroup`, length must be greater than or equal to `26`") # noqa: E501 - if 'id' in params and not re.search('[a-zA-Z2-7]{26}', params['id']): # noqa: E501 - raise ValueError("Invalid value for parameter `id` when calling `get_editgroup`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -2007,6 +2005,8 @@ class DefaultApi(object): path_params['id'] = params['id'] # noqa: E501 query_params = [] + if 'expand' in params: + query_params.append(('expand', params['expand'])) # noqa: E501 header_params = {} @@ -2026,14 +2026,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/editgroup/{id}', 'GET', + '/container/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Editgroup', # noqa: E501 + response_type='ContainerEntity', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2041,43 +2041,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_editor(self, id, **kwargs): # noqa: E501 - """get_editor # noqa: E501 + def get_container_history(self, id, **kwargs): # noqa: E501 + """get_container_history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_editor(id, async=True) + >>> thread = api.get_container_history(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :return: Editor + :param int limit: + :return: list[EntityHistoryEntry] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_editor_with_http_info(id, **kwargs) # noqa: E501 + return self.get_container_history_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_editor_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.get_container_history_with_http_info(id, **kwargs) # noqa: E501 return data - def get_editor_with_http_info(self, id, **kwargs): # noqa: E501 - """get_editor # noqa: E501 - + def get_container_history_with_http_info(self, id, **kwargs): # noqa: E501 + """get_container_history # noqa: E501 + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_editor_with_http_info(id, async=True) + >>> thread = api.get_container_history_with_http_info(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :return: Editor + :param int limit: + :return: list[EntityHistoryEntry] If the method is called asynchronously, returns the request thread. """ - all_params = ['id'] # noqa: E501 + all_params = ['id', 'limit'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2088,14 +2090,14 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_editor" % key + " to method get_container_history" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_editor`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_container_history`") # noqa: E501 collection_formats = {} @@ -2104,6 +2106,8 @@ class DefaultApi(object): path_params['id'] = params['id'] # noqa: E501 query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2123,14 +2127,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/editor/{id}', 'GET', + '/container/{id}/history', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Editor', # noqa: E501 + response_type='list[EntityHistoryEntry]', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2138,43 +2142,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_editor_changelog(self, id, **kwargs): # noqa: E501 - """get_editor_changelog # noqa: E501 + def get_creator(self, id, **kwargs): # noqa: E501 + """get_creator # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_editor_changelog(id, async=True) + >>> thread = api.get_creator(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :return: list[ChangelogEntry] + :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. + :return: CreatorEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_editor_changelog_with_http_info(id, **kwargs) # noqa: E501 + return self.get_creator_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_editor_changelog_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.get_creator_with_http_info(id, **kwargs) # noqa: E501 return data - def get_editor_changelog_with_http_info(self, id, **kwargs): # noqa: E501 - """get_editor_changelog # noqa: E501 + def get_creator_with_http_info(self, id, **kwargs): # noqa: E501 + """get_creator # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_editor_changelog_with_http_info(id, async=True) + >>> thread = api.get_creator_with_http_info(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :return: list[ChangelogEntry] + :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. + :return: CreatorEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['id'] # noqa: E501 + all_params = ['id', 'expand'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2185,14 +2191,14 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_editor_changelog" % key + " to method get_creator" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_editor_changelog`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_creator`") # noqa: E501 collection_formats = {} @@ -2201,6 +2207,8 @@ class DefaultApi(object): path_params['id'] = params['id'] # noqa: E501 query_params = [] + if 'expand' in params: + query_params.append(('expand', params['expand'])) # noqa: E501 header_params = {} @@ -2220,14 +2228,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/editor/{id}/changelog', 'GET', + '/creator/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[ChangelogEntry]', # noqa: E501 + response_type='CreatorEntity', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2235,45 +2243,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_file(self, id, **kwargs): # noqa: E501 - """get_file # noqa: E501 + def get_creator_history(self, id, **kwargs): # noqa: E501 + """get_creator_history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_file(id, async=True) + >>> thread = api.get_creator_history(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. - :return: FileEntity + :param int limit: + :return: list[EntityHistoryEntry] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_file_with_http_info(id, **kwargs) # noqa: E501 + return self.get_creator_history_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_file_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.get_creator_history_with_http_info(id, **kwargs) # noqa: E501 return data - def get_file_with_http_info(self, id, **kwargs): # noqa: E501 - """get_file # noqa: E501 + def get_creator_history_with_http_info(self, id, **kwargs): # noqa: E501 + """get_creator_history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_file_with_http_info(id, async=True) + >>> thread = api.get_creator_history_with_http_info(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. - :return: FileEntity + :param int limit: + :return: list[EntityHistoryEntry] If the method is called asynchronously, returns the request thread. """ - all_params = ['id', 'expand'] # noqa: E501 + all_params = ['id', 'limit'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2284,14 +2292,14 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_file" % key + " to method get_creator_history" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_file`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_creator_history`") # noqa: E501 collection_formats = {} @@ -2300,8 +2308,8 @@ class DefaultApi(object): path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2321,14 +2329,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/file/{id}', 'GET', + '/creator/{id}/history', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='FileEntity', # noqa: E501 + response_type='list[EntityHistoryEntry]', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2336,45 +2344,43 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_file_history(self, id, **kwargs): # noqa: E501 - """get_file_history # noqa: E501 + def get_creator_releases(self, id, **kwargs): # noqa: E501 + """get_creator_releases # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_file_history(id, async=True) + >>> thread = api.get_creator_releases(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :param int limit: - :return: list[EntityHistoryEntry] + :return: list[ReleaseEntity] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_file_history_with_http_info(id, **kwargs) # noqa: E501 + return self.get_creator_releases_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_file_history_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.get_creator_releases_with_http_info(id, **kwargs) # noqa: E501 return data - def get_file_history_with_http_info(self, id, **kwargs): # noqa: E501 - """get_file_history # noqa: E501 + def get_creator_releases_with_http_info(self, id, **kwargs): # noqa: E501 + """get_creator_releases # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_file_history_with_http_info(id, async=True) + >>> thread = api.get_creator_releases_with_http_info(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :param int limit: - :return: list[EntityHistoryEntry] + :return: list[ReleaseEntity] If the method is called asynchronously, returns the request thread. """ - all_params = ['id', 'limit'] # noqa: E501 + all_params = ['id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2385,14 +2391,14 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_file_history" % key + " to method get_creator_releases" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_file_history`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_creator_releases`") # noqa: E501 collection_formats = {} @@ -2401,8 +2407,6 @@ class DefaultApi(object): path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2422,14 +2426,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/file/{id}/history', 'GET', + '/creator/{id}/releases', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[EntityHistoryEntry]', # noqa: E501 + response_type='list[ReleaseEntity]', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2437,45 +2441,43 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_release(self, id, **kwargs): # noqa: E501 - """get_release # noqa: E501 + def get_editgroup(self, id, **kwargs): # noqa: E501 + """get_editgroup # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_release(id, async=True) + >>> thread = api.get_editgroup(id, async=True) >>> result = thread.get() :param async bool - :param str id: (required) - :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. - :return: ReleaseEntity + :param str id: base32-encoded unique identifier (required) + :return: Editgroup If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_release_with_http_info(id, **kwargs) # noqa: E501 + return self.get_editgroup_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_release_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.get_editgroup_with_http_info(id, **kwargs) # noqa: E501 return data - def get_release_with_http_info(self, id, **kwargs): # noqa: E501 - """get_release # noqa: E501 + def get_editgroup_with_http_info(self, id, **kwargs): # noqa: E501 + """get_editgroup # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_release_with_http_info(id, async=True) + >>> thread = api.get_editgroup_with_http_info(id, async=True) >>> result = thread.get() :param async bool - :param str id: (required) - :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. - :return: ReleaseEntity + :param str id: base32-encoded unique identifier (required) + :return: Editgroup If the method is called asynchronously, returns the request thread. """ - all_params = ['id', 'expand'] # noqa: E501 + all_params = ['id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2486,15 +2488,23 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_release" % key + " to method get_editgroup" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_release`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_editgroup`") # noqa: E501 + if ('id' in params and + len(params['id']) > 26): + raise ValueError("Invalid value for parameter `id` when calling `get_editgroup`, length must be less than or equal to `26`") # noqa: E501 + if ('id' in params and + len(params['id']) < 26): + raise ValueError("Invalid value for parameter `id` when calling `get_editgroup`, length must be greater than or equal to `26`") # noqa: E501 + if 'id' in params and not re.search('[a-zA-Z2-7]{26}', params['id']): # noqa: E501 + raise ValueError("Invalid value for parameter `id` when calling `get_editgroup`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -2502,8 +2512,6 @@ class DefaultApi(object): path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 header_params = {} @@ -2523,14 +2531,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/release/{id}', 'GET', + '/editgroup/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ReleaseEntity', # noqa: E501 + response_type='Editgroup', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2538,38 +2546,38 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_release_files(self, id, **kwargs): # noqa: E501 - """get_release_files # noqa: E501 + def get_editor(self, id, **kwargs): # noqa: E501 + """get_editor # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_release_files(id, async=True) + >>> thread = api.get_editor(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :return: list[FileEntity] + :return: Editor If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_release_files_with_http_info(id, **kwargs) # noqa: E501 + return self.get_editor_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_release_files_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.get_editor_with_http_info(id, **kwargs) # noqa: E501 return data - def get_release_files_with_http_info(self, id, **kwargs): # noqa: E501 - """get_release_files # noqa: E501 + def get_editor_with_http_info(self, id, **kwargs): # noqa: E501 + """get_editor # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_release_files_with_http_info(id, async=True) + >>> thread = api.get_editor_with_http_info(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :return: list[FileEntity] + :return: Editor If the method is called asynchronously, returns the request thread. """ @@ -2585,14 +2593,14 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_release_files" % key + " to method get_editor" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_release_files`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_editor`") # noqa: E501 collection_formats = {} @@ -2620,14 +2628,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/release/{id}/files', 'GET', + '/editor/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[FileEntity]', # noqa: E501 + response_type='Editor', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2635,45 +2643,43 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_release_history(self, id, **kwargs): # noqa: E501 - """get_release_history # noqa: E501 + def get_editor_changelog(self, id, **kwargs): # noqa: E501 + """get_editor_changelog # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_release_history(id, async=True) + >>> thread = api.get_editor_changelog(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :param int limit: - :return: list[EntityHistoryEntry] + :return: list[ChangelogEntry] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_release_history_with_http_info(id, **kwargs) # noqa: E501 + return self.get_editor_changelog_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_release_history_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.get_editor_changelog_with_http_info(id, **kwargs) # noqa: E501 return data - def get_release_history_with_http_info(self, id, **kwargs): # noqa: E501 - """get_release_history # noqa: E501 + def get_editor_changelog_with_http_info(self, id, **kwargs): # noqa: E501 + """get_editor_changelog # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_release_history_with_http_info(id, async=True) + >>> thread = api.get_editor_changelog_with_http_info(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :param int limit: - :return: list[EntityHistoryEntry] + :return: list[ChangelogEntry] If the method is called asynchronously, returns the request thread. """ - all_params = ['id', 'limit'] # noqa: E501 + all_params = ['id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2684,14 +2690,14 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_release_history" % key + " to method get_editor_changelog" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_release_history`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_editor_changelog`") # noqa: E501 collection_formats = {} @@ -2700,8 +2706,6 @@ class DefaultApi(object): path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2721,14 +2725,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/release/{id}/history', 'GET', + '/editor/{id}/changelog', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[EntityHistoryEntry]', # noqa: E501 + response_type='list[ChangelogEntry]', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2736,43 +2740,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_stats(self, **kwargs): # noqa: E501 - """get_stats # noqa: E501 + def get_file(self, id, **kwargs): # noqa: E501 + """get_file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_stats(async=True) + >>> thread = api.get_file(id, async=True) >>> result = thread.get() :param async bool - :param str more: - :return: StatsResponse + :param str id: (required) + :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. + :return: FileEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_stats_with_http_info(**kwargs) # noqa: E501 + return self.get_file_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_stats_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_file_with_http_info(id, **kwargs) # noqa: E501 return data - def get_stats_with_http_info(self, **kwargs): # noqa: E501 - """get_stats # noqa: E501 + def get_file_with_http_info(self, id, **kwargs): # noqa: E501 + """get_file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_stats_with_http_info(async=True) + >>> thread = api.get_file_with_http_info(id, async=True) >>> result = thread.get() :param async bool - :param str more: - :return: StatsResponse + :param str id: (required) + :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. + :return: FileEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['more'] # noqa: E501 + all_params = ['id', 'expand'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2783,18 +2789,24 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_stats" % key + " to method get_file" % key ) params[key] = val del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_file`") # noqa: E501 collection_formats = {} path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'more' in params: - query_params.append(('more', params['more'])) # noqa: E501 + if 'expand' in params: + query_params.append(('expand', params['expand'])) # noqa: E501 header_params = {} @@ -2814,14 +2826,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/stats', 'GET', + '/file/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='StatsResponse', # noqa: E501 + response_type='FileEntity', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2829,40 +2841,141 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_work(self, id, **kwargs): # noqa: E501 - """get_work # noqa: E501 + def get_file_history(self, id, **kwargs): # noqa: E501 + """get_file_history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_work(id, async=True) + >>> thread = api.get_file_history(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :return: list[EntityHistoryEntry] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_file_history_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_file_history_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_file_history_with_http_info(self, id, **kwargs): # noqa: E501 + """get_file_history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_file_history_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :return: list[EntityHistoryEntry] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_file_history" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_file_history`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/file/{id}/history', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EntityHistoryEntry]', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_release(self, id, **kwargs): # noqa: E501 + """get_release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_release(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. - :return: WorkEntity + :return: ReleaseEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_work_with_http_info(id, **kwargs) # noqa: E501 + return self.get_release_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.get_work_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.get_release_with_http_info(id, **kwargs) # noqa: E501 return data - def get_work_with_http_info(self, id, **kwargs): # noqa: E501 - """get_work # noqa: E501 + def get_release_with_http_info(self, id, **kwargs): # noqa: E501 + """get_release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_work_with_http_info(id, async=True) + >>> thread = api.get_release_with_http_info(id, async=True) >>> result = thread.get() :param async bool :param str id: (required) :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. - :return: WorkEntity + :return: ReleaseEntity If the method is called asynchronously, returns the request thread. """ @@ -2878,24 +2991,921 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_work" % key + " to method get_release" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_work`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_release`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'expand' in params: + query_params.append(('expand', params['expand'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/release/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ReleaseEntity', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_release_files(self, id, **kwargs): # noqa: E501 + """get_release_files # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_release_files(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: list[FileEntity] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_release_files_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_release_files_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_release_files_with_http_info(self, id, **kwargs): # noqa: E501 + """get_release_files # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_release_files_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: list[FileEntity] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_release_files" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_release_files`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/release/{id}/files', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FileEntity]', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_release_history(self, id, **kwargs): # noqa: E501 + """get_release_history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_release_history(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :return: list[EntityHistoryEntry] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_release_history_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_release_history_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_release_history_with_http_info(self, id, **kwargs): # noqa: E501 + """get_release_history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_release_history_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :return: list[EntityHistoryEntry] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_release_history" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_release_history`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/release/{id}/history', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EntityHistoryEntry]', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_stats(self, **kwargs): # noqa: E501 + """get_stats # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_stats(async=True) + >>> result = thread.get() + + :param async bool + :param str more: + :return: StatsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_stats_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_stats_with_http_info(**kwargs) # noqa: E501 + return data + + def get_stats_with_http_info(self, **kwargs): # noqa: E501 + """get_stats # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_stats_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param str more: + :return: StatsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['more'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_stats" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'more' in params: + query_params.append(('more', params['more'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/stats', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StatsResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_work(self, id, **kwargs): # noqa: E501 + """get_work # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_work(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. + :return: WorkEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_work_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_work_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_work_with_http_info(self, id, **kwargs): # noqa: E501 + """get_work # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_work_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted. + :return: WorkEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'expand'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_work" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_work`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'expand' in params: + query_params.append(('expand', params['expand'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/work/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WorkEntity', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_work_history(self, id, **kwargs): # noqa: E501 + """get_work_history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_work_history(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :return: list[EntityHistoryEntry] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_work_history_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_work_history_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_work_history_with_http_info(self, id, **kwargs): # noqa: E501 + """get_work_history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_work_history_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :return: list[EntityHistoryEntry] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_work_history" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_work_history`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/work/{id}/history', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EntityHistoryEntry]', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_work_releases(self, id, **kwargs): # noqa: E501 + """get_work_releases # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_work_releases(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: list[ReleaseEntity] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_work_releases_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_work_releases_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_work_releases_with_http_info(self, id, **kwargs): # noqa: E501 + """get_work_releases # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_work_releases_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: list[ReleaseEntity] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_work_releases" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_work_releases`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/work/{id}/releases', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ReleaseEntity]', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def lookup_container(self, issnl, **kwargs): # noqa: E501 + """lookup_container # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.lookup_container(issnl, async=True) + >>> result = thread.get() + + :param async bool + :param str issnl: (required) + :return: ContainerEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.lookup_container_with_http_info(issnl, **kwargs) # noqa: E501 + else: + (data) = self.lookup_container_with_http_info(issnl, **kwargs) # noqa: E501 + return data + + def lookup_container_with_http_info(self, issnl, **kwargs): # noqa: E501 + """lookup_container # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.lookup_container_with_http_info(issnl, async=True) + >>> result = thread.get() + + :param async bool + :param str issnl: (required) + :return: ContainerEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['issnl'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method lookup_container" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'issnl' is set + if ('issnl' not in params or + params['issnl'] is None): + raise ValueError("Missing the required parameter `issnl` when calling `lookup_container`") # noqa: E501 + + if ('issnl' in params and + len(params['issnl']) > 9): + raise ValueError("Invalid value for parameter `issnl` when calling `lookup_container`, length must be less than or equal to `9`") # noqa: E501 + if ('issnl' in params and + len(params['issnl']) < 9): + raise ValueError("Invalid value for parameter `issnl` when calling `lookup_container`, length must be greater than or equal to `9`") # noqa: E501 + if 'issnl' in params and not re.search('\\d{4}-\\d{3}[0-9X]', params['issnl']): # noqa: E501 + raise ValueError("Invalid value for parameter `issnl` when calling `lookup_container`, must conform to the pattern `/\\d{4}-\\d{3}[0-9X]/`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'issnl' in params: + query_params.append(('issnl', params['issnl'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/container/lookup', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ContainerEntity', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def lookup_creator(self, orcid, **kwargs): # noqa: E501 + """lookup_creator # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.lookup_creator(orcid, async=True) + >>> result = thread.get() + + :param async bool + :param str orcid: (required) + :return: CreatorEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.lookup_creator_with_http_info(orcid, **kwargs) # noqa: E501 + else: + (data) = self.lookup_creator_with_http_info(orcid, **kwargs) # noqa: E501 + return data + + def lookup_creator_with_http_info(self, orcid, **kwargs): # noqa: E501 + """lookup_creator # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.lookup_creator_with_http_info(orcid, async=True) + >>> result = thread.get() + + :param async bool + :param str orcid: (required) + :return: CreatorEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['orcid'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method lookup_creator" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'orcid' is set + if ('orcid' not in params or + params['orcid'] is None): + raise ValueError("Missing the required parameter `orcid` when calling `lookup_creator`") # noqa: E501 + + if ('orcid' in params and + len(params['orcid']) > 19): + raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, length must be less than or equal to `19`") # noqa: E501 + if ('orcid' in params and + len(params['orcid']) < 19): + raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, length must be greater than or equal to `19`") # noqa: E501 + if 'orcid' in params and not re.search('\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]', params['orcid']): # noqa: E501 + raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, must conform to the pattern `/\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]/`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'orcid' in params: + query_params.append(('orcid', params['orcid'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/creator/lookup', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CreatorEntity', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def lookup_file(self, sha1, **kwargs): # noqa: E501 + """lookup_file # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.lookup_file(sha1, async=True) + >>> result = thread.get() + + :param async bool + :param str sha1: (required) + :return: FileEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.lookup_file_with_http_info(sha1, **kwargs) # noqa: E501 + else: + (data) = self.lookup_file_with_http_info(sha1, **kwargs) # noqa: E501 + return data + + def lookup_file_with_http_info(self, sha1, **kwargs): # noqa: E501 + """lookup_file # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.lookup_file_with_http_info(sha1, async=True) + >>> result = thread.get() + + :param async bool + :param str sha1: (required) + :return: FileEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['sha1'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method lookup_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'sha1' is set + if ('sha1' not in params or + params['sha1'] is None): + raise ValueError("Missing the required parameter `sha1` when calling `lookup_file`") # noqa: E501 collection_formats = {} path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 + if 'sha1' in params: + query_params.append(('sha1', params['sha1'])) # noqa: E501 header_params = {} @@ -2915,14 +3925,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/work/{id}', 'GET', + '/file/lookup', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='WorkEntity', # noqa: E501 + response_type='FileEntity', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2930,45 +3940,43 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_work_history(self, id, **kwargs): # noqa: E501 - """get_work_history # noqa: E501 + def lookup_release(self, doi, **kwargs): # noqa: E501 + """lookup_release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_work_history(id, async=True) + >>> thread = api.lookup_release(doi, async=True) >>> result = thread.get() :param async bool - :param str id: (required) - :param int limit: - :return: list[EntityHistoryEntry] + :param str doi: (required) + :return: ReleaseEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_work_history_with_http_info(id, **kwargs) # noqa: E501 + return self.lookup_release_with_http_info(doi, **kwargs) # noqa: E501 else: - (data) = self.get_work_history_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.lookup_release_with_http_info(doi, **kwargs) # noqa: E501 return data - def get_work_history_with_http_info(self, id, **kwargs): # noqa: E501 - """get_work_history # noqa: E501 + def lookup_release_with_http_info(self, doi, **kwargs): # noqa: E501 + """lookup_release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_work_history_with_http_info(id, async=True) + >>> thread = api.lookup_release_with_http_info(doi, async=True) >>> result = thread.get() :param async bool - :param str id: (required) - :param int limit: - :return: list[EntityHistoryEntry] + :param str doi: (required) + :return: ReleaseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['id', 'limit'] # noqa: E501 + all_params = ['doi'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2979,24 +3987,22 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_work_history" % key + " to method lookup_release" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_work_history`") # noqa: E501 + # verify the required parameter 'doi' is set + if ('doi' not in params or + params['doi'] is None): + raise ValueError("Missing the required parameter `doi` when calling `lookup_release`") # noqa: E501 collection_formats = {} path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 + if 'doi' in params: + query_params.append(('doi', params['doi'])) # noqa: E501 header_params = {} @@ -3016,14 +4022,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/work/{id}/history', 'GET', + '/release/lookup', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[EntityHistoryEntry]', # noqa: E501 + response_type='ReleaseEntity', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3031,43 +4037,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_work_releases(self, id, **kwargs): # noqa: E501 - """get_work_releases # noqa: E501 + def update_container(self, id, entity, **kwargs): # noqa: E501 + """update_container # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_work_releases(id, async=True) + >>> thread = api.update_container(id, entity, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :return: list[ReleaseEntity] + :param ContainerEntity entity: (required) + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.get_work_releases_with_http_info(id, **kwargs) # noqa: E501 + return self.update_container_with_http_info(id, entity, **kwargs) # noqa: E501 else: - (data) = self.get_work_releases_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.update_container_with_http_info(id, entity, **kwargs) # noqa: E501 return data - def get_work_releases_with_http_info(self, id, **kwargs): # noqa: E501 - """get_work_releases # noqa: E501 + def update_container_with_http_info(self, id, entity, **kwargs): # noqa: E501 + """update_container # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.get_work_releases_with_http_info(id, async=True) + >>> thread = api.update_container_with_http_info(id, entity, async=True) >>> result = thread.get() :param async bool :param str id: (required) - :return: list[ReleaseEntity] + :param ContainerEntity entity: (required) + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ - all_params = ['id'] # noqa: E501 + all_params = ['id', 'entity'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3078,14 +4086,18 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_work_releases" % key + " to method update_container" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_work_releases`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `update_container`") # noqa: E501 + # verify the required parameter 'entity' is set + if ('entity' not in params or + params['entity'] is None): + raise ValueError("Missing the required parameter `entity` when calling `update_container`") # noqa: E501 collection_formats = {} @@ -3101,6 +4113,8 @@ class DefaultApi(object): local_var_files = {} body_params = None + if 'entity' in params: + body_params = params['entity'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -3113,14 +4127,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/work/{id}/releases', 'GET', + '/container/{id}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[ReleaseEntity]', # noqa: E501 + response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3128,43 +4142,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def lookup_container(self, issnl, **kwargs): # noqa: E501 - """lookup_container # noqa: E501 + def update_creator(self, id, entity, **kwargs): # noqa: E501 + """update_creator # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.lookup_container(issnl, async=True) + >>> thread = api.update_creator(id, entity, async=True) >>> result = thread.get() :param async bool - :param str issnl: (required) - :return: ContainerEntity + :param str id: (required) + :param CreatorEntity entity: (required) + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.lookup_container_with_http_info(issnl, **kwargs) # noqa: E501 + return self.update_creator_with_http_info(id, entity, **kwargs) # noqa: E501 else: - (data) = self.lookup_container_with_http_info(issnl, **kwargs) # noqa: E501 + (data) = self.update_creator_with_http_info(id, entity, **kwargs) # noqa: E501 return data - def lookup_container_with_http_info(self, issnl, **kwargs): # noqa: E501 - """lookup_container # noqa: E501 + def update_creator_with_http_info(self, id, entity, **kwargs): # noqa: E501 + """update_creator # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.lookup_container_with_http_info(issnl, async=True) + >>> thread = api.update_creator_with_http_info(id, entity, async=True) >>> result = thread.get() :param async bool - :param str issnl: (required) - :return: ContainerEntity + :param str id: (required) + :param CreatorEntity entity: (required) + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ - all_params = ['issnl'] # noqa: E501 + all_params = ['id', 'entity'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3175,30 +4191,26 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method lookup_container" % key + " to method update_creator" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'issnl' is set - if ('issnl' not in params or - params['issnl'] is None): - raise ValueError("Missing the required parameter `issnl` when calling `lookup_container`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `update_creator`") # noqa: E501 + # verify the required parameter 'entity' is set + if ('entity' not in params or + params['entity'] is None): + raise ValueError("Missing the required parameter `entity` when calling `update_creator`") # noqa: E501 - if ('issnl' in params and - len(params['issnl']) > 9): - raise ValueError("Invalid value for parameter `issnl` when calling `lookup_container`, length must be less than or equal to `9`") # noqa: E501 - if ('issnl' in params and - len(params['issnl']) < 9): - raise ValueError("Invalid value for parameter `issnl` when calling `lookup_container`, length must be greater than or equal to `9`") # noqa: E501 - if 'issnl' in params and not re.search('\\d{4}-\\d{3}[0-9X]', params['issnl']): # noqa: E501 - raise ValueError("Invalid value for parameter `issnl` when calling `lookup_container`, must conform to the pattern `/\\d{4}-\\d{3}[0-9X]/`") # noqa: E501 collection_formats = {} path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'issnl' in params: - query_params.append(('issnl', params['issnl'])) # noqa: E501 header_params = {} @@ -3206,6 +4218,8 @@ class DefaultApi(object): local_var_files = {} body_params = None + if 'entity' in params: + body_params = params['entity'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -3218,14 +4232,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/container/lookup', 'GET', + '/creator/{id}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ContainerEntity', # noqa: E501 + response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3233,43 +4247,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def lookup_creator(self, orcid, **kwargs): # noqa: E501 - """lookup_creator # noqa: E501 + def update_file(self, id, entity, **kwargs): # noqa: E501 + """update_file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.lookup_creator(orcid, async=True) + >>> thread = api.update_file(id, entity, async=True) >>> result = thread.get() :param async bool - :param str orcid: (required) - :return: CreatorEntity + :param str id: (required) + :param FileEntity entity: (required) + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.lookup_creator_with_http_info(orcid, **kwargs) # noqa: E501 + return self.update_file_with_http_info(id, entity, **kwargs) # noqa: E501 else: - (data) = self.lookup_creator_with_http_info(orcid, **kwargs) # noqa: E501 + (data) = self.update_file_with_http_info(id, entity, **kwargs) # noqa: E501 return data - def lookup_creator_with_http_info(self, orcid, **kwargs): # noqa: E501 - """lookup_creator # noqa: E501 + def update_file_with_http_info(self, id, entity, **kwargs): # noqa: E501 + """update_file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.lookup_creator_with_http_info(orcid, async=True) + >>> thread = api.update_file_with_http_info(id, entity, async=True) >>> result = thread.get() :param async bool - :param str orcid: (required) - :return: CreatorEntity + :param str id: (required) + :param FileEntity entity: (required) + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ - all_params = ['orcid'] # noqa: E501 + all_params = ['id', 'entity'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3280,30 +4296,26 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method lookup_creator" % key + " to method update_file" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'orcid' is set - if ('orcid' not in params or - params['orcid'] is None): - raise ValueError("Missing the required parameter `orcid` when calling `lookup_creator`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `update_file`") # noqa: E501 + # verify the required parameter 'entity' is set + if ('entity' not in params or + params['entity'] is None): + raise ValueError("Missing the required parameter `entity` when calling `update_file`") # noqa: E501 - if ('orcid' in params and - len(params['orcid']) > 19): - raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, length must be less than or equal to `19`") # noqa: E501 - if ('orcid' in params and - len(params['orcid']) < 19): - raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, length must be greater than or equal to `19`") # noqa: E501 - if 'orcid' in params and not re.search('\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]', params['orcid']): # noqa: E501 - raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, must conform to the pattern `/\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]/`") # noqa: E501 collection_formats = {} path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'orcid' in params: - query_params.append(('orcid', params['orcid'])) # noqa: E501 header_params = {} @@ -3311,6 +4323,8 @@ class DefaultApi(object): local_var_files = {} body_params = None + if 'entity' in params: + body_params = params['entity'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -3323,14 +4337,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/creator/lookup', 'GET', + '/file/{id}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='CreatorEntity', # noqa: E501 + response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3338,43 +4352,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def lookup_file(self, sha1, **kwargs): # noqa: E501 - """lookup_file # noqa: E501 + def update_release(self, id, entity, **kwargs): # noqa: E501 + """update_release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.lookup_file(sha1, async=True) + >>> thread = api.update_release(id, entity, async=True) >>> result = thread.get() :param async bool - :param str sha1: (required) - :return: FileEntity + :param str id: (required) + :param ReleaseEntity entity: (required) + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.lookup_file_with_http_info(sha1, **kwargs) # noqa: E501 + return self.update_release_with_http_info(id, entity, **kwargs) # noqa: E501 else: - (data) = self.lookup_file_with_http_info(sha1, **kwargs) # noqa: E501 + (data) = self.update_release_with_http_info(id, entity, **kwargs) # noqa: E501 return data - def lookup_file_with_http_info(self, sha1, **kwargs): # noqa: E501 - """lookup_file # noqa: E501 + def update_release_with_http_info(self, id, entity, **kwargs): # noqa: E501 + """update_release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.lookup_file_with_http_info(sha1, async=True) + >>> thread = api.update_release_with_http_info(id, entity, async=True) >>> result = thread.get() :param async bool - :param str sha1: (required) - :return: FileEntity + :param str id: (required) + :param ReleaseEntity entity: (required) + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ - all_params = ['sha1'] # noqa: E501 + all_params = ['id', 'entity'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3385,22 +4401,26 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method lookup_file" % key + " to method update_release" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'sha1' is set - if ('sha1' not in params or - params['sha1'] is None): - raise ValueError("Missing the required parameter `sha1` when calling `lookup_file`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `update_release`") # noqa: E501 + # verify the required parameter 'entity' is set + if ('entity' not in params or + params['entity'] is None): + raise ValueError("Missing the required parameter `entity` when calling `update_release`") # noqa: E501 collection_formats = {} path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'sha1' in params: - query_params.append(('sha1', params['sha1'])) # noqa: E501 header_params = {} @@ -3408,6 +4428,8 @@ class DefaultApi(object): local_var_files = {} body_params = None + if 'entity' in params: + body_params = params['entity'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -3420,14 +4442,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/file/lookup', 'GET', + '/release/{id}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='FileEntity', # noqa: E501 + response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3435,43 +4457,45 @@ class DefaultApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def lookup_release(self, doi, **kwargs): # noqa: E501 - """lookup_release # noqa: E501 + def update_work(self, id, entity, **kwargs): # noqa: E501 + """update_work # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.lookup_release(doi, async=True) + >>> thread = api.update_work(id, entity, async=True) >>> result = thread.get() :param async bool - :param str doi: (required) - :return: ReleaseEntity + :param str id: (required) + :param WorkEntity entity: (required) + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.lookup_release_with_http_info(doi, **kwargs) # noqa: E501 + return self.update_work_with_http_info(id, entity, **kwargs) # noqa: E501 else: - (data) = self.lookup_release_with_http_info(doi, **kwargs) # noqa: E501 + (data) = self.update_work_with_http_info(id, entity, **kwargs) # noqa: E501 return data - def lookup_release_with_http_info(self, doi, **kwargs): # noqa: E501 - """lookup_release # noqa: E501 + def update_work_with_http_info(self, id, entity, **kwargs): # noqa: E501 + """update_work # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.lookup_release_with_http_info(doi, async=True) + >>> thread = api.update_work_with_http_info(id, entity, async=True) >>> result = thread.get() :param async bool - :param str doi: (required) - :return: ReleaseEntity + :param str id: (required) + :param WorkEntity entity: (required) + :return: EntityEdit If the method is called asynchronously, returns the request thread. """ - all_params = ['doi'] # noqa: E501 + all_params = ['id', 'entity'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3482,22 +4506,26 @@ class DefaultApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method lookup_release" % key + " to method update_work" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'doi' is set - if ('doi' not in params or - params['doi'] is None): - raise ValueError("Missing the required parameter `doi` when calling `lookup_release`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `update_work`") # noqa: E501 + # verify the required parameter 'entity' is set + if ('entity' not in params or + params['entity'] is None): + raise ValueError("Missing the required parameter `entity` when calling `update_work`") # noqa: E501 collection_formats = {} path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'doi' in params: - query_params.append(('doi', params['doi'])) # noqa: E501 header_params = {} @@ -3505,6 +4533,8 @@ class DefaultApi(object): local_var_files = {} body_params = None + if 'entity' in params: + body_params = params['entity'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -3517,14 +4547,14 @@ class DefaultApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/release/lookup', 'GET', + '/work/{id}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ReleaseEntity', # noqa: E501 + response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, async=params.get('async'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/python/tests/codegen_tests/test_default_api.py b/python/tests/codegen_tests/test_default_api.py index e3008898..ec36887b 100644 --- a/python/tests/codegen_tests/test_default_api.py +++ b/python/tests/codegen_tests/test_default_api.py @@ -101,6 +101,36 @@ class TestDefaultApi(unittest.TestCase): """ pass + def test_delete_container(self): + """Test case for delete_container + + """ + pass + + def test_delete_creator(self): + """Test case for delete_creator + + """ + pass + + def test_delete_file(self): + """Test case for delete_file + + """ + pass + + def test_delete_release(self): + """Test case for delete_release + + """ + pass + + def test_delete_work(self): + """Test case for delete_work + + """ + pass + def test_get_changelog(self): """Test case for get_changelog @@ -239,6 +269,36 @@ class TestDefaultApi(unittest.TestCase): """ pass + def test_update_container(self): + """Test case for update_container + + """ + pass + + def test_update_creator(self): + """Test case for update_creator + + """ + pass + + def test_update_file(self): + """Test case for update_file + + """ + pass + + def test_update_release(self): + """Test case for update_release + + """ + pass + + def test_update_work(self): + """Test case for update_work + + """ + pass + if __name__ == '__main__': unittest.main() -- cgit v1.2.3