Skip to content

Commit

Permalink
Merge pull request #38 from devopsarr/feature/code-generation
Browse files Browse the repository at this point in the history
feat: add sonarr auto tagging schema return type
  • Loading branch information
devopsarr[bot] authored Aug 23, 2023
2 parents 5f18e00 + feeea7c commit b6c8108
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 43 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
40 changes: 22 additions & 18 deletions docs/AutoTaggingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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} |


Expand Down Expand Up @@ -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()


Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -463,17 +465,19 @@ 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
This endpoint does not need any parameter.

### Return type

void (empty response body)
[**List[AutoTaggingResource]**](AutoTaggingResource.md)

### Authorization

Expand All @@ -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 |
Expand All @@ -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()


Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -579,19 +583,19 @@ 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
This endpoint does not need any parameter.

### Return type

[**List[AutoTaggingResource]**](AutoTaggingResource.md)
[**List[AutoTaggingSpecificationSchema]**](AutoTaggingSpecificationSchema.md)

### Authorization

Expand Down
55 changes: 31 additions & 24 deletions sonarr/api/auto_tagging_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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()
Expand All @@ -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']
Expand All @@ -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,
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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()
Expand All @@ -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']
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit b6c8108

Please sign in to comment.