From ef79f4d157fc576eeb0f54e01d827f277de35708 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 11 Aug 2022 19:23:40 -0700 Subject: codegen python client using newer generator (v6.0.1) --- python_openapi_client/README.md | 73 +++++++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 18 deletions(-) (limited to 'python_openapi_client/README.md') diff --git a/python_openapi_client/README.md b/python_openapi_client/README.md index 316b9dfd..640bb817 100644 --- a/python_openapi_client/README.md +++ b/python_openapi_client/README.md @@ -1,5 +1,7 @@ # fatcat-openapi-client -Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. +Fatcat is a scalable, versioned, API-oriented catalog of bibliographic +entities and file metadata. + This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -10,7 +12,7 @@ For more information, please visit [https://fatcat.wiki](https://fatcat.wiki) ## Requirements. -Python 3.5+ +Python >=3.6 ## Installation & Usage ### pip install @@ -24,7 +26,7 @@ pip install fatcat-openapi-client Then import the package: ```python -import fatcat_openapi_client +import fatcat_openapi_client ``` ### Setuptools @@ -46,30 +48,65 @@ import fatcat_openapi_client Please follow the [installation procedure](#installation--usage) and then run the following: ```python -from __future__ import print_function + import time import fatcat_openapi_client -from fatcat_openapi_client.rest import ApiException from pprint import pprint +from fatcat_openapi_client.api import default_api +from fatcat_openapi_client.model.auth_oidc import AuthOidc +from fatcat_openapi_client.model.auth_oidc_result import AuthOidcResult +from fatcat_openapi_client.model.auth_token_result import AuthTokenResult +from fatcat_openapi_client.model.changelog_entry import ChangelogEntry +from fatcat_openapi_client.model.container_auto_batch import ContainerAutoBatch +from fatcat_openapi_client.model.container_entity import ContainerEntity +from fatcat_openapi_client.model.creator_auto_batch import CreatorAutoBatch +from fatcat_openapi_client.model.creator_entity import CreatorEntity +from fatcat_openapi_client.model.editgroup import Editgroup +from fatcat_openapi_client.model.editgroup_annotation import EditgroupAnnotation +from fatcat_openapi_client.model.editor import Editor +from fatcat_openapi_client.model.entity_edit import EntityEdit +from fatcat_openapi_client.model.entity_history_entry import EntityHistoryEntry +from fatcat_openapi_client.model.error_response import ErrorResponse +from fatcat_openapi_client.model.file_auto_batch import FileAutoBatch +from fatcat_openapi_client.model.file_entity import FileEntity +from fatcat_openapi_client.model.fileset_auto_batch import FilesetAutoBatch +from fatcat_openapi_client.model.fileset_entity import FilesetEntity +from fatcat_openapi_client.model.release_auto_batch import ReleaseAutoBatch +from fatcat_openapi_client.model.release_entity import ReleaseEntity +from fatcat_openapi_client.model.success import Success +from fatcat_openapi_client.model.webcapture_auto_batch import WebcaptureAutoBatch +from fatcat_openapi_client.model.webcapture_entity import WebcaptureEntity +from fatcat_openapi_client.model.work_auto_batch import WorkAutoBatch +from fatcat_openapi_client.model.work_entity import WorkEntity +# Defining the host is optional and defaults to https://api.fatcat.wiki/v0 +# See configuration.py for a list of all supported configuration parameters. +configuration = fatcat_openapi_client.Configuration( + host = "https://api.fatcat.wiki/v0" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -configuration = fatcat_openapi_client.Configuration() # Configure API key authorization: Bearer -configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key['Bearer'] = 'YOUR_API_KEY' + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['Authorization'] = 'Bearer' +# configuration.api_key_prefix['Bearer'] = 'Bearer' -# Defining host is optional and default to https://api.fatcat.wiki/v0 -configuration.host = "https://api.fatcat.wiki/v0" -# Create an instance of the API class -api_instance = fatcat_openapi_client.DefaultApi(fatcat_openapi_client.ApiClient(configuration)) -editgroup_id = 'editgroup_id_example' # str | base32-encoded unique identifier -try: - api_response = api_instance.accept_editgroup(editgroup_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling DefaultApi->accept_editgroup: %s\n" % e) +# Enter a context with an instance of the API client +with fatcat_openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = default_api.DefaultApi(api_client) + editgroup_id = "editgroup_id_example" # str | base32-encoded unique identifier + try: + api_response = api_instance.accept_editgroup(editgroup_id) + pprint(api_response) + except fatcat_openapi_client.ApiException as e: + print("Exception when calling DefaultApi->accept_editgroup: %s\n" % e) ``` ## Documentation for API Endpoints -- cgit v1.2.3