aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_client
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_client')
-rw-r--r--python/fatcat_client/README.md17
-rw-r--r--python/fatcat_client/__init__.py2
-rw-r--r--python/fatcat_client/api/default_api.py369
-rw-r--r--python/fatcat_client/configuration.py7
-rw-r--r--python/fatcat_client/models/__init__.py2
-rw-r--r--python/fatcat_client/models/auth_oidc.py194
-rw-r--r--python/fatcat_client/models/auth_oidc_result.py142
-rw-r--r--python/fatcat_client/models/editgroup.py5
-rw-r--r--python/fatcat_client/models/editor.py84
9 files changed, 778 insertions, 44 deletions
diff --git a/python/fatcat_client/README.md b/python/fatcat_client/README.md
index 0f170925..8704641e 100644
--- a/python/fatcat_client/README.md
+++ b/python/fatcat_client/README.md
@@ -50,6 +50,11 @@ import time
import fatcat_client
from fatcat_client.rest import ApiException
from pprint import pprint
+
+# Configure API key authorization: Bearer
+fatcat_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# fatcat_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = fatcat_client.DefaultApi()
editgroup_id = 'editgroup_id_example' # str | base32-encoded unique identifier
@@ -69,6 +74,8 @@ All URIs are relative to *https://api.fatcat.wiki/v0*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**accept_editgroup**](docs/DefaultApi.md#accept_editgroup) | **POST** /editgroup/{editgroup_id}/accept |
+*DefaultApi* | [**auth_check**](docs/DefaultApi.md#auth_check) | **GET** /auth/check |
+*DefaultApi* | [**auth_oidc**](docs/DefaultApi.md#auth_oidc) | **POST** /auth/oidc |
*DefaultApi* | [**create_container**](docs/DefaultApi.md#create_container) | **POST** /container |
*DefaultApi* | [**create_container_batch**](docs/DefaultApi.md#create_container_batch) | **POST** /container/batch |
*DefaultApi* | [**create_creator**](docs/DefaultApi.md#create_creator) | **POST** /creator |
@@ -149,6 +156,7 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**lookup_release**](docs/DefaultApi.md#lookup_release) | **GET** /release/lookup |
*DefaultApi* | [**update_container**](docs/DefaultApi.md#update_container) | **PUT** /container/{ident} |
*DefaultApi* | [**update_creator**](docs/DefaultApi.md#update_creator) | **PUT** /creator/{ident} |
+*DefaultApi* | [**update_editor**](docs/DefaultApi.md#update_editor) | **PUT** /editor/{editor_id} |
*DefaultApi* | [**update_file**](docs/DefaultApi.md#update_file) | **PUT** /file/{ident} |
*DefaultApi* | [**update_fileset**](docs/DefaultApi.md#update_fileset) | **PUT** /fileset/{ident} |
*DefaultApi* | [**update_release**](docs/DefaultApi.md#update_release) | **PUT** /release/{ident} |
@@ -158,6 +166,8 @@ Class | Method | HTTP request | Description
## Documentation For Models
+ - [AuthOidc](docs/AuthOidc.md)
+ - [AuthOidcResult](docs/AuthOidcResult.md)
- [ChangelogEntry](docs/ChangelogEntry.md)
- [ContainerEntity](docs/ContainerEntity.md)
- [CreatorEntity](docs/CreatorEntity.md)
@@ -184,7 +194,12 @@ Class | Method | HTTP request | Description
## Documentation For Authorization
- All endpoints do not require authorization.
+
+## Bearer
+
+- **Type**: API key
+- **API key parameter name**: Authorization
+- **Location**: HTTP header
## Author
diff --git a/python/fatcat_client/__init__.py b/python/fatcat_client/__init__.py
index 6b08c0b1..e9a04942 100644
--- a/python/fatcat_client/__init__.py
+++ b/python/fatcat_client/__init__.py
@@ -22,6 +22,8 @@ from fatcat_client.api.default_api import DefaultApi
from fatcat_client.api_client import ApiClient
from fatcat_client.configuration import Configuration
# import models into sdk package
+from fatcat_client.models.auth_oidc import AuthOidc
+from fatcat_client.models.auth_oidc_result import AuthOidcResult
from fatcat_client.models.changelog_entry import ChangelogEntry
from fatcat_client.models.container_entity import ContainerEntity
from fatcat_client.models.creator_entity import CreatorEntity
diff --git a/python/fatcat_client/api/default_api.py b/python/fatcat_client/api/default_api.py
index 9f7edf07..8b652571 100644
--- a/python/fatcat_client/api/default_api.py
+++ b/python/fatcat_client/api/default_api.py
@@ -120,7 +120,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/editgroup/{editgroup_id}/accept', 'POST',
@@ -138,6 +138,196 @@ class DefaultApi(object):
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
+ def auth_check(self, **kwargs): # noqa: E501
+ """auth_check # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.auth_check(async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str role:
+ :return: Success
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async'):
+ return self.auth_check_with_http_info(**kwargs) # noqa: E501
+ else:
+ (data) = self.auth_check_with_http_info(**kwargs) # noqa: E501
+ return data
+
+ def auth_check_with_http_info(self, **kwargs): # noqa: E501
+ """auth_check # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.auth_check_with_http_info(async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str role:
+ :return: Success
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['role'] # 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 auth_check" % key
+ )
+ params[key] = val
+ del params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'role' in params:
+ query_params.append(('role', params['role'])) # 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 = ['Bearer'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/auth/check', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='Success', # 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 auth_oidc(self, oidc_params, **kwargs): # noqa: E501
+ """auth_oidc # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.auth_oidc(oidc_params, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param AuthOidc oidc_params: (required)
+ :return: AuthOidcResult
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async'):
+ return self.auth_oidc_with_http_info(oidc_params, **kwargs) # noqa: E501
+ else:
+ (data) = self.auth_oidc_with_http_info(oidc_params, **kwargs) # noqa: E501
+ return data
+
+ def auth_oidc_with_http_info(self, oidc_params, **kwargs): # noqa: E501
+ """auth_oidc # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.auth_oidc_with_http_info(oidc_params, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param AuthOidc oidc_params: (required)
+ :return: AuthOidcResult
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['oidc_params'] # 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 auth_oidc" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'oidc_params' is set
+ if ('oidc_params' not in params or
+ params['oidc_params'] is None):
+ raise ValueError("Missing the required parameter `oidc_params` when calling `auth_oidc`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'oidc_params' in params:
+ body_params = params['oidc_params']
+ # 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 = ['Bearer'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/auth/oidc', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='AuthOidcResult', # 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 create_container(self, entity, **kwargs): # noqa: E501
"""create_container # noqa: E501
@@ -221,7 +411,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/container', 'POST',
@@ -326,7 +516,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/container/batch', 'POST',
@@ -427,7 +617,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/creator', 'POST',
@@ -532,7 +722,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/creator/batch', 'POST',
@@ -629,7 +819,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/editgroup', 'POST',
@@ -730,7 +920,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/file', 'POST',
@@ -835,7 +1025,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/file/batch', 'POST',
@@ -936,7 +1126,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/fileset', 'POST',
@@ -1041,7 +1231,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/fileset/batch', 'POST',
@@ -1142,7 +1332,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/release', 'POST',
@@ -1247,7 +1437,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/release/batch', 'POST',
@@ -1348,7 +1538,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/webcapture', 'POST',
@@ -1453,7 +1643,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/webcapture/batch', 'POST',
@@ -1554,7 +1744,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/work', 'POST',
@@ -1659,7 +1849,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/work/batch', 'POST',
@@ -1760,7 +1950,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/container/{ident}', 'DELETE',
@@ -1865,7 +2055,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/container/edit/{edit_id}', 'DELETE',
@@ -1966,7 +2156,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/creator/{ident}', 'DELETE',
@@ -2071,7 +2261,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/creator/edit/{edit_id}', 'DELETE',
@@ -2172,7 +2362,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/file/{ident}', 'DELETE',
@@ -2277,7 +2467,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/file/edit/{edit_id}', 'DELETE',
@@ -2378,7 +2568,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/fileset/{ident}', 'DELETE',
@@ -2483,7 +2673,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/fileset/edit/{edit_id}', 'DELETE',
@@ -2584,7 +2774,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/release/{ident}', 'DELETE',
@@ -2689,7 +2879,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/release/edit/{edit_id}', 'DELETE',
@@ -2790,7 +2980,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/webcapture/{ident}', 'DELETE',
@@ -2895,7 +3085,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/webcapture/edit/{edit_id}', 'DELETE',
@@ -2996,7 +3186,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/work/{ident}', 'DELETE',
@@ -3101,7 +3291,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/work/edit/{edit_id}', 'DELETE',
@@ -8331,7 +8521,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/container/{ident}', 'PUT',
@@ -8440,7 +8630,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/creator/{ident}', 'PUT',
@@ -8458,6 +8648,111 @@ class DefaultApi(object):
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
+ def update_editor(self, editor_id, editor, **kwargs): # noqa: E501
+ """update_editor # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.update_editor(editor_id, editor, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str editor_id: (required)
+ :param Editor editor: (required)
+ :return: Editor
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async'):
+ return self.update_editor_with_http_info(editor_id, editor, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_editor_with_http_info(editor_id, editor, **kwargs) # noqa: E501
+ return data
+
+ def update_editor_with_http_info(self, editor_id, editor, **kwargs): # noqa: E501
+ """update_editor # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async=True
+ >>> thread = api.update_editor_with_http_info(editor_id, editor, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str editor_id: (required)
+ :param Editor editor: (required)
+ :return: Editor
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['editor_id', 'editor'] # 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_editor" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'editor_id' is set
+ if ('editor_id' not in params or
+ params['editor_id'] is None):
+ raise ValueError("Missing the required parameter `editor_id` when calling `update_editor`") # noqa: E501
+ # verify the required parameter 'editor' is set
+ if ('editor' not in params or
+ params['editor'] is None):
+ raise ValueError("Missing the required parameter `editor` when calling `update_editor`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'editor_id' in params:
+ path_params['editor_id'] = params['editor_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'editor' in params:
+ body_params = params['editor']
+ # 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 = ['Bearer'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/editor/{editor_id}', 'PUT',
+ 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=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, ident, entity, **kwargs): # noqa: E501
"""update_file # noqa: E501
@@ -8549,7 +8844,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/file/{ident}', 'PUT',
@@ -8658,7 +8953,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/fileset/{ident}', 'PUT',
@@ -8767,7 +9062,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/release/{ident}', 'PUT',
@@ -8876,7 +9171,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/webcapture/{ident}', 'PUT',
@@ -8985,7 +9280,7 @@ class DefaultApi(object):
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = [] # noqa: E501
+ auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/work/{ident}', 'PUT',
diff --git a/python/fatcat_client/configuration.py b/python/fatcat_client/configuration.py
index 1dc47841..69b54edb 100644
--- a/python/fatcat_client/configuration.py
+++ b/python/fatcat_client/configuration.py
@@ -224,6 +224,13 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
:return: The Auth Settings information dict.
"""
return {
+ 'Bearer':
+ {
+ 'type': 'api_key',
+ 'in': 'header',
+ 'key': 'Authorization',
+ 'value': self.get_api_key_with_prefix('Authorization')
+ },
}
diff --git a/python/fatcat_client/models/__init__.py b/python/fatcat_client/models/__init__.py
index f4716d61..ef77b4fd 100644
--- a/python/fatcat_client/models/__init__.py
+++ b/python/fatcat_client/models/__init__.py
@@ -15,6 +15,8 @@
from __future__ import absolute_import
# import models into model package
+from fatcat_client.models.auth_oidc import AuthOidc
+from fatcat_client.models.auth_oidc_result import AuthOidcResult
from fatcat_client.models.changelog_entry import ChangelogEntry
from fatcat_client.models.container_entity import ContainerEntity
from fatcat_client.models.creator_entity import CreatorEntity
diff --git a/python/fatcat_client/models/auth_oidc.py b/python/fatcat_client/models/auth_oidc.py
new file mode 100644
index 00000000..1ee4c429
--- /dev/null
+++ b/python/fatcat_client/models/auth_oidc.py
@@ -0,0 +1,194 @@
+# coding: utf-8
+
+"""
+ fatcat
+
+ A scalable, versioned, API-oriented catalog of bibliographic entities and file metadata # noqa: E501
+
+ OpenAPI spec version: 0.1.0
+
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class AuthOidc(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'provider': 'str',
+ 'sub': 'str',
+ 'iss': 'str',
+ 'preferred_username': 'str'
+ }
+
+ attribute_map = {
+ 'provider': 'provider',
+ 'sub': 'sub',
+ 'iss': 'iss',
+ 'preferred_username': 'preferred_username'
+ }
+
+ def __init__(self, provider=None, sub=None, iss=None, preferred_username=None): # noqa: E501
+ """AuthOidc - a model defined in Swagger""" # noqa: E501
+
+ self._provider = None
+ self._sub = None
+ self._iss = None
+ self._preferred_username = None
+ self.discriminator = None
+
+ self.provider = provider
+ self.sub = sub
+ self.iss = iss
+ self.preferred_username = preferred_username
+
+ @property
+ def provider(self):
+ """Gets the provider of this AuthOidc. # noqa: E501
+
+
+ :return: The provider of this AuthOidc. # noqa: E501
+ :rtype: str
+ """
+ return self._provider
+
+ @provider.setter
+ def provider(self, provider):
+ """Sets the provider of this AuthOidc.
+
+
+ :param provider: The provider of this AuthOidc. # noqa: E501
+ :type: str
+ """
+ if provider is None:
+ raise ValueError("Invalid value for `provider`, must not be `None`") # noqa: E501
+
+ self._provider = provider
+
+ @property
+ def sub(self):
+ """Gets the sub of this AuthOidc. # noqa: E501
+
+
+ :return: The sub of this AuthOidc. # noqa: E501
+ :rtype: str
+ """
+ return self._sub
+
+ @sub.setter
+ def sub(self, sub):
+ """Sets the sub of this AuthOidc.
+
+
+ :param sub: The sub of this AuthOidc. # noqa: E501
+ :type: str
+ """
+ if sub is None:
+ raise ValueError("Invalid value for `sub`, must not be `None`") # noqa: E501
+
+ self._sub = sub
+
+ @property
+ def iss(self):
+ """Gets the iss of this AuthOidc. # noqa: E501
+
+
+ :return: The iss of this AuthOidc. # noqa: E501
+ :rtype: str
+ """
+ return self._iss
+
+ @iss.setter
+ def iss(self, iss):
+ """Sets the iss of this AuthOidc.
+
+
+ :param iss: The iss of this AuthOidc. # noqa: E501
+ :type: str
+ """
+ if iss is None:
+ raise ValueError("Invalid value for `iss`, must not be `None`") # noqa: E501
+
+ self._iss = iss
+
+ @property
+ def preferred_username(self):
+ """Gets the preferred_username of this AuthOidc. # noqa: E501
+
+
+ :return: The preferred_username of this AuthOidc. # noqa: E501
+ :rtype: str
+ """
+ return self._preferred_username
+
+ @preferred_username.setter
+ def preferred_username(self, preferred_username):
+ """Sets the preferred_username of this AuthOidc.
+
+
+ :param preferred_username: The preferred_username of this AuthOidc. # noqa: E501
+ :type: str
+ """
+ if preferred_username is None:
+ raise ValueError("Invalid value for `preferred_username`, must not be `None`") # noqa: E501
+
+ self._preferred_username = preferred_username
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, AuthOidc):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/python/fatcat_client/models/auth_oidc_result.py b/python/fatcat_client/models/auth_oidc_result.py
new file mode 100644
index 00000000..5e31a574
--- /dev/null
+++ b/python/fatcat_client/models/auth_oidc_result.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ fatcat
+
+ A scalable, versioned, API-oriented catalog of bibliographic entities and file metadata # noqa: E501
+
+ OpenAPI spec version: 0.1.0
+
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from fatcat_client.models.editor import Editor # noqa: F401,E501
+
+
+class AuthOidcResult(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'editor': 'Editor',
+ 'token': 'str'
+ }
+
+ attribute_map = {
+ 'editor': 'editor',
+ 'token': 'token'
+ }
+
+ def __init__(self, editor=None, token=None): # noqa: E501
+ """AuthOidcResult - a model defined in Swagger""" # noqa: E501
+
+ self._editor = None
+ self._token = None
+ self.discriminator = None
+
+ self.editor = editor
+ self.token = token
+
+ @property
+ def editor(self):
+ """Gets the editor of this AuthOidcResult. # noqa: E501
+
+
+ :return: The editor of this AuthOidcResult. # noqa: E501
+ :rtype: Editor
+ """
+ return self._editor
+
+ @editor.setter
+ def editor(self, editor):
+ """Sets the editor of this AuthOidcResult.
+
+
+ :param editor: The editor of this AuthOidcResult. # noqa: E501
+ :type: Editor
+ """
+ if editor is None:
+ raise ValueError("Invalid value for `editor`, must not be `None`") # noqa: E501
+
+ self._editor = editor
+
+ @property
+ def token(self):
+ """Gets the token of this AuthOidcResult. # noqa: E501
+
+
+ :return: The token of this AuthOidcResult. # noqa: E501
+ :rtype: str
+ """
+ return self._token
+
+ @token.setter
+ def token(self, token):
+ """Sets the token of this AuthOidcResult.
+
+
+ :param token: The token of this AuthOidcResult. # noqa: E501
+ :type: str
+ """
+ if token is None:
+ raise ValueError("Invalid value for `token`, must not be `None`") # noqa: E501
+
+ self._token = token
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, AuthOidcResult):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/python/fatcat_client/models/editgroup.py b/python/fatcat_client/models/editgroup.py
index 5b1573ed..4c877685 100644
--- a/python/fatcat_client/models/editgroup.py
+++ b/python/fatcat_client/models/editgroup.py
@@ -60,7 +60,8 @@ class Editgroup(object):
if editgroup_id is not None:
self.editgroup_id = editgroup_id
- self.editor_id = editor_id
+ if editor_id is not None:
+ self.editor_id = editor_id
if description is not None:
self.description = description
if extra is not None:
@@ -117,8 +118,6 @@ class Editgroup(object):
:param editor_id: The editor_id of this Editgroup. # noqa: E501
:type: str
"""
- if editor_id is None:
- raise ValueError("Invalid value for `editor_id`, must not be `None`") # noqa: E501
if editor_id is not None and len(editor_id) > 26:
raise ValueError("Invalid value for `editor_id`, length must be less than or equal to `26`") # noqa: E501
if editor_id is not None and len(editor_id) < 26:
diff --git a/python/fatcat_client/models/editor.py b/python/fatcat_client/models/editor.py
index 2010d454..493f5d81 100644
--- a/python/fatcat_client/models/editor.py
+++ b/python/fatcat_client/models/editor.py
@@ -32,24 +32,39 @@ class Editor(object):
"""
swagger_types = {
'editor_id': 'str',
- 'username': 'str'
+ 'username': 'str',
+ 'is_admin': 'bool',
+ 'is_bot': 'bool',
+ 'is_active': 'bool'
}
attribute_map = {
'editor_id': 'editor_id',
- 'username': 'username'
+ 'username': 'username',
+ 'is_admin': 'is_admin',
+ 'is_bot': 'is_bot',
+ 'is_active': 'is_active'
}
- def __init__(self, editor_id=None, username=None): # noqa: E501
+ def __init__(self, editor_id=None, username=None, is_admin=None, is_bot=None, is_active=None): # noqa: E501
"""Editor - a model defined in Swagger""" # noqa: E501
self._editor_id = None
self._username = None
+ self._is_admin = None
+ self._is_bot = None
+ self._is_active = None
self.discriminator = None
if editor_id is not None:
self.editor_id = editor_id
self.username = username
+ if is_admin is not None:
+ self.is_admin = is_admin
+ if is_bot is not None:
+ self.is_bot = is_bot
+ if is_active is not None:
+ self.is_active = is_active
@property
def editor_id(self):
@@ -103,6 +118,69 @@ class Editor(object):
self._username = username
+ @property
+ def is_admin(self):
+ """Gets the is_admin of this Editor. # noqa: E501
+
+
+ :return: The is_admin of this Editor. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_admin
+
+ @is_admin.setter
+ def is_admin(self, is_admin):
+ """Sets the is_admin of this Editor.
+
+
+ :param is_admin: The is_admin of this Editor. # noqa: E501
+ :type: bool
+ """
+
+ self._is_admin = is_admin
+
+ @property
+ def is_bot(self):
+ """Gets the is_bot of this Editor. # noqa: E501
+
+
+ :return: The is_bot of this Editor. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_bot
+
+ @is_bot.setter
+ def is_bot(self, is_bot):
+ """Sets the is_bot of this Editor.
+
+
+ :param is_bot: The is_bot of this Editor. # noqa: E501
+ :type: bool
+ """
+
+ self._is_bot = is_bot
+
+ @property
+ def is_active(self):
+ """Gets the is_active of this Editor. # noqa: E501
+
+
+ :return: The is_active of this Editor. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_active
+
+ @is_active.setter
+ def is_active(self, is_active):
+ """Sets the is_active of this Editor.
+
+
+ :param is_active: The is_active of this Editor. # noqa: E501
+ :type: bool
+ """
+
+ self._is_active = is_active
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}