summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/fatcat_client/api/default_api.py291
-rw-r--r--python/tests/codegen_tests/test_default_api.py18
2 files changed, 309 insertions, 0 deletions
diff --git a/python/fatcat_client/api/default_api.py b/python/fatcat_client/api/default_api.py
index 18c7046c..7420c2ee 100644
--- a/python/fatcat_client/api/default_api.py
+++ b/python/fatcat_client/api/default_api.py
@@ -1391,6 +1391,103 @@ 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
+
+ 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)
+ >>> 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_creator_releases_with_http_info(id, **kwargs) # noqa: E501
+ else:
+ (data) = self.get_creator_releases_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
+
+ 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)
+ >>> 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_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_creator_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(
+ '/creator/{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 get_editgroup(self, id, **kwargs): # noqa: E501
"""get_editgroup # noqa: E501
@@ -1876,6 +1973,103 @@ 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
+
+ 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_work(self, id, **kwargs): # noqa: E501
"""get_work # noqa: E501
@@ -1973,6 +2167,103 @@ 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
+
+ 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
diff --git a/python/tests/codegen_tests/test_default_api.py b/python/tests/codegen_tests/test_default_api.py
index 2057339e..3fe852ad 100644
--- a/python/tests/codegen_tests/test_default_api.py
+++ b/python/tests/codegen_tests/test_default_api.py
@@ -113,6 +113,12 @@ class TestDefaultApi(unittest.TestCase):
"""
pass
+ def test_get_creator_releases(self):
+ """Test case for get_creator_releases
+
+ """
+ pass
+
def test_get_editgroup(self):
"""Test case for get_editgroup
@@ -143,12 +149,24 @@ class TestDefaultApi(unittest.TestCase):
"""
pass
+ def test_get_release_files(self):
+ """Test case for get_release_files
+
+ """
+ pass
+
def test_get_work(self):
"""Test case for get_work
"""
pass
+ def test_get_work_releases(self):
+ """Test case for get_work_releases
+
+ """
+ pass
+
def test_lookup_container(self):
"""Test case for lookup_container