aboutsummaryrefslogtreecommitdiffstats
path: root/python_openapi_client/fatcat_openapi_client/api/default_api.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-10-12 17:35:20 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-10-13 16:21:30 -0700
commit6214e9f251cfa945641d9fbd2149746e83ec8331 (patch)
tree665904635db7f646b14924e94a65b89873b65038 /python_openapi_client/fatcat_openapi_client/api/default_api.py
parentf150c9f7389afaacde8a60cb933452e062aad9bb (diff)
downloadfatcat-6214e9f251cfa945641d9fbd2149746e83ec8331.tar.gz
fatcat-6214e9f251cfa945641d9fbd2149746e83ec8331.zip
python client: codegen for v0.4
Diffstat (limited to 'python_openapi_client/fatcat_openapi_client/api/default_api.py')
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/default_api.py158
1 files changed, 151 insertions, 7 deletions
diff --git a/python_openapi_client/fatcat_openapi_client/api/default_api.py b/python_openapi_client/fatcat_openapi_client/api/default_api.py
index ab2913d4..66a581f6 100644
--- a/python_openapi_client/fatcat_openapi_client/api/default_api.py
+++ b/python_openapi_client/fatcat_openapi_client/api/default_api.py
@@ -5,7 +5,7 @@
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.3
+ The version of the OpenAPI document: 0.4.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
@@ -9457,7 +9457,10 @@ class DefaultApi(object):
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str issnl:
+ :param str issnl: Linking ISSN (ISSN-L); will be one of either ISSN-E or ISSN-P
+ :param str issne: Electronic ISSN (ISSN-L)
+ :param str issnp: Print ISSN (ISSN-P)
+ :param str issn: Any of ISSN-L, ISSN-E, or ISSN-P
:param str wikidata_qid:
:param str expand: List of sub-entities to expand in response. See `get_container`.
:param str hide: List of entity fields to elide in response. See `get_container`.
@@ -9485,7 +9488,10 @@ class DefaultApi(object):
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str issnl:
+ :param str issnl: Linking ISSN (ISSN-L); will be one of either ISSN-E or ISSN-P
+ :param str issne: Electronic ISSN (ISSN-L)
+ :param str issnp: Print ISSN (ISSN-P)
+ :param str issn: Any of ISSN-L, ISSN-E, or ISSN-P
:param str wikidata_qid:
:param str expand: List of sub-entities to expand in response. See `get_container`.
:param str hide: List of entity fields to elide in response. See `get_container`.
@@ -9505,7 +9511,7 @@ class DefaultApi(object):
local_var_params = locals()
- all_params = ['issnl', 'wikidata_qid', 'expand', 'hide'] # noqa: E501
+ all_params = ['issnl', 'issne', 'issnp', 'issn', 'wikidata_qid', 'expand', 'hide'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -9527,7 +9533,31 @@ class DefaultApi(object):
len(local_var_params['issnl']) < 9):
raise ApiValueError("Invalid value for parameter `issnl` when calling `lookup_container`, length must be greater than or equal to `9`") # noqa: E501
if 'issnl' in local_var_params and not re.search(r'\d{4}-\d{3}[0-9X]', local_var_params['issnl']): # noqa: E501
- raise ApiValueError(r"Invalid value for parameter `issnl` when calling `lookup_container`, must conform to the pattern `/\d{4}-\d{3}[0-9X]/`") # noqa: E501
+ raise ApiValueError("Invalid value for parameter `issnl` when calling `lookup_container`, must conform to the pattern `/\d{4}-\d{3}[0-9X]/`") # noqa: E501
+ if ('issne' in local_var_params and
+ len(local_var_params['issne']) > 9):
+ raise ApiValueError("Invalid value for parameter `issne` when calling `lookup_container`, length must be less than or equal to `9`") # noqa: E501
+ if ('issne' in local_var_params and
+ len(local_var_params['issne']) < 9):
+ raise ApiValueError("Invalid value for parameter `issne` when calling `lookup_container`, length must be greater than or equal to `9`") # noqa: E501
+ if 'issne' in local_var_params and not re.search(r'\d{4}-\d{3}[0-9X]', local_var_params['issne']): # noqa: E501
+ raise ApiValueError("Invalid value for parameter `issne` when calling `lookup_container`, must conform to the pattern `/\d{4}-\d{3}[0-9X]/`") # noqa: E501
+ if ('issnp' in local_var_params and
+ len(local_var_params['issnp']) > 9):
+ raise ApiValueError("Invalid value for parameter `issnp` when calling `lookup_container`, length must be less than or equal to `9`") # noqa: E501
+ if ('issnp' in local_var_params and
+ len(local_var_params['issnp']) < 9):
+ raise ApiValueError("Invalid value for parameter `issnp` when calling `lookup_container`, length must be greater than or equal to `9`") # noqa: E501
+ if 'issnp' in local_var_params and not re.search(r'\d{4}-\d{3}[0-9X]', local_var_params['issnp']): # noqa: E501
+ raise ApiValueError("Invalid value for parameter `issnp` when calling `lookup_container`, must conform to the pattern `/\d{4}-\d{3}[0-9X]/`") # noqa: E501
+ if ('issn' in local_var_params and
+ len(local_var_params['issn']) > 9):
+ raise ApiValueError("Invalid value for parameter `issn` when calling `lookup_container`, length must be less than or equal to `9`") # noqa: E501
+ if ('issn' in local_var_params and
+ len(local_var_params['issn']) < 9):
+ raise ApiValueError("Invalid value for parameter `issn` when calling `lookup_container`, length must be greater than or equal to `9`") # noqa: E501
+ if 'issn' in local_var_params and not re.search(r'\d{4}-\d{3}[0-9X]', local_var_params['issn']): # noqa: E501
+ raise ApiValueError("Invalid value for parameter `issn` when calling `lookup_container`, must conform to the pattern `/\d{4}-\d{3}[0-9X]/`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -9535,6 +9565,12 @@ class DefaultApi(object):
query_params = []
if 'issnl' in local_var_params:
query_params.append(('issnl', local_var_params['issnl'])) # noqa: E501
+ if 'issne' in local_var_params:
+ query_params.append(('issne', local_var_params['issne'])) # noqa: E501
+ if 'issnp' in local_var_params:
+ query_params.append(('issnp', local_var_params['issnp'])) # noqa: E501
+ if 'issn' in local_var_params:
+ query_params.append(('issn', local_var_params['issn'])) # noqa: E501
if 'wikidata_qid' in local_var_params:
query_params.append(('wikidata_qid', local_var_params['wikidata_qid'])) # noqa: E501
if 'expand' in local_var_params:
@@ -9649,7 +9685,7 @@ class DefaultApi(object):
len(local_var_params['orcid']) < 19):
raise ApiValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, length must be greater than or equal to `19`") # noqa: E501
if 'orcid' in local_var_params and not re.search(r'\d{4}-\d{4}-\d{4}-\d{3}[\dX]', local_var_params['orcid']): # noqa: E501
- raise ApiValueError(r"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
+ raise ApiValueError("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 = {}
@@ -9693,6 +9729,110 @@ class DefaultApi(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def lookup_editor(self, **kwargs): # noqa: E501
+ """lookup_editor # noqa: E501
+
+ Fetches editor by, eg, username. One (and only one) lookup identifier should be specified per request. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.lookup_editor(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str username:
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Editor
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.lookup_editor_with_http_info(**kwargs) # noqa: E501
+
+ def lookup_editor_with_http_info(self, **kwargs): # noqa: E501
+ """lookup_editor # noqa: E501
+
+ Fetches editor by, eg, username. One (and only one) lookup identifier should be specified per request. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.lookup_editor_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str username:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(Editor, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['username'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method lookup_editor" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'username' in local_var_params:
+ query_params.append(('username', local_var_params['username'])) # 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
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/editor/lookup', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='Editor', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def lookup_file(self, **kwargs): # noqa: E501
"""lookup_file # noqa: E501
@@ -9858,6 +9998,7 @@ class DefaultApi(object):
:param str doaj:
:param str dblp:
:param str oai:
+ :param str hdl:
:param str expand: List of sub-entities to expand in response. See `get_release`.
:param str hide: List of sub-entities to elide in response. See `get_release`.
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -9897,6 +10038,7 @@ class DefaultApi(object):
:param str doaj:
:param str dblp:
:param str oai:
+ :param str hdl:
:param str expand: List of sub-entities to expand in response. See `get_release`.
:param str hide: List of sub-entities to elide in response. See `get_release`.
:param _return_http_data_only: response data without head status code
@@ -9915,7 +10057,7 @@ class DefaultApi(object):
local_var_params = locals()
- all_params = ['doi', 'wikidata_qid', 'isbn13', 'pmid', 'pmcid', 'core', 'arxiv', 'jstor', 'ark', 'mag', 'doaj', 'dblp', 'oai', 'expand', 'hide'] # noqa: E501
+ all_params = ['doi', 'wikidata_qid', 'isbn13', 'pmid', 'pmcid', 'core', 'arxiv', 'jstor', 'ark', 'mag', 'doaj', 'dblp', 'oai', 'hdl', 'expand', 'hide'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -9961,6 +10103,8 @@ class DefaultApi(object):
query_params.append(('dblp', local_var_params['dblp'])) # noqa: E501
if 'oai' in local_var_params:
query_params.append(('oai', local_var_params['oai'])) # noqa: E501
+ if 'hdl' in local_var_params:
+ query_params.append(('hdl', local_var_params['hdl'])) # noqa: E501
if 'expand' in local_var_params:
query_params.append(('expand', local_var_params['expand'])) # noqa: E501
if 'hide' in local_var_params: