aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_client
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_client')
-rw-r--r--python/fatcat_client/api/default_api.py1084
-rw-r--r--python/fatcat_client/models/creator_entity.py4
-rw-r--r--python/fatcat_client/models/release_entity.py28
3 files changed, 1106 insertions, 10 deletions
diff --git a/python/fatcat_client/api/default_api.py b/python/fatcat_client/api/default_api.py
index b7f23e25..23c8d7ca 100644
--- a/python/fatcat_client/api/default_api.py
+++ b/python/fatcat_client/api/default_api.py
@@ -245,6 +245,8 @@ class DefaultApi(object):
:param async bool
:param list[ContainerEntity] entity_list: (required)
+ :param bool autoaccept: If true, and editor is authorized, batch is accepted all at once
+ :param str editgroup: Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)
:return: list[EntityEdit]
If the method is called asynchronously,
returns the request thread.
@@ -266,12 +268,14 @@ class DefaultApi(object):
:param async bool
:param list[ContainerEntity] entity_list: (required)
+ :param bool autoaccept: If true, and editor is authorized, batch is accepted all at once
+ :param str editgroup: Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)
:return: list[EntityEdit]
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['entity_list'] # noqa: E501
+ all_params = ['entity_list', 'autoaccept', 'editgroup'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -296,6 +300,10 @@ class DefaultApi(object):
path_params = {}
query_params = []
+ if 'autoaccept' in params:
+ query_params.append(('autoaccept', params['autoaccept'])) # noqa: E501
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # noqa: E501
header_params = {}
@@ -439,6 +447,8 @@ class DefaultApi(object):
:param async bool
:param list[CreatorEntity] entity_list: (required)
+ :param bool autoaccept: If true, and editor is authorized, batch is accepted all at once
+ :param str editgroup: Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)
:return: list[EntityEdit]
If the method is called asynchronously,
returns the request thread.
@@ -460,12 +470,14 @@ class DefaultApi(object):
:param async bool
:param list[CreatorEntity] entity_list: (required)
+ :param bool autoaccept: If true, and editor is authorized, batch is accepted all at once
+ :param str editgroup: Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)
:return: list[EntityEdit]
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['entity_list'] # noqa: E501
+ all_params = ['entity_list', 'autoaccept', 'editgroup'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -490,6 +502,10 @@ class DefaultApi(object):
path_params = {}
query_params = []
+ if 'autoaccept' in params:
+ query_params.append(('autoaccept', params['autoaccept'])) # noqa: E501
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # noqa: E501
header_params = {}
@@ -730,6 +746,8 @@ class DefaultApi(object):
:param async bool
:param list[FileEntity] entity_list: (required)
+ :param bool autoaccept: If true, and editor is authorized, batch is accepted all at once
+ :param str editgroup: Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)
:return: list[EntityEdit]
If the method is called asynchronously,
returns the request thread.
@@ -751,12 +769,14 @@ class DefaultApi(object):
:param async bool
:param list[FileEntity] entity_list: (required)
+ :param bool autoaccept: If true, and editor is authorized, batch is accepted all at once
+ :param str editgroup: Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)
:return: list[EntityEdit]
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['entity_list'] # noqa: E501
+ all_params = ['entity_list', 'autoaccept', 'editgroup'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -781,6 +801,10 @@ class DefaultApi(object):
path_params = {}
query_params = []
+ if 'autoaccept' in params:
+ query_params.append(('autoaccept', params['autoaccept'])) # noqa: E501
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # noqa: E501
header_params = {}
@@ -924,6 +948,8 @@ class DefaultApi(object):
:param async bool
:param list[ReleaseEntity] entity_list: (required)
+ :param bool autoaccept: If true, and editor is authorized, batch is accepted all at once
+ :param str editgroup: Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)
:return: list[EntityEdit]
If the method is called asynchronously,
returns the request thread.
@@ -945,12 +971,14 @@ class DefaultApi(object):
:param async bool
:param list[ReleaseEntity] entity_list: (required)
+ :param bool autoaccept: If true, and editor is authorized, batch is accepted all at once
+ :param str editgroup: Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)
:return: list[EntityEdit]
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['entity_list'] # noqa: E501
+ all_params = ['entity_list', 'autoaccept', 'editgroup'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -975,6 +1003,10 @@ class DefaultApi(object):
path_params = {}
query_params = []
+ if 'autoaccept' in params:
+ query_params.append(('autoaccept', params['autoaccept'])) # noqa: E501
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # noqa: E501
header_params = {}
@@ -1118,6 +1150,8 @@ class DefaultApi(object):
:param async bool
:param list[WorkEntity] entity_list: (required)
+ :param bool autoaccept: If true, and editor is authorized, batch is accepted all at once
+ :param str editgroup: Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)
:return: list[EntityEdit]
If the method is called asynchronously,
returns the request thread.
@@ -1139,12 +1173,14 @@ class DefaultApi(object):
:param async bool
:param list[WorkEntity] entity_list: (required)
+ :param bool autoaccept: If true, and editor is authorized, batch is accepted all at once
+ :param str editgroup: Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)
:return: list[EntityEdit]
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['entity_list'] # noqa: E501
+ all_params = ['entity_list', 'autoaccept', 'editgroup'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -1169,6 +1205,10 @@ class DefaultApi(object):
path_params = {}
query_params = []
+ if 'autoaccept' in params:
+ query_params.append(('autoaccept', params['autoaccept'])) # noqa: E501
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # noqa: E501
header_params = {}
@@ -1205,6 +1245,511 @@ class DefaultApi(object):
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
+ 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.delete_container(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :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.delete_container_with_http_info(id, **kwargs) # noqa: E501
+ else:
+ (data) = self.delete_container_with_http_info(id, **kwargs) # noqa: E501
+ return data
+
+ 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.delete_container_with_http_info(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'editgroup'] # 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 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 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # 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/{id}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # 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 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.delete_creator(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :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.delete_creator_with_http_info(id, **kwargs) # noqa: E501
+ else:
+ (data) = self.delete_creator_with_http_info(id, **kwargs) # noqa: E501
+ return data
+
+ 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.delete_creator_with_http_info(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'editgroup'] # 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 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 `delete_creator`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # 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/{id}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # 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 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.delete_file(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :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.delete_file_with_http_info(id, **kwargs) # noqa: E501
+ else:
+ (data) = self.delete_file_with_http_info(id, **kwargs) # noqa: E501
+ return data
+
+ 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.delete_file_with_http_info(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'editgroup'] # 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 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 `delete_file`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # 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}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # 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 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.delete_release(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :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.delete_release_with_http_info(id, **kwargs) # noqa: E501
+ else:
+ (data) = self.delete_release_with_http_info(id, **kwargs) # noqa: E501
+ return data
+
+ 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.delete_release_with_http_info(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'editgroup'] # 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 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 `delete_release`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # 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}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # 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 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.delete_work(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :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.delete_work_with_http_info(id, **kwargs) # noqa: E501
+ else:
+ (data) = self.delete_work_with_http_info(id, **kwargs) # noqa: E501
+ return data
+
+ 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.delete_work_with_http_info(id, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param str editgroup:
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'editgroup'] # 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 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 `delete_work`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'id' in params:
+ path_params['id'] = params['id'] # noqa: E501
+
+ query_params = []
+ if 'editgroup' in params:
+ query_params.append(('editgroup', params['editgroup'])) # 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}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # 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_changelog(self, **kwargs): # noqa: E501
"""get_changelog # noqa: E501
@@ -3255,8 +3800,8 @@ class DefaultApi(object):
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{4}', 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{4}/`") # 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 = {}
@@ -3491,3 +4036,528 @@ class DefaultApi(object):
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
+
+ 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.update_container(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :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.update_container_with_http_info(id, entity, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_container_with_http_info(id, entity, **kwargs) # noqa: E501
+ return data
+
+ 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.update_container_with_http_info(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param ContainerEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'entity'] # 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 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 `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 = {}
+
+ 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
+ if 'entity' in params:
+ body_params = params['entity']
+ # 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/{id}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # 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 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.update_creator(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :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.update_creator_with_http_info(id, entity, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_creator_with_http_info(id, entity, **kwargs) # noqa: E501
+ return data
+
+ 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.update_creator_with_http_info(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param CreatorEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'entity'] # 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 update_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 `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
+
+ 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
+ if 'entity' in params:
+ body_params = params['entity']
+ # 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}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # 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 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.update_file(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :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.update_file_with_http_info(id, entity, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_file_with_http_info(id, entity, **kwargs) # noqa: E501
+ return data
+
+ 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.update_file_with_http_info(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param FileEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'entity'] # 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 update_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 `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
+
+ 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
+ if 'entity' in params:
+ body_params = params['entity']
+ # 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}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # 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 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.update_release(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :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.update_release_with_http_info(id, entity, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_release_with_http_info(id, entity, **kwargs) # noqa: E501
+ return data
+
+ 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.update_release_with_http_info(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param ReleaseEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'entity'] # 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 update_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 `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 = []
+
+ header_params = {}
+
+ form_params = []
+ 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
+
+ # 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}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # 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 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.update_work(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :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.update_work_with_http_info(id, entity, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_work_with_http_info(id, entity, **kwargs) # noqa: E501
+ return data
+
+ 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.update_work_with_http_info(id, entity, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str id: (required)
+ :param WorkEntity entity: (required)
+ :return: EntityEdit
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['id', 'entity'] # 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 update_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 `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 = []
+
+ header_params = {}
+
+ form_params = []
+ 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
+
+ # 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}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='EntityEdit', # 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)
diff --git a/python/fatcat_client/models/creator_entity.py b/python/fatcat_client/models/creator_entity.py
index a9e459ee..de096281 100644
--- a/python/fatcat_client/models/creator_entity.py
+++ b/python/fatcat_client/models/creator_entity.py
@@ -139,8 +139,8 @@ class CreatorEntity(object):
raise ValueError("Invalid value for `orcid`, length must be less than or equal to `19`") # noqa: E501
if orcid is not None and len(orcid) < 19:
raise ValueError("Invalid value for `orcid`, length must be greater than or equal to `19`") # noqa: E501
- if orcid is not None and not re.search('\\d{4}-\\d{4}-\\d{4}-\\d{4}', orcid): # noqa: E501
- raise ValueError("Invalid value for `orcid`, must be a follow pattern or equal to `/\\d{4}-\\d{4}-\\d{4}-\\d{4}/`") # noqa: E501
+ if orcid is not None and not re.search('\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]', orcid): # noqa: E501
+ raise ValueError("Invalid value for `orcid`, must be a follow pattern or equal to `/\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]/`") # noqa: E501
self._orcid = orcid
diff --git a/python/fatcat_client/models/release_entity.py b/python/fatcat_client/models/release_entity.py
index 3412ca92..79e2c64f 100644
--- a/python/fatcat_client/models/release_entity.py
+++ b/python/fatcat_client/models/release_entity.py
@@ -48,6 +48,7 @@ class ReleaseEntity(object):
'wikidata_qid': 'str',
'pmcid': 'str',
'pmid': 'str',
+ 'core_id': 'str',
'isbn13': 'str',
'doi': 'str',
'release_date': 'date',
@@ -78,6 +79,7 @@ class ReleaseEntity(object):
'wikidata_qid': 'wikidata_qid',
'pmcid': 'pmcid',
'pmid': 'pmid',
+ 'core_id': 'core_id',
'isbn13': 'isbn13',
'doi': 'doi',
'release_date': 'release_date',
@@ -96,7 +98,7 @@ class ReleaseEntity(object):
'extra': 'extra'
}
- def __init__(self, abstracts=None, refs=None, contribs=None, language=None, publisher=None, pages=None, issue=None, volume=None, wikidata_qid=None, pmcid=None, pmid=None, isbn13=None, doi=None, release_date=None, release_status=None, release_type=None, container_id=None, files=None, container=None, work_id=None, title=None, state=None, ident=None, revision=None, redirect=None, editgroup_id=None, extra=None): # noqa: E501
+ def __init__(self, abstracts=None, refs=None, contribs=None, language=None, publisher=None, pages=None, issue=None, volume=None, wikidata_qid=None, pmcid=None, pmid=None, core_id=None, isbn13=None, doi=None, release_date=None, release_status=None, release_type=None, container_id=None, files=None, container=None, work_id=None, title=None, state=None, ident=None, revision=None, redirect=None, editgroup_id=None, extra=None): # noqa: E501
"""ReleaseEntity - a model defined in Swagger""" # noqa: E501
self._abstracts = None
@@ -110,6 +112,7 @@ class ReleaseEntity(object):
self._wikidata_qid = None
self._pmcid = None
self._pmid = None
+ self._core_id = None
self._isbn13 = None
self._doi = None
self._release_date = None
@@ -150,6 +153,8 @@ class ReleaseEntity(object):
self.pmcid = pmcid
if pmid is not None:
self.pmid = pmid
+ if core_id is not None:
+ self.core_id = core_id
if isbn13 is not None:
self.isbn13 = isbn13
if doi is not None:
@@ -416,6 +421,27 @@ class ReleaseEntity(object):
self._pmid = pmid
@property
+ def core_id(self):
+ """Gets the core_id of this ReleaseEntity. # noqa: E501
+
+
+ :return: The core_id of this ReleaseEntity. # noqa: E501
+ :rtype: str
+ """
+ return self._core_id
+
+ @core_id.setter
+ def core_id(self, core_id):
+ """Sets the core_id of this ReleaseEntity.
+
+
+ :param core_id: The core_id of this ReleaseEntity. # noqa: E501
+ :type: str
+ """
+
+ self._core_id = core_id
+
+ @property
def isbn13(self):
"""Gets the isbn13 of this ReleaseEntity. # noqa: E501