diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 05e9a99..9914308 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -67,6 +67,8 @@ docs/HostConfigApi.md docs/HostConfigResource.md docs/ImportListApi.md docs/ImportListBulkResource.md +docs/ImportListConfigApi.md +docs/ImportListConfigResource.md docs/ImportListExclusionApi.md docs/ImportListExclusionResource.md docs/ImportListResource.md @@ -83,6 +85,7 @@ docs/LanguageProfileItemResource.md docs/LanguageProfileResource.md docs/LanguageProfileSchemaApi.md docs/LanguageResource.md +docs/ListSyncLevelType.md docs/LocalizationApi.md docs/LocalizationLanguageResource.md docs/LocalizationResource.md @@ -220,6 +223,7 @@ sonarr/api/health_api.py sonarr/api/history_api.py sonarr/api/host_config_api.py sonarr/api/import_list_api.py +sonarr/api/import_list_config_api.py sonarr/api/import_list_exclusion_api.py sonarr/api/indexer_api.py sonarr/api/indexer_config_api.py @@ -313,6 +317,7 @@ sonarr/models/history_resource.py sonarr/models/history_resource_paging_resource.py sonarr/models/host_config_resource.py sonarr/models/import_list_bulk_resource.py +sonarr/models/import_list_config_resource.py sonarr/models/import_list_exclusion_resource.py sonarr/models/import_list_resource.py sonarr/models/import_list_type.py @@ -323,6 +328,7 @@ sonarr/models/language.py sonarr/models/language_profile_item_resource.py sonarr/models/language_profile_resource.py sonarr/models/language_resource.py +sonarr/models/list_sync_level_type.py sonarr/models/localization_language_resource.py sonarr/models/localization_resource.py sonarr/models/log_file_resource.py diff --git a/README.md b/README.md index ec9d66c..cac119e 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,9 @@ Class | Method | HTTP request | Description *ImportListApi* | [**test_import_list**](docs/ImportListApi.md#test_import_list) | **POST** /api/v3/importlist/test | *ImportListApi* | [**testall_import_list**](docs/ImportListApi.md#testall_import_list) | **POST** /api/v3/importlist/testall | *ImportListApi* | [**update_import_list**](docs/ImportListApi.md#update_import_list) | **PUT** /api/v3/importlist/{id} | +*ImportListConfigApi* | [**get_import_list_config**](docs/ImportListConfigApi.md#get_import_list_config) | **GET** /api/v3/config/importlist | +*ImportListConfigApi* | [**get_import_list_config_by_id**](docs/ImportListConfigApi.md#get_import_list_config_by_id) | **GET** /api/v3/config/importlist/{id} | +*ImportListConfigApi* | [**update_import_list_config**](docs/ImportListConfigApi.md#update_import_list_config) | **PUT** /api/v3/config/importlist/{id} | *ImportListExclusionApi* | [**create_import_list_exclusion**](docs/ImportListExclusionApi.md#create_import_list_exclusion) | **POST** /api/v3/importlistexclusion | *ImportListExclusionApi* | [**delete_import_list_exclusion**](docs/ImportListExclusionApi.md#delete_import_list_exclusion) | **DELETE** /api/v3/importlistexclusion/{id} | *ImportListExclusionApi* | [**get_import_list_exclusion_by_id**](docs/ImportListExclusionApi.md#get_import_list_exclusion_by_id) | **GET** /api/v3/importlistexclusion/{id} | @@ -370,6 +373,7 @@ Class | Method | HTTP request | Description - [HistoryResourcePagingResource](docs/HistoryResourcePagingResource.md) - [HostConfigResource](docs/HostConfigResource.md) - [ImportListBulkResource](docs/ImportListBulkResource.md) + - [ImportListConfigResource](docs/ImportListConfigResource.md) - [ImportListExclusionResource](docs/ImportListExclusionResource.md) - [ImportListResource](docs/ImportListResource.md) - [ImportListType](docs/ImportListType.md) @@ -380,6 +384,7 @@ Class | Method | HTTP request | Description - [LanguageProfileItemResource](docs/LanguageProfileItemResource.md) - [LanguageProfileResource](docs/LanguageProfileResource.md) - [LanguageResource](docs/LanguageResource.md) + - [ListSyncLevelType](docs/ListSyncLevelType.md) - [LocalizationLanguageResource](docs/LocalizationLanguageResource.md) - [LocalizationResource](docs/LocalizationResource.md) - [LogFileResource](docs/LogFileResource.md) diff --git a/docs/HistoryApi.md b/docs/HistoryApi.md index 4b11c01..2f51106 100644 --- a/docs/HistoryApi.md +++ b/docs/HistoryApi.md @@ -177,7 +177,7 @@ with sonarr.ApiClient(configuration) as api_client: sort_direction = sonarr.SortDirection() # SortDirection | (optional) include_series = True # bool | (optional) include_episode = True # bool | (optional) - event_type = 56 # int | (optional) + event_type = [56] # List[int] | (optional) episode_id = 56 # int | (optional) download_id = 'download_id_example' # str | (optional) series_ids = [56] # List[int] | (optional) @@ -233,7 +233,7 @@ with sonarr.ApiClient(configuration) as api_client: sort_direction = sonarr.SortDirection() # SortDirection | (optional) include_series = True # bool | (optional) include_episode = True # bool | (optional) - event_type = 56 # int | (optional) + event_type = [56] # List[int] | (optional) episode_id = 56 # int | (optional) download_id = 'download_id_example' # str | (optional) series_ids = [56] # List[int] | (optional) @@ -258,7 +258,7 @@ Name | Type | Description | Notes **sort_direction** | [**SortDirection**](.md)| | [optional] **include_series** | **bool**| | [optional] **include_episode** | **bool**| | [optional] - **event_type** | **int**| | [optional] + **event_type** | [**List[int]**](int.md)| | [optional] **episode_id** | **int**| | [optional] **download_id** | **str**| | [optional] **series_ids** | [**List[int]**](int.md)| | [optional] diff --git a/docs/ImportListConfigApi.md b/docs/ImportListConfigApi.md new file mode 100644 index 0000000..f61ed31 --- /dev/null +++ b/docs/ImportListConfigApi.md @@ -0,0 +1,378 @@ +# sonarr.ImportListConfigApi + +All URIs are relative to *http://localhost:8989* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_import_list_config**](ImportListConfigApi.md#get_import_list_config) | **GET** /api/v3/config/importlist | +[**get_import_list_config_by_id**](ImportListConfigApi.md#get_import_list_config_by_id) | **GET** /api/v3/config/importlist/{id} | +[**update_import_list_config**](ImportListConfigApi.md#update_import_list_config) | **PUT** /api/v3/config/importlist/{id} | + + +# **get_import_list_config** +> ImportListConfigResource get_import_list_config() + + + +### Example + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import sonarr +from sonarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:8989 +# See configuration.py for a list of all supported configuration parameters. +configuration = sonarr.Configuration( + host = "http://localhost:8989" +) + +# 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. + +# Configure API key authorization: apikey +configuration.api_key['apikey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apikey'] = 'Bearer' + +# Configure API key authorization: X-Api-Key +configuration.api_key['X-Api-Key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Api-Key'] = 'Bearer' + +# Enter a context with an instance of the API client +with sonarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = sonarr.ImportListConfigApi(api_client) + + try: + api_response = api_instance.get_import_list_config() + print("The response of ImportListConfigApi->get_import_list_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImportListConfigApi->get_import_list_config: %s\n" % e) +``` + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import sonarr +from sonarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:8989 +# See configuration.py for a list of all supported configuration parameters. +configuration = sonarr.Configuration( + host = "http://localhost:8989" +) + +# 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. + +# Configure API key authorization: apikey +configuration.api_key['apikey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apikey'] = 'Bearer' + +# Configure API key authorization: X-Api-Key +configuration.api_key['X-Api-Key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Api-Key'] = 'Bearer' + +# Enter a context with an instance of the API client +with sonarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = sonarr.ImportListConfigApi(api_client) + + try: + api_response = api_instance.get_import_list_config() + print("The response of ImportListConfigApi->get_import_list_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImportListConfigApi->get_import_list_config: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ImportListConfigResource**](ImportListConfigResource.md) + +### Authorization + +[apikey](../README.md#apikey), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[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_import_list_config_by_id** +> ImportListConfigResource get_import_list_config_by_id(id) + + + +### Example + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import sonarr +from sonarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:8989 +# See configuration.py for a list of all supported configuration parameters. +configuration = sonarr.Configuration( + host = "http://localhost:8989" +) + +# 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. + +# Configure API key authorization: apikey +configuration.api_key['apikey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apikey'] = 'Bearer' + +# Configure API key authorization: X-Api-Key +configuration.api_key['X-Api-Key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Api-Key'] = 'Bearer' + +# Enter a context with an instance of the API client +with sonarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = sonarr.ImportListConfigApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_import_list_config_by_id(id) + print("The response of ImportListConfigApi->get_import_list_config_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImportListConfigApi->get_import_list_config_by_id: %s\n" % e) +``` + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import sonarr +from sonarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:8989 +# See configuration.py for a list of all supported configuration parameters. +configuration = sonarr.Configuration( + host = "http://localhost:8989" +) + +# 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. + +# Configure API key authorization: apikey +configuration.api_key['apikey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apikey'] = 'Bearer' + +# Configure API key authorization: X-Api-Key +configuration.api_key['X-Api-Key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Api-Key'] = 'Bearer' + +# Enter a context with an instance of the API client +with sonarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = sonarr.ImportListConfigApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_import_list_config_by_id(id) + print("The response of ImportListConfigApi->get_import_list_config_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImportListConfigApi->get_import_list_config_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**ImportListConfigResource**](ImportListConfigResource.md) + +### Authorization + +[apikey](../README.md#apikey), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[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) + +# **update_import_list_config** +> ImportListConfigResource update_import_list_config(id, import_list_config_resource=import_list_config_resource) + + + +### Example + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import sonarr +from sonarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:8989 +# See configuration.py for a list of all supported configuration parameters. +configuration = sonarr.Configuration( + host = "http://localhost:8989" +) + +# 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. + +# Configure API key authorization: apikey +configuration.api_key['apikey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apikey'] = 'Bearer' + +# Configure API key authorization: X-Api-Key +configuration.api_key['X-Api-Key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Api-Key'] = 'Bearer' + +# Enter a context with an instance of the API client +with sonarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = sonarr.ImportListConfigApi(api_client) + id = 'id_example' # str | + import_list_config_resource = sonarr.ImportListConfigResource() # ImportListConfigResource | (optional) + + try: + api_response = api_instance.update_import_list_config(id, import_list_config_resource=import_list_config_resource) + print("The response of ImportListConfigApi->update_import_list_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImportListConfigApi->update_import_list_config: %s\n" % e) +``` + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import sonarr +from sonarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:8989 +# See configuration.py for a list of all supported configuration parameters. +configuration = sonarr.Configuration( + host = "http://localhost:8989" +) + +# 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. + +# Configure API key authorization: apikey +configuration.api_key['apikey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apikey'] = 'Bearer' + +# Configure API key authorization: X-Api-Key +configuration.api_key['X-Api-Key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Api-Key'] = 'Bearer' + +# Enter a context with an instance of the API client +with sonarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = sonarr.ImportListConfigApi(api_client) + id = 'id_example' # str | + import_list_config_resource = sonarr.ImportListConfigResource() # ImportListConfigResource | (optional) + + try: + api_response = api_instance.update_import_list_config(id, import_list_config_resource=import_list_config_resource) + print("The response of ImportListConfigApi->update_import_list_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImportListConfigApi->update_import_list_config: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **import_list_config_resource** | [**ImportListConfigResource**](ImportListConfigResource.md)| | [optional] + +### Return type + +[**ImportListConfigResource**](ImportListConfigResource.md) + +### Authorization + +[apikey](../README.md#apikey), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: text/plain, application/json, text/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[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) + diff --git a/docs/ImportListConfigResource.md b/docs/ImportListConfigResource.md new file mode 100644 index 0000000..5c8a06c --- /dev/null +++ b/docs/ImportListConfigResource.md @@ -0,0 +1,30 @@ +# ImportListConfigResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**list_sync_level** | [**ListSyncLevelType**](ListSyncLevelType.md) | | [optional] +**list_sync_tag** | **int** | | [optional] + +## Example + +```python +from sonarr.models.import_list_config_resource import ImportListConfigResource + +# TODO update the JSON string below +json = "{}" +# create an instance of ImportListConfigResource from a JSON string +import_list_config_resource_instance = ImportListConfigResource.from_json(json) +# print the JSON string representation of the object +print ImportListConfigResource.to_json() + +# convert the object into a dict +import_list_config_resource_dict = import_list_config_resource_instance.to_dict() +# create an instance of ImportListConfigResource from a dict +import_list_config_resource_form_dict = import_list_config_resource.from_dict(import_list_config_resource_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListSyncLevelType.md b/docs/ListSyncLevelType.md new file mode 100644 index 0000000..0cc4b40 --- /dev/null +++ b/docs/ListSyncLevelType.md @@ -0,0 +1,10 @@ +# ListSyncLevelType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/QueueApi.md b/docs/QueueApi.md index 24d288e..b98836c 100644 --- a/docs/QueueApi.md +++ b/docs/QueueApi.md @@ -10,7 +10,7 @@ Method | HTTP request | Description # **delete_queue** -> delete_queue(id, remove_from_client=remove_from_client, blocklist=blocklist, skip_redownload=skip_redownload) +> delete_queue(id, remove_from_client=remove_from_client, blocklist=blocklist, skip_redownload=skip_redownload, change_category=change_category) @@ -55,9 +55,10 @@ with sonarr.ApiClient(configuration) as api_client: remove_from_client = True # bool | (optional) (default to True) blocklist = False # bool | (optional) (default to False) skip_redownload = False # bool | (optional) (default to False) + change_category = False # bool | (optional) (default to False) try: - api_instance.delete_queue(id, remove_from_client=remove_from_client, blocklist=blocklist, skip_redownload=skip_redownload) + api_instance.delete_queue(id, remove_from_client=remove_from_client, blocklist=blocklist, skip_redownload=skip_redownload, change_category=change_category) except Exception as e: print("Exception when calling QueueApi->delete_queue: %s\n" % e) ``` @@ -101,9 +102,10 @@ with sonarr.ApiClient(configuration) as api_client: remove_from_client = True # bool | (optional) (default to True) blocklist = False # bool | (optional) (default to False) skip_redownload = False # bool | (optional) (default to False) + change_category = False # bool | (optional) (default to False) try: - api_instance.delete_queue(id, remove_from_client=remove_from_client, blocklist=blocklist, skip_redownload=skip_redownload) + api_instance.delete_queue(id, remove_from_client=remove_from_client, blocklist=blocklist, skip_redownload=skip_redownload, change_category=change_category) except Exception as e: print("Exception when calling QueueApi->delete_queue: %s\n" % e) ``` @@ -116,6 +118,7 @@ Name | Type | Description | Notes **remove_from_client** | **bool**| | [optional] [default to True] **blocklist** | **bool**| | [optional] [default to False] **skip_redownload** | **bool**| | [optional] [default to False] + **change_category** | **bool**| | [optional] [default to False] ### Return type @@ -138,7 +141,7 @@ 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) # **delete_queue_bulk** -> delete_queue_bulk(remove_from_client=remove_from_client, blocklist=blocklist, skip_redownload=skip_redownload, queue_bulk_resource=queue_bulk_resource) +> delete_queue_bulk(remove_from_client=remove_from_client, blocklist=blocklist, skip_redownload=skip_redownload, change_category=change_category, queue_bulk_resource=queue_bulk_resource) @@ -182,10 +185,11 @@ with sonarr.ApiClient(configuration) as api_client: remove_from_client = True # bool | (optional) (default to True) blocklist = False # bool | (optional) (default to False) skip_redownload = False # bool | (optional) (default to False) + change_category = False # bool | (optional) (default to False) queue_bulk_resource = sonarr.QueueBulkResource() # QueueBulkResource | (optional) try: - api_instance.delete_queue_bulk(remove_from_client=remove_from_client, blocklist=blocklist, skip_redownload=skip_redownload, queue_bulk_resource=queue_bulk_resource) + api_instance.delete_queue_bulk(remove_from_client=remove_from_client, blocklist=blocklist, skip_redownload=skip_redownload, change_category=change_category, queue_bulk_resource=queue_bulk_resource) except Exception as e: print("Exception when calling QueueApi->delete_queue_bulk: %s\n" % e) ``` @@ -228,10 +232,11 @@ with sonarr.ApiClient(configuration) as api_client: remove_from_client = True # bool | (optional) (default to True) blocklist = False # bool | (optional) (default to False) skip_redownload = False # bool | (optional) (default to False) + change_category = False # bool | (optional) (default to False) queue_bulk_resource = sonarr.QueueBulkResource() # QueueBulkResource | (optional) try: - api_instance.delete_queue_bulk(remove_from_client=remove_from_client, blocklist=blocklist, skip_redownload=skip_redownload, queue_bulk_resource=queue_bulk_resource) + api_instance.delete_queue_bulk(remove_from_client=remove_from_client, blocklist=blocklist, skip_redownload=skip_redownload, change_category=change_category, queue_bulk_resource=queue_bulk_resource) except Exception as e: print("Exception when calling QueueApi->delete_queue_bulk: %s\n" % e) ``` @@ -243,6 +248,7 @@ Name | Type | Description | Notes **remove_from_client** | **bool**| | [optional] [default to True] **blocklist** | **bool**| | [optional] [default to False] **skip_redownload** | **bool**| | [optional] [default to False] + **change_category** | **bool**| | [optional] [default to False] **queue_bulk_resource** | [**QueueBulkResource**](QueueBulkResource.md)| | [optional] ### Return type diff --git a/docs/QueueResource.md b/docs/QueueResource.md index 8208cb0..41e2a10 100644 --- a/docs/QueueResource.md +++ b/docs/QueueResource.md @@ -28,6 +28,7 @@ Name | Type | Description | Notes **download_id** | **str** | | [optional] **protocol** | [**DownloadProtocol**](DownloadProtocol.md) | | [optional] **download_client** | **str** | | [optional] +**download_client_has_post_import_category** | **bool** | | [optional] **indexer** | **str** | | [optional] **output_path** | **str** | | [optional] **episode_has_file** | **bool** | | [optional] diff --git a/sonarr/__init__.py b/sonarr/__init__.py index 6d2bf21..dd877d1 100644 --- a/sonarr/__init__.py +++ b/sonarr/__init__.py @@ -41,6 +41,7 @@ from sonarr.api.history_api import HistoryApi from sonarr.api.host_config_api import HostConfigApi from sonarr.api.import_list_api import ImportListApi +from sonarr.api.import_list_config_api import ImportListConfigApi from sonarr.api.import_list_exclusion_api import ImportListExclusionApi from sonarr.api.indexer_api import IndexerApi from sonarr.api.indexer_config_api import IndexerConfigApi @@ -140,6 +141,7 @@ from sonarr.models.history_resource_paging_resource import HistoryResourcePagingResource from sonarr.models.host_config_resource import HostConfigResource from sonarr.models.import_list_bulk_resource import ImportListBulkResource +from sonarr.models.import_list_config_resource import ImportListConfigResource from sonarr.models.import_list_exclusion_resource import ImportListExclusionResource from sonarr.models.import_list_resource import ImportListResource from sonarr.models.import_list_type import ImportListType @@ -150,6 +152,7 @@ from sonarr.models.language_profile_item_resource import LanguageProfileItemResource from sonarr.models.language_profile_resource import LanguageProfileResource from sonarr.models.language_resource import LanguageResource +from sonarr.models.list_sync_level_type import ListSyncLevelType from sonarr.models.localization_language_resource import LocalizationLanguageResource from sonarr.models.localization_resource import LocalizationResource from sonarr.models.log_file_resource import LogFileResource diff --git a/sonarr/api/__init__.py b/sonarr/api/__init__.py index 8134309..ce3556d 100644 --- a/sonarr/api/__init__.py +++ b/sonarr/api/__init__.py @@ -35,6 +35,7 @@ from sonarr.api.history_api import HistoryApi from sonarr.api.host_config_api import HostConfigApi from sonarr.api.import_list_api import ImportListApi +from sonarr.api.import_list_config_api import ImportListConfigApi from sonarr.api.import_list_exclusion_api import ImportListExclusionApi from sonarr.api.indexer_api import IndexerApi from sonarr.api.indexer_config_api import IndexerConfigApi diff --git a/sonarr/api/history_api.py b/sonarr/api/history_api.py index 913c0e9..d01cde8 100644 --- a/sonarr/api/history_api.py +++ b/sonarr/api/history_api.py @@ -183,7 +183,7 @@ def create_history_failed_by_id_with_http_info(self, id : StrictInt, **kwargs): _request_auth=_params.get('_request_auth')) @validate_arguments - def get_history(self, page : Optional[StrictInt] = None, page_size : Optional[StrictInt] = None, sort_key : Optional[StrictStr] = None, sort_direction : Optional[SortDirection] = None, include_series : Optional[StrictBool] = None, include_episode : Optional[StrictBool] = None, event_type : Optional[StrictInt] = None, episode_id : Optional[StrictInt] = None, download_id : Optional[StrictStr] = None, series_ids : Optional[List[StrictInt]] = None, languages : Optional[List[StrictInt]] = None, quality : Optional[List[StrictInt]] = None, **kwargs) -> HistoryResourcePagingResource: # noqa: E501 + def get_history(self, page : Optional[StrictInt] = None, page_size : Optional[StrictInt] = None, sort_key : Optional[StrictStr] = None, sort_direction : Optional[SortDirection] = None, include_series : Optional[StrictBool] = None, include_episode : Optional[StrictBool] = None, event_type : Optional[List[StrictInt]] = None, episode_id : Optional[StrictInt] = None, download_id : Optional[StrictStr] = None, series_ids : Optional[List[StrictInt]] = None, languages : Optional[List[StrictInt]] = None, quality : Optional[List[StrictInt]] = None, **kwargs) -> HistoryResourcePagingResource: # noqa: E501 """get_history # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -205,7 +205,7 @@ def get_history(self, page : Optional[StrictInt] = None, page_size : Optional[St :param include_episode: :type include_episode: bool :param event_type: - :type event_type: int + :type event_type: List[int] :param episode_id: :type episode_id: int :param download_id: @@ -235,7 +235,7 @@ def get_history(self, page : Optional[StrictInt] = None, page_size : Optional[St return self.get_history_with_http_info(page, page_size, sort_key, sort_direction, include_series, include_episode, event_type, episode_id, download_id, series_ids, languages, quality, **kwargs) # noqa: E501 @validate_arguments - def get_history_with_http_info(self, page : Optional[StrictInt] = None, page_size : Optional[StrictInt] = None, sort_key : Optional[StrictStr] = None, sort_direction : Optional[SortDirection] = None, include_series : Optional[StrictBool] = None, include_episode : Optional[StrictBool] = None, event_type : Optional[StrictInt] = None, episode_id : Optional[StrictInt] = None, download_id : Optional[StrictStr] = None, series_ids : Optional[List[StrictInt]] = None, languages : Optional[List[StrictInt]] = None, quality : Optional[List[StrictInt]] = None, **kwargs): # noqa: E501 + def get_history_with_http_info(self, page : Optional[StrictInt] = None, page_size : Optional[StrictInt] = None, sort_key : Optional[StrictStr] = None, sort_direction : Optional[SortDirection] = None, include_series : Optional[StrictBool] = None, include_episode : Optional[StrictBool] = None, event_type : Optional[List[StrictInt]] = None, episode_id : Optional[StrictInt] = None, download_id : Optional[StrictStr] = None, series_ids : Optional[List[StrictInt]] = None, languages : Optional[List[StrictInt]] = None, quality : Optional[List[StrictInt]] = None, **kwargs): # noqa: E501 """get_history # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -257,7 +257,7 @@ def get_history_with_http_info(self, page : Optional[StrictInt] = None, page_siz :param include_episode: :type include_episode: bool :param event_type: - :type event_type: int + :type event_type: List[int] :param episode_id: :type episode_id: int :param download_id: @@ -351,6 +351,7 @@ def get_history_with_http_info(self, page : Optional[StrictInt] = None, page_siz _query_params.append(('includeEpisode', _params['include_episode'])) if _params.get('event_type') is not None: # noqa: E501 _query_params.append(('eventType', _params['event_type'])) + _collection_formats['eventType'] = 'multi' if _params.get('episode_id') is not None: # noqa: E501 _query_params.append(('episodeId', _params['episode_id'])) if _params.get('download_id') is not None: # noqa: E501 diff --git a/sonarr/api/import_list_config_api.py b/sonarr/api/import_list_config_api.py new file mode 100644 index 0000000..543abf1 --- /dev/null +++ b/sonarr/api/import_list_config_api.py @@ -0,0 +1,473 @@ +# coding: utf-8 + +""" + Sonarr + + Sonarr API docs - The v3 API docs apply to both v3 and v4 versions of Sonarr. Some functionality may only be available in v4 of the Sonarr application. # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import StrictInt, StrictStr + +from typing import Optional + +from sonarr.models.import_list_config_resource import ImportListConfigResource + +from sonarr.api_client import ApiClient +from sonarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ImportListConfigApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def get_import_list_config(self, **kwargs) -> ImportListConfigResource: # noqa: E501 + """get_import_list_config # 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_import_list_config(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :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: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ImportListConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.get_import_list_config_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_import_list_config_with_http_info(self, **kwargs): # noqa: E501 + """get_import_list_config # 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_import_list_config_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :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. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ImportListConfigResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_import_list_config" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + + # process the form parameters + _form_params = [] + _files = {} + + # 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 = { + '200': "ImportListConfigResource", + } + + return self.api_client.call_api( + '/api/v3/config/importlist', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_import_list_config_by_id(self, id : StrictInt, **kwargs) -> ImportListConfigResource: # noqa: E501 + """get_import_list_config_by_id # 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_import_list_config_by_id(id, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :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: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ImportListConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.get_import_list_config_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_import_list_config_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_import_list_config_by_id # 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_import_list_config_by_id_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :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. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ImportListConfigResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_import_list_config_by_id" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + + # process the query parameters + _query_params = [] + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + + # process the form parameters + _form_params = [] + _files = {} + + # 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 = { + '200': "ImportListConfigResource", + } + + return self.api_client.call_api( + '/api/v3/config/importlist/{id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_import_list_config(self, id : StrictStr, import_list_config_resource : Optional[ImportListConfigResource] = None, **kwargs) -> ImportListConfigResource: # noqa: E501 + """update_import_list_config # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_import_list_config(id, import_list_config_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param import_list_config_resource: + :type import_list_config_resource: ImportListConfigResource + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :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: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ImportListConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.update_import_list_config_with_http_info(id, import_list_config_resource, **kwargs) # noqa: E501 + + @validate_arguments + def update_import_list_config_with_http_info(self, id : StrictStr, import_list_config_resource : Optional[ImportListConfigResource] = None, **kwargs): # noqa: E501 + """update_import_list_config # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_import_list_config_with_http_info(id, import_list_config_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param import_list_config_resource: + :type import_list_config_resource: ImportListConfigResource + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :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. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ImportListConfigResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'import_list_config_resource' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_import_list_config" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + + # process the query parameters + _query_params = [] + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + + # process the form parameters + _form_params = [] + _files = {} + + # process the body parameter + _body_params = None + if _params['import_list_config_resource']: + _body_params = _params['import_list_config_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['apikey', 'X-Api-Key'] # noqa: E501 + + _response_types_map = { + '200': "ImportListConfigResource", + } + + return self.api_client.call_api( + '/api/v3/config/importlist/{id}', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/sonarr/api/queue_api.py b/sonarr/api/queue_api.py index 174e231..c7e11b3 100644 --- a/sonarr/api/queue_api.py +++ b/sonarr/api/queue_api.py @@ -46,13 +46,13 @@ def __init__(self, api_client=None): self.api_client = api_client @validate_arguments - def delete_queue(self, id : StrictInt, remove_from_client : Optional[StrictBool] = None, blocklist : Optional[StrictBool] = None, skip_redownload : Optional[StrictBool] = None, **kwargs) -> None: # noqa: E501 + def delete_queue(self, id : StrictInt, remove_from_client : Optional[StrictBool] = None, blocklist : Optional[StrictBool] = None, skip_redownload : Optional[StrictBool] = None, change_category : Optional[StrictBool] = None, **kwargs) -> None: # noqa: E501 """delete_queue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_queue(id, remove_from_client, blocklist, skip_redownload, async_req=True) + >>> thread = api.delete_queue(id, remove_from_client, blocklist, skip_redownload, change_category, async_req=True) >>> result = thread.get() :param id: (required) @@ -63,6 +63,8 @@ def delete_queue(self, id : StrictInt, remove_from_client : Optional[StrictBool] :type blocklist: bool :param skip_redownload: :type skip_redownload: bool + :param change_category: + :type change_category: bool :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -79,16 +81,16 @@ def delete_queue(self, id : StrictInt, remove_from_client : Optional[StrictBool] :rtype: None """ kwargs['_return_http_data_only'] = True - return self.delete_queue_with_http_info(id, remove_from_client, blocklist, skip_redownload, **kwargs) # noqa: E501 + return self.delete_queue_with_http_info(id, remove_from_client, blocklist, skip_redownload, change_category, **kwargs) # noqa: E501 @validate_arguments - def delete_queue_with_http_info(self, id : StrictInt, remove_from_client : Optional[StrictBool] = None, blocklist : Optional[StrictBool] = None, skip_redownload : Optional[StrictBool] = None, **kwargs): # noqa: E501 + def delete_queue_with_http_info(self, id : StrictInt, remove_from_client : Optional[StrictBool] = None, blocklist : Optional[StrictBool] = None, skip_redownload : Optional[StrictBool] = None, change_category : Optional[StrictBool] = None, **kwargs): # noqa: E501 """delete_queue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_queue_with_http_info(id, remove_from_client, blocklist, skip_redownload, async_req=True) + >>> thread = api.delete_queue_with_http_info(id, remove_from_client, blocklist, skip_redownload, change_category, async_req=True) >>> result = thread.get() :param id: (required) @@ -99,6 +101,8 @@ def delete_queue_with_http_info(self, id : StrictInt, remove_from_client : Optio :type blocklist: bool :param skip_redownload: :type skip_redownload: bool + :param change_category: + :type change_category: bool :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code @@ -129,7 +133,8 @@ def delete_queue_with_http_info(self, id : StrictInt, remove_from_client : Optio 'id', 'remove_from_client', 'blocklist', - 'skip_redownload' + 'skip_redownload', + 'change_category' ] _all_params.extend( [ @@ -168,6 +173,8 @@ def delete_queue_with_http_info(self, id : StrictInt, remove_from_client : Optio _query_params.append(('blocklist', _params['blocklist'])) if _params.get('skip_redownload') is not None: # noqa: E501 _query_params.append(('skipRedownload', _params['skip_redownload'])) + if _params.get('change_category') is not None: # noqa: E501 + _query_params.append(('changeCategory', _params['change_category'])) # process the header parameters _header_params = dict(_params.get('_headers', {})) @@ -202,13 +209,13 @@ def delete_queue_with_http_info(self, id : StrictInt, remove_from_client : Optio _request_auth=_params.get('_request_auth')) @validate_arguments - def delete_queue_bulk(self, remove_from_client : Optional[StrictBool] = None, blocklist : Optional[StrictBool] = None, skip_redownload : Optional[StrictBool] = None, queue_bulk_resource : Optional[QueueBulkResource] = None, **kwargs) -> None: # noqa: E501 + def delete_queue_bulk(self, remove_from_client : Optional[StrictBool] = None, blocklist : Optional[StrictBool] = None, skip_redownload : Optional[StrictBool] = None, change_category : Optional[StrictBool] = None, queue_bulk_resource : Optional[QueueBulkResource] = None, **kwargs) -> None: # noqa: E501 """delete_queue_bulk # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_queue_bulk(remove_from_client, blocklist, skip_redownload, queue_bulk_resource, async_req=True) + >>> thread = api.delete_queue_bulk(remove_from_client, blocklist, skip_redownload, change_category, queue_bulk_resource, async_req=True) >>> result = thread.get() :param remove_from_client: @@ -217,6 +224,8 @@ def delete_queue_bulk(self, remove_from_client : Optional[StrictBool] = None, bl :type blocklist: bool :param skip_redownload: :type skip_redownload: bool + :param change_category: + :type change_category: bool :param queue_bulk_resource: :type queue_bulk_resource: QueueBulkResource :param async_req: Whether to execute the request asynchronously. @@ -235,16 +244,16 @@ def delete_queue_bulk(self, remove_from_client : Optional[StrictBool] = None, bl :rtype: None """ kwargs['_return_http_data_only'] = True - return self.delete_queue_bulk_with_http_info(remove_from_client, blocklist, skip_redownload, queue_bulk_resource, **kwargs) # noqa: E501 + return self.delete_queue_bulk_with_http_info(remove_from_client, blocklist, skip_redownload, change_category, queue_bulk_resource, **kwargs) # noqa: E501 @validate_arguments - def delete_queue_bulk_with_http_info(self, remove_from_client : Optional[StrictBool] = None, blocklist : Optional[StrictBool] = None, skip_redownload : Optional[StrictBool] = None, queue_bulk_resource : Optional[QueueBulkResource] = None, **kwargs): # noqa: E501 + def delete_queue_bulk_with_http_info(self, remove_from_client : Optional[StrictBool] = None, blocklist : Optional[StrictBool] = None, skip_redownload : Optional[StrictBool] = None, change_category : Optional[StrictBool] = None, queue_bulk_resource : Optional[QueueBulkResource] = None, **kwargs): # noqa: E501 """delete_queue_bulk # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_queue_bulk_with_http_info(remove_from_client, blocklist, skip_redownload, queue_bulk_resource, async_req=True) + >>> thread = api.delete_queue_bulk_with_http_info(remove_from_client, blocklist, skip_redownload, change_category, queue_bulk_resource, async_req=True) >>> result = thread.get() :param remove_from_client: @@ -253,6 +262,8 @@ def delete_queue_bulk_with_http_info(self, remove_from_client : Optional[StrictB :type blocklist: bool :param skip_redownload: :type skip_redownload: bool + :param change_category: + :type change_category: bool :param queue_bulk_resource: :type queue_bulk_resource: QueueBulkResource :param async_req: Whether to execute the request asynchronously. @@ -285,6 +296,7 @@ def delete_queue_bulk_with_http_info(self, remove_from_client : Optional[StrictB 'remove_from_client', 'blocklist', 'skip_redownload', + 'change_category', 'queue_bulk_resource' ] _all_params.extend( @@ -322,6 +334,8 @@ def delete_queue_bulk_with_http_info(self, remove_from_client : Optional[StrictB _query_params.append(('blocklist', _params['blocklist'])) if _params.get('skip_redownload') is not None: # noqa: E501 _query_params.append(('skipRedownload', _params['skip_redownload'])) + if _params.get('change_category') is not None: # noqa: E501 + _query_params.append(('changeCategory', _params['change_category'])) # process the header parameters _header_params = dict(_params.get('_headers', {})) diff --git a/sonarr/models/__init__.py b/sonarr/models/__init__.py index d73282e..24b5514 100644 --- a/sonarr/models/__init__.py +++ b/sonarr/models/__init__.py @@ -59,6 +59,7 @@ from sonarr.models.history_resource_paging_resource import HistoryResourcePagingResource from sonarr.models.host_config_resource import HostConfigResource from sonarr.models.import_list_bulk_resource import ImportListBulkResource +from sonarr.models.import_list_config_resource import ImportListConfigResource from sonarr.models.import_list_exclusion_resource import ImportListExclusionResource from sonarr.models.import_list_resource import ImportListResource from sonarr.models.import_list_type import ImportListType @@ -69,6 +70,7 @@ from sonarr.models.language_profile_item_resource import LanguageProfileItemResource from sonarr.models.language_profile_resource import LanguageProfileResource from sonarr.models.language_resource import LanguageResource +from sonarr.models.list_sync_level_type import ListSyncLevelType from sonarr.models.localization_language_resource import LocalizationLanguageResource from sonarr.models.localization_resource import LocalizationResource from sonarr.models.log_file_resource import LogFileResource diff --git a/sonarr/models/import_list_config_resource.py b/sonarr/models/import_list_config_resource.py new file mode 100644 index 0000000..8de83e2 --- /dev/null +++ b/sonarr/models/import_list_config_resource.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Sonarr + + Sonarr API docs - The v3 API docs apply to both v3 and v4 versions of Sonarr. Some functionality may only be available in v4 of the Sonarr application. # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from inspect import getfullargspec +import pprint +import re # noqa: F401 +import json + + +from typing import Any, ClassVar, Dict, Optional +from pydantic import BaseModel +from sonarr.models.list_sync_level_type import ListSyncLevelType + +class ImportListConfigResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + list_sync_level: Optional[ListSyncLevelType] + list_sync_tag: Optional[int] + __properties = ["id", "listSyncLevel", "listSyncTag"] + + class Config: + allow_population_by_field_name = True + validate_assignment = True + alias_generator = lambda x: x.split("_")[0] + "".join(word.capitalize() for word in x.split("_")[1:]) + + def __getitem__(self, item): + return getattr(self, item) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ImportListConfigResource: + """Create an instance of ImportListConfigResource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ImportListConfigResource: + """Create an instance of ImportListConfigResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return ImportListConfigResource.parse_obj(obj) + + _obj = ImportListConfigResource.parse_obj({ + "id": obj.get("id"), + "list_sync_level": obj.get("listSyncLevel"), + "list_sync_tag": obj.get("listSyncTag") + }) + return _obj + diff --git a/sonarr/models/list_sync_level_type.py b/sonarr/models/list_sync_level_type.py new file mode 100644 index 0000000..91cbeff --- /dev/null +++ b/sonarr/models/list_sync_level_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Sonarr + + Sonarr API docs - The v3 API docs apply to both v3 and v4 versions of Sonarr. Some functionality may only be available in v4 of the Sonarr application. # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Generated by: https://openapi-generator.tech +""" + + +from inspect import getfullargspec +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class ListSyncLevelType(str, Enum): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + + DISABLED = 'disabled' + LOGONLY = 'logOnly' + KEEPANDUNMONITOR = 'keepAndUnmonitor' + KEEPANDTAG = 'keepAndTag' + diff --git a/sonarr/models/queue_resource.py b/sonarr/models/queue_resource.py index 4a51aa5..c9fa1cc 100644 --- a/sonarr/models/queue_resource.py +++ b/sonarr/models/queue_resource.py @@ -59,10 +59,11 @@ class QueueResource(BaseModel): download_id: Optional[str] protocol: Optional[DownloadProtocol] download_client: Optional[str] + download_client_has_post_import_category: Optional[bool] indexer: Optional[str] output_path: Optional[str] episode_has_file: Optional[bool] - __properties = ["id", "seriesId", "episodeId", "seasonNumber", "series", "episode", "languages", "quality", "customFormats", "customFormatScore", "size", "title", "sizeleft", "timeleft", "estimatedCompletionTime", "added", "status", "trackedDownloadStatus", "trackedDownloadState", "statusMessages", "errorMessage", "downloadId", "protocol", "downloadClient", "indexer", "outputPath", "episodeHasFile"] + __properties = ["id", "seriesId", "episodeId", "seasonNumber", "series", "episode", "languages", "quality", "customFormats", "customFormatScore", "size", "title", "sizeleft", "timeleft", "estimatedCompletionTime", "added", "status", "trackedDownloadStatus", "trackedDownloadState", "statusMessages", "errorMessage", "downloadId", "protocol", "downloadClient", "downloadClientHasPostImportCategory", "indexer", "outputPath", "episodeHasFile"] class Config: allow_population_by_field_name = True @@ -217,6 +218,7 @@ def from_dict(cls, obj: dict) -> QueueResource: "download_id": obj.get("downloadId"), "protocol": obj.get("protocol"), "download_client": obj.get("downloadClient"), + "download_client_has_post_import_category": obj.get("downloadClientHasPostImportCategory"), "indexer": obj.get("indexer"), "output_path": obj.get("outputPath"), "episode_has_file": obj.get("episodeHasFile")