From feeea7c43dcef2f2a0b3216b67de2d22dfed8f44 Mon Sep 17 00:00:00 2001 From: "devopsarr[bot]" <127950054+devopsarr[bot]@users.noreply.github.com> Date: Wed, 23 Aug 2023 06:16:07 +0000 Subject: [PATCH] feat: add sonarr auto tagging schema return type --- README.md | 2 +- docs/AutoTaggingApi.md | 40 ++++++++++++++----------- sonarr/api/auto_tagging_api.py | 55 +++++++++++++++++++--------------- 3 files changed, 54 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 2818e24..8bc4605 100644 --- a/README.md +++ b/README.md @@ -104,8 +104,8 @@ Class | Method | HTTP request | Description *AutoTaggingApi* | [**create_auto_tagging**](docs/AutoTaggingApi.md#create_auto_tagging) | **POST** /api/v3/autotagging | *AutoTaggingApi* | [**delete_auto_tagging**](docs/AutoTaggingApi.md#delete_auto_tagging) | **DELETE** /api/v3/autotagging/{id} | *AutoTaggingApi* | [**get_auto_tagging_by_id**](docs/AutoTaggingApi.md#get_auto_tagging_by_id) | **GET** /api/v3/autotagging/{id} | -*AutoTaggingApi* | [**get_auto_tagging_schema**](docs/AutoTaggingApi.md#get_auto_tagging_schema) | **GET** /api/v3/autotagging/schema | *AutoTaggingApi* | [**list_auto_tagging**](docs/AutoTaggingApi.md#list_auto_tagging) | **GET** /api/v3/autotagging | +*AutoTaggingApi* | [**list_auto_tagging_schema**](docs/AutoTaggingApi.md#list_auto_tagging_schema) | **GET** /api/v3/autotagging/schema | *AutoTaggingApi* | [**update_auto_tagging**](docs/AutoTaggingApi.md#update_auto_tagging) | **PUT** /api/v3/autotagging/{id} | *BackupApi* | [**create_system_backup_restore_by_id**](docs/BackupApi.md#create_system_backup_restore_by_id) | **POST** /api/v3/system/backup/restore/{id} | *BackupApi* | [**create_system_backup_restore_upload**](docs/BackupApi.md#create_system_backup_restore_upload) | **POST** /api/v3/system/backup/restore/upload | diff --git a/docs/AutoTaggingApi.md b/docs/AutoTaggingApi.md index d86b650..b58634d 100644 --- a/docs/AutoTaggingApi.md +++ b/docs/AutoTaggingApi.md @@ -7,8 +7,8 @@ Method | HTTP request | Description [**create_auto_tagging**](AutoTaggingApi.md#create_auto_tagging) | **POST** /api/v3/autotagging | [**delete_auto_tagging**](AutoTaggingApi.md#delete_auto_tagging) | **DELETE** /api/v3/autotagging/{id} | [**get_auto_tagging_by_id**](AutoTaggingApi.md#get_auto_tagging_by_id) | **GET** /api/v3/autotagging/{id} | -[**get_auto_tagging_schema**](AutoTaggingApi.md#get_auto_tagging_schema) | **GET** /api/v3/autotagging/schema | [**list_auto_tagging**](AutoTaggingApi.md#list_auto_tagging) | **GET** /api/v3/autotagging | +[**list_auto_tagging_schema**](AutoTaggingApi.md#list_auto_tagging_schema) | **GET** /api/v3/autotagging/schema | [**update_auto_tagging**](AutoTaggingApi.md#update_auto_tagging) | **PUT** /api/v3/autotagging/{id} | @@ -377,8 +377,8 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_auto_tagging_schema** -> get_auto_tagging_schema() +# **list_auto_tagging** +> List[AutoTaggingResource] list_auto_tagging() @@ -421,9 +421,11 @@ with sonarr.ApiClient(configuration) as api_client: api_instance = sonarr.AutoTaggingApi(api_client) try: - api_instance.get_auto_tagging_schema() + api_response = api_instance.list_auto_tagging() + print("The response of AutoTaggingApi->list_auto_tagging:\n") + pprint(api_response) except Exception as e: - print("Exception when calling AutoTaggingApi->get_auto_tagging_schema: %s\n" % e) + print("Exception when calling AutoTaggingApi->list_auto_tagging: %s\n" % e) ``` * Api Key Authentication (X-Api-Key): @@ -463,9 +465,11 @@ with sonarr.ApiClient(configuration) as api_client: api_instance = sonarr.AutoTaggingApi(api_client) try: - api_instance.get_auto_tagging_schema() + api_response = api_instance.list_auto_tagging() + print("The response of AutoTaggingApi->list_auto_tagging:\n") + pprint(api_response) except Exception as e: - print("Exception when calling AutoTaggingApi->get_auto_tagging_schema: %s\n" % e) + print("Exception when calling AutoTaggingApi->list_auto_tagging: %s\n" % e) ``` ### Parameters @@ -473,7 +477,7 @@ This endpoint does not need any parameter. ### Return type -void (empty response body) +[**List[AutoTaggingResource]**](AutoTaggingResource.md) ### Authorization @@ -482,7 +486,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | @@ -491,8 +495,8 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_auto_tagging** -> List[AutoTaggingResource] list_auto_tagging() +# **list_auto_tagging_schema** +> List[AutoTaggingSpecificationSchema] list_auto_tagging_schema() @@ -535,11 +539,11 @@ with sonarr.ApiClient(configuration) as api_client: api_instance = sonarr.AutoTaggingApi(api_client) try: - api_response = api_instance.list_auto_tagging() - print("The response of AutoTaggingApi->list_auto_tagging:\n") + api_response = api_instance.list_auto_tagging_schema() + print("The response of AutoTaggingApi->list_auto_tagging_schema:\n") pprint(api_response) except Exception as e: - print("Exception when calling AutoTaggingApi->list_auto_tagging: %s\n" % e) + print("Exception when calling AutoTaggingApi->list_auto_tagging_schema: %s\n" % e) ``` * Api Key Authentication (X-Api-Key): @@ -579,11 +583,11 @@ with sonarr.ApiClient(configuration) as api_client: api_instance = sonarr.AutoTaggingApi(api_client) try: - api_response = api_instance.list_auto_tagging() - print("The response of AutoTaggingApi->list_auto_tagging:\n") + api_response = api_instance.list_auto_tagging_schema() + print("The response of AutoTaggingApi->list_auto_tagging_schema:\n") pprint(api_response) except Exception as e: - print("Exception when calling AutoTaggingApi->list_auto_tagging: %s\n" % e) + print("Exception when calling AutoTaggingApi->list_auto_tagging_schema: %s\n" % e) ``` ### Parameters @@ -591,7 +595,7 @@ This endpoint does not need any parameter. ### Return type -[**List[AutoTaggingResource]**](AutoTaggingResource.md) +[**List[AutoTaggingSpecificationSchema]**](AutoTaggingSpecificationSchema.md) ### Authorization diff --git a/sonarr/api/auto_tagging_api.py b/sonarr/api/auto_tagging_api.py index ed871f9..0721b77 100644 --- a/sonarr/api/auto_tagging_api.py +++ b/sonarr/api/auto_tagging_api.py @@ -22,6 +22,7 @@ from typing import List, Optional from sonarr.models.auto_tagging_resource import AutoTaggingResource +from sonarr.models.auto_tagging_specification_schema import AutoTaggingSpecificationSchema from sonarr.api_client import ApiClient from sonarr.exceptions import ( # noqa: F401 @@ -467,13 +468,13 @@ def get_auto_tagging_by_id_with_http_info(self, id : StrictInt, **kwargs): # no _request_auth=_params.get('_request_auth')) @validate_arguments - def get_auto_tagging_schema(self, **kwargs) -> None: # noqa: E501 - """get_auto_tagging_schema # noqa: E501 + def list_auto_tagging(self, **kwargs) -> List[AutoTaggingResource]: # noqa: E501 + """list_auto_tagging # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_auto_tagging_schema(async_req=True) + >>> thread = api.list_auto_tagging(async_req=True) >>> result = thread.get() :param async_req: Whether to execute the request asynchronously. @@ -489,19 +490,19 @@ def get_auto_tagging_schema(self, **kwargs) -> None: # noqa: E501 :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: None + :rtype: List[AutoTaggingResource] """ kwargs['_return_http_data_only'] = True - return self.get_auto_tagging_schema_with_http_info(**kwargs) # noqa: E501 + return self.list_auto_tagging_with_http_info(**kwargs) # noqa: E501 @validate_arguments - def get_auto_tagging_schema_with_http_info(self, **kwargs): # noqa: E501 - """get_auto_tagging_schema # noqa: E501 + def list_auto_tagging_with_http_info(self, **kwargs): # noqa: E501 + """list_auto_tagging # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_auto_tagging_schema_with_http_info(async_req=True) + >>> thread = api.list_auto_tagging_with_http_info(async_req=True) >>> result = thread.get() :param async_req: Whether to execute the request asynchronously. @@ -525,7 +526,7 @@ def get_auto_tagging_schema_with_http_info(self, **kwargs): # noqa: E501 :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: None + :rtype: tuple(List[AutoTaggingResource], status_code(int), headers(HTTPHeaderDict)) """ _params = locals() @@ -549,7 +550,7 @@ def get_auto_tagging_schema_with_http_info(self, **kwargs): # noqa: E501 if _key not in _all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_auto_tagging_schema" % _key + " to method list_auto_tagging" % _key ) _params[_key] = _val del _params['kwargs'] @@ -572,13 +573,19 @@ def get_auto_tagging_schema_with_http_info(self, **kwargs): # noqa: E501 # process the body parameter _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + # authentication setting _auth_settings = ['apikey', 'X-Api-Key'] # noqa: E501 - _response_types_map = {} + _response_types_map = { + '200': "List[AutoTaggingResource]", + } return self.api_client.call_api( - '/api/v3/autotagging/schema', 'GET', + '/api/v3/autotagging', 'GET', _path_params, _query_params, _header_params, @@ -595,13 +602,13 @@ def get_auto_tagging_schema_with_http_info(self, **kwargs): # noqa: E501 _request_auth=_params.get('_request_auth')) @validate_arguments - def list_auto_tagging(self, **kwargs) -> List[AutoTaggingResource]: # noqa: E501 - """list_auto_tagging # noqa: E501 + def list_auto_tagging_schema(self, **kwargs) -> List[AutoTaggingSpecificationSchema]: # noqa: E501 + """list_auto_tagging_schema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_auto_tagging(async_req=True) + >>> thread = api.list_auto_tagging_schema(async_req=True) >>> result = thread.get() :param async_req: Whether to execute the request asynchronously. @@ -617,19 +624,19 @@ def list_auto_tagging(self, **kwargs) -> List[AutoTaggingResource]: # noqa: E50 :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: List[AutoTaggingResource] + :rtype: List[AutoTaggingSpecificationSchema] """ kwargs['_return_http_data_only'] = True - return self.list_auto_tagging_with_http_info(**kwargs) # noqa: E501 + return self.list_auto_tagging_schema_with_http_info(**kwargs) # noqa: E501 @validate_arguments - def list_auto_tagging_with_http_info(self, **kwargs): # noqa: E501 - """list_auto_tagging # noqa: E501 + def list_auto_tagging_schema_with_http_info(self, **kwargs): # noqa: E501 + """list_auto_tagging_schema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_auto_tagging_with_http_info(async_req=True) + >>> thread = api.list_auto_tagging_schema_with_http_info(async_req=True) >>> result = thread.get() :param async_req: Whether to execute the request asynchronously. @@ -653,7 +660,7 @@ def list_auto_tagging_with_http_info(self, **kwargs): # noqa: E501 :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: tuple(List[AutoTaggingResource], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(List[AutoTaggingSpecificationSchema], status_code(int), headers(HTTPHeaderDict)) """ _params = locals() @@ -677,7 +684,7 @@ def list_auto_tagging_with_http_info(self, **kwargs): # noqa: E501 if _key not in _all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_auto_tagging" % _key + " to method list_auto_tagging_schema" % _key ) _params[_key] = _val del _params['kwargs'] @@ -708,11 +715,11 @@ def list_auto_tagging_with_http_info(self, **kwargs): # noqa: E501 _auth_settings = ['apikey', 'X-Api-Key'] # noqa: E501 _response_types_map = { - '200': "List[AutoTaggingResource]", + '200': "List[AutoTaggingSpecificationSchema]", } return self.api_client.call_api( - '/api/v3/autotagging', 'GET', + '/api/v3/autotagging/schema', 'GET', _path_params, _query_params, _header_params,