diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..1047217 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,12 @@ +name: CD + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + cd: + uses: devopsarr/shared-workflows/.github/workflows/python_release.yml@main + secrets: inherit \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..43995bd --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..fe29b2d --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,216 @@ +.github/workflows/python.yml +.gitignore +README.md +docs/ApiInfoApi.md +docs/ApiInfoResource.md +docs/AppProfileApi.md +docs/AppProfileResource.md +docs/ApplicationApi.md +docs/ApplicationResource.md +docs/ApplicationSyncLevel.md +docs/ApplyTags.md +docs/AuthenticationApi.md +docs/AuthenticationRequiredType.md +docs/AuthenticationType.md +docs/BackupApi.md +docs/BackupResource.md +docs/BackupType.md +docs/BookSearchParam.md +docs/CertificateValidationType.md +docs/Command.md +docs/CommandApi.md +docs/CommandPriority.md +docs/CommandResource.md +docs/CommandStatus.md +docs/CommandTrigger.md +docs/CustomFilterApi.md +docs/CustomFilterResource.md +docs/DevelopmentConfigApi.md +docs/DevelopmentConfigResource.md +docs/DownloadClientApi.md +docs/DownloadClientCategory.md +docs/DownloadClientConfigApi.md +docs/DownloadClientConfigResource.md +docs/DownloadClientResource.md +docs/DownloadProtocol.md +docs/Field.md +docs/FileSystemApi.md +docs/HealthApi.md +docs/HealthCheckResult.md +docs/HealthResource.md +docs/HistoryApi.md +docs/HistoryEventType.md +docs/HistoryResource.md +docs/HistoryResourcePagingResource.md +docs/HostConfigApi.md +docs/HostConfigResource.md +docs/HostStatistics.md +docs/HttpUri.md +docs/IndexerApi.md +docs/IndexerCapabilityResource.md +docs/IndexerCategory.md +docs/IndexerDefaultCategoriesApi.md +docs/IndexerEditorApi.md +docs/IndexerEditorResource.md +docs/IndexerPrivacy.md +docs/IndexerProxyApi.md +docs/IndexerProxyResource.md +docs/IndexerResource.md +docs/IndexerStatistics.md +docs/IndexerStatsApi.md +docs/IndexerStatsResource.md +docs/IndexerStatusApi.md +docs/IndexerStatusResource.md +docs/InitializeJsApi.md +docs/LocalizationApi.md +docs/LocalizationOption.md +docs/LogApi.md +docs/LogFileApi.md +docs/LogFileResource.md +docs/LogResource.md +docs/LogResourcePagingResource.md +docs/MovieSearchParam.md +docs/MusicSearchParam.md +docs/NewznabApi.md +docs/NotificationApi.md +docs/NotificationResource.md +docs/PagingResourceFilter.md +docs/ProviderMessage.md +docs/ProviderMessageType.md +docs/ProxyType.md +docs/QualityProfileSchemaApi.md +docs/ReleaseResource.md +docs/SearchApi.md +docs/SearchParam.md +docs/SelectOption.md +docs/SortDirection.md +docs/StaticResourceApi.md +docs/SystemApi.md +docs/TagApi.md +docs/TagDetailsApi.md +docs/TagDetailsResource.md +docs/TagResource.md +docs/TaskApi.md +docs/TaskResource.md +docs/TimeSpan.md +docs/TvSearchParam.md +docs/UiConfigApi.md +docs/UiConfigResource.md +docs/UpdateApi.md +docs/UpdateChanges.md +docs/UpdateLogFileApi.md +docs/UpdateMechanism.md +docs/UpdateResource.md +docs/UserAgentStatistics.md +docs/Version.md +prowlarr/__init__.py +prowlarr/api/__init__.py +prowlarr/api/api_info_api.py +prowlarr/api/app_profile_api.py +prowlarr/api/application_api.py +prowlarr/api/authentication_api.py +prowlarr/api/backup_api.py +prowlarr/api/command_api.py +prowlarr/api/custom_filter_api.py +prowlarr/api/development_config_api.py +prowlarr/api/download_client_api.py +prowlarr/api/download_client_config_api.py +prowlarr/api/file_system_api.py +prowlarr/api/health_api.py +prowlarr/api/history_api.py +prowlarr/api/host_config_api.py +prowlarr/api/indexer_api.py +prowlarr/api/indexer_default_categories_api.py +prowlarr/api/indexer_editor_api.py +prowlarr/api/indexer_proxy_api.py +prowlarr/api/indexer_stats_api.py +prowlarr/api/indexer_status_api.py +prowlarr/api/initialize_js_api.py +prowlarr/api/localization_api.py +prowlarr/api/log_api.py +prowlarr/api/log_file_api.py +prowlarr/api/newznab_api.py +prowlarr/api/notification_api.py +prowlarr/api/quality_profile_schema_api.py +prowlarr/api/search_api.py +prowlarr/api/static_resource_api.py +prowlarr/api/system_api.py +prowlarr/api/tag_api.py +prowlarr/api/tag_details_api.py +prowlarr/api/task_api.py +prowlarr/api/ui_config_api.py +prowlarr/api/update_api.py +prowlarr/api/update_log_file_api.py +prowlarr/api_client.py +prowlarr/configuration.py +prowlarr/exceptions.py +prowlarr/models/__init__.py +prowlarr/models/api_info_resource.py +prowlarr/models/app_profile_resource.py +prowlarr/models/application_resource.py +prowlarr/models/application_sync_level.py +prowlarr/models/apply_tags.py +prowlarr/models/authentication_required_type.py +prowlarr/models/authentication_type.py +prowlarr/models/backup_resource.py +prowlarr/models/backup_type.py +prowlarr/models/book_search_param.py +prowlarr/models/certificate_validation_type.py +prowlarr/models/command.py +prowlarr/models/command_priority.py +prowlarr/models/command_resource.py +prowlarr/models/command_status.py +prowlarr/models/command_trigger.py +prowlarr/models/custom_filter_resource.py +prowlarr/models/development_config_resource.py +prowlarr/models/download_client_category.py +prowlarr/models/download_client_config_resource.py +prowlarr/models/download_client_resource.py +prowlarr/models/download_protocol.py +prowlarr/models/field.py +prowlarr/models/health_check_result.py +prowlarr/models/health_resource.py +prowlarr/models/history_event_type.py +prowlarr/models/history_resource.py +prowlarr/models/history_resource_paging_resource.py +prowlarr/models/host_config_resource.py +prowlarr/models/host_statistics.py +prowlarr/models/http_uri.py +prowlarr/models/indexer_capability_resource.py +prowlarr/models/indexer_category.py +prowlarr/models/indexer_editor_resource.py +prowlarr/models/indexer_privacy.py +prowlarr/models/indexer_proxy_resource.py +prowlarr/models/indexer_resource.py +prowlarr/models/indexer_statistics.py +prowlarr/models/indexer_stats_resource.py +prowlarr/models/indexer_status_resource.py +prowlarr/models/localization_option.py +prowlarr/models/log_file_resource.py +prowlarr/models/log_resource.py +prowlarr/models/log_resource_paging_resource.py +prowlarr/models/movie_search_param.py +prowlarr/models/music_search_param.py +prowlarr/models/notification_resource.py +prowlarr/models/paging_resource_filter.py +prowlarr/models/provider_message.py +prowlarr/models/provider_message_type.py +prowlarr/models/proxy_type.py +prowlarr/models/release_resource.py +prowlarr/models/search_param.py +prowlarr/models/select_option.py +prowlarr/models/sort_direction.py +prowlarr/models/tag_details_resource.py +prowlarr/models/tag_resource.py +prowlarr/models/task_resource.py +prowlarr/models/time_span.py +prowlarr/models/tv_search_param.py +prowlarr/models/ui_config_resource.py +prowlarr/models/update_changes.py +prowlarr/models/update_mechanism.py +prowlarr/models/update_resource.py +prowlarr/models/user_agent_statistics.py +prowlarr/models/version.py +prowlarr/rest.py +setup.cfg +setup.py diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..d6b4ec4 --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.3.0-SNAPSHOT \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..4ba20a3 --- /dev/null +++ b/README.md @@ -0,0 +1,319 @@ +# prowlarr-py +Prowlarr API docs + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Package version: 0.0.1 +- Build package: org.openapitools.codegen.languages.PythonNextgenClientCodegen + +## Requirements. + +Python 3.7+ + +## Installation & Usage +### pip install + +If the python package is hosted on a repository, you can install directly using: + +```sh +pip install git+https://github.com/devopsarr/prowlarr-py.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/devopsarr/prowlarr-py.git`) + +Then import the package: +```python +import prowlarr +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import prowlarr +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function + +import time +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApiInfoApi(api_client) + + try: + api_response = api_instance.get_api() + print("The response of ApiInfoApi->get_api:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling ApiInfoApi->get_api: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost:9696* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ApiInfoApi* | [**get_api**](docs/ApiInfoApi.md#get_api) | **GET** /api | +*AppProfileApi* | [**create_app_profile**](docs/AppProfileApi.md#create_app_profile) | **POST** /api/v1/appprofile | +*AppProfileApi* | [**delete_app_profile**](docs/AppProfileApi.md#delete_app_profile) | **DELETE** /api/v1/appprofile/{id} | +*AppProfileApi* | [**get_app_profile_by_id**](docs/AppProfileApi.md#get_app_profile_by_id) | **GET** /api/v1/appprofile/{id} | +*AppProfileApi* | [**list_app_profile**](docs/AppProfileApi.md#list_app_profile) | **GET** /api/v1/appprofile | +*AppProfileApi* | [**update_app_profile**](docs/AppProfileApi.md#update_app_profile) | **PUT** /api/v1/appprofile/{id} | +*ApplicationApi* | [**create_applications**](docs/ApplicationApi.md#create_applications) | **POST** /api/v1/applications | +*ApplicationApi* | [**create_applications_action_by_name**](docs/ApplicationApi.md#create_applications_action_by_name) | **POST** /api/v1/applications/action/{name} | +*ApplicationApi* | [**delete_applications**](docs/ApplicationApi.md#delete_applications) | **DELETE** /api/v1/applications/{id} | +*ApplicationApi* | [**get_applications_by_id**](docs/ApplicationApi.md#get_applications_by_id) | **GET** /api/v1/applications/{id} | +*ApplicationApi* | [**list_applications**](docs/ApplicationApi.md#list_applications) | **GET** /api/v1/applications | +*ApplicationApi* | [**list_applications_schema**](docs/ApplicationApi.md#list_applications_schema) | **GET** /api/v1/applications/schema | +*ApplicationApi* | [**test_applications**](docs/ApplicationApi.md#test_applications) | **POST** /api/v1/applications/test | +*ApplicationApi* | [**testall_applications**](docs/ApplicationApi.md#testall_applications) | **POST** /api/v1/applications/testall | +*ApplicationApi* | [**update_applications**](docs/ApplicationApi.md#update_applications) | **PUT** /api/v1/applications/{id} | +*AuthenticationApi* | [**create_login**](docs/AuthenticationApi.md#create_login) | **POST** /login | +*AuthenticationApi* | [**get_logout**](docs/AuthenticationApi.md#get_logout) | **GET** /logout | +*BackupApi* | [**create_system_backup_restore_by_id**](docs/BackupApi.md#create_system_backup_restore_by_id) | **POST** /api/v1/system/backup/restore/{id} | +*BackupApi* | [**create_system_backup_restore_upload**](docs/BackupApi.md#create_system_backup_restore_upload) | **POST** /api/v1/system/backup/restore/upload | +*BackupApi* | [**delete_system_backup**](docs/BackupApi.md#delete_system_backup) | **DELETE** /api/v1/system/backup/{id} | +*BackupApi* | [**list_system_backup**](docs/BackupApi.md#list_system_backup) | **GET** /api/v1/system/backup | +*CommandApi* | [**create_command**](docs/CommandApi.md#create_command) | **POST** /api/v1/command | +*CommandApi* | [**delete_command**](docs/CommandApi.md#delete_command) | **DELETE** /api/v1/command/{id} | +*CommandApi* | [**get_command_by_id**](docs/CommandApi.md#get_command_by_id) | **GET** /api/v1/command/{id} | +*CommandApi* | [**list_command**](docs/CommandApi.md#list_command) | **GET** /api/v1/command | +*CustomFilterApi* | [**create_custom_filter**](docs/CustomFilterApi.md#create_custom_filter) | **POST** /api/v1/customfilter | +*CustomFilterApi* | [**delete_custom_filter**](docs/CustomFilterApi.md#delete_custom_filter) | **DELETE** /api/v1/customfilter/{id} | +*CustomFilterApi* | [**get_custom_filter_by_id**](docs/CustomFilterApi.md#get_custom_filter_by_id) | **GET** /api/v1/customfilter/{id} | +*CustomFilterApi* | [**list_custom_filter**](docs/CustomFilterApi.md#list_custom_filter) | **GET** /api/v1/customfilter | +*CustomFilterApi* | [**update_custom_filter**](docs/CustomFilterApi.md#update_custom_filter) | **PUT** /api/v1/customfilter/{id} | +*DevelopmentConfigApi* | [**get_development_config**](docs/DevelopmentConfigApi.md#get_development_config) | **GET** /api/v1/config/development | +*DevelopmentConfigApi* | [**get_development_config_by_id**](docs/DevelopmentConfigApi.md#get_development_config_by_id) | **GET** /api/v1/config/development/{id} | +*DevelopmentConfigApi* | [**update_development_config**](docs/DevelopmentConfigApi.md#update_development_config) | **PUT** /api/v1/config/development/{id} | +*DownloadClientApi* | [**create_download_client**](docs/DownloadClientApi.md#create_download_client) | **POST** /api/v1/downloadclient | +*DownloadClientApi* | [**create_download_client_action_by_name**](docs/DownloadClientApi.md#create_download_client_action_by_name) | **POST** /api/v1/downloadclient/action/{name} | +*DownloadClientApi* | [**delete_download_client**](docs/DownloadClientApi.md#delete_download_client) | **DELETE** /api/v1/downloadclient/{id} | +*DownloadClientApi* | [**get_download_client_by_id**](docs/DownloadClientApi.md#get_download_client_by_id) | **GET** /api/v1/downloadclient/{id} | +*DownloadClientApi* | [**list_download_client**](docs/DownloadClientApi.md#list_download_client) | **GET** /api/v1/downloadclient | +*DownloadClientApi* | [**list_download_client_schema**](docs/DownloadClientApi.md#list_download_client_schema) | **GET** /api/v1/downloadclient/schema | +*DownloadClientApi* | [**test_download_client**](docs/DownloadClientApi.md#test_download_client) | **POST** /api/v1/downloadclient/test | +*DownloadClientApi* | [**testall_download_client**](docs/DownloadClientApi.md#testall_download_client) | **POST** /api/v1/downloadclient/testall | +*DownloadClientApi* | [**update_download_client**](docs/DownloadClientApi.md#update_download_client) | **PUT** /api/v1/downloadclient/{id} | +*DownloadClientConfigApi* | [**get_download_client_config**](docs/DownloadClientConfigApi.md#get_download_client_config) | **GET** /api/v1/config/downloadclient | +*DownloadClientConfigApi* | [**get_download_client_config_by_id**](docs/DownloadClientConfigApi.md#get_download_client_config_by_id) | **GET** /api/v1/config/downloadclient/{id} | +*DownloadClientConfigApi* | [**update_download_client_config**](docs/DownloadClientConfigApi.md#update_download_client_config) | **PUT** /api/v1/config/downloadclient/{id} | +*FileSystemApi* | [**get_file_system**](docs/FileSystemApi.md#get_file_system) | **GET** /api/v1/filesystem | +*FileSystemApi* | [**get_file_system_type**](docs/FileSystemApi.md#get_file_system_type) | **GET** /api/v1/filesystem/type | +*HealthApi* | [**get_health_by_id**](docs/HealthApi.md#get_health_by_id) | **GET** /api/v1/health/{id} | +*HealthApi* | [**list_health**](docs/HealthApi.md#list_health) | **GET** /api/v1/health | +*HistoryApi* | [**get_history**](docs/HistoryApi.md#get_history) | **GET** /api/v1/history | +*HistoryApi* | [**list_history_indexer**](docs/HistoryApi.md#list_history_indexer) | **GET** /api/v1/history/indexer | +*HistoryApi* | [**list_history_since**](docs/HistoryApi.md#list_history_since) | **GET** /api/v1/history/since | +*HostConfigApi* | [**get_host_config**](docs/HostConfigApi.md#get_host_config) | **GET** /api/v1/config/host | +*HostConfigApi* | [**get_host_config_by_id**](docs/HostConfigApi.md#get_host_config_by_id) | **GET** /api/v1/config/host/{id} | +*HostConfigApi* | [**update_host_config**](docs/HostConfigApi.md#update_host_config) | **PUT** /api/v1/config/host/{id} | +*IndexerApi* | [**create_indexer**](docs/IndexerApi.md#create_indexer) | **POST** /api/v1/indexer | +*IndexerApi* | [**create_indexer_action_by_name**](docs/IndexerApi.md#create_indexer_action_by_name) | **POST** /api/v1/indexer/action/{name} | +*IndexerApi* | [**delete_indexer**](docs/IndexerApi.md#delete_indexer) | **DELETE** /api/v1/indexer/{id} | +*IndexerApi* | [**get_indexer_by_id**](docs/IndexerApi.md#get_indexer_by_id) | **GET** /api/v1/indexer/{id} | +*IndexerApi* | [**list_indexer**](docs/IndexerApi.md#list_indexer) | **GET** /api/v1/indexer | +*IndexerApi* | [**list_indexer_schema**](docs/IndexerApi.md#list_indexer_schema) | **GET** /api/v1/indexer/schema | +*IndexerApi* | [**test_indexer**](docs/IndexerApi.md#test_indexer) | **POST** /api/v1/indexer/test | +*IndexerApi* | [**testall_indexer**](docs/IndexerApi.md#testall_indexer) | **POST** /api/v1/indexer/testall | +*IndexerApi* | [**update_indexer**](docs/IndexerApi.md#update_indexer) | **PUT** /api/v1/indexer/{id} | +*IndexerDefaultCategoriesApi* | [**list_indexer_categories**](docs/IndexerDefaultCategoriesApi.md#list_indexer_categories) | **GET** /api/v1/indexer/categories | +*IndexerEditorApi* | [**delete_indexer_editor**](docs/IndexerEditorApi.md#delete_indexer_editor) | **DELETE** /api/v1/indexer/editor | +*IndexerEditorApi* | [**put_indexer_editor**](docs/IndexerEditorApi.md#put_indexer_editor) | **PUT** /api/v1/indexer/editor | +*IndexerProxyApi* | [**create_indexer_proxy**](docs/IndexerProxyApi.md#create_indexer_proxy) | **POST** /api/v1/indexerproxy | +*IndexerProxyApi* | [**create_indexer_proxy_action_by_name**](docs/IndexerProxyApi.md#create_indexer_proxy_action_by_name) | **POST** /api/v1/indexerproxy/action/{name} | +*IndexerProxyApi* | [**delete_indexer_proxy**](docs/IndexerProxyApi.md#delete_indexer_proxy) | **DELETE** /api/v1/indexerproxy/{id} | +*IndexerProxyApi* | [**get_indexer_proxy_by_id**](docs/IndexerProxyApi.md#get_indexer_proxy_by_id) | **GET** /api/v1/indexerproxy/{id} | +*IndexerProxyApi* | [**list_indexer_proxy**](docs/IndexerProxyApi.md#list_indexer_proxy) | **GET** /api/v1/indexerproxy | +*IndexerProxyApi* | [**list_indexer_proxy_schema**](docs/IndexerProxyApi.md#list_indexer_proxy_schema) | **GET** /api/v1/indexerproxy/schema | +*IndexerProxyApi* | [**test_indexer_proxy**](docs/IndexerProxyApi.md#test_indexer_proxy) | **POST** /api/v1/indexerproxy/test | +*IndexerProxyApi* | [**testall_indexer_proxy**](docs/IndexerProxyApi.md#testall_indexer_proxy) | **POST** /api/v1/indexerproxy/testall | +*IndexerProxyApi* | [**update_indexer_proxy**](docs/IndexerProxyApi.md#update_indexer_proxy) | **PUT** /api/v1/indexerproxy/{id} | +*IndexerStatsApi* | [**get_indexer_stats**](docs/IndexerStatsApi.md#get_indexer_stats) | **GET** /api/v1/indexerstats | +*IndexerStatusApi* | [**get_indexer_status_by_id**](docs/IndexerStatusApi.md#get_indexer_status_by_id) | **GET** /api/v1/indexerstatus/{id} | +*IndexerStatusApi* | [**list_indexer_status**](docs/IndexerStatusApi.md#list_indexer_status) | **GET** /api/v1/indexerstatus | +*InitializeJsApi* | [**get_initialize_js**](docs/InitializeJsApi.md#get_initialize_js) | **GET** /initialize.js | +*LocalizationApi* | [**get_localization**](docs/LocalizationApi.md#get_localization) | **GET** /api/v1/localization | +*LocalizationApi* | [**list_localization_options**](docs/LocalizationApi.md#list_localization_options) | **GET** /api/v1/localization/options | +*LogApi* | [**get_log**](docs/LogApi.md#get_log) | **GET** /api/v1/log | +*LogFileApi* | [**get_log_file_by_filename**](docs/LogFileApi.md#get_log_file_by_filename) | **GET** /api/v1/log/file/{filename} | +*LogFileApi* | [**list_log_file**](docs/LogFileApi.md#list_log_file) | **GET** /api/v1/log/file | +*NewznabApi* | [**get_indexerid_download**](docs/NewznabApi.md#get_indexerid_download) | **GET** /api/v1/indexer/{id}/download | +*NewznabApi* | [**get_indexerid_newznab**](docs/NewznabApi.md#get_indexerid_newznab) | **GET** /api/v1/indexer/{id}/newznab | +*NewznabApi* | [**getid_api**](docs/NewznabApi.md#getid_api) | **GET** /{id}/api | +*NewznabApi* | [**getid_download**](docs/NewznabApi.md#getid_download) | **GET** /{id}/download | +*NotificationApi* | [**create_notification**](docs/NotificationApi.md#create_notification) | **POST** /api/v1/notification | +*NotificationApi* | [**create_notification_action_by_name**](docs/NotificationApi.md#create_notification_action_by_name) | **POST** /api/v1/notification/action/{name} | +*NotificationApi* | [**delete_notification**](docs/NotificationApi.md#delete_notification) | **DELETE** /api/v1/notification/{id} | +*NotificationApi* | [**get_notification_by_id**](docs/NotificationApi.md#get_notification_by_id) | **GET** /api/v1/notification/{id} | +*NotificationApi* | [**list_notification**](docs/NotificationApi.md#list_notification) | **GET** /api/v1/notification | +*NotificationApi* | [**list_notification_schema**](docs/NotificationApi.md#list_notification_schema) | **GET** /api/v1/notification/schema | +*NotificationApi* | [**test_notification**](docs/NotificationApi.md#test_notification) | **POST** /api/v1/notification/test | +*NotificationApi* | [**testall_notification**](docs/NotificationApi.md#testall_notification) | **POST** /api/v1/notification/testall | +*NotificationApi* | [**update_notification**](docs/NotificationApi.md#update_notification) | **PUT** /api/v1/notification/{id} | +*QualityProfileSchemaApi* | [**get_appprofile_schema**](docs/QualityProfileSchemaApi.md#get_appprofile_schema) | **GET** /api/v1/appprofile/schema | +*SearchApi* | [**create_search**](docs/SearchApi.md#create_search) | **POST** /api/v1/search | +*SearchApi* | [**create_search_bulk**](docs/SearchApi.md#create_search_bulk) | **POST** /api/v1/search/bulk | +*SearchApi* | [**get_search_by_id**](docs/SearchApi.md#get_search_by_id) | **GET** /api/v1/search/{id} | +*SearchApi* | [**list_search**](docs/SearchApi.md#list_search) | **GET** /api/v1/search | +*StaticResourceApi* | [**get**](docs/StaticResourceApi.md#get) | **GET** / | +*StaticResourceApi* | [**get_by_path**](docs/StaticResourceApi.md#get_by_path) | **GET** /{path} | +*StaticResourceApi* | [**get_content_by_path**](docs/StaticResourceApi.md#get_content_by_path) | **GET** /content/{path} | +*StaticResourceApi* | [**get_login**](docs/StaticResourceApi.md#get_login) | **GET** /login | +*SystemApi* | [**create_system_restart**](docs/SystemApi.md#create_system_restart) | **POST** /api/v1/system/restart | +*SystemApi* | [**create_system_shutdown**](docs/SystemApi.md#create_system_shutdown) | **POST** /api/v1/system/shutdown | +*SystemApi* | [**get_system_routes**](docs/SystemApi.md#get_system_routes) | **GET** /api/v1/system/routes | +*SystemApi* | [**get_system_routes_duplicate**](docs/SystemApi.md#get_system_routes_duplicate) | **GET** /api/v1/system/routes/duplicate | +*SystemApi* | [**get_system_status**](docs/SystemApi.md#get_system_status) | **GET** /api/v1/system/status | +*TagApi* | [**create_tag**](docs/TagApi.md#create_tag) | **POST** /api/v1/tag | +*TagApi* | [**delete_tag**](docs/TagApi.md#delete_tag) | **DELETE** /api/v1/tag/{id} | +*TagApi* | [**get_tag_by_id**](docs/TagApi.md#get_tag_by_id) | **GET** /api/v1/tag/{id} | +*TagApi* | [**list_tag**](docs/TagApi.md#list_tag) | **GET** /api/v1/tag | +*TagApi* | [**update_tag**](docs/TagApi.md#update_tag) | **PUT** /api/v1/tag/{id} | +*TagDetailsApi* | [**get_tag_detail_by_id**](docs/TagDetailsApi.md#get_tag_detail_by_id) | **GET** /api/v1/tag/detail/{id} | +*TagDetailsApi* | [**list_tag_detail**](docs/TagDetailsApi.md#list_tag_detail) | **GET** /api/v1/tag/detail | +*TaskApi* | [**get_system_task_by_id**](docs/TaskApi.md#get_system_task_by_id) | **GET** /api/v1/system/task/{id} | +*TaskApi* | [**list_system_task**](docs/TaskApi.md#list_system_task) | **GET** /api/v1/system/task | +*UiConfigApi* | [**get_ui_config**](docs/UiConfigApi.md#get_ui_config) | **GET** /api/v1/config/ui | +*UiConfigApi* | [**get_ui_config_by_id**](docs/UiConfigApi.md#get_ui_config_by_id) | **GET** /api/v1/config/ui/{id} | +*UiConfigApi* | [**update_ui_config**](docs/UiConfigApi.md#update_ui_config) | **PUT** /api/v1/config/ui/{id} | +*UpdateApi* | [**list_update**](docs/UpdateApi.md#list_update) | **GET** /api/v1/update | +*UpdateLogFileApi* | [**get_log_file_update_by_filename**](docs/UpdateLogFileApi.md#get_log_file_update_by_filename) | **GET** /api/v1/log/file/update/{filename} | +*UpdateLogFileApi* | [**list_log_file_update**](docs/UpdateLogFileApi.md#list_log_file_update) | **GET** /api/v1/log/file/update | + + +## Documentation For Models + + - [ApiInfoResource](docs/ApiInfoResource.md) + - [AppProfileResource](docs/AppProfileResource.md) + - [ApplicationResource](docs/ApplicationResource.md) + - [ApplicationSyncLevel](docs/ApplicationSyncLevel.md) + - [ApplyTags](docs/ApplyTags.md) + - [AuthenticationRequiredType](docs/AuthenticationRequiredType.md) + - [AuthenticationType](docs/AuthenticationType.md) + - [BackupResource](docs/BackupResource.md) + - [BackupType](docs/BackupType.md) + - [BookSearchParam](docs/BookSearchParam.md) + - [CertificateValidationType](docs/CertificateValidationType.md) + - [Command](docs/Command.md) + - [CommandPriority](docs/CommandPriority.md) + - [CommandResource](docs/CommandResource.md) + - [CommandStatus](docs/CommandStatus.md) + - [CommandTrigger](docs/CommandTrigger.md) + - [CustomFilterResource](docs/CustomFilterResource.md) + - [DevelopmentConfigResource](docs/DevelopmentConfigResource.md) + - [DownloadClientCategory](docs/DownloadClientCategory.md) + - [DownloadClientConfigResource](docs/DownloadClientConfigResource.md) + - [DownloadClientResource](docs/DownloadClientResource.md) + - [DownloadProtocol](docs/DownloadProtocol.md) + - [Field](docs/Field.md) + - [HealthCheckResult](docs/HealthCheckResult.md) + - [HealthResource](docs/HealthResource.md) + - [HistoryEventType](docs/HistoryEventType.md) + - [HistoryResource](docs/HistoryResource.md) + - [HistoryResourcePagingResource](docs/HistoryResourcePagingResource.md) + - [HostConfigResource](docs/HostConfigResource.md) + - [HostStatistics](docs/HostStatistics.md) + - [HttpUri](docs/HttpUri.md) + - [IndexerCapabilityResource](docs/IndexerCapabilityResource.md) + - [IndexerCategory](docs/IndexerCategory.md) + - [IndexerEditorResource](docs/IndexerEditorResource.md) + - [IndexerPrivacy](docs/IndexerPrivacy.md) + - [IndexerProxyResource](docs/IndexerProxyResource.md) + - [IndexerResource](docs/IndexerResource.md) + - [IndexerStatistics](docs/IndexerStatistics.md) + - [IndexerStatsResource](docs/IndexerStatsResource.md) + - [IndexerStatusResource](docs/IndexerStatusResource.md) + - [LocalizationOption](docs/LocalizationOption.md) + - [LogFileResource](docs/LogFileResource.md) + - [LogResource](docs/LogResource.md) + - [LogResourcePagingResource](docs/LogResourcePagingResource.md) + - [MovieSearchParam](docs/MovieSearchParam.md) + - [MusicSearchParam](docs/MusicSearchParam.md) + - [NotificationResource](docs/NotificationResource.md) + - [PagingResourceFilter](docs/PagingResourceFilter.md) + - [ProviderMessage](docs/ProviderMessage.md) + - [ProviderMessageType](docs/ProviderMessageType.md) + - [ProxyType](docs/ProxyType.md) + - [ReleaseResource](docs/ReleaseResource.md) + - [SearchParam](docs/SearchParam.md) + - [SelectOption](docs/SelectOption.md) + - [SortDirection](docs/SortDirection.md) + - [TagDetailsResource](docs/TagDetailsResource.md) + - [TagResource](docs/TagResource.md) + - [TaskResource](docs/TaskResource.md) + - [TimeSpan](docs/TimeSpan.md) + - [TvSearchParam](docs/TvSearchParam.md) + - [UiConfigResource](docs/UiConfigResource.md) + - [UpdateChanges](docs/UpdateChanges.md) + - [UpdateMechanism](docs/UpdateMechanism.md) + - [UpdateResource](docs/UpdateResource.md) + - [UserAgentStatistics](docs/UserAgentStatistics.md) + - [Version](docs/Version.md) + + +## Documentation For Authorization + + +## X-Api-Key + +- **Type**: API key +- **API key parameter name**: X-Api-Key +- **Location**: HTTP header + + +## apikey + +- **Type**: API key +- **API key parameter name**: apikey +- **Location**: URL query string + + +## Author + + + + diff --git a/docs/ApiInfoApi.md b/docs/ApiInfoApi.md new file mode 100644 index 0000000..e12cdc5 --- /dev/null +++ b/docs/ApiInfoApi.md @@ -0,0 +1,127 @@ +# prowlarr.ApiInfoApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_api**](ApiInfoApi.md#get_api) | **GET** /api | + + +# **get_api** +> ApiInfoResource get_api() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApiInfoApi(api_client) + + try: + api_response = api_instance.get_api() + print("The response of ApiInfoApi->get_api:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiInfoApi->get_api: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApiInfoApi(api_client) + + try: + api_response = api_instance.get_api() + print("The response of ApiInfoApi->get_api:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiInfoApi->get_api: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ApiInfoResource**](ApiInfoResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + diff --git a/docs/ApiInfoResource.md b/docs/ApiInfoResource.md new file mode 100644 index 0000000..24f5e49 --- /dev/null +++ b/docs/ApiInfoResource.md @@ -0,0 +1,29 @@ +# ApiInfoResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**current** | **str** | | [optional] +**deprecated** | **List[str]** | | [optional] + +## Example + +```python +from prowlarr.models.api_info_resource import ApiInfoResource + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiInfoResource from a JSON string +api_info_resource_instance = ApiInfoResource.from_json(json) +# print the JSON string representation of the object +print ApiInfoResource.to_json() + +# convert the object into a dict +api_info_resource_dict = api_info_resource_instance.to_dict() +# create an instance of ApiInfoResource from a dict +api_info_resource_form_dict = api_info_resource.from_dict(api_info_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/AppProfileApi.md b/docs/AppProfileApi.md new file mode 100644 index 0000000..db47237 --- /dev/null +++ b/docs/AppProfileApi.md @@ -0,0 +1,624 @@ +# prowlarr.AppProfileApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_app_profile**](AppProfileApi.md#create_app_profile) | **POST** /api/v1/appprofile | +[**delete_app_profile**](AppProfileApi.md#delete_app_profile) | **DELETE** /api/v1/appprofile/{id} | +[**get_app_profile_by_id**](AppProfileApi.md#get_app_profile_by_id) | **GET** /api/v1/appprofile/{id} | +[**list_app_profile**](AppProfileApi.md#list_app_profile) | **GET** /api/v1/appprofile | +[**update_app_profile**](AppProfileApi.md#update_app_profile) | **PUT** /api/v1/appprofile/{id} | + + +# **create_app_profile** +> AppProfileResource create_app_profile(app_profile_resource=app_profile_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AppProfileApi(api_client) + app_profile_resource = prowlarr.AppProfileResource() # AppProfileResource | (optional) + + try: + api_response = api_instance.create_app_profile(app_profile_resource=app_profile_resource) + print("The response of AppProfileApi->create_app_profile:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AppProfileApi->create_app_profile: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AppProfileApi(api_client) + app_profile_resource = prowlarr.AppProfileResource() # AppProfileResource | (optional) + + try: + api_response = api_instance.create_app_profile(app_profile_resource=app_profile_resource) + print("The response of AppProfileApi->create_app_profile:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AppProfileApi->create_app_profile: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **app_profile_resource** | [**AppProfileResource**](AppProfileResource.md)| | [optional] + +### Return type + +[**AppProfileResource**](AppProfileResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + +# **delete_app_profile** +> delete_app_profile(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AppProfileApi(api_client) + id = 56 # int | + + try: + api_instance.delete_app_profile(id) + except Exception as e: + print("Exception when calling AppProfileApi->delete_app_profile: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AppProfileApi(api_client) + id = 56 # int | + + try: + api_instance.delete_app_profile(id) + except Exception as e: + print("Exception when calling AppProfileApi->delete_app_profile: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_app_profile_by_id** +> AppProfileResource get_app_profile_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AppProfileApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_app_profile_by_id(id) + print("The response of AppProfileApi->get_app_profile_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AppProfileApi->get_app_profile_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AppProfileApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_app_profile_by_id(id) + print("The response of AppProfileApi->get_app_profile_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AppProfileApi->get_app_profile_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**AppProfileResource**](AppProfileResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**404** | Not Found | - | +**500** | Server Error | - | + +[[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_app_profile** +> List[AppProfileResource] list_app_profile() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AppProfileApi(api_client) + + try: + api_response = api_instance.list_app_profile() + print("The response of AppProfileApi->list_app_profile:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AppProfileApi->list_app_profile: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AppProfileApi(api_client) + + try: + api_response = api_instance.list_app_profile() + print("The response of AppProfileApi->list_app_profile:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AppProfileApi->list_app_profile: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[AppProfileResource]**](AppProfileResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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_app_profile** +> AppProfileResource update_app_profile(id, app_profile_resource=app_profile_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AppProfileApi(api_client) + id = 'id_example' # str | + app_profile_resource = prowlarr.AppProfileResource() # AppProfileResource | (optional) + + try: + api_response = api_instance.update_app_profile(id, app_profile_resource=app_profile_resource) + print("The response of AppProfileApi->update_app_profile:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AppProfileApi->update_app_profile: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AppProfileApi(api_client) + id = 'id_example' # str | + app_profile_resource = prowlarr.AppProfileResource() # AppProfileResource | (optional) + + try: + api_response = api_instance.update_app_profile(id, app_profile_resource=app_profile_resource) + print("The response of AppProfileApi->update_app_profile:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AppProfileApi->update_app_profile: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **app_profile_resource** | [**AppProfileResource**](AppProfileResource.md)| | [optional] + +### Return type + +[**AppProfileResource**](AppProfileResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + diff --git a/docs/AppProfileResource.md b/docs/AppProfileResource.md new file mode 100644 index 0000000..103fb84 --- /dev/null +++ b/docs/AppProfileResource.md @@ -0,0 +1,33 @@ +# AppProfileResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**enable_rss** | **bool** | | [optional] +**enable_interactive_search** | **bool** | | [optional] +**enable_automatic_search** | **bool** | | [optional] +**minimum_seeders** | **int** | | [optional] + +## Example + +```python +from prowlarr.models.app_profile_resource import AppProfileResource + +# TODO update the JSON string below +json = "{}" +# create an instance of AppProfileResource from a JSON string +app_profile_resource_instance = AppProfileResource.from_json(json) +# print the JSON string representation of the object +print AppProfileResource.to_json() + +# convert the object into a dict +app_profile_resource_dict = app_profile_resource_instance.to_dict() +# create an instance of AppProfileResource from a dict +app_profile_resource_form_dict = app_profile_resource.from_dict(app_profile_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/ApplicationApi.md b/docs/ApplicationApi.md new file mode 100644 index 0000000..f1d886d --- /dev/null +++ b/docs/ApplicationApi.md @@ -0,0 +1,1099 @@ +# prowlarr.ApplicationApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_applications**](ApplicationApi.md#create_applications) | **POST** /api/v1/applications | +[**create_applications_action_by_name**](ApplicationApi.md#create_applications_action_by_name) | **POST** /api/v1/applications/action/{name} | +[**delete_applications**](ApplicationApi.md#delete_applications) | **DELETE** /api/v1/applications/{id} | +[**get_applications_by_id**](ApplicationApi.md#get_applications_by_id) | **GET** /api/v1/applications/{id} | +[**list_applications**](ApplicationApi.md#list_applications) | **GET** /api/v1/applications | +[**list_applications_schema**](ApplicationApi.md#list_applications_schema) | **GET** /api/v1/applications/schema | +[**test_applications**](ApplicationApi.md#test_applications) | **POST** /api/v1/applications/test | +[**testall_applications**](ApplicationApi.md#testall_applications) | **POST** /api/v1/applications/testall | +[**update_applications**](ApplicationApi.md#update_applications) | **PUT** /api/v1/applications/{id} | + + +# **create_applications** +> ApplicationResource create_applications(application_resource=application_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + application_resource = prowlarr.ApplicationResource() # ApplicationResource | (optional) + + try: + api_response = api_instance.create_applications(application_resource=application_resource) + print("The response of ApplicationApi->create_applications:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApplicationApi->create_applications: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + application_resource = prowlarr.ApplicationResource() # ApplicationResource | (optional) + + try: + api_response = api_instance.create_applications(application_resource=application_resource) + print("The response of ApplicationApi->create_applications:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApplicationApi->create_applications: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_resource** | [**ApplicationResource**](ApplicationResource.md)| | [optional] + +### Return type + +[**ApplicationResource**](ApplicationResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + +# **create_applications_action_by_name** +> create_applications_action_by_name(name, application_resource=application_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + name = 'name_example' # str | + application_resource = prowlarr.ApplicationResource() # ApplicationResource | (optional) + + try: + api_instance.create_applications_action_by_name(name, application_resource=application_resource) + except Exception as e: + print("Exception when calling ApplicationApi->create_applications_action_by_name: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + name = 'name_example' # str | + application_resource = prowlarr.ApplicationResource() # ApplicationResource | (optional) + + try: + api_instance.create_applications_action_by_name(name, application_resource=application_resource) + except Exception as e: + print("Exception when calling ApplicationApi->create_applications_action_by_name: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| | + **application_resource** | [**ApplicationResource**](ApplicationResource.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + +### 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) + +# **delete_applications** +> delete_applications(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + id = 56 # int | + + try: + api_instance.delete_applications(id) + except Exception as e: + print("Exception when calling ApplicationApi->delete_applications: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + id = 56 # int | + + try: + api_instance.delete_applications(id) + except Exception as e: + print("Exception when calling ApplicationApi->delete_applications: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_applications_by_id** +> ApplicationResource get_applications_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_applications_by_id(id) + print("The response of ApplicationApi->get_applications_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApplicationApi->get_applications_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_applications_by_id(id) + print("The response of ApplicationApi->get_applications_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApplicationApi->get_applications_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**ApplicationResource**](ApplicationResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **list_applications** +> List[ApplicationResource] list_applications() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + + try: + api_response = api_instance.list_applications() + print("The response of ApplicationApi->list_applications:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApplicationApi->list_applications: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + + try: + api_response = api_instance.list_applications() + print("The response of ApplicationApi->list_applications:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApplicationApi->list_applications: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[ApplicationResource]**](ApplicationResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + +# **list_applications_schema** +> List[ApplicationResource] list_applications_schema() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + + try: + api_response = api_instance.list_applications_schema() + print("The response of ApplicationApi->list_applications_schema:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApplicationApi->list_applications_schema: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + + try: + api_response = api_instance.list_applications_schema() + print("The response of ApplicationApi->list_applications_schema:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApplicationApi->list_applications_schema: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[ApplicationResource]**](ApplicationResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + +# **test_applications** +> test_applications(application_resource=application_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + application_resource = prowlarr.ApplicationResource() # ApplicationResource | (optional) + + try: + api_instance.test_applications(application_resource=application_resource) + except Exception as e: + print("Exception when calling ApplicationApi->test_applications: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + application_resource = prowlarr.ApplicationResource() # ApplicationResource | (optional) + + try: + api_instance.test_applications(application_resource=application_resource) + except Exception as e: + print("Exception when calling ApplicationApi->test_applications: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_resource** | [**ApplicationResource**](ApplicationResource.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + +### 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) + +# **testall_applications** +> testall_applications() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + + try: + api_instance.testall_applications() + except Exception as e: + print("Exception when calling ApplicationApi->testall_applications: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + + try: + api_instance.testall_applications() + except Exception as e: + print("Exception when calling ApplicationApi->testall_applications: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_applications** +> ApplicationResource update_applications(id, application_resource=application_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + id = 'id_example' # str | + application_resource = prowlarr.ApplicationResource() # ApplicationResource | (optional) + + try: + api_response = api_instance.update_applications(id, application_resource=application_resource) + print("The response of ApplicationApi->update_applications:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApplicationApi->update_applications: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.ApplicationApi(api_client) + id = 'id_example' # str | + application_resource = prowlarr.ApplicationResource() # ApplicationResource | (optional) + + try: + api_response = api_instance.update_applications(id, application_resource=application_resource) + print("The response of ApplicationApi->update_applications:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApplicationApi->update_applications: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **application_resource** | [**ApplicationResource**](ApplicationResource.md)| | [optional] + +### Return type + +[**ApplicationResource**](ApplicationResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + diff --git a/docs/ApplicationResource.md b/docs/ApplicationResource.md new file mode 100644 index 0000000..12bca04 --- /dev/null +++ b/docs/ApplicationResource.md @@ -0,0 +1,39 @@ +# ApplicationResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**fields** | [**List[Field]**](Field.md) | | [optional] +**implementation_name** | **str** | | [optional] +**implementation** | **str** | | [optional] +**config_contract** | **str** | | [optional] +**info_link** | **str** | | [optional] +**message** | [**ProviderMessage**](ProviderMessage.md) | | [optional] +**tags** | **List[int]** | | [optional] +**presets** | [**List[ApplicationResource]**](ApplicationResource.md) | | [optional] +**sync_level** | [**ApplicationSyncLevel**](ApplicationSyncLevel.md) | | [optional] +**test_command** | **str** | | [optional] + +## Example + +```python +from prowlarr.models.application_resource import ApplicationResource + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationResource from a JSON string +application_resource_instance = ApplicationResource.from_json(json) +# print the JSON string representation of the object +print ApplicationResource.to_json() + +# convert the object into a dict +application_resource_dict = application_resource_instance.to_dict() +# create an instance of ApplicationResource from a dict +application_resource_form_dict = application_resource.from_dict(application_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/ApplicationSyncLevel.md b/docs/ApplicationSyncLevel.md new file mode 100644 index 0000000..dc56f22 --- /dev/null +++ b/docs/ApplicationSyncLevel.md @@ -0,0 +1,10 @@ +# ApplicationSyncLevel + + +## 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/ApplyTags.md b/docs/ApplyTags.md new file mode 100644 index 0000000..f067c8b --- /dev/null +++ b/docs/ApplyTags.md @@ -0,0 +1,10 @@ +# ApplyTags + + +## 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/AuthenticationApi.md b/docs/AuthenticationApi.md new file mode 100644 index 0000000..df089ce --- /dev/null +++ b/docs/AuthenticationApi.md @@ -0,0 +1,252 @@ +# prowlarr.AuthenticationApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_login**](AuthenticationApi.md#create_login) | **POST** /login | +[**get_logout**](AuthenticationApi.md#get_logout) | **GET** /logout | + + +# **create_login** +> create_login(return_url=return_url, username=username, password=password, remember_me=remember_me) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AuthenticationApi(api_client) + return_url = 'return_url_example' # str | (optional) + username = 'username_example' # str | (optional) + password = 'password_example' # str | (optional) + remember_me = 'remember_me_example' # str | (optional) + + try: + api_instance.create_login(return_url=return_url, username=username, password=password, remember_me=remember_me) + except Exception as e: + print("Exception when calling AuthenticationApi->create_login: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AuthenticationApi(api_client) + return_url = 'return_url_example' # str | (optional) + username = 'username_example' # str | (optional) + password = 'password_example' # str | (optional) + remember_me = 'remember_me_example' # str | (optional) + + try: + api_instance.create_login(return_url=return_url, username=username, password=password, remember_me=remember_me) + except Exception as e: + print("Exception when calling AuthenticationApi->create_login: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **return_url** | **str**| | [optional] + **username** | **str**| | [optional] + **password** | **str**| | [optional] + **remember_me** | **str**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: Not defined + +### 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_logout** +> get_logout() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AuthenticationApi(api_client) + + try: + api_instance.get_logout() + except Exception as e: + print("Exception when calling AuthenticationApi->get_logout: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.AuthenticationApi(api_client) + + try: + api_instance.get_logout() + except Exception as e: + print("Exception when calling AuthenticationApi->get_logout: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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/AuthenticationRequiredType.md b/docs/AuthenticationRequiredType.md new file mode 100644 index 0000000..ab55e72 --- /dev/null +++ b/docs/AuthenticationRequiredType.md @@ -0,0 +1,10 @@ +# AuthenticationRequiredType + + +## 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/AuthenticationType.md b/docs/AuthenticationType.md new file mode 100644 index 0000000..3636722 --- /dev/null +++ b/docs/AuthenticationType.md @@ -0,0 +1,10 @@ +# AuthenticationType + + +## 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/BackupApi.md b/docs/BackupApi.md new file mode 100644 index 0000000..c6415c4 --- /dev/null +++ b/docs/BackupApi.md @@ -0,0 +1,482 @@ +# prowlarr.BackupApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_system_backup_restore_by_id**](BackupApi.md#create_system_backup_restore_by_id) | **POST** /api/v1/system/backup/restore/{id} | +[**create_system_backup_restore_upload**](BackupApi.md#create_system_backup_restore_upload) | **POST** /api/v1/system/backup/restore/upload | +[**delete_system_backup**](BackupApi.md#delete_system_backup) | **DELETE** /api/v1/system/backup/{id} | +[**list_system_backup**](BackupApi.md#list_system_backup) | **GET** /api/v1/system/backup | + + +# **create_system_backup_restore_by_id** +> create_system_backup_restore_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.BackupApi(api_client) + id = 56 # int | + + try: + api_instance.create_system_backup_restore_by_id(id) + except Exception as e: + print("Exception when calling BackupApi->create_system_backup_restore_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.BackupApi(api_client) + id = 56 # int | + + try: + api_instance.create_system_backup_restore_by_id(id) + except Exception as e: + print("Exception when calling BackupApi->create_system_backup_restore_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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) + +# **create_system_backup_restore_upload** +> create_system_backup_restore_upload() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.BackupApi(api_client) + + try: + api_instance.create_system_backup_restore_upload() + except Exception as e: + print("Exception when calling BackupApi->create_system_backup_restore_upload: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.BackupApi(api_client) + + try: + api_instance.create_system_backup_restore_upload() + except Exception as e: + print("Exception when calling BackupApi->create_system_backup_restore_upload: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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) + +# **delete_system_backup** +> delete_system_backup(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.BackupApi(api_client) + id = 56 # int | + + try: + api_instance.delete_system_backup(id) + except Exception as e: + print("Exception when calling BackupApi->delete_system_backup: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.BackupApi(api_client) + id = 56 # int | + + try: + api_instance.delete_system_backup(id) + except Exception as e: + print("Exception when calling BackupApi->delete_system_backup: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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) + +# **list_system_backup** +> List[BackupResource] list_system_backup() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.BackupApi(api_client) + + try: + api_response = api_instance.list_system_backup() + print("The response of BackupApi->list_system_backup:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BackupApi->list_system_backup: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.BackupApi(api_client) + + try: + api_response = api_instance.list_system_backup() + print("The response of BackupApi->list_system_backup:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BackupApi->list_system_backup: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[BackupResource]**](BackupResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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/BackupResource.md b/docs/BackupResource.md new file mode 100644 index 0000000..b3bfe85 --- /dev/null +++ b/docs/BackupResource.md @@ -0,0 +1,33 @@ +# BackupResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**path** | **str** | | [optional] +**type** | [**BackupType**](BackupType.md) | | [optional] +**size** | **int** | | [optional] +**time** | **datetime** | | [optional] + +## Example + +```python +from prowlarr.models.backup_resource import BackupResource + +# TODO update the JSON string below +json = "{}" +# create an instance of BackupResource from a JSON string +backup_resource_instance = BackupResource.from_json(json) +# print the JSON string representation of the object +print BackupResource.to_json() + +# convert the object into a dict +backup_resource_dict = backup_resource_instance.to_dict() +# create an instance of BackupResource from a dict +backup_resource_form_dict = backup_resource.from_dict(backup_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/BackupType.md b/docs/BackupType.md new file mode 100644 index 0000000..f380cb0 --- /dev/null +++ b/docs/BackupType.md @@ -0,0 +1,10 @@ +# BackupType + + +## 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/BookSearchParam.md b/docs/BookSearchParam.md new file mode 100644 index 0000000..8e3f750 --- /dev/null +++ b/docs/BookSearchParam.md @@ -0,0 +1,10 @@ +# BookSearchParam + + +## 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/CertificateValidationType.md b/docs/CertificateValidationType.md new file mode 100644 index 0000000..91b12f8 --- /dev/null +++ b/docs/CertificateValidationType.md @@ -0,0 +1,10 @@ +# CertificateValidationType + + +## 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/Command.md b/docs/Command.md new file mode 100644 index 0000000..96ba878 --- /dev/null +++ b/docs/Command.md @@ -0,0 +1,39 @@ +# Command + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**send_updates_to_client** | **bool** | | [optional] +**update_scheduled_task** | **bool** | | [optional] [readonly] +**completion_message** | **str** | | [optional] [readonly] +**requires_disk_access** | **bool** | | [optional] [readonly] +**is_exclusive** | **bool** | | [optional] [readonly] +**is_type_exclusive** | **bool** | | [optional] [readonly] +**name** | **str** | | [optional] [readonly] +**last_execution_time** | **datetime** | | [optional] +**last_start_time** | **datetime** | | [optional] +**trigger** | [**CommandTrigger**](CommandTrigger.md) | | [optional] +**suppress_messages** | **bool** | | [optional] +**client_user_agent** | **str** | | [optional] + +## Example + +```python +from prowlarr.models.command import Command + +# TODO update the JSON string below +json = "{}" +# create an instance of Command from a JSON string +command_instance = Command.from_json(json) +# print the JSON string representation of the object +print Command.to_json() + +# convert the object into a dict +command_dict = command_instance.to_dict() +# create an instance of Command from a dict +command_form_dict = command.from_dict(command_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/CommandApi.md b/docs/CommandApi.md new file mode 100644 index 0000000..21ea9a5 --- /dev/null +++ b/docs/CommandApi.md @@ -0,0 +1,495 @@ +# prowlarr.CommandApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_command**](CommandApi.md#create_command) | **POST** /api/v1/command | +[**delete_command**](CommandApi.md#delete_command) | **DELETE** /api/v1/command/{id} | +[**get_command_by_id**](CommandApi.md#get_command_by_id) | **GET** /api/v1/command/{id} | +[**list_command**](CommandApi.md#list_command) | **GET** /api/v1/command | + + +# **create_command** +> CommandResource create_command(command_resource=command_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CommandApi(api_client) + command_resource = prowlarr.CommandResource() # CommandResource | (optional) + + try: + api_response = api_instance.create_command(command_resource=command_resource) + print("The response of CommandApi->create_command:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CommandApi->create_command: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CommandApi(api_client) + command_resource = prowlarr.CommandResource() # CommandResource | (optional) + + try: + api_response = api_instance.create_command(command_resource=command_resource) + print("The response of CommandApi->create_command:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CommandApi->create_command: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **command_resource** | [**CommandResource**](CommandResource.md)| | [optional] + +### Return type + +[**CommandResource**](CommandResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + +# **delete_command** +> delete_command(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CommandApi(api_client) + id = 56 # int | + + try: + api_instance.delete_command(id) + except Exception as e: + print("Exception when calling CommandApi->delete_command: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CommandApi(api_client) + id = 56 # int | + + try: + api_instance.delete_command(id) + except Exception as e: + print("Exception when calling CommandApi->delete_command: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_command_by_id** +> CommandResource get_command_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CommandApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_command_by_id(id) + print("The response of CommandApi->get_command_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CommandApi->get_command_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CommandApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_command_by_id(id) + print("The response of CommandApi->get_command_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CommandApi->get_command_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**CommandResource**](CommandResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **list_command** +> List[CommandResource] list_command() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CommandApi(api_client) + + try: + api_response = api_instance.list_command() + print("The response of CommandApi->list_command:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CommandApi->list_command: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CommandApi(api_client) + + try: + api_response = api_instance.list_command() + print("The response of CommandApi->list_command:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CommandApi->list_command: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[CommandResource]**](CommandResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + diff --git a/docs/CommandPriority.md b/docs/CommandPriority.md new file mode 100644 index 0000000..d88345d --- /dev/null +++ b/docs/CommandPriority.md @@ -0,0 +1,10 @@ +# CommandPriority + + +## 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/CommandResource.md b/docs/CommandResource.md new file mode 100644 index 0000000..17772e3 --- /dev/null +++ b/docs/CommandResource.md @@ -0,0 +1,45 @@ +# CommandResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**command_name** | **str** | | [optional] +**message** | **str** | | [optional] +**body** | [**Command**](Command.md) | | [optional] +**priority** | [**CommandPriority**](CommandPriority.md) | | [optional] +**status** | [**CommandStatus**](CommandStatus.md) | | [optional] +**queued** | **datetime** | | [optional] +**started** | **datetime** | | [optional] +**ended** | **datetime** | | [optional] +**duration** | [**TimeSpan**](TimeSpan.md) | | [optional] +**exception** | **str** | | [optional] +**trigger** | [**CommandTrigger**](CommandTrigger.md) | | [optional] +**client_user_agent** | **str** | | [optional] +**state_change_time** | **datetime** | | [optional] +**send_updates_to_client** | **bool** | | [optional] +**update_scheduled_task** | **bool** | | [optional] +**last_execution_time** | **datetime** | | [optional] + +## Example + +```python +from prowlarr.models.command_resource import CommandResource + +# TODO update the JSON string below +json = "{}" +# create an instance of CommandResource from a JSON string +command_resource_instance = CommandResource.from_json(json) +# print the JSON string representation of the object +print CommandResource.to_json() + +# convert the object into a dict +command_resource_dict = command_resource_instance.to_dict() +# create an instance of CommandResource from a dict +command_resource_form_dict = command_resource.from_dict(command_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/CommandStatus.md b/docs/CommandStatus.md new file mode 100644 index 0000000..e5765f5 --- /dev/null +++ b/docs/CommandStatus.md @@ -0,0 +1,10 @@ +# CommandStatus + + +## 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/CommandTrigger.md b/docs/CommandTrigger.md new file mode 100644 index 0000000..8fc1853 --- /dev/null +++ b/docs/CommandTrigger.md @@ -0,0 +1,10 @@ +# CommandTrigger + + +## 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/CustomFilterApi.md b/docs/CustomFilterApi.md new file mode 100644 index 0000000..bd02d8e --- /dev/null +++ b/docs/CustomFilterApi.md @@ -0,0 +1,622 @@ +# prowlarr.CustomFilterApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_custom_filter**](CustomFilterApi.md#create_custom_filter) | **POST** /api/v1/customfilter | +[**delete_custom_filter**](CustomFilterApi.md#delete_custom_filter) | **DELETE** /api/v1/customfilter/{id} | +[**get_custom_filter_by_id**](CustomFilterApi.md#get_custom_filter_by_id) | **GET** /api/v1/customfilter/{id} | +[**list_custom_filter**](CustomFilterApi.md#list_custom_filter) | **GET** /api/v1/customfilter | +[**update_custom_filter**](CustomFilterApi.md#update_custom_filter) | **PUT** /api/v1/customfilter/{id} | + + +# **create_custom_filter** +> CustomFilterResource create_custom_filter(custom_filter_resource=custom_filter_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CustomFilterApi(api_client) + custom_filter_resource = prowlarr.CustomFilterResource() # CustomFilterResource | (optional) + + try: + api_response = api_instance.create_custom_filter(custom_filter_resource=custom_filter_resource) + print("The response of CustomFilterApi->create_custom_filter:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CustomFilterApi->create_custom_filter: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CustomFilterApi(api_client) + custom_filter_resource = prowlarr.CustomFilterResource() # CustomFilterResource | (optional) + + try: + api_response = api_instance.create_custom_filter(custom_filter_resource=custom_filter_resource) + print("The response of CustomFilterApi->create_custom_filter:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CustomFilterApi->create_custom_filter: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **custom_filter_resource** | [**CustomFilterResource**](CustomFilterResource.md)| | [optional] + +### Return type + +[**CustomFilterResource**](CustomFilterResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + +# **delete_custom_filter** +> delete_custom_filter(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CustomFilterApi(api_client) + id = 56 # int | + + try: + api_instance.delete_custom_filter(id) + except Exception as e: + print("Exception when calling CustomFilterApi->delete_custom_filter: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CustomFilterApi(api_client) + id = 56 # int | + + try: + api_instance.delete_custom_filter(id) + except Exception as e: + print("Exception when calling CustomFilterApi->delete_custom_filter: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_custom_filter_by_id** +> CustomFilterResource get_custom_filter_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CustomFilterApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_custom_filter_by_id(id) + print("The response of CustomFilterApi->get_custom_filter_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CustomFilterApi->get_custom_filter_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CustomFilterApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_custom_filter_by_id(id) + print("The response of CustomFilterApi->get_custom_filter_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CustomFilterApi->get_custom_filter_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**CustomFilterResource**](CustomFilterResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **list_custom_filter** +> List[CustomFilterResource] list_custom_filter() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CustomFilterApi(api_client) + + try: + api_response = api_instance.list_custom_filter() + print("The response of CustomFilterApi->list_custom_filter:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CustomFilterApi->list_custom_filter: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CustomFilterApi(api_client) + + try: + api_response = api_instance.list_custom_filter() + print("The response of CustomFilterApi->list_custom_filter:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CustomFilterApi->list_custom_filter: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[CustomFilterResource]**](CustomFilterResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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_custom_filter** +> CustomFilterResource update_custom_filter(id, custom_filter_resource=custom_filter_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CustomFilterApi(api_client) + id = 'id_example' # str | + custom_filter_resource = prowlarr.CustomFilterResource() # CustomFilterResource | (optional) + + try: + api_response = api_instance.update_custom_filter(id, custom_filter_resource=custom_filter_resource) + print("The response of CustomFilterApi->update_custom_filter:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CustomFilterApi->update_custom_filter: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.CustomFilterApi(api_client) + id = 'id_example' # str | + custom_filter_resource = prowlarr.CustomFilterResource() # CustomFilterResource | (optional) + + try: + api_response = api_instance.update_custom_filter(id, custom_filter_resource=custom_filter_resource) + print("The response of CustomFilterApi->update_custom_filter:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CustomFilterApi->update_custom_filter: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **custom_filter_resource** | [**CustomFilterResource**](CustomFilterResource.md)| | [optional] + +### Return type + +[**CustomFilterResource**](CustomFilterResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + diff --git a/docs/CustomFilterResource.md b/docs/CustomFilterResource.md new file mode 100644 index 0000000..ddc74ab --- /dev/null +++ b/docs/CustomFilterResource.md @@ -0,0 +1,31 @@ +# CustomFilterResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**type** | **str** | | [optional] +**label** | **str** | | [optional] +**filters** | **List[Dict[str, object]]** | | [optional] + +## Example + +```python +from prowlarr.models.custom_filter_resource import CustomFilterResource + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomFilterResource from a JSON string +custom_filter_resource_instance = CustomFilterResource.from_json(json) +# print the JSON string representation of the object +print CustomFilterResource.to_json() + +# convert the object into a dict +custom_filter_resource_dict = custom_filter_resource_instance.to_dict() +# create an instance of CustomFilterResource from a dict +custom_filter_resource_form_dict = custom_filter_resource.from_dict(custom_filter_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/DevelopmentConfigApi.md b/docs/DevelopmentConfigApi.md new file mode 100644 index 0000000..fb05b41 --- /dev/null +++ b/docs/DevelopmentConfigApi.md @@ -0,0 +1,378 @@ +# prowlarr.DevelopmentConfigApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_development_config**](DevelopmentConfigApi.md#get_development_config) | **GET** /api/v1/config/development | +[**get_development_config_by_id**](DevelopmentConfigApi.md#get_development_config_by_id) | **GET** /api/v1/config/development/{id} | +[**update_development_config**](DevelopmentConfigApi.md#update_development_config) | **PUT** /api/v1/config/development/{id} | + + +# **get_development_config** +> DevelopmentConfigResource get_development_config() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DevelopmentConfigApi(api_client) + + try: + api_response = api_instance.get_development_config() + print("The response of DevelopmentConfigApi->get_development_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DevelopmentConfigApi->get_development_config: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DevelopmentConfigApi(api_client) + + try: + api_response = api_instance.get_development_config() + print("The response of DevelopmentConfigApi->get_development_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DevelopmentConfigApi->get_development_config: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DevelopmentConfigResource**](DevelopmentConfigResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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_development_config_by_id** +> DevelopmentConfigResource get_development_config_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DevelopmentConfigApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_development_config_by_id(id) + print("The response of DevelopmentConfigApi->get_development_config_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DevelopmentConfigApi->get_development_config_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DevelopmentConfigApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_development_config_by_id(id) + print("The response of DevelopmentConfigApi->get_development_config_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DevelopmentConfigApi->get_development_config_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**DevelopmentConfigResource**](DevelopmentConfigResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **update_development_config** +> DevelopmentConfigResource update_development_config(id, development_config_resource=development_config_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DevelopmentConfigApi(api_client) + id = 'id_example' # str | + development_config_resource = prowlarr.DevelopmentConfigResource() # DevelopmentConfigResource | (optional) + + try: + api_response = api_instance.update_development_config(id, development_config_resource=development_config_resource) + print("The response of DevelopmentConfigApi->update_development_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DevelopmentConfigApi->update_development_config: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DevelopmentConfigApi(api_client) + id = 'id_example' # str | + development_config_resource = prowlarr.DevelopmentConfigResource() # DevelopmentConfigResource | (optional) + + try: + api_response = api_instance.update_development_config(id, development_config_resource=development_config_resource) + print("The response of DevelopmentConfigApi->update_development_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DevelopmentConfigApi->update_development_config: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **development_config_resource** | [**DevelopmentConfigResource**](DevelopmentConfigResource.md)| | [optional] + +### Return type + +[**DevelopmentConfigResource**](DevelopmentConfigResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + diff --git a/docs/DevelopmentConfigResource.md b/docs/DevelopmentConfigResource.md new file mode 100644 index 0000000..abd62f5 --- /dev/null +++ b/docs/DevelopmentConfigResource.md @@ -0,0 +1,33 @@ +# DevelopmentConfigResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**console_log_level** | **str** | | [optional] +**log_sql** | **bool** | | [optional] +**log_indexer_response** | **bool** | | [optional] +**log_rotate** | **int** | | [optional] +**filter_sentry_events** | **bool** | | [optional] + +## Example + +```python +from prowlarr.models.development_config_resource import DevelopmentConfigResource + +# TODO update the JSON string below +json = "{}" +# create an instance of DevelopmentConfigResource from a JSON string +development_config_resource_instance = DevelopmentConfigResource.from_json(json) +# print the JSON string representation of the object +print DevelopmentConfigResource.to_json() + +# convert the object into a dict +development_config_resource_dict = development_config_resource_instance.to_dict() +# create an instance of DevelopmentConfigResource from a dict +development_config_resource_form_dict = development_config_resource.from_dict(development_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/DownloadClientApi.md b/docs/DownloadClientApi.md new file mode 100644 index 0000000..d3e45de --- /dev/null +++ b/docs/DownloadClientApi.md @@ -0,0 +1,1099 @@ +# prowlarr.DownloadClientApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_download_client**](DownloadClientApi.md#create_download_client) | **POST** /api/v1/downloadclient | +[**create_download_client_action_by_name**](DownloadClientApi.md#create_download_client_action_by_name) | **POST** /api/v1/downloadclient/action/{name} | +[**delete_download_client**](DownloadClientApi.md#delete_download_client) | **DELETE** /api/v1/downloadclient/{id} | +[**get_download_client_by_id**](DownloadClientApi.md#get_download_client_by_id) | **GET** /api/v1/downloadclient/{id} | +[**list_download_client**](DownloadClientApi.md#list_download_client) | **GET** /api/v1/downloadclient | +[**list_download_client_schema**](DownloadClientApi.md#list_download_client_schema) | **GET** /api/v1/downloadclient/schema | +[**test_download_client**](DownloadClientApi.md#test_download_client) | **POST** /api/v1/downloadclient/test | +[**testall_download_client**](DownloadClientApi.md#testall_download_client) | **POST** /api/v1/downloadclient/testall | +[**update_download_client**](DownloadClientApi.md#update_download_client) | **PUT** /api/v1/downloadclient/{id} | + + +# **create_download_client** +> DownloadClientResource create_download_client(download_client_resource=download_client_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + download_client_resource = prowlarr.DownloadClientResource() # DownloadClientResource | (optional) + + try: + api_response = api_instance.create_download_client(download_client_resource=download_client_resource) + print("The response of DownloadClientApi->create_download_client:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientApi->create_download_client: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + download_client_resource = prowlarr.DownloadClientResource() # DownloadClientResource | (optional) + + try: + api_response = api_instance.create_download_client(download_client_resource=download_client_resource) + print("The response of DownloadClientApi->create_download_client:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientApi->create_download_client: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **download_client_resource** | [**DownloadClientResource**](DownloadClientResource.md)| | [optional] + +### Return type + +[**DownloadClientResource**](DownloadClientResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + +# **create_download_client_action_by_name** +> create_download_client_action_by_name(name, download_client_resource=download_client_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + name = 'name_example' # str | + download_client_resource = prowlarr.DownloadClientResource() # DownloadClientResource | (optional) + + try: + api_instance.create_download_client_action_by_name(name, download_client_resource=download_client_resource) + except Exception as e: + print("Exception when calling DownloadClientApi->create_download_client_action_by_name: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + name = 'name_example' # str | + download_client_resource = prowlarr.DownloadClientResource() # DownloadClientResource | (optional) + + try: + api_instance.create_download_client_action_by_name(name, download_client_resource=download_client_resource) + except Exception as e: + print("Exception when calling DownloadClientApi->create_download_client_action_by_name: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| | + **download_client_resource** | [**DownloadClientResource**](DownloadClientResource.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + +### 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) + +# **delete_download_client** +> delete_download_client(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + id = 56 # int | + + try: + api_instance.delete_download_client(id) + except Exception as e: + print("Exception when calling DownloadClientApi->delete_download_client: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + id = 56 # int | + + try: + api_instance.delete_download_client(id) + except Exception as e: + print("Exception when calling DownloadClientApi->delete_download_client: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_download_client_by_id** +> DownloadClientResource get_download_client_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_download_client_by_id(id) + print("The response of DownloadClientApi->get_download_client_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientApi->get_download_client_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_download_client_by_id(id) + print("The response of DownloadClientApi->get_download_client_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientApi->get_download_client_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**DownloadClientResource**](DownloadClientResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **list_download_client** +> List[DownloadClientResource] list_download_client() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + + try: + api_response = api_instance.list_download_client() + print("The response of DownloadClientApi->list_download_client:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientApi->list_download_client: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + + try: + api_response = api_instance.list_download_client() + print("The response of DownloadClientApi->list_download_client:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientApi->list_download_client: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[DownloadClientResource]**](DownloadClientResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + +# **list_download_client_schema** +> List[DownloadClientResource] list_download_client_schema() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + + try: + api_response = api_instance.list_download_client_schema() + print("The response of DownloadClientApi->list_download_client_schema:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientApi->list_download_client_schema: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + + try: + api_response = api_instance.list_download_client_schema() + print("The response of DownloadClientApi->list_download_client_schema:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientApi->list_download_client_schema: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[DownloadClientResource]**](DownloadClientResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + +# **test_download_client** +> test_download_client(download_client_resource=download_client_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + download_client_resource = prowlarr.DownloadClientResource() # DownloadClientResource | (optional) + + try: + api_instance.test_download_client(download_client_resource=download_client_resource) + except Exception as e: + print("Exception when calling DownloadClientApi->test_download_client: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + download_client_resource = prowlarr.DownloadClientResource() # DownloadClientResource | (optional) + + try: + api_instance.test_download_client(download_client_resource=download_client_resource) + except Exception as e: + print("Exception when calling DownloadClientApi->test_download_client: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **download_client_resource** | [**DownloadClientResource**](DownloadClientResource.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + +### 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) + +# **testall_download_client** +> testall_download_client() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + + try: + api_instance.testall_download_client() + except Exception as e: + print("Exception when calling DownloadClientApi->testall_download_client: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + + try: + api_instance.testall_download_client() + except Exception as e: + print("Exception when calling DownloadClientApi->testall_download_client: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_download_client** +> DownloadClientResource update_download_client(id, download_client_resource=download_client_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + id = 'id_example' # str | + download_client_resource = prowlarr.DownloadClientResource() # DownloadClientResource | (optional) + + try: + api_response = api_instance.update_download_client(id, download_client_resource=download_client_resource) + print("The response of DownloadClientApi->update_download_client:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientApi->update_download_client: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientApi(api_client) + id = 'id_example' # str | + download_client_resource = prowlarr.DownloadClientResource() # DownloadClientResource | (optional) + + try: + api_response = api_instance.update_download_client(id, download_client_resource=download_client_resource) + print("The response of DownloadClientApi->update_download_client:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientApi->update_download_client: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **download_client_resource** | [**DownloadClientResource**](DownloadClientResource.md)| | [optional] + +### Return type + +[**DownloadClientResource**](DownloadClientResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + diff --git a/docs/DownloadClientCategory.md b/docs/DownloadClientCategory.md new file mode 100644 index 0000000..6fe1a34 --- /dev/null +++ b/docs/DownloadClientCategory.md @@ -0,0 +1,29 @@ +# DownloadClientCategory + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_category** | **str** | | [optional] +**categories** | **List[int]** | | [optional] + +## Example + +```python +from prowlarr.models.download_client_category import DownloadClientCategory + +# TODO update the JSON string below +json = "{}" +# create an instance of DownloadClientCategory from a JSON string +download_client_category_instance = DownloadClientCategory.from_json(json) +# print the JSON string representation of the object +print DownloadClientCategory.to_json() + +# convert the object into a dict +download_client_category_dict = download_client_category_instance.to_dict() +# create an instance of DownloadClientCategory from a dict +download_client_category_form_dict = download_client_category.from_dict(download_client_category_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/DownloadClientConfigApi.md b/docs/DownloadClientConfigApi.md new file mode 100644 index 0000000..1cd5460 --- /dev/null +++ b/docs/DownloadClientConfigApi.md @@ -0,0 +1,378 @@ +# prowlarr.DownloadClientConfigApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_download_client_config**](DownloadClientConfigApi.md#get_download_client_config) | **GET** /api/v1/config/downloadclient | +[**get_download_client_config_by_id**](DownloadClientConfigApi.md#get_download_client_config_by_id) | **GET** /api/v1/config/downloadclient/{id} | +[**update_download_client_config**](DownloadClientConfigApi.md#update_download_client_config) | **PUT** /api/v1/config/downloadclient/{id} | + + +# **get_download_client_config** +> DownloadClientConfigResource get_download_client_config() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientConfigApi(api_client) + + try: + api_response = api_instance.get_download_client_config() + print("The response of DownloadClientConfigApi->get_download_client_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientConfigApi->get_download_client_config: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientConfigApi(api_client) + + try: + api_response = api_instance.get_download_client_config() + print("The response of DownloadClientConfigApi->get_download_client_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientConfigApi->get_download_client_config: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DownloadClientConfigResource**](DownloadClientConfigResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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_download_client_config_by_id** +> DownloadClientConfigResource get_download_client_config_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientConfigApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_download_client_config_by_id(id) + print("The response of DownloadClientConfigApi->get_download_client_config_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientConfigApi->get_download_client_config_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientConfigApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_download_client_config_by_id(id) + print("The response of DownloadClientConfigApi->get_download_client_config_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientConfigApi->get_download_client_config_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**DownloadClientConfigResource**](DownloadClientConfigResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **update_download_client_config** +> DownloadClientConfigResource update_download_client_config(id, download_client_config_resource=download_client_config_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientConfigApi(api_client) + id = 'id_example' # str | + download_client_config_resource = prowlarr.DownloadClientConfigResource() # DownloadClientConfigResource | (optional) + + try: + api_response = api_instance.update_download_client_config(id, download_client_config_resource=download_client_config_resource) + print("The response of DownloadClientConfigApi->update_download_client_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientConfigApi->update_download_client_config: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.DownloadClientConfigApi(api_client) + id = 'id_example' # str | + download_client_config_resource = prowlarr.DownloadClientConfigResource() # DownloadClientConfigResource | (optional) + + try: + api_response = api_instance.update_download_client_config(id, download_client_config_resource=download_client_config_resource) + print("The response of DownloadClientConfigApi->update_download_client_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DownloadClientConfigApi->update_download_client_config: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **download_client_config_resource** | [**DownloadClientConfigResource**](DownloadClientConfigResource.md)| | [optional] + +### Return type + +[**DownloadClientConfigResource**](DownloadClientConfigResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + diff --git a/docs/DownloadClientConfigResource.md b/docs/DownloadClientConfigResource.md new file mode 100644 index 0000000..f596ef2 --- /dev/null +++ b/docs/DownloadClientConfigResource.md @@ -0,0 +1,28 @@ +# DownloadClientConfigResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] + +## Example + +```python +from prowlarr.models.download_client_config_resource import DownloadClientConfigResource + +# TODO update the JSON string below +json = "{}" +# create an instance of DownloadClientConfigResource from a JSON string +download_client_config_resource_instance = DownloadClientConfigResource.from_json(json) +# print the JSON string representation of the object +print DownloadClientConfigResource.to_json() + +# convert the object into a dict +download_client_config_resource_dict = download_client_config_resource_instance.to_dict() +# create an instance of DownloadClientConfigResource from a dict +download_client_config_resource_form_dict = download_client_config_resource.from_dict(download_client_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/DownloadClientResource.md b/docs/DownloadClientResource.md new file mode 100644 index 0000000..00c633e --- /dev/null +++ b/docs/DownloadClientResource.md @@ -0,0 +1,42 @@ +# DownloadClientResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**fields** | [**List[Field]**](Field.md) | | [optional] +**implementation_name** | **str** | | [optional] +**implementation** | **str** | | [optional] +**config_contract** | **str** | | [optional] +**info_link** | **str** | | [optional] +**message** | [**ProviderMessage**](ProviderMessage.md) | | [optional] +**tags** | **List[int]** | | [optional] +**presets** | [**List[DownloadClientResource]**](DownloadClientResource.md) | | [optional] +**enable** | **bool** | | [optional] +**protocol** | [**DownloadProtocol**](DownloadProtocol.md) | | [optional] +**priority** | **int** | | [optional] +**categories** | [**List[DownloadClientCategory]**](DownloadClientCategory.md) | | [optional] +**supports_categories** | **bool** | | [optional] + +## Example + +```python +from prowlarr.models.download_client_resource import DownloadClientResource + +# TODO update the JSON string below +json = "{}" +# create an instance of DownloadClientResource from a JSON string +download_client_resource_instance = DownloadClientResource.from_json(json) +# print the JSON string representation of the object +print DownloadClientResource.to_json() + +# convert the object into a dict +download_client_resource_dict = download_client_resource_instance.to_dict() +# create an instance of DownloadClientResource from a dict +download_client_resource_form_dict = download_client_resource.from_dict(download_client_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/DownloadProtocol.md b/docs/DownloadProtocol.md new file mode 100644 index 0000000..d0dfa49 --- /dev/null +++ b/docs/DownloadProtocol.md @@ -0,0 +1,10 @@ +# DownloadProtocol + + +## 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/Field.md b/docs/Field.md new file mode 100644 index 0000000..8b5fd5c --- /dev/null +++ b/docs/Field.md @@ -0,0 +1,41 @@ +# Field + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order** | **int** | | [optional] +**name** | **str** | | [optional] +**label** | **str** | | [optional] +**unit** | **str** | | [optional] +**help_text** | **str** | | [optional] +**help_link** | **str** | | [optional] +**value** | **object** | | [optional] +**type** | **str** | | [optional] +**advanced** | **bool** | | [optional] +**select_options** | [**List[SelectOption]**](SelectOption.md) | | [optional] +**select_options_provider_action** | **str** | | [optional] +**section** | **str** | | [optional] +**hidden** | **str** | | [optional] +**placeholder** | **str** | | [optional] + +## Example + +```python +from prowlarr.models.field import Field + +# TODO update the JSON string below +json = "{}" +# create an instance of Field from a JSON string +field_instance = Field.from_json(json) +# print the JSON string representation of the object +print Field.to_json() + +# convert the object into a dict +field_dict = field_instance.to_dict() +# create an instance of Field from a dict +field_form_dict = field.from_dict(field_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/FileSystemApi.md b/docs/FileSystemApi.md new file mode 100644 index 0000000..12eaae7 --- /dev/null +++ b/docs/FileSystemApi.md @@ -0,0 +1,254 @@ +# prowlarr.FileSystemApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_file_system**](FileSystemApi.md#get_file_system) | **GET** /api/v1/filesystem | +[**get_file_system_type**](FileSystemApi.md#get_file_system_type) | **GET** /api/v1/filesystem/type | + + +# **get_file_system** +> get_file_system(path=path, include_files=include_files, allow_folders_without_trailing_slashes=allow_folders_without_trailing_slashes) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.FileSystemApi(api_client) + path = 'path_example' # str | (optional) + include_files = False # bool | (optional) (default to False) + allow_folders_without_trailing_slashes = False # bool | (optional) (default to False) + + try: + api_instance.get_file_system(path=path, include_files=include_files, allow_folders_without_trailing_slashes=allow_folders_without_trailing_slashes) + except Exception as e: + print("Exception when calling FileSystemApi->get_file_system: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.FileSystemApi(api_client) + path = 'path_example' # str | (optional) + include_files = False # bool | (optional) (default to False) + allow_folders_without_trailing_slashes = False # bool | (optional) (default to False) + + try: + api_instance.get_file_system(path=path, include_files=include_files, allow_folders_without_trailing_slashes=allow_folders_without_trailing_slashes) + except Exception as e: + print("Exception when calling FileSystemApi->get_file_system: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **path** | **str**| | [optional] + **include_files** | **bool**| | [optional] [default to False] + **allow_folders_without_trailing_slashes** | **bool**| | [optional] [default to False] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_file_system_type** +> get_file_system_type(path=path) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.FileSystemApi(api_client) + path = 'path_example' # str | (optional) + + try: + api_instance.get_file_system_type(path=path) + except Exception as e: + print("Exception when calling FileSystemApi->get_file_system_type: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.FileSystemApi(api_client) + path = 'path_example' # str | (optional) + + try: + api_instance.get_file_system_type(path=path) + except Exception as e: + print("Exception when calling FileSystemApi->get_file_system_type: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **path** | **str**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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/HealthApi.md b/docs/HealthApi.md new file mode 100644 index 0000000..c591e80 --- /dev/null +++ b/docs/HealthApi.md @@ -0,0 +1,251 @@ +# prowlarr.HealthApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_health_by_id**](HealthApi.md#get_health_by_id) | **GET** /api/v1/health/{id} | +[**list_health**](HealthApi.md#list_health) | **GET** /api/v1/health | + + +# **get_health_by_id** +> HealthResource get_health_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HealthApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_health_by_id(id) + print("The response of HealthApi->get_health_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HealthApi->get_health_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HealthApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_health_by_id(id) + print("The response of HealthApi->get_health_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HealthApi->get_health_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**HealthResource**](HealthResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **list_health** +> List[HealthResource] list_health() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HealthApi(api_client) + + try: + api_response = api_instance.list_health() + print("The response of HealthApi->list_health:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HealthApi->list_health: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HealthApi(api_client) + + try: + api_response = api_instance.list_health() + print("The response of HealthApi->list_health:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HealthApi->list_health: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[HealthResource]**](HealthResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + diff --git a/docs/HealthCheckResult.md b/docs/HealthCheckResult.md new file mode 100644 index 0000000..dc45f59 --- /dev/null +++ b/docs/HealthCheckResult.md @@ -0,0 +1,10 @@ +# HealthCheckResult + + +## 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/HealthResource.md b/docs/HealthResource.md new file mode 100644 index 0000000..e3ca5d4 --- /dev/null +++ b/docs/HealthResource.md @@ -0,0 +1,32 @@ +# HealthResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**source** | **str** | | [optional] +**type** | [**HealthCheckResult**](HealthCheckResult.md) | | [optional] +**message** | **str** | | [optional] +**wiki_url** | [**HttpUri**](HttpUri.md) | | [optional] + +## Example + +```python +from prowlarr.models.health_resource import HealthResource + +# TODO update the JSON string below +json = "{}" +# create an instance of HealthResource from a JSON string +health_resource_instance = HealthResource.from_json(json) +# print the JSON string representation of the object +print HealthResource.to_json() + +# convert the object into a dict +health_resource_dict = health_resource_instance.to_dict() +# create an instance of HealthResource from a dict +health_resource_form_dict = health_resource.from_dict(health_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/HistoryApi.md b/docs/HistoryApi.md new file mode 100644 index 0000000..a1f9543 --- /dev/null +++ b/docs/HistoryApi.md @@ -0,0 +1,381 @@ +# prowlarr.HistoryApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_history**](HistoryApi.md#get_history) | **GET** /api/v1/history | +[**list_history_indexer**](HistoryApi.md#list_history_indexer) | **GET** /api/v1/history/indexer | +[**list_history_since**](HistoryApi.md#list_history_since) | **GET** /api/v1/history/since | + + +# **get_history** +> HistoryResourcePagingResource get_history() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HistoryApi(api_client) + + try: + api_response = api_instance.get_history() + print("The response of HistoryApi->get_history:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HistoryApi->get_history: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HistoryApi(api_client) + + try: + api_response = api_instance.get_history() + print("The response of HistoryApi->get_history:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HistoryApi->get_history: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HistoryResourcePagingResource**](HistoryResourcePagingResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + +# **list_history_indexer** +> List[HistoryResource] list_history_indexer(indexer_id=indexer_id, event_type=event_type) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HistoryApi(api_client) + indexer_id = 56 # int | (optional) + event_type = prowlarr.HistoryEventType() # HistoryEventType | (optional) + + try: + api_response = api_instance.list_history_indexer(indexer_id=indexer_id, event_type=event_type) + print("The response of HistoryApi->list_history_indexer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HistoryApi->list_history_indexer: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HistoryApi(api_client) + indexer_id = 56 # int | (optional) + event_type = prowlarr.HistoryEventType() # HistoryEventType | (optional) + + try: + api_response = api_instance.list_history_indexer(indexer_id=indexer_id, event_type=event_type) + print("The response of HistoryApi->list_history_indexer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HistoryApi->list_history_indexer: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **indexer_id** | **int**| | [optional] + **event_type** | [**HistoryEventType**](.md)| | [optional] + +### Return type + +[**List[HistoryResource]**](HistoryResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + +# **list_history_since** +> List[HistoryResource] list_history_since(var_date=var_date, event_type=event_type) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HistoryApi(api_client) + var_date = '2013-10-20T19:20:30+01:00' # datetime | (optional) + event_type = prowlarr.HistoryEventType() # HistoryEventType | (optional) + + try: + api_response = api_instance.list_history_since(var_date=var_date, event_type=event_type) + print("The response of HistoryApi->list_history_since:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HistoryApi->list_history_since: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HistoryApi(api_client) + var_date = '2013-10-20T19:20:30+01:00' # datetime | (optional) + event_type = prowlarr.HistoryEventType() # HistoryEventType | (optional) + + try: + api_response = api_instance.list_history_since(var_date=var_date, event_type=event_type) + print("The response of HistoryApi->list_history_since:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HistoryApi->list_history_since: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **var_date** | **datetime**| | [optional] + **event_type** | [**HistoryEventType**](.md)| | [optional] + +### Return type + +[**List[HistoryResource]**](HistoryResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + diff --git a/docs/HistoryEventType.md b/docs/HistoryEventType.md new file mode 100644 index 0000000..c1d0009 --- /dev/null +++ b/docs/HistoryEventType.md @@ -0,0 +1,10 @@ +# HistoryEventType + + +## 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/HistoryResource.md b/docs/HistoryResource.md new file mode 100644 index 0000000..5e81580 --- /dev/null +++ b/docs/HistoryResource.md @@ -0,0 +1,34 @@ +# HistoryResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**indexer_id** | **int** | | [optional] +**var_date** | **datetime** | | [optional] +**download_id** | **str** | | [optional] +**successful** | **bool** | | [optional] +**event_type** | [**HistoryEventType**](HistoryEventType.md) | | [optional] +**data** | **Dict[str, str]** | | [optional] + +## Example + +```python +from prowlarr.models.history_resource import HistoryResource + +# TODO update the JSON string below +json = "{}" +# create an instance of HistoryResource from a JSON string +history_resource_instance = HistoryResource.from_json(json) +# print the JSON string representation of the object +print HistoryResource.to_json() + +# convert the object into a dict +history_resource_dict = history_resource_instance.to_dict() +# create an instance of HistoryResource from a dict +history_resource_form_dict = history_resource.from_dict(history_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/HistoryResourcePagingResource.md b/docs/HistoryResourcePagingResource.md new file mode 100644 index 0000000..d566a31 --- /dev/null +++ b/docs/HistoryResourcePagingResource.md @@ -0,0 +1,34 @@ +# HistoryResourcePagingResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **int** | | [optional] +**page_size** | **int** | | [optional] +**sort_key** | **str** | | [optional] +**sort_direction** | [**SortDirection**](SortDirection.md) | | [optional] +**filters** | [**List[PagingResourceFilter]**](PagingResourceFilter.md) | | [optional] +**total_records** | **int** | | [optional] +**records** | [**List[HistoryResource]**](HistoryResource.md) | | [optional] + +## Example + +```python +from prowlarr.models.history_resource_paging_resource import HistoryResourcePagingResource + +# TODO update the JSON string below +json = "{}" +# create an instance of HistoryResourcePagingResource from a JSON string +history_resource_paging_resource_instance = HistoryResourcePagingResource.from_json(json) +# print the JSON string representation of the object +print HistoryResourcePagingResource.to_json() + +# convert the object into a dict +history_resource_paging_resource_dict = history_resource_paging_resource_instance.to_dict() +# create an instance of HistoryResourcePagingResource from a dict +history_resource_paging_resource_form_dict = history_resource_paging_resource.from_dict(history_resource_paging_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/HostConfigApi.md b/docs/HostConfigApi.md new file mode 100644 index 0000000..b2cdce5 --- /dev/null +++ b/docs/HostConfigApi.md @@ -0,0 +1,378 @@ +# prowlarr.HostConfigApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_host_config**](HostConfigApi.md#get_host_config) | **GET** /api/v1/config/host | +[**get_host_config_by_id**](HostConfigApi.md#get_host_config_by_id) | **GET** /api/v1/config/host/{id} | +[**update_host_config**](HostConfigApi.md#update_host_config) | **PUT** /api/v1/config/host/{id} | + + +# **get_host_config** +> HostConfigResource get_host_config() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HostConfigApi(api_client) + + try: + api_response = api_instance.get_host_config() + print("The response of HostConfigApi->get_host_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HostConfigApi->get_host_config: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HostConfigApi(api_client) + + try: + api_response = api_instance.get_host_config() + print("The response of HostConfigApi->get_host_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HostConfigApi->get_host_config: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HostConfigResource**](HostConfigResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **get_host_config_by_id** +> HostConfigResource get_host_config_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HostConfigApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_host_config_by_id(id) + print("The response of HostConfigApi->get_host_config_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HostConfigApi->get_host_config_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HostConfigApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_host_config_by_id(id) + print("The response of HostConfigApi->get_host_config_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HostConfigApi->get_host_config_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**HostConfigResource**](HostConfigResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **update_host_config** +> HostConfigResource update_host_config(id, host_config_resource=host_config_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HostConfigApi(api_client) + id = 'id_example' # str | + host_config_resource = prowlarr.HostConfigResource() # HostConfigResource | (optional) + + try: + api_response = api_instance.update_host_config(id, host_config_resource=host_config_resource) + print("The response of HostConfigApi->update_host_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HostConfigApi->update_host_config: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.HostConfigApi(api_client) + id = 'id_example' # str | + host_config_resource = prowlarr.HostConfigResource() # HostConfigResource | (optional) + + try: + api_response = api_instance.update_host_config(id, host_config_resource=host_config_resource) + print("The response of HostConfigApi->update_host_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HostConfigApi->update_host_config: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **host_config_resource** | [**HostConfigResource**](HostConfigResource.md)| | [optional] + +### Return type + +[**HostConfigResource**](HostConfigResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, 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/HostConfigResource.md b/docs/HostConfigResource.md new file mode 100644 index 0000000..97793a7 --- /dev/null +++ b/docs/HostConfigResource.md @@ -0,0 +1,62 @@ +# HostConfigResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**bind_address** | **str** | | [optional] +**port** | **int** | | [optional] +**ssl_port** | **int** | | [optional] +**enable_ssl** | **bool** | | [optional] +**launch_browser** | **bool** | | [optional] +**authentication_method** | [**AuthenticationType**](AuthenticationType.md) | | [optional] +**authentication_required** | [**AuthenticationRequiredType**](AuthenticationRequiredType.md) | | [optional] +**analytics_enabled** | **bool** | | [optional] +**username** | **str** | | [optional] +**password** | **str** | | [optional] +**log_level** | **str** | | [optional] +**console_log_level** | **str** | | [optional] +**branch** | **str** | | [optional] +**api_key** | **str** | | [optional] +**ssl_cert_path** | **str** | | [optional] +**ssl_cert_password** | **str** | | [optional] +**url_base** | **str** | | [optional] +**instance_name** | **str** | | [optional] +**update_automatically** | **bool** | | [optional] +**update_mechanism** | [**UpdateMechanism**](UpdateMechanism.md) | | [optional] +**update_script_path** | **str** | | [optional] +**proxy_enabled** | **bool** | | [optional] +**proxy_type** | [**ProxyType**](ProxyType.md) | | [optional] +**proxy_hostname** | **str** | | [optional] +**proxy_port** | **int** | | [optional] +**proxy_username** | **str** | | [optional] +**proxy_password** | **str** | | [optional] +**proxy_bypass_filter** | **str** | | [optional] +**proxy_bypass_local_addresses** | **bool** | | [optional] +**certificate_validation** | [**CertificateValidationType**](CertificateValidationType.md) | | [optional] +**backup_folder** | **str** | | [optional] +**backup_interval** | **int** | | [optional] +**backup_retention** | **int** | | [optional] +**history_cleanup_days** | **int** | | [optional] + +## Example + +```python +from prowlarr.models.host_config_resource import HostConfigResource + +# TODO update the JSON string below +json = "{}" +# create an instance of HostConfigResource from a JSON string +host_config_resource_instance = HostConfigResource.from_json(json) +# print the JSON string representation of the object +print HostConfigResource.to_json() + +# convert the object into a dict +host_config_resource_dict = host_config_resource_instance.to_dict() +# create an instance of HostConfigResource from a dict +host_config_resource_form_dict = host_config_resource.from_dict(host_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/HostStatistics.md b/docs/HostStatistics.md new file mode 100644 index 0000000..ff295e6 --- /dev/null +++ b/docs/HostStatistics.md @@ -0,0 +1,30 @@ +# HostStatistics + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**host** | **str** | | [optional] +**number_of_queries** | **int** | | [optional] +**number_of_grabs** | **int** | | [optional] + +## Example + +```python +from prowlarr.models.host_statistics import HostStatistics + +# TODO update the JSON string below +json = "{}" +# create an instance of HostStatistics from a JSON string +host_statistics_instance = HostStatistics.from_json(json) +# print the JSON string representation of the object +print HostStatistics.to_json() + +# convert the object into a dict +host_statistics_dict = host_statistics_instance.to_dict() +# create an instance of HostStatistics from a dict +host_statistics_form_dict = host_statistics.from_dict(host_statistics_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/HttpUri.md b/docs/HttpUri.md new file mode 100644 index 0000000..94affb9 --- /dev/null +++ b/docs/HttpUri.md @@ -0,0 +1,34 @@ +# HttpUri + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**full_uri** | **str** | | [optional] [readonly] +**scheme** | **str** | | [optional] [readonly] +**host** | **str** | | [optional] [readonly] +**port** | **int** | | [optional] [readonly] +**path** | **str** | | [optional] [readonly] +**query** | **str** | | [optional] [readonly] +**fragment** | **str** | | [optional] [readonly] + +## Example + +```python +from prowlarr.models.http_uri import HttpUri + +# TODO update the JSON string below +json = "{}" +# create an instance of HttpUri from a JSON string +http_uri_instance = HttpUri.from_json(json) +# print the JSON string representation of the object +print HttpUri.to_json() + +# convert the object into a dict +http_uri_dict = http_uri_instance.to_dict() +# create an instance of HttpUri from a dict +http_uri_form_dict = http_uri.from_dict(http_uri_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/IndexerApi.md b/docs/IndexerApi.md new file mode 100644 index 0000000..0575ab4 --- /dev/null +++ b/docs/IndexerApi.md @@ -0,0 +1,1099 @@ +# prowlarr.IndexerApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_indexer**](IndexerApi.md#create_indexer) | **POST** /api/v1/indexer | +[**create_indexer_action_by_name**](IndexerApi.md#create_indexer_action_by_name) | **POST** /api/v1/indexer/action/{name} | +[**delete_indexer**](IndexerApi.md#delete_indexer) | **DELETE** /api/v1/indexer/{id} | +[**get_indexer_by_id**](IndexerApi.md#get_indexer_by_id) | **GET** /api/v1/indexer/{id} | +[**list_indexer**](IndexerApi.md#list_indexer) | **GET** /api/v1/indexer | +[**list_indexer_schema**](IndexerApi.md#list_indexer_schema) | **GET** /api/v1/indexer/schema | +[**test_indexer**](IndexerApi.md#test_indexer) | **POST** /api/v1/indexer/test | +[**testall_indexer**](IndexerApi.md#testall_indexer) | **POST** /api/v1/indexer/testall | +[**update_indexer**](IndexerApi.md#update_indexer) | **PUT** /api/v1/indexer/{id} | + + +# **create_indexer** +> IndexerResource create_indexer(indexer_resource=indexer_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + indexer_resource = prowlarr.IndexerResource() # IndexerResource | (optional) + + try: + api_response = api_instance.create_indexer(indexer_resource=indexer_resource) + print("The response of IndexerApi->create_indexer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerApi->create_indexer: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + indexer_resource = prowlarr.IndexerResource() # IndexerResource | (optional) + + try: + api_response = api_instance.create_indexer(indexer_resource=indexer_resource) + print("The response of IndexerApi->create_indexer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerApi->create_indexer: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **indexer_resource** | [**IndexerResource**](IndexerResource.md)| | [optional] + +### Return type + +[**IndexerResource**](IndexerResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + +# **create_indexer_action_by_name** +> create_indexer_action_by_name(name, indexer_resource=indexer_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + name = 'name_example' # str | + indexer_resource = prowlarr.IndexerResource() # IndexerResource | (optional) + + try: + api_instance.create_indexer_action_by_name(name, indexer_resource=indexer_resource) + except Exception as e: + print("Exception when calling IndexerApi->create_indexer_action_by_name: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + name = 'name_example' # str | + indexer_resource = prowlarr.IndexerResource() # IndexerResource | (optional) + + try: + api_instance.create_indexer_action_by_name(name, indexer_resource=indexer_resource) + except Exception as e: + print("Exception when calling IndexerApi->create_indexer_action_by_name: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| | + **indexer_resource** | [**IndexerResource**](IndexerResource.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + +### 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) + +# **delete_indexer** +> delete_indexer(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + id = 56 # int | + + try: + api_instance.delete_indexer(id) + except Exception as e: + print("Exception when calling IndexerApi->delete_indexer: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + id = 56 # int | + + try: + api_instance.delete_indexer(id) + except Exception as e: + print("Exception when calling IndexerApi->delete_indexer: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_indexer_by_id** +> IndexerResource get_indexer_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_indexer_by_id(id) + print("The response of IndexerApi->get_indexer_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerApi->get_indexer_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_indexer_by_id(id) + print("The response of IndexerApi->get_indexer_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerApi->get_indexer_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**IndexerResource**](IndexerResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **list_indexer** +> List[IndexerResource] list_indexer() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + + try: + api_response = api_instance.list_indexer() + print("The response of IndexerApi->list_indexer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerApi->list_indexer: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + + try: + api_response = api_instance.list_indexer() + print("The response of IndexerApi->list_indexer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerApi->list_indexer: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[IndexerResource]**](IndexerResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + +# **list_indexer_schema** +> List[IndexerResource] list_indexer_schema() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + + try: + api_response = api_instance.list_indexer_schema() + print("The response of IndexerApi->list_indexer_schema:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerApi->list_indexer_schema: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + + try: + api_response = api_instance.list_indexer_schema() + print("The response of IndexerApi->list_indexer_schema:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerApi->list_indexer_schema: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[IndexerResource]**](IndexerResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + +# **test_indexer** +> test_indexer(indexer_resource=indexer_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + indexer_resource = prowlarr.IndexerResource() # IndexerResource | (optional) + + try: + api_instance.test_indexer(indexer_resource=indexer_resource) + except Exception as e: + print("Exception when calling IndexerApi->test_indexer: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + indexer_resource = prowlarr.IndexerResource() # IndexerResource | (optional) + + try: + api_instance.test_indexer(indexer_resource=indexer_resource) + except Exception as e: + print("Exception when calling IndexerApi->test_indexer: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **indexer_resource** | [**IndexerResource**](IndexerResource.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + +### 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) + +# **testall_indexer** +> testall_indexer() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + + try: + api_instance.testall_indexer() + except Exception as e: + print("Exception when calling IndexerApi->testall_indexer: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + + try: + api_instance.testall_indexer() + except Exception as e: + print("Exception when calling IndexerApi->testall_indexer: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_indexer** +> IndexerResource update_indexer(id, indexer_resource=indexer_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + id = 'id_example' # str | + indexer_resource = prowlarr.IndexerResource() # IndexerResource | (optional) + + try: + api_response = api_instance.update_indexer(id, indexer_resource=indexer_resource) + print("The response of IndexerApi->update_indexer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerApi->update_indexer: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerApi(api_client) + id = 'id_example' # str | + indexer_resource = prowlarr.IndexerResource() # IndexerResource | (optional) + + try: + api_response = api_instance.update_indexer(id, indexer_resource=indexer_resource) + print("The response of IndexerApi->update_indexer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerApi->update_indexer: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **indexer_resource** | [**IndexerResource**](IndexerResource.md)| | [optional] + +### Return type + +[**IndexerResource**](IndexerResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + diff --git a/docs/IndexerCapabilityResource.md b/docs/IndexerCapabilityResource.md new file mode 100644 index 0000000..2cbf205 --- /dev/null +++ b/docs/IndexerCapabilityResource.md @@ -0,0 +1,37 @@ +# IndexerCapabilityResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**limits_max** | **int** | | [optional] +**limits_default** | **int** | | [optional] +**categories** | [**List[IndexerCategory]**](IndexerCategory.md) | | [optional] +**supports_raw_search** | **bool** | | [optional] +**search_params** | [**List[SearchParam]**](SearchParam.md) | | [optional] +**tv_search_params** | [**List[TvSearchParam]**](TvSearchParam.md) | | [optional] +**movie_search_params** | [**List[MovieSearchParam]**](MovieSearchParam.md) | | [optional] +**music_search_params** | [**List[MusicSearchParam]**](MusicSearchParam.md) | | [optional] +**book_search_params** | [**List[BookSearchParam]**](BookSearchParam.md) | | [optional] + +## Example + +```python +from prowlarr.models.indexer_capability_resource import IndexerCapabilityResource + +# TODO update the JSON string below +json = "{}" +# create an instance of IndexerCapabilityResource from a JSON string +indexer_capability_resource_instance = IndexerCapabilityResource.from_json(json) +# print the JSON string representation of the object +print IndexerCapabilityResource.to_json() + +# convert the object into a dict +indexer_capability_resource_dict = indexer_capability_resource_instance.to_dict() +# create an instance of IndexerCapabilityResource from a dict +indexer_capability_resource_form_dict = indexer_capability_resource.from_dict(indexer_capability_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/IndexerCategory.md b/docs/IndexerCategory.md new file mode 100644 index 0000000..557fd8c --- /dev/null +++ b/docs/IndexerCategory.md @@ -0,0 +1,31 @@ +# IndexerCategory + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**sub_categories** | [**List[IndexerCategory]**](IndexerCategory.md) | | [optional] [readonly] + +## Example + +```python +from prowlarr.models.indexer_category import IndexerCategory + +# TODO update the JSON string below +json = "{}" +# create an instance of IndexerCategory from a JSON string +indexer_category_instance = IndexerCategory.from_json(json) +# print the JSON string representation of the object +print IndexerCategory.to_json() + +# convert the object into a dict +indexer_category_dict = indexer_category_instance.to_dict() +# create an instance of IndexerCategory from a dict +indexer_category_form_dict = indexer_category.from_dict(indexer_category_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/IndexerDefaultCategoriesApi.md b/docs/IndexerDefaultCategoriesApi.md new file mode 100644 index 0000000..885b147 --- /dev/null +++ b/docs/IndexerDefaultCategoriesApi.md @@ -0,0 +1,127 @@ +# prowlarr.IndexerDefaultCategoriesApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_indexer_categories**](IndexerDefaultCategoriesApi.md#list_indexer_categories) | **GET** /api/v1/indexer/categories | + + +# **list_indexer_categories** +> List[IndexerCategory] list_indexer_categories() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerDefaultCategoriesApi(api_client) + + try: + api_response = api_instance.list_indexer_categories() + print("The response of IndexerDefaultCategoriesApi->list_indexer_categories:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerDefaultCategoriesApi->list_indexer_categories: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerDefaultCategoriesApi(api_client) + + try: + api_response = api_instance.list_indexer_categories() + print("The response of IndexerDefaultCategoriesApi->list_indexer_categories:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerDefaultCategoriesApi->list_indexer_categories: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[IndexerCategory]**](IndexerCategory.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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/IndexerEditorApi.md b/docs/IndexerEditorApi.md new file mode 100644 index 0000000..ed683a1 --- /dev/null +++ b/docs/IndexerEditorApi.md @@ -0,0 +1,248 @@ +# prowlarr.IndexerEditorApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_indexer_editor**](IndexerEditorApi.md#delete_indexer_editor) | **DELETE** /api/v1/indexer/editor | +[**put_indexer_editor**](IndexerEditorApi.md#put_indexer_editor) | **PUT** /api/v1/indexer/editor | + + +# **delete_indexer_editor** +> delete_indexer_editor(indexer_editor_resource=indexer_editor_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerEditorApi(api_client) + indexer_editor_resource = prowlarr.IndexerEditorResource() # IndexerEditorResource | (optional) + + try: + api_instance.delete_indexer_editor(indexer_editor_resource=indexer_editor_resource) + except Exception as e: + print("Exception when calling IndexerEditorApi->delete_indexer_editor: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerEditorApi(api_client) + indexer_editor_resource = prowlarr.IndexerEditorResource() # IndexerEditorResource | (optional) + + try: + api_instance.delete_indexer_editor(indexer_editor_resource=indexer_editor_resource) + except Exception as e: + print("Exception when calling IndexerEditorApi->delete_indexer_editor: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **indexer_editor_resource** | [**IndexerEditorResource**](IndexerEditorResource.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + +### 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) + +# **put_indexer_editor** +> put_indexer_editor(indexer_editor_resource=indexer_editor_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerEditorApi(api_client) + indexer_editor_resource = prowlarr.IndexerEditorResource() # IndexerEditorResource | (optional) + + try: + api_instance.put_indexer_editor(indexer_editor_resource=indexer_editor_resource) + except Exception as e: + print("Exception when calling IndexerEditorApi->put_indexer_editor: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerEditorApi(api_client) + indexer_editor_resource = prowlarr.IndexerEditorResource() # IndexerEditorResource | (optional) + + try: + api_instance.put_indexer_editor(indexer_editor_resource=indexer_editor_resource) + except Exception as e: + print("Exception when calling IndexerEditorApi->put_indexer_editor: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **indexer_editor_resource** | [**IndexerEditorResource**](IndexerEditorResource.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + +### 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/IndexerEditorResource.md b/docs/IndexerEditorResource.md new file mode 100644 index 0000000..a25d04d --- /dev/null +++ b/docs/IndexerEditorResource.md @@ -0,0 +1,32 @@ +# IndexerEditorResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**indexer_ids** | **List[int]** | | [optional] +**enable** | **str** | | [optional] +**app_profile_id** | **int** | | [optional] +**tags** | **List[int]** | | [optional] +**apply_tags** | [**ApplyTags**](ApplyTags.md) | | [optional] + +## Example + +```python +from prowlarr.models.indexer_editor_resource import IndexerEditorResource + +# TODO update the JSON string below +json = "{}" +# create an instance of IndexerEditorResource from a JSON string +indexer_editor_resource_instance = IndexerEditorResource.from_json(json) +# print the JSON string representation of the object +print IndexerEditorResource.to_json() + +# convert the object into a dict +indexer_editor_resource_dict = indexer_editor_resource_instance.to_dict() +# create an instance of IndexerEditorResource from a dict +indexer_editor_resource_form_dict = indexer_editor_resource.from_dict(indexer_editor_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/IndexerPrivacy.md b/docs/IndexerPrivacy.md new file mode 100644 index 0000000..546240e --- /dev/null +++ b/docs/IndexerPrivacy.md @@ -0,0 +1,10 @@ +# IndexerPrivacy + + +## 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/IndexerProxyApi.md b/docs/IndexerProxyApi.md new file mode 100644 index 0000000..2d05671 --- /dev/null +++ b/docs/IndexerProxyApi.md @@ -0,0 +1,1099 @@ +# prowlarr.IndexerProxyApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_indexer_proxy**](IndexerProxyApi.md#create_indexer_proxy) | **POST** /api/v1/indexerproxy | +[**create_indexer_proxy_action_by_name**](IndexerProxyApi.md#create_indexer_proxy_action_by_name) | **POST** /api/v1/indexerproxy/action/{name} | +[**delete_indexer_proxy**](IndexerProxyApi.md#delete_indexer_proxy) | **DELETE** /api/v1/indexerproxy/{id} | +[**get_indexer_proxy_by_id**](IndexerProxyApi.md#get_indexer_proxy_by_id) | **GET** /api/v1/indexerproxy/{id} | +[**list_indexer_proxy**](IndexerProxyApi.md#list_indexer_proxy) | **GET** /api/v1/indexerproxy | +[**list_indexer_proxy_schema**](IndexerProxyApi.md#list_indexer_proxy_schema) | **GET** /api/v1/indexerproxy/schema | +[**test_indexer_proxy**](IndexerProxyApi.md#test_indexer_proxy) | **POST** /api/v1/indexerproxy/test | +[**testall_indexer_proxy**](IndexerProxyApi.md#testall_indexer_proxy) | **POST** /api/v1/indexerproxy/testall | +[**update_indexer_proxy**](IndexerProxyApi.md#update_indexer_proxy) | **PUT** /api/v1/indexerproxy/{id} | + + +# **create_indexer_proxy** +> IndexerProxyResource create_indexer_proxy(indexer_proxy_resource=indexer_proxy_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + indexer_proxy_resource = prowlarr.IndexerProxyResource() # IndexerProxyResource | (optional) + + try: + api_response = api_instance.create_indexer_proxy(indexer_proxy_resource=indexer_proxy_resource) + print("The response of IndexerProxyApi->create_indexer_proxy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerProxyApi->create_indexer_proxy: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + indexer_proxy_resource = prowlarr.IndexerProxyResource() # IndexerProxyResource | (optional) + + try: + api_response = api_instance.create_indexer_proxy(indexer_proxy_resource=indexer_proxy_resource) + print("The response of IndexerProxyApi->create_indexer_proxy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerProxyApi->create_indexer_proxy: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **indexer_proxy_resource** | [**IndexerProxyResource**](IndexerProxyResource.md)| | [optional] + +### Return type + +[**IndexerProxyResource**](IndexerProxyResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + +# **create_indexer_proxy_action_by_name** +> create_indexer_proxy_action_by_name(name, indexer_proxy_resource=indexer_proxy_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + name = 'name_example' # str | + indexer_proxy_resource = prowlarr.IndexerProxyResource() # IndexerProxyResource | (optional) + + try: + api_instance.create_indexer_proxy_action_by_name(name, indexer_proxy_resource=indexer_proxy_resource) + except Exception as e: + print("Exception when calling IndexerProxyApi->create_indexer_proxy_action_by_name: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + name = 'name_example' # str | + indexer_proxy_resource = prowlarr.IndexerProxyResource() # IndexerProxyResource | (optional) + + try: + api_instance.create_indexer_proxy_action_by_name(name, indexer_proxy_resource=indexer_proxy_resource) + except Exception as e: + print("Exception when calling IndexerProxyApi->create_indexer_proxy_action_by_name: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| | + **indexer_proxy_resource** | [**IndexerProxyResource**](IndexerProxyResource.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + +### 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) + +# **delete_indexer_proxy** +> delete_indexer_proxy(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + id = 56 # int | + + try: + api_instance.delete_indexer_proxy(id) + except Exception as e: + print("Exception when calling IndexerProxyApi->delete_indexer_proxy: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + id = 56 # int | + + try: + api_instance.delete_indexer_proxy(id) + except Exception as e: + print("Exception when calling IndexerProxyApi->delete_indexer_proxy: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_indexer_proxy_by_id** +> IndexerProxyResource get_indexer_proxy_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_indexer_proxy_by_id(id) + print("The response of IndexerProxyApi->get_indexer_proxy_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerProxyApi->get_indexer_proxy_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_indexer_proxy_by_id(id) + print("The response of IndexerProxyApi->get_indexer_proxy_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerProxyApi->get_indexer_proxy_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**IndexerProxyResource**](IndexerProxyResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **list_indexer_proxy** +> List[IndexerProxyResource] list_indexer_proxy() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + + try: + api_response = api_instance.list_indexer_proxy() + print("The response of IndexerProxyApi->list_indexer_proxy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerProxyApi->list_indexer_proxy: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + + try: + api_response = api_instance.list_indexer_proxy() + print("The response of IndexerProxyApi->list_indexer_proxy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerProxyApi->list_indexer_proxy: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[IndexerProxyResource]**](IndexerProxyResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + +# **list_indexer_proxy_schema** +> List[IndexerProxyResource] list_indexer_proxy_schema() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + + try: + api_response = api_instance.list_indexer_proxy_schema() + print("The response of IndexerProxyApi->list_indexer_proxy_schema:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerProxyApi->list_indexer_proxy_schema: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + + try: + api_response = api_instance.list_indexer_proxy_schema() + print("The response of IndexerProxyApi->list_indexer_proxy_schema:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerProxyApi->list_indexer_proxy_schema: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[IndexerProxyResource]**](IndexerProxyResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + +# **test_indexer_proxy** +> test_indexer_proxy(indexer_proxy_resource=indexer_proxy_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + indexer_proxy_resource = prowlarr.IndexerProxyResource() # IndexerProxyResource | (optional) + + try: + api_instance.test_indexer_proxy(indexer_proxy_resource=indexer_proxy_resource) + except Exception as e: + print("Exception when calling IndexerProxyApi->test_indexer_proxy: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + indexer_proxy_resource = prowlarr.IndexerProxyResource() # IndexerProxyResource | (optional) + + try: + api_instance.test_indexer_proxy(indexer_proxy_resource=indexer_proxy_resource) + except Exception as e: + print("Exception when calling IndexerProxyApi->test_indexer_proxy: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **indexer_proxy_resource** | [**IndexerProxyResource**](IndexerProxyResource.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + +### 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) + +# **testall_indexer_proxy** +> testall_indexer_proxy() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + + try: + api_instance.testall_indexer_proxy() + except Exception as e: + print("Exception when calling IndexerProxyApi->testall_indexer_proxy: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + + try: + api_instance.testall_indexer_proxy() + except Exception as e: + print("Exception when calling IndexerProxyApi->testall_indexer_proxy: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_indexer_proxy** +> IndexerProxyResource update_indexer_proxy(id, indexer_proxy_resource=indexer_proxy_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + id = 'id_example' # str | + indexer_proxy_resource = prowlarr.IndexerProxyResource() # IndexerProxyResource | (optional) + + try: + api_response = api_instance.update_indexer_proxy(id, indexer_proxy_resource=indexer_proxy_resource) + print("The response of IndexerProxyApi->update_indexer_proxy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerProxyApi->update_indexer_proxy: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerProxyApi(api_client) + id = 'id_example' # str | + indexer_proxy_resource = prowlarr.IndexerProxyResource() # IndexerProxyResource | (optional) + + try: + api_response = api_instance.update_indexer_proxy(id, indexer_proxy_resource=indexer_proxy_resource) + print("The response of IndexerProxyApi->update_indexer_proxy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerProxyApi->update_indexer_proxy: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **indexer_proxy_resource** | [**IndexerProxyResource**](IndexerProxyResource.md)| | [optional] + +### Return type + +[**IndexerProxyResource**](IndexerProxyResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + diff --git a/docs/IndexerProxyResource.md b/docs/IndexerProxyResource.md new file mode 100644 index 0000000..54c3b6f --- /dev/null +++ b/docs/IndexerProxyResource.md @@ -0,0 +1,42 @@ +# IndexerProxyResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**fields** | [**List[Field]**](Field.md) | | [optional] +**implementation_name** | **str** | | [optional] +**implementation** | **str** | | [optional] +**config_contract** | **str** | | [optional] +**info_link** | **str** | | [optional] +**message** | [**ProviderMessage**](ProviderMessage.md) | | [optional] +**tags** | **List[int]** | | [optional] +**presets** | [**List[IndexerProxyResource]**](IndexerProxyResource.md) | | [optional] +**link** | **str** | | [optional] +**on_health_issue** | **bool** | | [optional] +**supports_on_health_issue** | **bool** | | [optional] +**include_health_warnings** | **bool** | | [optional] +**test_command** | **str** | | [optional] + +## Example + +```python +from prowlarr.models.indexer_proxy_resource import IndexerProxyResource + +# TODO update the JSON string below +json = "{}" +# create an instance of IndexerProxyResource from a JSON string +indexer_proxy_resource_instance = IndexerProxyResource.from_json(json) +# print the JSON string representation of the object +print IndexerProxyResource.to_json() + +# convert the object into a dict +indexer_proxy_resource_dict = indexer_proxy_resource_instance.to_dict() +# create an instance of IndexerProxyResource from a dict +indexer_proxy_resource_form_dict = indexer_proxy_resource.from_dict(indexer_proxy_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/IndexerResource.md b/docs/IndexerResource.md new file mode 100644 index 0000000..537d34b --- /dev/null +++ b/docs/IndexerResource.md @@ -0,0 +1,56 @@ +# IndexerResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**fields** | [**List[Field]**](Field.md) | | [optional] +**implementation_name** | **str** | | [optional] +**implementation** | **str** | | [optional] +**config_contract** | **str** | | [optional] +**info_link** | **str** | | [optional] +**message** | [**ProviderMessage**](ProviderMessage.md) | | [optional] +**tags** | **List[int]** | | [optional] +**presets** | [**List[IndexerResource]**](IndexerResource.md) | | [optional] +**indexer_urls** | **List[str]** | | [optional] +**legacy_urls** | **List[str]** | | [optional] +**definition_name** | **str** | | [optional] +**description** | **str** | | [optional] +**language** | **str** | | [optional] +**encoding** | **str** | | [optional] +**enable** | **bool** | | [optional] +**redirect** | **bool** | | [optional] +**supports_rss** | **bool** | | [optional] +**supports_search** | **bool** | | [optional] +**supports_redirect** | **bool** | | [optional] +**app_profile_id** | **int** | | [optional] +**protocol** | [**DownloadProtocol**](DownloadProtocol.md) | | [optional] +**privacy** | [**IndexerPrivacy**](IndexerPrivacy.md) | | [optional] +**capabilities** | [**IndexerCapabilityResource**](IndexerCapabilityResource.md) | | [optional] +**priority** | **int** | | [optional] +**added** | **datetime** | | [optional] +**status** | [**IndexerStatusResource**](IndexerStatusResource.md) | | [optional] +**sort_name** | **str** | | [optional] + +## Example + +```python +from prowlarr.models.indexer_resource import IndexerResource + +# TODO update the JSON string below +json = "{}" +# create an instance of IndexerResource from a JSON string +indexer_resource_instance = IndexerResource.from_json(json) +# print the JSON string representation of the object +print IndexerResource.to_json() + +# convert the object into a dict +indexer_resource_dict = indexer_resource_instance.to_dict() +# create an instance of IndexerResource from a dict +indexer_resource_form_dict = indexer_resource.from_dict(indexer_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/IndexerStatistics.md b/docs/IndexerStatistics.md new file mode 100644 index 0000000..3a024bd --- /dev/null +++ b/docs/IndexerStatistics.md @@ -0,0 +1,38 @@ +# IndexerStatistics + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**indexer_id** | **int** | | [optional] +**indexer_name** | **str** | | [optional] +**average_response_time** | **int** | | [optional] +**number_of_queries** | **int** | | [optional] +**number_of_grabs** | **int** | | [optional] +**number_of_rss_queries** | **int** | | [optional] +**number_of_auth_queries** | **int** | | [optional] +**number_of_failed_queries** | **int** | | [optional] +**number_of_failed_grabs** | **int** | | [optional] +**number_of_failed_rss_queries** | **int** | | [optional] +**number_of_failed_auth_queries** | **int** | | [optional] + +## Example + +```python +from prowlarr.models.indexer_statistics import IndexerStatistics + +# TODO update the JSON string below +json = "{}" +# create an instance of IndexerStatistics from a JSON string +indexer_statistics_instance = IndexerStatistics.from_json(json) +# print the JSON string representation of the object +print IndexerStatistics.to_json() + +# convert the object into a dict +indexer_statistics_dict = indexer_statistics_instance.to_dict() +# create an instance of IndexerStatistics from a dict +indexer_statistics_form_dict = indexer_statistics.from_dict(indexer_statistics_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/IndexerStatsApi.md b/docs/IndexerStatsApi.md new file mode 100644 index 0000000..dad11a6 --- /dev/null +++ b/docs/IndexerStatsApi.md @@ -0,0 +1,135 @@ +# prowlarr.IndexerStatsApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_indexer_stats**](IndexerStatsApi.md#get_indexer_stats) | **GET** /api/v1/indexerstats | + + +# **get_indexer_stats** +> IndexerStatsResource get_indexer_stats(start_date=start_date, end_date=end_date) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerStatsApi(api_client) + start_date = '2013-10-20T19:20:30+01:00' # datetime | (optional) + end_date = '2013-10-20T19:20:30+01:00' # datetime | (optional) + + try: + api_response = api_instance.get_indexer_stats(start_date=start_date, end_date=end_date) + print("The response of IndexerStatsApi->get_indexer_stats:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerStatsApi->get_indexer_stats: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerStatsApi(api_client) + start_date = '2013-10-20T19:20:30+01:00' # datetime | (optional) + end_date = '2013-10-20T19:20:30+01:00' # datetime | (optional) + + try: + api_response = api_instance.get_indexer_stats(start_date=start_date, end_date=end_date) + print("The response of IndexerStatsApi->get_indexer_stats:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerStatsApi->get_indexer_stats: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_date** | **datetime**| | [optional] + **end_date** | **datetime**| | [optional] + +### Return type + +[**IndexerStatsResource**](IndexerStatsResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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/IndexerStatsResource.md b/docs/IndexerStatsResource.md new file mode 100644 index 0000000..08782e9 --- /dev/null +++ b/docs/IndexerStatsResource.md @@ -0,0 +1,31 @@ +# IndexerStatsResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**indexers** | [**List[IndexerStatistics]**](IndexerStatistics.md) | | [optional] +**user_agents** | [**List[UserAgentStatistics]**](UserAgentStatistics.md) | | [optional] +**hosts** | [**List[HostStatistics]**](HostStatistics.md) | | [optional] + +## Example + +```python +from prowlarr.models.indexer_stats_resource import IndexerStatsResource + +# TODO update the JSON string below +json = "{}" +# create an instance of IndexerStatsResource from a JSON string +indexer_stats_resource_instance = IndexerStatsResource.from_json(json) +# print the JSON string representation of the object +print IndexerStatsResource.to_json() + +# convert the object into a dict +indexer_stats_resource_dict = indexer_stats_resource_instance.to_dict() +# create an instance of IndexerStatsResource from a dict +indexer_stats_resource_form_dict = indexer_stats_resource.from_dict(indexer_stats_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/IndexerStatusApi.md b/docs/IndexerStatusApi.md new file mode 100644 index 0000000..82f1d7e --- /dev/null +++ b/docs/IndexerStatusApi.md @@ -0,0 +1,251 @@ +# prowlarr.IndexerStatusApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_indexer_status_by_id**](IndexerStatusApi.md#get_indexer_status_by_id) | **GET** /api/v1/indexerstatus/{id} | +[**list_indexer_status**](IndexerStatusApi.md#list_indexer_status) | **GET** /api/v1/indexerstatus | + + +# **get_indexer_status_by_id** +> IndexerStatusResource get_indexer_status_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerStatusApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_indexer_status_by_id(id) + print("The response of IndexerStatusApi->get_indexer_status_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerStatusApi->get_indexer_status_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerStatusApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_indexer_status_by_id(id) + print("The response of IndexerStatusApi->get_indexer_status_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerStatusApi->get_indexer_status_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**IndexerStatusResource**](IndexerStatusResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **list_indexer_status** +> List[IndexerStatusResource] list_indexer_status() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerStatusApi(api_client) + + try: + api_response = api_instance.list_indexer_status() + print("The response of IndexerStatusApi->list_indexer_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerStatusApi->list_indexer_status: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.IndexerStatusApi(api_client) + + try: + api_response = api_instance.list_indexer_status() + print("The response of IndexerStatusApi->list_indexer_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexerStatusApi->list_indexer_status: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[IndexerStatusResource]**](IndexerStatusResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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/IndexerStatusResource.md b/docs/IndexerStatusResource.md new file mode 100644 index 0000000..7080d31 --- /dev/null +++ b/docs/IndexerStatusResource.md @@ -0,0 +1,30 @@ +# IndexerStatusResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**indexer_id** | **int** | | [optional] +**disabled_till** | **datetime** | | [optional] + +## Example + +```python +from prowlarr.models.indexer_status_resource import IndexerStatusResource + +# TODO update the JSON string below +json = "{}" +# create an instance of IndexerStatusResource from a JSON string +indexer_status_resource_instance = IndexerStatusResource.from_json(json) +# print the JSON string representation of the object +print IndexerStatusResource.to_json() + +# convert the object into a dict +indexer_status_resource_dict = indexer_status_resource_instance.to_dict() +# create an instance of IndexerStatusResource from a dict +indexer_status_resource_form_dict = indexer_status_resource.from_dict(indexer_status_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/InitializeJsApi.md b/docs/InitializeJsApi.md new file mode 100644 index 0000000..3dde258 --- /dev/null +++ b/docs/InitializeJsApi.md @@ -0,0 +1,123 @@ +# prowlarr.InitializeJsApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_initialize_js**](InitializeJsApi.md#get_initialize_js) | **GET** /initialize.js | + + +# **get_initialize_js** +> get_initialize_js() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.InitializeJsApi(api_client) + + try: + api_instance.get_initialize_js() + except Exception as e: + print("Exception when calling InitializeJsApi->get_initialize_js: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.InitializeJsApi(api_client) + + try: + api_instance.get_initialize_js() + except Exception as e: + print("Exception when calling InitializeJsApi->get_initialize_js: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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/LocalizationApi.md b/docs/LocalizationApi.md new file mode 100644 index 0000000..3c12a0b --- /dev/null +++ b/docs/LocalizationApi.md @@ -0,0 +1,242 @@ +# prowlarr.LocalizationApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_localization**](LocalizationApi.md#get_localization) | **GET** /api/v1/localization | +[**list_localization_options**](LocalizationApi.md#list_localization_options) | **GET** /api/v1/localization/options | + + +# **get_localization** +> get_localization() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.LocalizationApi(api_client) + + try: + api_instance.get_localization() + except Exception as e: + print("Exception when calling LocalizationApi->get_localization: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.LocalizationApi(api_client) + + try: + api_instance.get_localization() + except Exception as e: + print("Exception when calling LocalizationApi->get_localization: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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) + +# **list_localization_options** +> List[LocalizationOption] list_localization_options() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.LocalizationApi(api_client) + + try: + api_response = api_instance.list_localization_options() + print("The response of LocalizationApi->list_localization_options:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LocalizationApi->list_localization_options: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.LocalizationApi(api_client) + + try: + api_response = api_instance.list_localization_options() + print("The response of LocalizationApi->list_localization_options:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LocalizationApi->list_localization_options: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[LocalizationOption]**](LocalizationOption.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + diff --git a/docs/LocalizationOption.md b/docs/LocalizationOption.md new file mode 100644 index 0000000..7de89c4 --- /dev/null +++ b/docs/LocalizationOption.md @@ -0,0 +1,29 @@ +# LocalizationOption + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**value** | **str** | | [optional] + +## Example + +```python +from prowlarr.models.localization_option import LocalizationOption + +# TODO update the JSON string below +json = "{}" +# create an instance of LocalizationOption from a JSON string +localization_option_instance = LocalizationOption.from_json(json) +# print the JSON string representation of the object +print LocalizationOption.to_json() + +# convert the object into a dict +localization_option_dict = localization_option_instance.to_dict() +# create an instance of LocalizationOption from a dict +localization_option_form_dict = localization_option.from_dict(localization_option_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/LogApi.md b/docs/LogApi.md new file mode 100644 index 0000000..2c5b587 --- /dev/null +++ b/docs/LogApi.md @@ -0,0 +1,127 @@ +# prowlarr.LogApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_log**](LogApi.md#get_log) | **GET** /api/v1/log | + + +# **get_log** +> LogResourcePagingResource get_log() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.LogApi(api_client) + + try: + api_response = api_instance.get_log() + print("The response of LogApi->get_log:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LogApi->get_log: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.LogApi(api_client) + + try: + api_response = api_instance.get_log() + print("The response of LogApi->get_log:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LogApi->get_log: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**LogResourcePagingResource**](LogResourcePagingResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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/LogFileApi.md b/docs/LogFileApi.md new file mode 100644 index 0000000..0ae58fb --- /dev/null +++ b/docs/LogFileApi.md @@ -0,0 +1,247 @@ +# prowlarr.LogFileApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_log_file_by_filename**](LogFileApi.md#get_log_file_by_filename) | **GET** /api/v1/log/file/{filename} | +[**list_log_file**](LogFileApi.md#list_log_file) | **GET** /api/v1/log/file | + + +# **get_log_file_by_filename** +> get_log_file_by_filename(filename) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.LogFileApi(api_client) + filename = 'filename_example' # str | + + try: + api_instance.get_log_file_by_filename(filename) + except Exception as e: + print("Exception when calling LogFileApi->get_log_file_by_filename: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.LogFileApi(api_client) + filename = 'filename_example' # str | + + try: + api_instance.get_log_file_by_filename(filename) + except Exception as e: + print("Exception when calling LogFileApi->get_log_file_by_filename: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filename** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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) + +# **list_log_file** +> List[LogFileResource] list_log_file() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.LogFileApi(api_client) + + try: + api_response = api_instance.list_log_file() + print("The response of LogFileApi->list_log_file:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LogFileApi->list_log_file: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.LogFileApi(api_client) + + try: + api_response = api_instance.list_log_file() + print("The response of LogFileApi->list_log_file:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LogFileApi->list_log_file: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[LogFileResource]**](LogFileResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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/LogFileResource.md b/docs/LogFileResource.md new file mode 100644 index 0000000..1b32e05 --- /dev/null +++ b/docs/LogFileResource.md @@ -0,0 +1,32 @@ +# LogFileResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**filename** | **str** | | [optional] +**last_write_time** | **datetime** | | [optional] +**contents_url** | **str** | | [optional] +**download_url** | **str** | | [optional] + +## Example + +```python +from prowlarr.models.log_file_resource import LogFileResource + +# TODO update the JSON string below +json = "{}" +# create an instance of LogFileResource from a JSON string +log_file_resource_instance = LogFileResource.from_json(json) +# print the JSON string representation of the object +print LogFileResource.to_json() + +# convert the object into a dict +log_file_resource_dict = log_file_resource_instance.to_dict() +# create an instance of LogFileResource from a dict +log_file_resource_form_dict = log_file_resource.from_dict(log_file_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/LogResource.md b/docs/LogResource.md new file mode 100644 index 0000000..cefb357 --- /dev/null +++ b/docs/LogResource.md @@ -0,0 +1,35 @@ +# LogResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**time** | **datetime** | | [optional] +**exception** | **str** | | [optional] +**exception_type** | **str** | | [optional] +**level** | **str** | | [optional] +**logger** | **str** | | [optional] +**message** | **str** | | [optional] +**method** | **str** | | [optional] + +## Example + +```python +from prowlarr.models.log_resource import LogResource + +# TODO update the JSON string below +json = "{}" +# create an instance of LogResource from a JSON string +log_resource_instance = LogResource.from_json(json) +# print the JSON string representation of the object +print LogResource.to_json() + +# convert the object into a dict +log_resource_dict = log_resource_instance.to_dict() +# create an instance of LogResource from a dict +log_resource_form_dict = log_resource.from_dict(log_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/LogResourcePagingResource.md b/docs/LogResourcePagingResource.md new file mode 100644 index 0000000..5f99710 --- /dev/null +++ b/docs/LogResourcePagingResource.md @@ -0,0 +1,34 @@ +# LogResourcePagingResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **int** | | [optional] +**page_size** | **int** | | [optional] +**sort_key** | **str** | | [optional] +**sort_direction** | [**SortDirection**](SortDirection.md) | | [optional] +**filters** | [**List[PagingResourceFilter]**](PagingResourceFilter.md) | | [optional] +**total_records** | **int** | | [optional] +**records** | [**List[LogResource]**](LogResource.md) | | [optional] + +## Example + +```python +from prowlarr.models.log_resource_paging_resource import LogResourcePagingResource + +# TODO update the JSON string below +json = "{}" +# create an instance of LogResourcePagingResource from a JSON string +log_resource_paging_resource_instance = LogResourcePagingResource.from_json(json) +# print the JSON string representation of the object +print LogResourcePagingResource.to_json() + +# convert the object into a dict +log_resource_paging_resource_dict = log_resource_paging_resource_instance.to_dict() +# create an instance of LogResourcePagingResource from a dict +log_resource_paging_resource_form_dict = log_resource_paging_resource.from_dict(log_resource_paging_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/MovieSearchParam.md b/docs/MovieSearchParam.md new file mode 100644 index 0000000..4e10cd1 --- /dev/null +++ b/docs/MovieSearchParam.md @@ -0,0 +1,10 @@ +# MovieSearchParam + + +## 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/MusicSearchParam.md b/docs/MusicSearchParam.md new file mode 100644 index 0000000..2d8e507 --- /dev/null +++ b/docs/MusicSearchParam.md @@ -0,0 +1,10 @@ +# MusicSearchParam + + +## 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/NewznabApi.md b/docs/NewznabApi.md new file mode 100644 index 0000000..4826edf --- /dev/null +++ b/docs/NewznabApi.md @@ -0,0 +1,668 @@ +# prowlarr.NewznabApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_indexerid_download**](NewznabApi.md#get_indexerid_download) | **GET** /api/v1/indexer/{id}/download | +[**get_indexerid_newznab**](NewznabApi.md#get_indexerid_newznab) | **GET** /api/v1/indexer/{id}/newznab | +[**getid_api**](NewznabApi.md#getid_api) | **GET** /{id}/api | +[**getid_download**](NewznabApi.md#getid_download) | **GET** /{id}/download | + + +# **get_indexerid_download** +> get_indexerid_download(id, link=link, file=file) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NewznabApi(api_client) + id = 56 # int | + link = 'link_example' # str | (optional) + file = 'file_example' # str | (optional) + + try: + api_instance.get_indexerid_download(id, link=link, file=file) + except Exception as e: + print("Exception when calling NewznabApi->get_indexerid_download: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NewznabApi(api_client) + id = 56 # int | + link = 'link_example' # str | (optional) + file = 'file_example' # str | (optional) + + try: + api_instance.get_indexerid_download(id, link=link, file=file) + except Exception as e: + print("Exception when calling NewznabApi->get_indexerid_download: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + **link** | **str**| | [optional] + **file** | **str**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_indexerid_newznab** +> get_indexerid_newznab(id, t=t, q=q, cat=cat, imdbid=imdbid, tmdbid=tmdbid, extended=extended, limit=limit, offset=offset, rid=rid, tvmazeid=tvmazeid, traktid=traktid, tvdbid=tvdbid, doubanid=doubanid, season=season, ep=ep, album=album, artist=artist, label=label, track=track, year=year, genre=genre, author=author, title=title, publisher=publisher, configured=configured, source=source, host=host, server=server) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NewznabApi(api_client) + id = 56 # int | + t = 't_example' # str | (optional) + q = 'q_example' # str | (optional) + cat = 'cat_example' # str | (optional) + imdbid = 'imdbid_example' # str | (optional) + tmdbid = 56 # int | (optional) + extended = 'extended_example' # str | (optional) + limit = 56 # int | (optional) + offset = 56 # int | (optional) + rid = 56 # int | (optional) + tvmazeid = 56 # int | (optional) + traktid = 56 # int | (optional) + tvdbid = 56 # int | (optional) + doubanid = 56 # int | (optional) + season = 56 # int | (optional) + ep = 'ep_example' # str | (optional) + album = 'album_example' # str | (optional) + artist = 'artist_example' # str | (optional) + label = 'label_example' # str | (optional) + track = 'track_example' # str | (optional) + year = 56 # int | (optional) + genre = 'genre_example' # str | (optional) + author = 'author_example' # str | (optional) + title = 'title_example' # str | (optional) + publisher = 'publisher_example' # str | (optional) + configured = 'configured_example' # str | (optional) + source = 'source_example' # str | (optional) + host = 'host_example' # str | (optional) + server = 'server_example' # str | (optional) + + try: + api_instance.get_indexerid_newznab(id, t=t, q=q, cat=cat, imdbid=imdbid, tmdbid=tmdbid, extended=extended, limit=limit, offset=offset, rid=rid, tvmazeid=tvmazeid, traktid=traktid, tvdbid=tvdbid, doubanid=doubanid, season=season, ep=ep, album=album, artist=artist, label=label, track=track, year=year, genre=genre, author=author, title=title, publisher=publisher, configured=configured, source=source, host=host, server=server) + except Exception as e: + print("Exception when calling NewznabApi->get_indexerid_newznab: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NewznabApi(api_client) + id = 56 # int | + t = 't_example' # str | (optional) + q = 'q_example' # str | (optional) + cat = 'cat_example' # str | (optional) + imdbid = 'imdbid_example' # str | (optional) + tmdbid = 56 # int | (optional) + extended = 'extended_example' # str | (optional) + limit = 56 # int | (optional) + offset = 56 # int | (optional) + rid = 56 # int | (optional) + tvmazeid = 56 # int | (optional) + traktid = 56 # int | (optional) + tvdbid = 56 # int | (optional) + doubanid = 56 # int | (optional) + season = 56 # int | (optional) + ep = 'ep_example' # str | (optional) + album = 'album_example' # str | (optional) + artist = 'artist_example' # str | (optional) + label = 'label_example' # str | (optional) + track = 'track_example' # str | (optional) + year = 56 # int | (optional) + genre = 'genre_example' # str | (optional) + author = 'author_example' # str | (optional) + title = 'title_example' # str | (optional) + publisher = 'publisher_example' # str | (optional) + configured = 'configured_example' # str | (optional) + source = 'source_example' # str | (optional) + host = 'host_example' # str | (optional) + server = 'server_example' # str | (optional) + + try: + api_instance.get_indexerid_newznab(id, t=t, q=q, cat=cat, imdbid=imdbid, tmdbid=tmdbid, extended=extended, limit=limit, offset=offset, rid=rid, tvmazeid=tvmazeid, traktid=traktid, tvdbid=tvdbid, doubanid=doubanid, season=season, ep=ep, album=album, artist=artist, label=label, track=track, year=year, genre=genre, author=author, title=title, publisher=publisher, configured=configured, source=source, host=host, server=server) + except Exception as e: + print("Exception when calling NewznabApi->get_indexerid_newznab: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + **t** | **str**| | [optional] + **q** | **str**| | [optional] + **cat** | **str**| | [optional] + **imdbid** | **str**| | [optional] + **tmdbid** | **int**| | [optional] + **extended** | **str**| | [optional] + **limit** | **int**| | [optional] + **offset** | **int**| | [optional] + **rid** | **int**| | [optional] + **tvmazeid** | **int**| | [optional] + **traktid** | **int**| | [optional] + **tvdbid** | **int**| | [optional] + **doubanid** | **int**| | [optional] + **season** | **int**| | [optional] + **ep** | **str**| | [optional] + **album** | **str**| | [optional] + **artist** | **str**| | [optional] + **label** | **str**| | [optional] + **track** | **str**| | [optional] + **year** | **int**| | [optional] + **genre** | **str**| | [optional] + **author** | **str**| | [optional] + **title** | **str**| | [optional] + **publisher** | **str**| | [optional] + **configured** | **str**| | [optional] + **source** | **str**| | [optional] + **host** | **str**| | [optional] + **server** | **str**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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) + +# **getid_api** +> getid_api(id, t=t, q=q, cat=cat, imdbid=imdbid, tmdbid=tmdbid, extended=extended, limit=limit, offset=offset, rid=rid, tvmazeid=tvmazeid, traktid=traktid, tvdbid=tvdbid, doubanid=doubanid, season=season, ep=ep, album=album, artist=artist, label=label, track=track, year=year, genre=genre, author=author, title=title, publisher=publisher, configured=configured, source=source, host=host, server=server) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NewznabApi(api_client) + id = 56 # int | + t = 't_example' # str | (optional) + q = 'q_example' # str | (optional) + cat = 'cat_example' # str | (optional) + imdbid = 'imdbid_example' # str | (optional) + tmdbid = 56 # int | (optional) + extended = 'extended_example' # str | (optional) + limit = 56 # int | (optional) + offset = 56 # int | (optional) + rid = 56 # int | (optional) + tvmazeid = 56 # int | (optional) + traktid = 56 # int | (optional) + tvdbid = 56 # int | (optional) + doubanid = 56 # int | (optional) + season = 56 # int | (optional) + ep = 'ep_example' # str | (optional) + album = 'album_example' # str | (optional) + artist = 'artist_example' # str | (optional) + label = 'label_example' # str | (optional) + track = 'track_example' # str | (optional) + year = 56 # int | (optional) + genre = 'genre_example' # str | (optional) + author = 'author_example' # str | (optional) + title = 'title_example' # str | (optional) + publisher = 'publisher_example' # str | (optional) + configured = 'configured_example' # str | (optional) + source = 'source_example' # str | (optional) + host = 'host_example' # str | (optional) + server = 'server_example' # str | (optional) + + try: + api_instance.getid_api(id, t=t, q=q, cat=cat, imdbid=imdbid, tmdbid=tmdbid, extended=extended, limit=limit, offset=offset, rid=rid, tvmazeid=tvmazeid, traktid=traktid, tvdbid=tvdbid, doubanid=doubanid, season=season, ep=ep, album=album, artist=artist, label=label, track=track, year=year, genre=genre, author=author, title=title, publisher=publisher, configured=configured, source=source, host=host, server=server) + except Exception as e: + print("Exception when calling NewznabApi->getid_api: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NewznabApi(api_client) + id = 56 # int | + t = 't_example' # str | (optional) + q = 'q_example' # str | (optional) + cat = 'cat_example' # str | (optional) + imdbid = 'imdbid_example' # str | (optional) + tmdbid = 56 # int | (optional) + extended = 'extended_example' # str | (optional) + limit = 56 # int | (optional) + offset = 56 # int | (optional) + rid = 56 # int | (optional) + tvmazeid = 56 # int | (optional) + traktid = 56 # int | (optional) + tvdbid = 56 # int | (optional) + doubanid = 56 # int | (optional) + season = 56 # int | (optional) + ep = 'ep_example' # str | (optional) + album = 'album_example' # str | (optional) + artist = 'artist_example' # str | (optional) + label = 'label_example' # str | (optional) + track = 'track_example' # str | (optional) + year = 56 # int | (optional) + genre = 'genre_example' # str | (optional) + author = 'author_example' # str | (optional) + title = 'title_example' # str | (optional) + publisher = 'publisher_example' # str | (optional) + configured = 'configured_example' # str | (optional) + source = 'source_example' # str | (optional) + host = 'host_example' # str | (optional) + server = 'server_example' # str | (optional) + + try: + api_instance.getid_api(id, t=t, q=q, cat=cat, imdbid=imdbid, tmdbid=tmdbid, extended=extended, limit=limit, offset=offset, rid=rid, tvmazeid=tvmazeid, traktid=traktid, tvdbid=tvdbid, doubanid=doubanid, season=season, ep=ep, album=album, artist=artist, label=label, track=track, year=year, genre=genre, author=author, title=title, publisher=publisher, configured=configured, source=source, host=host, server=server) + except Exception as e: + print("Exception when calling NewznabApi->getid_api: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + **t** | **str**| | [optional] + **q** | **str**| | [optional] + **cat** | **str**| | [optional] + **imdbid** | **str**| | [optional] + **tmdbid** | **int**| | [optional] + **extended** | **str**| | [optional] + **limit** | **int**| | [optional] + **offset** | **int**| | [optional] + **rid** | **int**| | [optional] + **tvmazeid** | **int**| | [optional] + **traktid** | **int**| | [optional] + **tvdbid** | **int**| | [optional] + **doubanid** | **int**| | [optional] + **season** | **int**| | [optional] + **ep** | **str**| | [optional] + **album** | **str**| | [optional] + **artist** | **str**| | [optional] + **label** | **str**| | [optional] + **track** | **str**| | [optional] + **year** | **int**| | [optional] + **genre** | **str**| | [optional] + **author** | **str**| | [optional] + **title** | **str**| | [optional] + **publisher** | **str**| | [optional] + **configured** | **str**| | [optional] + **source** | **str**| | [optional] + **host** | **str**| | [optional] + **server** | **str**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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) + +# **getid_download** +> getid_download(id, link=link, file=file) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NewznabApi(api_client) + id = 56 # int | + link = 'link_example' # str | (optional) + file = 'file_example' # str | (optional) + + try: + api_instance.getid_download(id, link=link, file=file) + except Exception as e: + print("Exception when calling NewznabApi->getid_download: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NewznabApi(api_client) + id = 56 # int | + link = 'link_example' # str | (optional) + file = 'file_example' # str | (optional) + + try: + api_instance.getid_download(id, link=link, file=file) + except Exception as e: + print("Exception when calling NewznabApi->getid_download: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + **link** | **str**| | [optional] + **file** | **str**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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/NotificationApi.md b/docs/NotificationApi.md new file mode 100644 index 0000000..a54bc0d --- /dev/null +++ b/docs/NotificationApi.md @@ -0,0 +1,1099 @@ +# prowlarr.NotificationApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_notification**](NotificationApi.md#create_notification) | **POST** /api/v1/notification | +[**create_notification_action_by_name**](NotificationApi.md#create_notification_action_by_name) | **POST** /api/v1/notification/action/{name} | +[**delete_notification**](NotificationApi.md#delete_notification) | **DELETE** /api/v1/notification/{id} | +[**get_notification_by_id**](NotificationApi.md#get_notification_by_id) | **GET** /api/v1/notification/{id} | +[**list_notification**](NotificationApi.md#list_notification) | **GET** /api/v1/notification | +[**list_notification_schema**](NotificationApi.md#list_notification_schema) | **GET** /api/v1/notification/schema | +[**test_notification**](NotificationApi.md#test_notification) | **POST** /api/v1/notification/test | +[**testall_notification**](NotificationApi.md#testall_notification) | **POST** /api/v1/notification/testall | +[**update_notification**](NotificationApi.md#update_notification) | **PUT** /api/v1/notification/{id} | + + +# **create_notification** +> NotificationResource create_notification(notification_resource=notification_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + notification_resource = prowlarr.NotificationResource() # NotificationResource | (optional) + + try: + api_response = api_instance.create_notification(notification_resource=notification_resource) + print("The response of NotificationApi->create_notification:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NotificationApi->create_notification: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + notification_resource = prowlarr.NotificationResource() # NotificationResource | (optional) + + try: + api_response = api_instance.create_notification(notification_resource=notification_resource) + print("The response of NotificationApi->create_notification:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NotificationApi->create_notification: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **notification_resource** | [**NotificationResource**](NotificationResource.md)| | [optional] + +### Return type + +[**NotificationResource**](NotificationResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + +# **create_notification_action_by_name** +> create_notification_action_by_name(name, notification_resource=notification_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + name = 'name_example' # str | + notification_resource = prowlarr.NotificationResource() # NotificationResource | (optional) + + try: + api_instance.create_notification_action_by_name(name, notification_resource=notification_resource) + except Exception as e: + print("Exception when calling NotificationApi->create_notification_action_by_name: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + name = 'name_example' # str | + notification_resource = prowlarr.NotificationResource() # NotificationResource | (optional) + + try: + api_instance.create_notification_action_by_name(name, notification_resource=notification_resource) + except Exception as e: + print("Exception when calling NotificationApi->create_notification_action_by_name: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| | + **notification_resource** | [**NotificationResource**](NotificationResource.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + +### 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) + +# **delete_notification** +> delete_notification(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + id = 56 # int | + + try: + api_instance.delete_notification(id) + except Exception as e: + print("Exception when calling NotificationApi->delete_notification: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + id = 56 # int | + + try: + api_instance.delete_notification(id) + except Exception as e: + print("Exception when calling NotificationApi->delete_notification: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_notification_by_id** +> NotificationResource get_notification_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_notification_by_id(id) + print("The response of NotificationApi->get_notification_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NotificationApi->get_notification_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_notification_by_id(id) + print("The response of NotificationApi->get_notification_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NotificationApi->get_notification_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**NotificationResource**](NotificationResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **list_notification** +> List[NotificationResource] list_notification() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + + try: + api_response = api_instance.list_notification() + print("The response of NotificationApi->list_notification:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NotificationApi->list_notification: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + + try: + api_response = api_instance.list_notification() + print("The response of NotificationApi->list_notification:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NotificationApi->list_notification: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[NotificationResource]**](NotificationResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + +# **list_notification_schema** +> List[NotificationResource] list_notification_schema() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + + try: + api_response = api_instance.list_notification_schema() + print("The response of NotificationApi->list_notification_schema:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NotificationApi->list_notification_schema: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + + try: + api_response = api_instance.list_notification_schema() + print("The response of NotificationApi->list_notification_schema:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NotificationApi->list_notification_schema: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[NotificationResource]**](NotificationResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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) + +# **test_notification** +> test_notification(notification_resource=notification_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + notification_resource = prowlarr.NotificationResource() # NotificationResource | (optional) + + try: + api_instance.test_notification(notification_resource=notification_resource) + except Exception as e: + print("Exception when calling NotificationApi->test_notification: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + notification_resource = prowlarr.NotificationResource() # NotificationResource | (optional) + + try: + api_instance.test_notification(notification_resource=notification_resource) + except Exception as e: + print("Exception when calling NotificationApi->test_notification: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **notification_resource** | [**NotificationResource**](NotificationResource.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + +### 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) + +# **testall_notification** +> testall_notification() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + + try: + api_instance.testall_notification() + except Exception as e: + print("Exception when calling NotificationApi->testall_notification: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + + try: + api_instance.testall_notification() + except Exception as e: + print("Exception when calling NotificationApi->testall_notification: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_notification** +> NotificationResource update_notification(id, notification_resource=notification_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + id = 'id_example' # str | + notification_resource = prowlarr.NotificationResource() # NotificationResource | (optional) + + try: + api_response = api_instance.update_notification(id, notification_resource=notification_resource) + print("The response of NotificationApi->update_notification:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NotificationApi->update_notification: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.NotificationApi(api_client) + id = 'id_example' # str | + notification_resource = prowlarr.NotificationResource() # NotificationResource | (optional) + + try: + api_response = api_instance.update_notification(id, notification_resource=notification_resource) + print("The response of NotificationApi->update_notification:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NotificationApi->update_notification: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **notification_resource** | [**NotificationResource**](NotificationResource.md)| | [optional] + +### Return type + +[**NotificationResource**](NotificationResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + diff --git a/docs/NotificationResource.md b/docs/NotificationResource.md new file mode 100644 index 0000000..927a28b --- /dev/null +++ b/docs/NotificationResource.md @@ -0,0 +1,44 @@ +# NotificationResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**fields** | [**List[Field]**](Field.md) | | [optional] +**implementation_name** | **str** | | [optional] +**implementation** | **str** | | [optional] +**config_contract** | **str** | | [optional] +**info_link** | **str** | | [optional] +**message** | [**ProviderMessage**](ProviderMessage.md) | | [optional] +**tags** | **List[int]** | | [optional] +**presets** | [**List[NotificationResource]**](NotificationResource.md) | | [optional] +**link** | **str** | | [optional] +**on_health_issue** | **bool** | | [optional] +**on_application_update** | **bool** | | [optional] +**supports_on_health_issue** | **bool** | | [optional] +**include_health_warnings** | **bool** | | [optional] +**supports_on_application_update** | **bool** | | [optional] +**test_command** | **str** | | [optional] + +## Example + +```python +from prowlarr.models.notification_resource import NotificationResource + +# TODO update the JSON string below +json = "{}" +# create an instance of NotificationResource from a JSON string +notification_resource_instance = NotificationResource.from_json(json) +# print the JSON string representation of the object +print NotificationResource.to_json() + +# convert the object into a dict +notification_resource_dict = notification_resource_instance.to_dict() +# create an instance of NotificationResource from a dict +notification_resource_form_dict = notification_resource.from_dict(notification_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/PagingResourceFilter.md b/docs/PagingResourceFilter.md new file mode 100644 index 0000000..a92415f --- /dev/null +++ b/docs/PagingResourceFilter.md @@ -0,0 +1,29 @@ +# PagingResourceFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **str** | | [optional] +**value** | **str** | | [optional] + +## Example + +```python +from prowlarr.models.paging_resource_filter import PagingResourceFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of PagingResourceFilter from a JSON string +paging_resource_filter_instance = PagingResourceFilter.from_json(json) +# print the JSON string representation of the object +print PagingResourceFilter.to_json() + +# convert the object into a dict +paging_resource_filter_dict = paging_resource_filter_instance.to_dict() +# create an instance of PagingResourceFilter from a dict +paging_resource_filter_form_dict = paging_resource_filter.from_dict(paging_resource_filter_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/ProviderMessage.md b/docs/ProviderMessage.md new file mode 100644 index 0000000..d4e62db --- /dev/null +++ b/docs/ProviderMessage.md @@ -0,0 +1,29 @@ +# ProviderMessage + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] +**type** | [**ProviderMessageType**](ProviderMessageType.md) | | [optional] + +## Example + +```python +from prowlarr.models.provider_message import ProviderMessage + +# TODO update the JSON string below +json = "{}" +# create an instance of ProviderMessage from a JSON string +provider_message_instance = ProviderMessage.from_json(json) +# print the JSON string representation of the object +print ProviderMessage.to_json() + +# convert the object into a dict +provider_message_dict = provider_message_instance.to_dict() +# create an instance of ProviderMessage from a dict +provider_message_form_dict = provider_message.from_dict(provider_message_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/ProviderMessageType.md b/docs/ProviderMessageType.md new file mode 100644 index 0000000..6ca732b --- /dev/null +++ b/docs/ProviderMessageType.md @@ -0,0 +1,10 @@ +# ProviderMessageType + + +## 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/ProxyType.md b/docs/ProxyType.md new file mode 100644 index 0000000..4cf6222 --- /dev/null +++ b/docs/ProxyType.md @@ -0,0 +1,10 @@ +# ProxyType + + +## 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/QualityProfileSchemaApi.md b/docs/QualityProfileSchemaApi.md new file mode 100644 index 0000000..b0ac147 --- /dev/null +++ b/docs/QualityProfileSchemaApi.md @@ -0,0 +1,127 @@ +# prowlarr.QualityProfileSchemaApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_appprofile_schema**](QualityProfileSchemaApi.md#get_appprofile_schema) | **GET** /api/v1/appprofile/schema | + + +# **get_appprofile_schema** +> AppProfileResource get_appprofile_schema() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.QualityProfileSchemaApi(api_client) + + try: + api_response = api_instance.get_appprofile_schema() + print("The response of QualityProfileSchemaApi->get_appprofile_schema:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling QualityProfileSchemaApi->get_appprofile_schema: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.QualityProfileSchemaApi(api_client) + + try: + api_response = api_instance.get_appprofile_schema() + print("The response of QualityProfileSchemaApi->get_appprofile_schema:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling QualityProfileSchemaApi->get_appprofile_schema: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AppProfileResource**](AppProfileResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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/ReleaseResource.md b/docs/ReleaseResource.md new file mode 100644 index 0000000..610fa34 --- /dev/null +++ b/docs/ReleaseResource.md @@ -0,0 +1,54 @@ +# ReleaseResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**guid** | **str** | | [optional] +**age** | **int** | | [optional] +**age_hours** | **float** | | [optional] +**age_minutes** | **float** | | [optional] +**size** | **int** | | [optional] +**files** | **int** | | [optional] +**grabs** | **int** | | [optional] +**indexer_id** | **int** | | [optional] +**indexer** | **str** | | [optional] +**sub_group** | **str** | | [optional] +**release_hash** | **str** | | [optional] +**title** | **str** | | [optional] +**approved** | **bool** | | [optional] +**imdb_id** | **int** | | [optional] +**publish_date** | **datetime** | | [optional] +**comment_url** | **str** | | [optional] +**download_url** | **str** | | [optional] +**info_url** | **str** | | [optional] +**poster_url** | **str** | | [optional] +**indexer_flags** | **List[str]** | | [optional] +**categories** | [**List[IndexerCategory]**](IndexerCategory.md) | | [optional] +**magnet_url** | **str** | | [optional] +**info_hash** | **str** | | [optional] +**seeders** | **int** | | [optional] +**leechers** | **int** | | [optional] +**protocol** | [**DownloadProtocol**](DownloadProtocol.md) | | [optional] + +## Example + +```python +from prowlarr.models.release_resource import ReleaseResource + +# TODO update the JSON string below +json = "{}" +# create an instance of ReleaseResource from a JSON string +release_resource_instance = ReleaseResource.from_json(json) +# print the JSON string representation of the object +print ReleaseResource.to_json() + +# convert the object into a dict +release_resource_dict = release_resource_instance.to_dict() +# create an instance of ReleaseResource from a dict +release_resource_form_dict = release_resource.from_dict(release_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/SearchApi.md b/docs/SearchApi.md new file mode 100644 index 0000000..4d35bd6 --- /dev/null +++ b/docs/SearchApi.md @@ -0,0 +1,519 @@ +# prowlarr.SearchApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_search**](SearchApi.md#create_search) | **POST** /api/v1/search | +[**create_search_bulk**](SearchApi.md#create_search_bulk) | **POST** /api/v1/search/bulk | +[**get_search_by_id**](SearchApi.md#get_search_by_id) | **GET** /api/v1/search/{id} | +[**list_search**](SearchApi.md#list_search) | **GET** /api/v1/search | + + +# **create_search** +> ReleaseResource create_search(release_resource=release_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SearchApi(api_client) + release_resource = prowlarr.ReleaseResource() # ReleaseResource | (optional) + + try: + api_response = api_instance.create_search(release_resource=release_resource) + print("The response of SearchApi->create_search:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SearchApi->create_search: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SearchApi(api_client) + release_resource = prowlarr.ReleaseResource() # ReleaseResource | (optional) + + try: + api_response = api_instance.create_search(release_resource=release_resource) + print("The response of SearchApi->create_search:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SearchApi->create_search: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **release_resource** | [**ReleaseResource**](ReleaseResource.md)| | [optional] + +### Return type + +[**ReleaseResource**](ReleaseResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, 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) + +# **create_search_bulk** +> ReleaseResource create_search_bulk(release_resource=release_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SearchApi(api_client) + release_resource = [prowlarr.ReleaseResource()] # List[ReleaseResource] | (optional) + + try: + api_response = api_instance.create_search_bulk(release_resource=release_resource) + print("The response of SearchApi->create_search_bulk:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SearchApi->create_search_bulk: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SearchApi(api_client) + release_resource = [prowlarr.ReleaseResource()] # List[ReleaseResource] | (optional) + + try: + api_response = api_instance.create_search_bulk(release_resource=release_resource) + print("The response of SearchApi->create_search_bulk:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SearchApi->create_search_bulk: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **release_resource** | [**List[ReleaseResource]**](ReleaseResource.md)| | [optional] + +### Return type + +[**ReleaseResource**](ReleaseResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, 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) + +# **get_search_by_id** +> ReleaseResource get_search_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SearchApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_search_by_id(id) + print("The response of SearchApi->get_search_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SearchApi->get_search_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SearchApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_search_by_id(id) + print("The response of SearchApi->get_search_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SearchApi->get_search_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**ReleaseResource**](ReleaseResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **list_search** +> List[ReleaseResource] list_search(query=query, type=type, indexer_ids=indexer_ids, categories=categories, limit=limit, offset=offset) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SearchApi(api_client) + query = 'query_example' # str | (optional) + type = 'type_example' # str | (optional) + indexer_ids = [56] # List[int] | (optional) + categories = [56] # List[int] | (optional) + limit = 56 # int | (optional) + offset = 56 # int | (optional) + + try: + api_response = api_instance.list_search(query=query, type=type, indexer_ids=indexer_ids, categories=categories, limit=limit, offset=offset) + print("The response of SearchApi->list_search:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SearchApi->list_search: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SearchApi(api_client) + query = 'query_example' # str | (optional) + type = 'type_example' # str | (optional) + indexer_ids = [56] # List[int] | (optional) + categories = [56] # List[int] | (optional) + limit = 56 # int | (optional) + offset = 56 # int | (optional) + + try: + api_response = api_instance.list_search(query=query, type=type, indexer_ids=indexer_ids, categories=categories, limit=limit, offset=offset) + print("The response of SearchApi->list_search:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SearchApi->list_search: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **str**| | [optional] + **type** | **str**| | [optional] + **indexer_ids** | [**List[int]**](int.md)| | [optional] + **categories** | [**List[int]**](int.md)| | [optional] + **limit** | **int**| | [optional] + **offset** | **int**| | [optional] + +### Return type + +[**List[ReleaseResource]**](ReleaseResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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/SearchParam.md b/docs/SearchParam.md new file mode 100644 index 0000000..5b7a6a2 --- /dev/null +++ b/docs/SearchParam.md @@ -0,0 +1,10 @@ +# SearchParam + + +## 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/SelectOption.md b/docs/SelectOption.md new file mode 100644 index 0000000..3abd52d --- /dev/null +++ b/docs/SelectOption.md @@ -0,0 +1,32 @@ +# SelectOption + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **int** | | [optional] +**name** | **str** | | [optional] +**order** | **int** | | [optional] +**hint** | **str** | | [optional] +**parent_value** | **int** | | [optional] + +## Example + +```python +from prowlarr.models.select_option import SelectOption + +# TODO update the JSON string below +json = "{}" +# create an instance of SelectOption from a JSON string +select_option_instance = SelectOption.from_json(json) +# print the JSON string representation of the object +print SelectOption.to_json() + +# convert the object into a dict +select_option_dict = select_option_instance.to_dict() +# create an instance of SelectOption from a dict +select_option_form_dict = select_option.from_dict(select_option_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/SortDirection.md b/docs/SortDirection.md new file mode 100644 index 0000000..a859d85 --- /dev/null +++ b/docs/SortDirection.md @@ -0,0 +1,10 @@ +# SortDirection + + +## 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/StaticResourceApi.md b/docs/StaticResourceApi.md new file mode 100644 index 0000000..9eb7f76 --- /dev/null +++ b/docs/StaticResourceApi.md @@ -0,0 +1,483 @@ +# prowlarr.StaticResourceApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get**](StaticResourceApi.md#get) | **GET** / | +[**get_by_path**](StaticResourceApi.md#get_by_path) | **GET** /{path} | +[**get_content_by_path**](StaticResourceApi.md#get_content_by_path) | **GET** /content/{path} | +[**get_login**](StaticResourceApi.md#get_login) | **GET** /login | + + +# **get** +> get(path) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.StaticResourceApi(api_client) + path = 'path_example' # str | + + try: + api_instance.get(path) + except Exception as e: + print("Exception when calling StaticResourceApi->get: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.StaticResourceApi(api_client) + path = 'path_example' # str | + + try: + api_instance.get(path) + except Exception as e: + print("Exception when calling StaticResourceApi->get: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **path** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_by_path** +> get_by_path(path) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.StaticResourceApi(api_client) + path = 'path_example' # str | + + try: + api_instance.get_by_path(path) + except Exception as e: + print("Exception when calling StaticResourceApi->get_by_path: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.StaticResourceApi(api_client) + path = 'path_example' # str | + + try: + api_instance.get_by_path(path) + except Exception as e: + print("Exception when calling StaticResourceApi->get_by_path: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **path** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_content_by_path** +> get_content_by_path(path) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.StaticResourceApi(api_client) + path = 'path_example' # str | + + try: + api_instance.get_content_by_path(path) + except Exception as e: + print("Exception when calling StaticResourceApi->get_content_by_path: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.StaticResourceApi(api_client) + path = 'path_example' # str | + + try: + api_instance.get_content_by_path(path) + except Exception as e: + print("Exception when calling StaticResourceApi->get_content_by_path: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **path** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_login** +> get_login() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.StaticResourceApi(api_client) + + try: + api_instance.get_login() + except Exception as e: + print("Exception when calling StaticResourceApi->get_login: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.StaticResourceApi(api_client) + + try: + api_instance.get_login() + except Exception as e: + print("Exception when calling StaticResourceApi->get_login: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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/SystemApi.md b/docs/SystemApi.md new file mode 100644 index 0000000..6dee2f8 --- /dev/null +++ b/docs/SystemApi.md @@ -0,0 +1,583 @@ +# prowlarr.SystemApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_system_restart**](SystemApi.md#create_system_restart) | **POST** /api/v1/system/restart | +[**create_system_shutdown**](SystemApi.md#create_system_shutdown) | **POST** /api/v1/system/shutdown | +[**get_system_routes**](SystemApi.md#get_system_routes) | **GET** /api/v1/system/routes | +[**get_system_routes_duplicate**](SystemApi.md#get_system_routes_duplicate) | **GET** /api/v1/system/routes/duplicate | +[**get_system_status**](SystemApi.md#get_system_status) | **GET** /api/v1/system/status | + + +# **create_system_restart** +> create_system_restart() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SystemApi(api_client) + + try: + api_instance.create_system_restart() + except Exception as e: + print("Exception when calling SystemApi->create_system_restart: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SystemApi(api_client) + + try: + api_instance.create_system_restart() + except Exception as e: + print("Exception when calling SystemApi->create_system_restart: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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) + +# **create_system_shutdown** +> create_system_shutdown() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SystemApi(api_client) + + try: + api_instance.create_system_shutdown() + except Exception as e: + print("Exception when calling SystemApi->create_system_shutdown: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SystemApi(api_client) + + try: + api_instance.create_system_shutdown() + except Exception as e: + print("Exception when calling SystemApi->create_system_shutdown: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_system_routes** +> get_system_routes() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SystemApi(api_client) + + try: + api_instance.get_system_routes() + except Exception as e: + print("Exception when calling SystemApi->get_system_routes: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SystemApi(api_client) + + try: + api_instance.get_system_routes() + except Exception as e: + print("Exception when calling SystemApi->get_system_routes: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_system_routes_duplicate** +> get_system_routes_duplicate() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SystemApi(api_client) + + try: + api_instance.get_system_routes_duplicate() + except Exception as e: + print("Exception when calling SystemApi->get_system_routes_duplicate: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SystemApi(api_client) + + try: + api_instance.get_system_routes_duplicate() + except Exception as e: + print("Exception when calling SystemApi->get_system_routes_duplicate: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_system_status** +> get_system_status() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SystemApi(api_client) + + try: + api_instance.get_system_status() + except Exception as e: + print("Exception when calling SystemApi->get_system_status: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.SystemApi(api_client) + + try: + api_instance.get_system_status() + except Exception as e: + print("Exception when calling SystemApi->get_system_status: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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/TagApi.md b/docs/TagApi.md new file mode 100644 index 0000000..1ea3496 --- /dev/null +++ b/docs/TagApi.md @@ -0,0 +1,622 @@ +# prowlarr.TagApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tag**](TagApi.md#create_tag) | **POST** /api/v1/tag | +[**delete_tag**](TagApi.md#delete_tag) | **DELETE** /api/v1/tag/{id} | +[**get_tag_by_id**](TagApi.md#get_tag_by_id) | **GET** /api/v1/tag/{id} | +[**list_tag**](TagApi.md#list_tag) | **GET** /api/v1/tag | +[**update_tag**](TagApi.md#update_tag) | **PUT** /api/v1/tag/{id} | + + +# **create_tag** +> TagResource create_tag(tag_resource=tag_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagApi(api_client) + tag_resource = prowlarr.TagResource() # TagResource | (optional) + + try: + api_response = api_instance.create_tag(tag_resource=tag_resource) + print("The response of TagApi->create_tag:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagApi->create_tag: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagApi(api_client) + tag_resource = prowlarr.TagResource() # TagResource | (optional) + + try: + api_response = api_instance.create_tag(tag_resource=tag_resource) + print("The response of TagApi->create_tag:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagApi->create_tag: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tag_resource** | [**TagResource**](TagResource.md)| | [optional] + +### Return type + +[**TagResource**](TagResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, 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) + +# **delete_tag** +> delete_tag(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagApi(api_client) + id = 56 # int | + + try: + api_instance.delete_tag(id) + except Exception as e: + print("Exception when calling TagApi->delete_tag: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagApi(api_client) + id = 56 # int | + + try: + api_instance.delete_tag(id) + except Exception as e: + print("Exception when calling TagApi->delete_tag: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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_tag_by_id** +> TagResource get_tag_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_tag_by_id(id) + print("The response of TagApi->get_tag_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagApi->get_tag_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_tag_by_id(id) + print("The response of TagApi->get_tag_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagApi->get_tag_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**TagResource**](TagResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **list_tag** +> List[TagResource] list_tag() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagApi(api_client) + + try: + api_response = api_instance.list_tag() + print("The response of TagApi->list_tag:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagApi->list_tag: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagApi(api_client) + + try: + api_response = api_instance.list_tag() + print("The response of TagApi->list_tag:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagApi->list_tag: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[TagResource]**](TagResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **update_tag** +> TagResource update_tag(id, tag_resource=tag_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagApi(api_client) + id = 'id_example' # str | + tag_resource = prowlarr.TagResource() # TagResource | (optional) + + try: + api_response = api_instance.update_tag(id, tag_resource=tag_resource) + print("The response of TagApi->update_tag:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagApi->update_tag: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagApi(api_client) + id = 'id_example' # str | + tag_resource = prowlarr.TagResource() # TagResource | (optional) + + try: + api_response = api_instance.update_tag(id, tag_resource=tag_resource) + print("The response of TagApi->update_tag:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagApi->update_tag: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **tag_resource** | [**TagResource**](TagResource.md)| | [optional] + +### Return type + +[**TagResource**](TagResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, 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/TagDetailsApi.md b/docs/TagDetailsApi.md new file mode 100644 index 0000000..dbcd3c7 --- /dev/null +++ b/docs/TagDetailsApi.md @@ -0,0 +1,251 @@ +# prowlarr.TagDetailsApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_tag_detail_by_id**](TagDetailsApi.md#get_tag_detail_by_id) | **GET** /api/v1/tag/detail/{id} | +[**list_tag_detail**](TagDetailsApi.md#list_tag_detail) | **GET** /api/v1/tag/detail | + + +# **get_tag_detail_by_id** +> TagDetailsResource get_tag_detail_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagDetailsApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_tag_detail_by_id(id) + print("The response of TagDetailsApi->get_tag_detail_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagDetailsApi->get_tag_detail_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagDetailsApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_tag_detail_by_id(id) + print("The response of TagDetailsApi->get_tag_detail_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagDetailsApi->get_tag_detail_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**TagDetailsResource**](TagDetailsResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **list_tag_detail** +> List[TagDetailsResource] list_tag_detail() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagDetailsApi(api_client) + + try: + api_response = api_instance.list_tag_detail() + print("The response of TagDetailsApi->list_tag_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagDetailsApi->list_tag_detail: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TagDetailsApi(api_client) + + try: + api_response = api_instance.list_tag_detail() + print("The response of TagDetailsApi->list_tag_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagDetailsApi->list_tag_detail: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[TagDetailsResource]**](TagDetailsResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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/TagDetailsResource.md b/docs/TagDetailsResource.md new file mode 100644 index 0000000..39469d2 --- /dev/null +++ b/docs/TagDetailsResource.md @@ -0,0 +1,32 @@ +# TagDetailsResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**label** | **str** | | [optional] +**notification_ids** | **List[int]** | | [optional] +**indexer_ids** | **List[int]** | | [optional] +**indexer_proxy_ids** | **List[int]** | | [optional] + +## Example + +```python +from prowlarr.models.tag_details_resource import TagDetailsResource + +# TODO update the JSON string below +json = "{}" +# create an instance of TagDetailsResource from a JSON string +tag_details_resource_instance = TagDetailsResource.from_json(json) +# print the JSON string representation of the object +print TagDetailsResource.to_json() + +# convert the object into a dict +tag_details_resource_dict = tag_details_resource_instance.to_dict() +# create an instance of TagDetailsResource from a dict +tag_details_resource_form_dict = tag_details_resource.from_dict(tag_details_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/TagResource.md b/docs/TagResource.md new file mode 100644 index 0000000..77d954b --- /dev/null +++ b/docs/TagResource.md @@ -0,0 +1,29 @@ +# TagResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**label** | **str** | | [optional] + +## Example + +```python +from prowlarr.models.tag_resource import TagResource + +# TODO update the JSON string below +json = "{}" +# create an instance of TagResource from a JSON string +tag_resource_instance = TagResource.from_json(json) +# print the JSON string representation of the object +print TagResource.to_json() + +# convert the object into a dict +tag_resource_dict = tag_resource_instance.to_dict() +# create an instance of TagResource from a dict +tag_resource_form_dict = tag_resource.from_dict(tag_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/TaskApi.md b/docs/TaskApi.md new file mode 100644 index 0000000..c350a99 --- /dev/null +++ b/docs/TaskApi.md @@ -0,0 +1,251 @@ +# prowlarr.TaskApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_system_task_by_id**](TaskApi.md#get_system_task_by_id) | **GET** /api/v1/system/task/{id} | +[**list_system_task**](TaskApi.md#list_system_task) | **GET** /api/v1/system/task | + + +# **get_system_task_by_id** +> TaskResource get_system_task_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TaskApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_system_task_by_id(id) + print("The response of TaskApi->get_system_task_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaskApi->get_system_task_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TaskApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_system_task_by_id(id) + print("The response of TaskApi->get_system_task_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaskApi->get_system_task_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**TaskResource**](TaskResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **list_system_task** +> List[TaskResource] list_system_task() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TaskApi(api_client) + + try: + api_response = api_instance.list_system_task() + print("The response of TaskApi->list_system_task:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaskApi->list_system_task: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.TaskApi(api_client) + + try: + api_response = api_instance.list_system_task() + print("The response of TaskApi->list_system_task:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaskApi->list_system_task: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[TaskResource]**](TaskResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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/TaskResource.md b/docs/TaskResource.md new file mode 100644 index 0000000..25075ef --- /dev/null +++ b/docs/TaskResource.md @@ -0,0 +1,35 @@ +# TaskResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**task_name** | **str** | | [optional] +**interval** | **int** | | [optional] +**last_execution** | **datetime** | | [optional] +**last_start_time** | **datetime** | | [optional] +**next_execution** | **datetime** | | [optional] +**last_duration** | [**TimeSpan**](TimeSpan.md) | | [optional] + +## Example + +```python +from prowlarr.models.task_resource import TaskResource + +# TODO update the JSON string below +json = "{}" +# create an instance of TaskResource from a JSON string +task_resource_instance = TaskResource.from_json(json) +# print the JSON string representation of the object +print TaskResource.to_json() + +# convert the object into a dict +task_resource_dict = task_resource_instance.to_dict() +# create an instance of TaskResource from a dict +task_resource_form_dict = task_resource.from_dict(task_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/TimeSpan.md b/docs/TimeSpan.md new file mode 100644 index 0000000..b2cd488 --- /dev/null +++ b/docs/TimeSpan.md @@ -0,0 +1,38 @@ +# TimeSpan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ticks** | **int** | | [optional] +**days** | **int** | | [optional] [readonly] +**hours** | **int** | | [optional] [readonly] +**milliseconds** | **int** | | [optional] [readonly] +**minutes** | **int** | | [optional] [readonly] +**seconds** | **int** | | [optional] [readonly] +**total_days** | **float** | | [optional] [readonly] +**total_hours** | **float** | | [optional] [readonly] +**total_milliseconds** | **float** | | [optional] [readonly] +**total_minutes** | **float** | | [optional] [readonly] +**total_seconds** | **float** | | [optional] [readonly] + +## Example + +```python +from prowlarr.models.time_span import TimeSpan + +# TODO update the JSON string below +json = "{}" +# create an instance of TimeSpan from a JSON string +time_span_instance = TimeSpan.from_json(json) +# print the JSON string representation of the object +print TimeSpan.to_json() + +# convert the object into a dict +time_span_dict = time_span_instance.to_dict() +# create an instance of TimeSpan from a dict +time_span_form_dict = time_span.from_dict(time_span_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/TvSearchParam.md b/docs/TvSearchParam.md new file mode 100644 index 0000000..04e6fa8 --- /dev/null +++ b/docs/TvSearchParam.md @@ -0,0 +1,10 @@ +# TvSearchParam + + +## 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/UiConfigApi.md b/docs/UiConfigApi.md new file mode 100644 index 0000000..f7eea73 --- /dev/null +++ b/docs/UiConfigApi.md @@ -0,0 +1,378 @@ +# prowlarr.UiConfigApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_ui_config**](UiConfigApi.md#get_ui_config) | **GET** /api/v1/config/ui | +[**get_ui_config_by_id**](UiConfigApi.md#get_ui_config_by_id) | **GET** /api/v1/config/ui/{id} | +[**update_ui_config**](UiConfigApi.md#update_ui_config) | **PUT** /api/v1/config/ui/{id} | + + +# **get_ui_config** +> UiConfigResource get_ui_config() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.UiConfigApi(api_client) + + try: + api_response = api_instance.get_ui_config() + print("The response of UiConfigApi->get_ui_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UiConfigApi->get_ui_config: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.UiConfigApi(api_client) + + try: + api_response = api_instance.get_ui_config() + print("The response of UiConfigApi->get_ui_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UiConfigApi->get_ui_config: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UiConfigResource**](UiConfigResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### 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_ui_config_by_id** +> UiConfigResource get_ui_config_by_id(id) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.UiConfigApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_ui_config_by_id(id) + print("The response of UiConfigApi->get_ui_config_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UiConfigApi->get_ui_config_by_id: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.UiConfigApi(api_client) + id = 56 # int | + + try: + api_response = api_instance.get_ui_config_by_id(id) + print("The response of UiConfigApi->get_ui_config_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UiConfigApi->get_ui_config_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**UiConfigResource**](UiConfigResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + +# **update_ui_config** +> UiConfigResource update_ui_config(id, ui_config_resource=ui_config_resource) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.UiConfigApi(api_client) + id = 'id_example' # str | + ui_config_resource = prowlarr.UiConfigResource() # UiConfigResource | (optional) + + try: + api_response = api_instance.update_ui_config(id, ui_config_resource=ui_config_resource) + print("The response of UiConfigApi->update_ui_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UiConfigApi->update_ui_config: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.UiConfigApi(api_client) + id = 'id_example' # str | + ui_config_resource = prowlarr.UiConfigResource() # UiConfigResource | (optional) + + try: + api_response = api_instance.update_ui_config(id, ui_config_resource=ui_config_resource) + print("The response of UiConfigApi->update_ui_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UiConfigApi->update_ui_config: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **ui_config_resource** | [**UiConfigResource**](UiConfigResource.md)| | [optional] + +### Return type + +[**UiConfigResource**](UiConfigResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **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) + diff --git a/docs/UiConfigResource.md b/docs/UiConfigResource.md new file mode 100644 index 0000000..5c748ce --- /dev/null +++ b/docs/UiConfigResource.md @@ -0,0 +1,37 @@ +# UiConfigResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**first_day_of_week** | **int** | | [optional] +**calendar_week_column_header** | **str** | | [optional] +**short_date_format** | **str** | | [optional] +**long_date_format** | **str** | | [optional] +**time_format** | **str** | | [optional] +**show_relative_dates** | **bool** | | [optional] +**enable_color_impaired_mode** | **bool** | | [optional] +**ui_language** | **str** | | [optional] +**theme** | **str** | | [optional] + +## Example + +```python +from prowlarr.models.ui_config_resource import UiConfigResource + +# TODO update the JSON string below +json = "{}" +# create an instance of UiConfigResource from a JSON string +ui_config_resource_instance = UiConfigResource.from_json(json) +# print the JSON string representation of the object +print UiConfigResource.to_json() + +# convert the object into a dict +ui_config_resource_dict = ui_config_resource_instance.to_dict() +# create an instance of UiConfigResource from a dict +ui_config_resource_form_dict = ui_config_resource.from_dict(ui_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/UpdateApi.md b/docs/UpdateApi.md new file mode 100644 index 0000000..2d91910 --- /dev/null +++ b/docs/UpdateApi.md @@ -0,0 +1,127 @@ +# prowlarr.UpdateApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_update**](UpdateApi.md#list_update) | **GET** /api/v1/update | + + +# **list_update** +> List[UpdateResource] list_update() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.UpdateApi(api_client) + + try: + api_response = api_instance.list_update() + print("The response of UpdateApi->list_update:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UpdateApi->list_update: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.UpdateApi(api_client) + + try: + api_response = api_instance.list_update() + print("The response of UpdateApi->list_update:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UpdateApi->list_update: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[UpdateResource]**](UpdateResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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/UpdateChanges.md b/docs/UpdateChanges.md new file mode 100644 index 0000000..5930527 --- /dev/null +++ b/docs/UpdateChanges.md @@ -0,0 +1,29 @@ +# UpdateChanges + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new** | **List[str]** | | [optional] +**fixed** | **List[str]** | | [optional] + +## Example + +```python +from prowlarr.models.update_changes import UpdateChanges + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateChanges from a JSON string +update_changes_instance = UpdateChanges.from_json(json) +# print the JSON string representation of the object +print UpdateChanges.to_json() + +# convert the object into a dict +update_changes_dict = update_changes_instance.to_dict() +# create an instance of UpdateChanges from a dict +update_changes_form_dict = update_changes.from_dict(update_changes_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/UpdateLogFileApi.md b/docs/UpdateLogFileApi.md new file mode 100644 index 0000000..ab2cf03 --- /dev/null +++ b/docs/UpdateLogFileApi.md @@ -0,0 +1,247 @@ +# prowlarr.UpdateLogFileApi + +All URIs are relative to *http://localhost:9696* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_log_file_update_by_filename**](UpdateLogFileApi.md#get_log_file_update_by_filename) | **GET** /api/v1/log/file/update/{filename} | +[**list_log_file_update**](UpdateLogFileApi.md#list_log_file_update) | **GET** /api/v1/log/file/update | + + +# **get_log_file_update_by_filename** +> get_log_file_update_by_filename(filename) + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.UpdateLogFileApi(api_client) + filename = 'filename_example' # str | + + try: + api_instance.get_log_file_update_by_filename(filename) + except Exception as e: + print("Exception when calling UpdateLogFileApi->get_log_file_update_by_filename: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.UpdateLogFileApi(api_client) + filename = 'filename_example' # str | + + try: + api_instance.get_log_file_update_by_filename(filename) + except Exception as e: + print("Exception when calling UpdateLogFileApi->get_log_file_update_by_filename: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filename** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### 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) + +# **list_log_file_update** +> List[LogFileResource] list_log_file_update() + + + +### Example + +* Api Key Authentication (X-Api-Key): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.UpdateLogFileApi(api_client) + + try: + api_response = api_instance.list_log_file_update() + print("The response of UpdateLogFileApi->list_log_file_update:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UpdateLogFileApi->list_log_file_update: %s\n" % e) +``` + +* Api Key Authentication (apikey): +```python +from __future__ import print_function +import time +import os +import prowlarr +from prowlarr.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:9696 +# See configuration.py for a list of all supported configuration parameters. +configuration = prowlarr.Configuration( + host = "http://localhost:9696" +) + +# 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: 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' + +# 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' + +# Enter a context with an instance of the API client +with prowlarr.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = prowlarr.UpdateLogFileApi(api_client) + + try: + api_response = api_instance.list_log_file_update() + print("The response of UpdateLogFileApi->list_log_file_update:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UpdateLogFileApi->list_log_file_update: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List[LogFileResource]**](LogFileResource.md) + +### Authorization + +[X-Api-Key](../README.md#X-Api-Key), [apikey](../README.md#apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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/UpdateMechanism.md b/docs/UpdateMechanism.md new file mode 100644 index 0000000..9ecab0c --- /dev/null +++ b/docs/UpdateMechanism.md @@ -0,0 +1,10 @@ +# UpdateMechanism + + +## 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/UpdateResource.md b/docs/UpdateResource.md new file mode 100644 index 0000000..d047b85 --- /dev/null +++ b/docs/UpdateResource.md @@ -0,0 +1,39 @@ +# UpdateResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**version** | **str** | | [optional] +**branch** | **str** | | [optional] +**release_date** | **datetime** | | [optional] +**file_name** | **str** | | [optional] +**url** | **str** | | [optional] +**installed** | **bool** | | [optional] +**installed_on** | **datetime** | | [optional] +**installable** | **bool** | | [optional] +**latest** | **bool** | | [optional] +**changes** | [**UpdateChanges**](UpdateChanges.md) | | [optional] +**hash** | **str** | | [optional] + +## Example + +```python +from prowlarr.models.update_resource import UpdateResource + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateResource from a JSON string +update_resource_instance = UpdateResource.from_json(json) +# print the JSON string representation of the object +print UpdateResource.to_json() + +# convert the object into a dict +update_resource_dict = update_resource_instance.to_dict() +# create an instance of UpdateResource from a dict +update_resource_form_dict = update_resource.from_dict(update_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/UserAgentStatistics.md b/docs/UserAgentStatistics.md new file mode 100644 index 0000000..7d18ce5 --- /dev/null +++ b/docs/UserAgentStatistics.md @@ -0,0 +1,30 @@ +# UserAgentStatistics + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_agent** | **str** | | [optional] +**number_of_queries** | **int** | | [optional] +**number_of_grabs** | **int** | | [optional] + +## Example + +```python +from prowlarr.models.user_agent_statistics import UserAgentStatistics + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAgentStatistics from a JSON string +user_agent_statistics_instance = UserAgentStatistics.from_json(json) +# print the JSON string representation of the object +print UserAgentStatistics.to_json() + +# convert the object into a dict +user_agent_statistics_dict = user_agent_statistics_instance.to_dict() +# create an instance of UserAgentStatistics from a dict +user_agent_statistics_form_dict = user_agent_statistics.from_dict(user_agent_statistics_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/Version.md b/docs/Version.md new file mode 100644 index 0000000..908dc0c --- /dev/null +++ b/docs/Version.md @@ -0,0 +1,33 @@ +# Version + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**major** | **int** | | [optional] [readonly] +**minor** | **int** | | [optional] [readonly] +**build** | **int** | | [optional] [readonly] +**revision** | **int** | | [optional] [readonly] +**major_revision** | **int** | | [optional] [readonly] +**minor_revision** | **int** | | [optional] [readonly] + +## Example + +```python +from prowlarr.models.version import Version + +# TODO update the JSON string below +json = "{}" +# create an instance of Version from a JSON string +version_instance = Version.from_json(json) +# print the JSON string representation of the object +print Version.to_json() + +# convert the object into a dict +version_dict = version_instance.to_dict() +# create an instance of Version from a dict +version_form_dict = version.from_dict(version_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/prowlarr/__init__.py b/prowlarr/__init__.py new file mode 100644 index 0000000..6014b5e --- /dev/null +++ b/prowlarr/__init__.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +__version__ = "0.0.1" + +# import apis into sdk package +from prowlarr.api.api_info_api import ApiInfoApi +from prowlarr.api.app_profile_api import AppProfileApi +from prowlarr.api.application_api import ApplicationApi +from prowlarr.api.authentication_api import AuthenticationApi +from prowlarr.api.backup_api import BackupApi +from prowlarr.api.command_api import CommandApi +from prowlarr.api.custom_filter_api import CustomFilterApi +from prowlarr.api.development_config_api import DevelopmentConfigApi +from prowlarr.api.download_client_api import DownloadClientApi +from prowlarr.api.download_client_config_api import DownloadClientConfigApi +from prowlarr.api.file_system_api import FileSystemApi +from prowlarr.api.health_api import HealthApi +from prowlarr.api.history_api import HistoryApi +from prowlarr.api.host_config_api import HostConfigApi +from prowlarr.api.indexer_api import IndexerApi +from prowlarr.api.indexer_default_categories_api import IndexerDefaultCategoriesApi +from prowlarr.api.indexer_editor_api import IndexerEditorApi +from prowlarr.api.indexer_proxy_api import IndexerProxyApi +from prowlarr.api.indexer_stats_api import IndexerStatsApi +from prowlarr.api.indexer_status_api import IndexerStatusApi +from prowlarr.api.initialize_js_api import InitializeJsApi +from prowlarr.api.localization_api import LocalizationApi +from prowlarr.api.log_api import LogApi +from prowlarr.api.log_file_api import LogFileApi +from prowlarr.api.newznab_api import NewznabApi +from prowlarr.api.notification_api import NotificationApi +from prowlarr.api.quality_profile_schema_api import QualityProfileSchemaApi +from prowlarr.api.search_api import SearchApi +from prowlarr.api.static_resource_api import StaticResourceApi +from prowlarr.api.system_api import SystemApi +from prowlarr.api.tag_api import TagApi +from prowlarr.api.tag_details_api import TagDetailsApi +from prowlarr.api.task_api import TaskApi +from prowlarr.api.ui_config_api import UiConfigApi +from prowlarr.api.update_api import UpdateApi +from prowlarr.api.update_log_file_api import UpdateLogFileApi + +# import ApiClient +from prowlarr.api_client import ApiClient +from prowlarr.configuration import Configuration +from prowlarr.exceptions import OpenApiException +from prowlarr.exceptions import ApiTypeError +from prowlarr.exceptions import ApiValueError +from prowlarr.exceptions import ApiKeyError +from prowlarr.exceptions import ApiAttributeError +from prowlarr.exceptions import ApiException +# import models into sdk package +from prowlarr.models.api_info_resource import ApiInfoResource +from prowlarr.models.app_profile_resource import AppProfileResource +from prowlarr.models.application_resource import ApplicationResource +from prowlarr.models.application_sync_level import ApplicationSyncLevel +from prowlarr.models.apply_tags import ApplyTags +from prowlarr.models.authentication_required_type import AuthenticationRequiredType +from prowlarr.models.authentication_type import AuthenticationType +from prowlarr.models.backup_resource import BackupResource +from prowlarr.models.backup_type import BackupType +from prowlarr.models.book_search_param import BookSearchParam +from prowlarr.models.certificate_validation_type import CertificateValidationType +from prowlarr.models.command import Command +from prowlarr.models.command_priority import CommandPriority +from prowlarr.models.command_resource import CommandResource +from prowlarr.models.command_status import CommandStatus +from prowlarr.models.command_trigger import CommandTrigger +from prowlarr.models.custom_filter_resource import CustomFilterResource +from prowlarr.models.development_config_resource import DevelopmentConfigResource +from prowlarr.models.download_client_category import DownloadClientCategory +from prowlarr.models.download_client_config_resource import DownloadClientConfigResource +from prowlarr.models.download_client_resource import DownloadClientResource +from prowlarr.models.download_protocol import DownloadProtocol +from prowlarr.models.field import Field +from prowlarr.models.health_check_result import HealthCheckResult +from prowlarr.models.health_resource import HealthResource +from prowlarr.models.history_event_type import HistoryEventType +from prowlarr.models.history_resource import HistoryResource +from prowlarr.models.history_resource_paging_resource import HistoryResourcePagingResource +from prowlarr.models.host_config_resource import HostConfigResource +from prowlarr.models.host_statistics import HostStatistics +from prowlarr.models.http_uri import HttpUri +from prowlarr.models.indexer_capability_resource import IndexerCapabilityResource +from prowlarr.models.indexer_category import IndexerCategory +from prowlarr.models.indexer_editor_resource import IndexerEditorResource +from prowlarr.models.indexer_privacy import IndexerPrivacy +from prowlarr.models.indexer_proxy_resource import IndexerProxyResource +from prowlarr.models.indexer_resource import IndexerResource +from prowlarr.models.indexer_statistics import IndexerStatistics +from prowlarr.models.indexer_stats_resource import IndexerStatsResource +from prowlarr.models.indexer_status_resource import IndexerStatusResource +from prowlarr.models.localization_option import LocalizationOption +from prowlarr.models.log_file_resource import LogFileResource +from prowlarr.models.log_resource import LogResource +from prowlarr.models.log_resource_paging_resource import LogResourcePagingResource +from prowlarr.models.movie_search_param import MovieSearchParam +from prowlarr.models.music_search_param import MusicSearchParam +from prowlarr.models.notification_resource import NotificationResource +from prowlarr.models.paging_resource_filter import PagingResourceFilter +from prowlarr.models.provider_message import ProviderMessage +from prowlarr.models.provider_message_type import ProviderMessageType +from prowlarr.models.proxy_type import ProxyType +from prowlarr.models.release_resource import ReleaseResource +from prowlarr.models.search_param import SearchParam +from prowlarr.models.select_option import SelectOption +from prowlarr.models.sort_direction import SortDirection +from prowlarr.models.tag_details_resource import TagDetailsResource +from prowlarr.models.tag_resource import TagResource +from prowlarr.models.task_resource import TaskResource +from prowlarr.models.time_span import TimeSpan +from prowlarr.models.tv_search_param import TvSearchParam +from prowlarr.models.ui_config_resource import UiConfigResource +from prowlarr.models.update_changes import UpdateChanges +from prowlarr.models.update_mechanism import UpdateMechanism +from prowlarr.models.update_resource import UpdateResource +from prowlarr.models.user_agent_statistics import UserAgentStatistics +from prowlarr.models.version import Version diff --git a/prowlarr/api/__init__.py b/prowlarr/api/__init__.py new file mode 100644 index 0000000..2af303e --- /dev/null +++ b/prowlarr/api/__init__.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +# import apis into api package +from prowlarr.api.api_info_api import ApiInfoApi +from prowlarr.api.app_profile_api import AppProfileApi +from prowlarr.api.application_api import ApplicationApi +from prowlarr.api.authentication_api import AuthenticationApi +from prowlarr.api.backup_api import BackupApi +from prowlarr.api.command_api import CommandApi +from prowlarr.api.custom_filter_api import CustomFilterApi +from prowlarr.api.development_config_api import DevelopmentConfigApi +from prowlarr.api.download_client_api import DownloadClientApi +from prowlarr.api.download_client_config_api import DownloadClientConfigApi +from prowlarr.api.file_system_api import FileSystemApi +from prowlarr.api.health_api import HealthApi +from prowlarr.api.history_api import HistoryApi +from prowlarr.api.host_config_api import HostConfigApi +from prowlarr.api.indexer_api import IndexerApi +from prowlarr.api.indexer_default_categories_api import IndexerDefaultCategoriesApi +from prowlarr.api.indexer_editor_api import IndexerEditorApi +from prowlarr.api.indexer_proxy_api import IndexerProxyApi +from prowlarr.api.indexer_stats_api import IndexerStatsApi +from prowlarr.api.indexer_status_api import IndexerStatusApi +from prowlarr.api.initialize_js_api import InitializeJsApi +from prowlarr.api.localization_api import LocalizationApi +from prowlarr.api.log_api import LogApi +from prowlarr.api.log_file_api import LogFileApi +from prowlarr.api.newznab_api import NewznabApi +from prowlarr.api.notification_api import NotificationApi +from prowlarr.api.quality_profile_schema_api import QualityProfileSchemaApi +from prowlarr.api.search_api import SearchApi +from prowlarr.api.static_resource_api import StaticResourceApi +from prowlarr.api.system_api import SystemApi +from prowlarr.api.tag_api import TagApi +from prowlarr.api.tag_details_api import TagDetailsApi +from prowlarr.api.task_api import TaskApi +from prowlarr.api.ui_config_api import UiConfigApi +from prowlarr.api.update_api import UpdateApi +from prowlarr.api.update_log_file_api import UpdateLogFileApi diff --git a/prowlarr/api/api_info_api.py b/prowlarr/api/api_info_api.py new file mode 100644 index 0000000..f54dc60 --- /dev/null +++ b/prowlarr/api/api_info_api.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 prowlarr.models.api_info_resource import ApiInfoResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ApiInfoApi(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_api(self, **kwargs) -> ApiInfoResource: # noqa: E501 + """get_api # 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_api(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: ApiInfoResource + """ + kwargs['_return_http_data_only'] = True + return self.get_api_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_api_with_http_info(self, **kwargs): # noqa: E501 + """get_api # 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_api_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(ApiInfoResource, 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_api" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "ApiInfoResource", + } + + return self.api_client.call_api( + '/api', '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')) diff --git a/prowlarr/api/app_profile_api.py b/prowlarr/api/app_profile_api.py new file mode 100644 index 0000000..00c0b45 --- /dev/null +++ b/prowlarr/api/app_profile_api.py @@ -0,0 +1,758 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional + +from prowlarr.models.app_profile_resource import AppProfileResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class AppProfileApi(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 create_app_profile(self, app_profile_resource : Optional[AppProfileResource] = None, **kwargs) -> AppProfileResource: # noqa: E501 + """create_app_profile # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_app_profile(app_profile_resource, async_req=True) + >>> result = thread.get() + + :param app_profile_resource: + :type app_profile_resource: AppProfileResource + :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: AppProfileResource + """ + kwargs['_return_http_data_only'] = True + return self.create_app_profile_with_http_info(app_profile_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_app_profile_with_http_info(self, app_profile_resource : Optional[AppProfileResource] = None, **kwargs): # noqa: E501 + """create_app_profile # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_app_profile_with_http_info(app_profile_resource, async_req=True) + >>> result = thread.get() + + :param app_profile_resource: + :type app_profile_resource: AppProfileResource + :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(AppProfileResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'app_profile_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 create_app_profile" % _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 + if _params['app_profile_resource']: + _body_params = _params['app_profile_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "AppProfileResource", + } + + return self.api_client.call_api( + '/api/v1/appprofile', 'POST', + _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 delete_app_profile(self, id : StrictInt, **kwargs) -> None: # noqa: E501 + """delete_app_profile # 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_app_profile(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: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_app_profile_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_app_profile_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """delete_app_profile # 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_app_profile_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: None + """ + + _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 delete_app_profile" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/appprofile/{id}', 'DELETE', + _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_app_profile_by_id(self, id : StrictInt, **kwargs) -> AppProfileResource: # noqa: E501 + """get_app_profile_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_app_profile_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: AppProfileResource + """ + kwargs['_return_http_data_only'] = True + return self.get_app_profile_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_app_profile_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_app_profile_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_app_profile_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(AppProfileResource, 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_app_profile_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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "AppProfileResource", + '404': "Dict[str, str]", + '500': None, + } + + return self.api_client.call_api( + '/api/v1/appprofile/{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 list_app_profile(self, **kwargs) -> List[AppProfileResource]: # noqa: E501 + """list_app_profile # 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_app_profile(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: List[AppProfileResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_app_profile_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_app_profile_with_http_info(self, **kwargs): # noqa: E501 + """list_app_profile # 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_app_profile_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(List[AppProfileResource], 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 list_app_profile" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[AppProfileResource]", + } + + return self.api_client.call_api( + '/api/v1/appprofile', '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_app_profile(self, id : StrictStr, app_profile_resource : Optional[AppProfileResource] = None, **kwargs) -> AppProfileResource: # noqa: E501 + """update_app_profile # 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_app_profile(id, app_profile_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param app_profile_resource: + :type app_profile_resource: AppProfileResource + :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: AppProfileResource + """ + kwargs['_return_http_data_only'] = True + return self.update_app_profile_with_http_info(id, app_profile_resource, **kwargs) # noqa: E501 + + @validate_arguments + def update_app_profile_with_http_info(self, id : StrictStr, app_profile_resource : Optional[AppProfileResource] = None, **kwargs): # noqa: E501 + """update_app_profile # 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_app_profile_with_http_info(id, app_profile_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param app_profile_resource: + :type app_profile_resource: AppProfileResource + :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(AppProfileResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'app_profile_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_app_profile" % _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['app_profile_resource']: + _body_params = _params['app_profile_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "AppProfileResource", + } + + return self.api_client.call_api( + '/api/v1/appprofile/{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/prowlarr/api/application_api.py b/prowlarr/api/application_api.py new file mode 100644 index 0000000..28ef82b --- /dev/null +++ b/prowlarr/api/application_api.py @@ -0,0 +1,1309 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional + +from prowlarr.models.application_resource import ApplicationResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ApplicationApi(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 create_applications(self, application_resource : Optional[ApplicationResource] = None, **kwargs) -> ApplicationResource: # noqa: E501 + """create_applications # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_applications(application_resource, async_req=True) + >>> result = thread.get() + + :param application_resource: + :type application_resource: ApplicationResource + :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: ApplicationResource + """ + kwargs['_return_http_data_only'] = True + return self.create_applications_with_http_info(application_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_applications_with_http_info(self, application_resource : Optional[ApplicationResource] = None, **kwargs): # noqa: E501 + """create_applications # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_applications_with_http_info(application_resource, async_req=True) + >>> result = thread.get() + + :param application_resource: + :type application_resource: ApplicationResource + :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(ApplicationResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'application_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 create_applications" % _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 + if _params['application_resource']: + _body_params = _params['application_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "ApplicationResource", + } + + return self.api_client.call_api( + '/api/v1/applications', 'POST', + _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 create_applications_action_by_name(self, name : StrictStr, application_resource : Optional[ApplicationResource] = None, **kwargs) -> None: # noqa: E501 + """create_applications_action_by_name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_applications_action_by_name(name, application_resource, async_req=True) + >>> result = thread.get() + + :param name: (required) + :type name: str + :param application_resource: + :type application_resource: ApplicationResource + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.create_applications_action_by_name_with_http_info(name, application_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_applications_action_by_name_with_http_info(self, name : StrictStr, application_resource : Optional[ApplicationResource] = None, **kwargs): # noqa: E501 + """create_applications_action_by_name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_applications_action_by_name_with_http_info(name, application_resource, async_req=True) + >>> result = thread.get() + + :param name: (required) + :type name: str + :param application_resource: + :type application_resource: ApplicationResource + :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: None + """ + + _params = locals() + + _all_params = [ + 'name', + 'application_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 create_applications_action_by_name" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['name']: + _path_params['name'] = _params['name'] + + # 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['application_resource']: + _body_params = _params['application_resource'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/applications/action/{name}', 'POST', + _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 delete_applications(self, id : StrictInt, **kwargs) -> None: # noqa: E501 + """delete_applications # 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_applications(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: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_applications_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_applications_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """delete_applications # 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_applications_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: None + """ + + _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 delete_applications" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/applications/{id}', 'DELETE', + _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_applications_by_id(self, id : StrictInt, **kwargs) -> ApplicationResource: # noqa: E501 + """get_applications_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_applications_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: ApplicationResource + """ + kwargs['_return_http_data_only'] = True + return self.get_applications_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_applications_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_applications_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_applications_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(ApplicationResource, 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_applications_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "ApplicationResource", + } + + return self.api_client.call_api( + '/api/v1/applications/{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 list_applications(self, **kwargs) -> List[ApplicationResource]: # noqa: E501 + """list_applications # 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_applications(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: List[ApplicationResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_applications_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_applications_with_http_info(self, **kwargs): # noqa: E501 + """list_applications # 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_applications_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(List[ApplicationResource], 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 list_applications" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[ApplicationResource]", + } + + return self.api_client.call_api( + '/api/v1/applications', '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 list_applications_schema(self, **kwargs) -> List[ApplicationResource]: # noqa: E501 + """list_applications_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_applications_schema(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: List[ApplicationResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_applications_schema_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_applications_schema_with_http_info(self, **kwargs): # noqa: E501 + """list_applications_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_applications_schema_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(List[ApplicationResource], 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 list_applications_schema" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[ApplicationResource]", + } + + return self.api_client.call_api( + '/api/v1/applications/schema', '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 test_applications(self, application_resource : Optional[ApplicationResource] = None, **kwargs) -> None: # noqa: E501 + """test_applications # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_applications(application_resource, async_req=True) + >>> result = thread.get() + + :param application_resource: + :type application_resource: ApplicationResource + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.test_applications_with_http_info(application_resource, **kwargs) # noqa: E501 + + @validate_arguments + def test_applications_with_http_info(self, application_resource : Optional[ApplicationResource] = None, **kwargs): # noqa: E501 + """test_applications # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_applications_with_http_info(application_resource, async_req=True) + >>> result = thread.get() + + :param application_resource: + :type application_resource: ApplicationResource + :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: None + """ + + _params = locals() + + _all_params = [ + 'application_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 test_applications" % _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 + if _params['application_resource']: + _body_params = _params['application_resource'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/applications/test', 'POST', + _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 testall_applications(self, **kwargs) -> None: # noqa: E501 + """testall_applications # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.testall_applications(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: None + """ + kwargs['_return_http_data_only'] = True + return self.testall_applications_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def testall_applications_with_http_info(self, **kwargs): # noqa: E501 + """testall_applications # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.testall_applications_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: None + """ + + _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 testall_applications" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/applications/testall', 'POST', + _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_applications(self, id : StrictStr, application_resource : Optional[ApplicationResource] = None, **kwargs) -> ApplicationResource: # noqa: E501 + """update_applications # 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_applications(id, application_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param application_resource: + :type application_resource: ApplicationResource + :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: ApplicationResource + """ + kwargs['_return_http_data_only'] = True + return self.update_applications_with_http_info(id, application_resource, **kwargs) # noqa: E501 + + @validate_arguments + def update_applications_with_http_info(self, id : StrictStr, application_resource : Optional[ApplicationResource] = None, **kwargs): # noqa: E501 + """update_applications # 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_applications_with_http_info(id, application_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param application_resource: + :type application_resource: ApplicationResource + :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(ApplicationResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'application_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_applications" % _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['application_resource']: + _body_params = _params['application_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "ApplicationResource", + } + + return self.api_client.call_api( + '/api/v1/applications/{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/prowlarr/api/authentication_api.py b/prowlarr/api/authentication_api.py new file mode 100644 index 0000000..0e8bf83 --- /dev/null +++ b/prowlarr/api/authentication_api.py @@ -0,0 +1,333 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 StrictStr + +from typing import Optional + + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class AuthenticationApi(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 create_login(self, return_url : Optional[StrictStr] = None, username : Optional[StrictStr] = None, password : Optional[StrictStr] = None, remember_me : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501 + """create_login # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_login(return_url, username, password, remember_me, async_req=True) + >>> result = thread.get() + + :param return_url: + :type return_url: str + :param username: + :type username: str + :param password: + :type password: str + :param remember_me: + :type remember_me: str + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.create_login_with_http_info(return_url, username, password, remember_me, **kwargs) # noqa: E501 + + @validate_arguments + def create_login_with_http_info(self, return_url : Optional[StrictStr] = None, username : Optional[StrictStr] = None, password : Optional[StrictStr] = None, remember_me : Optional[StrictStr] = None, **kwargs): # noqa: E501 + """create_login # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_login_with_http_info(return_url, username, password, remember_me, async_req=True) + >>> result = thread.get() + + :param return_url: + :type return_url: str + :param username: + :type username: str + :param password: + :type password: str + :param remember_me: + :type remember_me: str + :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: None + """ + + _params = locals() + + _all_params = [ + 'return_url', + 'username', + 'password', + 'remember_me' + ] + _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 create_login" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('return_url') is not None: # noqa: E501 + _query_params.append(('returnUrl', _params['return_url'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + + # process the form parameters + _form_params = [] + _files = {} + if _params['username']: + _form_params.append(('Username', _params['username'])) + if _params['password']: + _form_params.append(('Password', _params['password'])) + if _params['remember_me']: + _form_params.append(('RememberMe', _params['remember_me'])) + + # process the body parameter + _body_params = None + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/login', 'POST', + _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_logout(self, **kwargs) -> None: # noqa: E501 + """get_logout # 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_logout(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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_logout_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_logout_with_http_info(self, **kwargs): # noqa: E501 + """get_logout # 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_logout_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: None + """ + + _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_logout" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/logout', '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')) diff --git a/prowlarr/api/backup_api.py b/prowlarr/api/backup_api.py new file mode 100644 index 0000000..6bfd79a --- /dev/null +++ b/prowlarr/api/backup_api.py @@ -0,0 +1,575 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 + +from typing import List + +from prowlarr.models.backup_resource import BackupResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class BackupApi(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 create_system_backup_restore_by_id(self, id : StrictInt, **kwargs) -> None: # noqa: E501 + """create_system_backup_restore_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.create_system_backup_restore_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: None + """ + kwargs['_return_http_data_only'] = True + return self.create_system_backup_restore_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def create_system_backup_restore_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """create_system_backup_restore_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.create_system_backup_restore_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: None + """ + + _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 create_system_backup_restore_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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/system/backup/restore/{id}', 'POST', + _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 create_system_backup_restore_upload(self, **kwargs) -> None: # noqa: E501 + """create_system_backup_restore_upload # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_system_backup_restore_upload(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: None + """ + kwargs['_return_http_data_only'] = True + return self.create_system_backup_restore_upload_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def create_system_backup_restore_upload_with_http_info(self, **kwargs): # noqa: E501 + """create_system_backup_restore_upload # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_system_backup_restore_upload_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: None + """ + + _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 create_system_backup_restore_upload" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/system/backup/restore/upload', 'POST', + _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 delete_system_backup(self, id : StrictInt, **kwargs) -> None: # noqa: E501 + """delete_system_backup # 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_system_backup(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: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_system_backup_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_system_backup_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """delete_system_backup # 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_system_backup_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: None + """ + + _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 delete_system_backup" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/system/backup/{id}', 'DELETE', + _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 list_system_backup(self, **kwargs) -> List[BackupResource]: # noqa: E501 + """list_system_backup # 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_system_backup(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: List[BackupResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_system_backup_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_system_backup_with_http_info(self, **kwargs): # noqa: E501 + """list_system_backup # 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_system_backup_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(List[BackupResource], 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 list_system_backup" % _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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[BackupResource]", + } + + return self.api_client.call_api( + '/api/v1/system/backup', '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')) diff --git a/prowlarr/api/command_api.py b/prowlarr/api/command_api.py new file mode 100644 index 0000000..3141c41 --- /dev/null +++ b/prowlarr/api/command_api.py @@ -0,0 +1,601 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 + +from typing import List, Optional + +from prowlarr.models.command_resource import CommandResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class CommandApi(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 create_command(self, command_resource : Optional[CommandResource] = None, **kwargs) -> CommandResource: # noqa: E501 + """create_command # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_command(command_resource, async_req=True) + >>> result = thread.get() + + :param command_resource: + :type command_resource: CommandResource + :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: CommandResource + """ + kwargs['_return_http_data_only'] = True + return self.create_command_with_http_info(command_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_command_with_http_info(self, command_resource : Optional[CommandResource] = None, **kwargs): # noqa: E501 + """create_command # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_command_with_http_info(command_resource, async_req=True) + >>> result = thread.get() + + :param command_resource: + :type command_resource: CommandResource + :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(CommandResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'command_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 create_command" % _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 + if _params['command_resource']: + _body_params = _params['command_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "CommandResource", + } + + return self.api_client.call_api( + '/api/v1/command', 'POST', + _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 delete_command(self, id : StrictInt, **kwargs) -> None: # noqa: E501 + """delete_command # 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_command(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: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_command_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_command_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """delete_command # 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_command_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: None + """ + + _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 delete_command" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/command/{id}', 'DELETE', + _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_command_by_id(self, id : StrictInt, **kwargs) -> CommandResource: # noqa: E501 + """get_command_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_command_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: CommandResource + """ + kwargs['_return_http_data_only'] = True + return self.get_command_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_command_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_command_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_command_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(CommandResource, 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_command_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "CommandResource", + } + + return self.api_client.call_api( + '/api/v1/command/{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 list_command(self, **kwargs) -> List[CommandResource]: # noqa: E501 + """list_command # 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_command(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: List[CommandResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_command_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_command_with_http_info(self, **kwargs): # noqa: E501 + """list_command # 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_command_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(List[CommandResource], 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 list_command" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[CommandResource]", + } + + return self.api_client.call_api( + '/api/v1/command', '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')) diff --git a/prowlarr/api/custom_filter_api.py b/prowlarr/api/custom_filter_api.py new file mode 100644 index 0000000..59680ab --- /dev/null +++ b/prowlarr/api/custom_filter_api.py @@ -0,0 +1,756 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional + +from prowlarr.models.custom_filter_resource import CustomFilterResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class CustomFilterApi(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 create_custom_filter(self, custom_filter_resource : Optional[CustomFilterResource] = None, **kwargs) -> CustomFilterResource: # noqa: E501 + """create_custom_filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_custom_filter(custom_filter_resource, async_req=True) + >>> result = thread.get() + + :param custom_filter_resource: + :type custom_filter_resource: CustomFilterResource + :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: CustomFilterResource + """ + kwargs['_return_http_data_only'] = True + return self.create_custom_filter_with_http_info(custom_filter_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_custom_filter_with_http_info(self, custom_filter_resource : Optional[CustomFilterResource] = None, **kwargs): # noqa: E501 + """create_custom_filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_custom_filter_with_http_info(custom_filter_resource, async_req=True) + >>> result = thread.get() + + :param custom_filter_resource: + :type custom_filter_resource: CustomFilterResource + :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(CustomFilterResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'custom_filter_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 create_custom_filter" % _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 + if _params['custom_filter_resource']: + _body_params = _params['custom_filter_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "CustomFilterResource", + } + + return self.api_client.call_api( + '/api/v1/customfilter', 'POST', + _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 delete_custom_filter(self, id : StrictInt, **kwargs) -> None: # noqa: E501 + """delete_custom_filter # 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_custom_filter(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: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_custom_filter_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_custom_filter_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """delete_custom_filter # 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_custom_filter_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: None + """ + + _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 delete_custom_filter" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/customfilter/{id}', 'DELETE', + _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_custom_filter_by_id(self, id : StrictInt, **kwargs) -> CustomFilterResource: # noqa: E501 + """get_custom_filter_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_custom_filter_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: CustomFilterResource + """ + kwargs['_return_http_data_only'] = True + return self.get_custom_filter_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_custom_filter_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_custom_filter_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_custom_filter_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(CustomFilterResource, 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_custom_filter_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "CustomFilterResource", + } + + return self.api_client.call_api( + '/api/v1/customfilter/{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 list_custom_filter(self, **kwargs) -> List[CustomFilterResource]: # noqa: E501 + """list_custom_filter # 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_custom_filter(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: List[CustomFilterResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_custom_filter_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_custom_filter_with_http_info(self, **kwargs): # noqa: E501 + """list_custom_filter # 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_custom_filter_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(List[CustomFilterResource], 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 list_custom_filter" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[CustomFilterResource]", + } + + return self.api_client.call_api( + '/api/v1/customfilter', '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_custom_filter(self, id : StrictStr, custom_filter_resource : Optional[CustomFilterResource] = None, **kwargs) -> CustomFilterResource: # noqa: E501 + """update_custom_filter # 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_custom_filter(id, custom_filter_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param custom_filter_resource: + :type custom_filter_resource: CustomFilterResource + :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: CustomFilterResource + """ + kwargs['_return_http_data_only'] = True + return self.update_custom_filter_with_http_info(id, custom_filter_resource, **kwargs) # noqa: E501 + + @validate_arguments + def update_custom_filter_with_http_info(self, id : StrictStr, custom_filter_resource : Optional[CustomFilterResource] = None, **kwargs): # noqa: E501 + """update_custom_filter # 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_custom_filter_with_http_info(id, custom_filter_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param custom_filter_resource: + :type custom_filter_resource: CustomFilterResource + :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(CustomFilterResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'custom_filter_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_custom_filter" % _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['custom_filter_resource']: + _body_params = _params['custom_filter_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "CustomFilterResource", + } + + return self.api_client.call_api( + '/api/v1/customfilter/{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/prowlarr/api/development_config_api.py b/prowlarr/api/development_config_api.py new file mode 100644 index 0000000..9c7da0d --- /dev/null +++ b/prowlarr/api/development_config_api.py @@ -0,0 +1,473 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 prowlarr.models.development_config_resource import DevelopmentConfigResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class DevelopmentConfigApi(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_development_config(self, **kwargs) -> DevelopmentConfigResource: # noqa: E501 + """get_development_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_development_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: DevelopmentConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.get_development_config_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_development_config_with_http_info(self, **kwargs): # noqa: E501 + """get_development_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_development_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(DevelopmentConfigResource, 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_development_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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "DevelopmentConfigResource", + } + + return self.api_client.call_api( + '/api/v1/config/development', '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_development_config_by_id(self, id : StrictInt, **kwargs) -> DevelopmentConfigResource: # noqa: E501 + """get_development_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_development_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: DevelopmentConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.get_development_config_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_development_config_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_development_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_development_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(DevelopmentConfigResource, 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_development_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "DevelopmentConfigResource", + } + + return self.api_client.call_api( + '/api/v1/config/development/{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_development_config(self, id : StrictStr, development_config_resource : Optional[DevelopmentConfigResource] = None, **kwargs) -> DevelopmentConfigResource: # noqa: E501 + """update_development_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_development_config(id, development_config_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param development_config_resource: + :type development_config_resource: DevelopmentConfigResource + :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: DevelopmentConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.update_development_config_with_http_info(id, development_config_resource, **kwargs) # noqa: E501 + + @validate_arguments + def update_development_config_with_http_info(self, id : StrictStr, development_config_resource : Optional[DevelopmentConfigResource] = None, **kwargs): # noqa: E501 + """update_development_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_development_config_with_http_info(id, development_config_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param development_config_resource: + :type development_config_resource: DevelopmentConfigResource + :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(DevelopmentConfigResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'development_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_development_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['development_config_resource']: + _body_params = _params['development_config_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "DevelopmentConfigResource", + } + + return self.api_client.call_api( + '/api/v1/config/development/{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/prowlarr/api/download_client_api.py b/prowlarr/api/download_client_api.py new file mode 100644 index 0000000..5aee508 --- /dev/null +++ b/prowlarr/api/download_client_api.py @@ -0,0 +1,1309 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional + +from prowlarr.models.download_client_resource import DownloadClientResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class DownloadClientApi(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 create_download_client(self, download_client_resource : Optional[DownloadClientResource] = None, **kwargs) -> DownloadClientResource: # noqa: E501 + """create_download_client # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_download_client(download_client_resource, async_req=True) + >>> result = thread.get() + + :param download_client_resource: + :type download_client_resource: DownloadClientResource + :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: DownloadClientResource + """ + kwargs['_return_http_data_only'] = True + return self.create_download_client_with_http_info(download_client_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_download_client_with_http_info(self, download_client_resource : Optional[DownloadClientResource] = None, **kwargs): # noqa: E501 + """create_download_client # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_download_client_with_http_info(download_client_resource, async_req=True) + >>> result = thread.get() + + :param download_client_resource: + :type download_client_resource: DownloadClientResource + :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(DownloadClientResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'download_client_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 create_download_client" % _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 + if _params['download_client_resource']: + _body_params = _params['download_client_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "DownloadClientResource", + } + + return self.api_client.call_api( + '/api/v1/downloadclient', 'POST', + _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 create_download_client_action_by_name(self, name : StrictStr, download_client_resource : Optional[DownloadClientResource] = None, **kwargs) -> None: # noqa: E501 + """create_download_client_action_by_name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_download_client_action_by_name(name, download_client_resource, async_req=True) + >>> result = thread.get() + + :param name: (required) + :type name: str + :param download_client_resource: + :type download_client_resource: DownloadClientResource + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.create_download_client_action_by_name_with_http_info(name, download_client_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_download_client_action_by_name_with_http_info(self, name : StrictStr, download_client_resource : Optional[DownloadClientResource] = None, **kwargs): # noqa: E501 + """create_download_client_action_by_name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_download_client_action_by_name_with_http_info(name, download_client_resource, async_req=True) + >>> result = thread.get() + + :param name: (required) + :type name: str + :param download_client_resource: + :type download_client_resource: DownloadClientResource + :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: None + """ + + _params = locals() + + _all_params = [ + 'name', + 'download_client_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 create_download_client_action_by_name" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['name']: + _path_params['name'] = _params['name'] + + # 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['download_client_resource']: + _body_params = _params['download_client_resource'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/downloadclient/action/{name}', 'POST', + _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 delete_download_client(self, id : StrictInt, **kwargs) -> None: # noqa: E501 + """delete_download_client # 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_download_client(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: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_download_client_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_download_client_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """delete_download_client # 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_download_client_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: None + """ + + _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 delete_download_client" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/downloadclient/{id}', 'DELETE', + _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_download_client_by_id(self, id : StrictInt, **kwargs) -> DownloadClientResource: # noqa: E501 + """get_download_client_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_download_client_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: DownloadClientResource + """ + kwargs['_return_http_data_only'] = True + return self.get_download_client_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_download_client_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_download_client_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_download_client_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(DownloadClientResource, 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_download_client_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "DownloadClientResource", + } + + return self.api_client.call_api( + '/api/v1/downloadclient/{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 list_download_client(self, **kwargs) -> List[DownloadClientResource]: # noqa: E501 + """list_download_client # 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_download_client(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: List[DownloadClientResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_download_client_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_download_client_with_http_info(self, **kwargs): # noqa: E501 + """list_download_client # 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_download_client_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(List[DownloadClientResource], 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 list_download_client" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[DownloadClientResource]", + } + + return self.api_client.call_api( + '/api/v1/downloadclient', '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 list_download_client_schema(self, **kwargs) -> List[DownloadClientResource]: # noqa: E501 + """list_download_client_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_download_client_schema(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: List[DownloadClientResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_download_client_schema_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_download_client_schema_with_http_info(self, **kwargs): # noqa: E501 + """list_download_client_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_download_client_schema_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(List[DownloadClientResource], 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 list_download_client_schema" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[DownloadClientResource]", + } + + return self.api_client.call_api( + '/api/v1/downloadclient/schema', '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 test_download_client(self, download_client_resource : Optional[DownloadClientResource] = None, **kwargs) -> None: # noqa: E501 + """test_download_client # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_download_client(download_client_resource, async_req=True) + >>> result = thread.get() + + :param download_client_resource: + :type download_client_resource: DownloadClientResource + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.test_download_client_with_http_info(download_client_resource, **kwargs) # noqa: E501 + + @validate_arguments + def test_download_client_with_http_info(self, download_client_resource : Optional[DownloadClientResource] = None, **kwargs): # noqa: E501 + """test_download_client # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_download_client_with_http_info(download_client_resource, async_req=True) + >>> result = thread.get() + + :param download_client_resource: + :type download_client_resource: DownloadClientResource + :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: None + """ + + _params = locals() + + _all_params = [ + 'download_client_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 test_download_client" % _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 + if _params['download_client_resource']: + _body_params = _params['download_client_resource'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/downloadclient/test', 'POST', + _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 testall_download_client(self, **kwargs) -> None: # noqa: E501 + """testall_download_client # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.testall_download_client(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: None + """ + kwargs['_return_http_data_only'] = True + return self.testall_download_client_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def testall_download_client_with_http_info(self, **kwargs): # noqa: E501 + """testall_download_client # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.testall_download_client_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: None + """ + + _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 testall_download_client" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/downloadclient/testall', 'POST', + _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_download_client(self, id : StrictStr, download_client_resource : Optional[DownloadClientResource] = None, **kwargs) -> DownloadClientResource: # noqa: E501 + """update_download_client # 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_download_client(id, download_client_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param download_client_resource: + :type download_client_resource: DownloadClientResource + :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: DownloadClientResource + """ + kwargs['_return_http_data_only'] = True + return self.update_download_client_with_http_info(id, download_client_resource, **kwargs) # noqa: E501 + + @validate_arguments + def update_download_client_with_http_info(self, id : StrictStr, download_client_resource : Optional[DownloadClientResource] = None, **kwargs): # noqa: E501 + """update_download_client # 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_download_client_with_http_info(id, download_client_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param download_client_resource: + :type download_client_resource: DownloadClientResource + :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(DownloadClientResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'download_client_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_download_client" % _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['download_client_resource']: + _body_params = _params['download_client_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "DownloadClientResource", + } + + return self.api_client.call_api( + '/api/v1/downloadclient/{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/prowlarr/api/download_client_config_api.py b/prowlarr/api/download_client_config_api.py new file mode 100644 index 0000000..7fbbd47 --- /dev/null +++ b/prowlarr/api/download_client_config_api.py @@ -0,0 +1,473 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 prowlarr.models.download_client_config_resource import DownloadClientConfigResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class DownloadClientConfigApi(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_download_client_config(self, **kwargs) -> DownloadClientConfigResource: # noqa: E501 + """get_download_client_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_download_client_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: DownloadClientConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.get_download_client_config_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_download_client_config_with_http_info(self, **kwargs): # noqa: E501 + """get_download_client_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_download_client_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(DownloadClientConfigResource, 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_download_client_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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "DownloadClientConfigResource", + } + + return self.api_client.call_api( + '/api/v1/config/downloadclient', '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_download_client_config_by_id(self, id : StrictInt, **kwargs) -> DownloadClientConfigResource: # noqa: E501 + """get_download_client_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_download_client_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: DownloadClientConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.get_download_client_config_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_download_client_config_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_download_client_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_download_client_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(DownloadClientConfigResource, 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_download_client_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "DownloadClientConfigResource", + } + + return self.api_client.call_api( + '/api/v1/config/downloadclient/{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_download_client_config(self, id : StrictStr, download_client_config_resource : Optional[DownloadClientConfigResource] = None, **kwargs) -> DownloadClientConfigResource: # noqa: E501 + """update_download_client_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_download_client_config(id, download_client_config_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param download_client_config_resource: + :type download_client_config_resource: DownloadClientConfigResource + :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: DownloadClientConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.update_download_client_config_with_http_info(id, download_client_config_resource, **kwargs) # noqa: E501 + + @validate_arguments + def update_download_client_config_with_http_info(self, id : StrictStr, download_client_config_resource : Optional[DownloadClientConfigResource] = None, **kwargs): # noqa: E501 + """update_download_client_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_download_client_config_with_http_info(id, download_client_config_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param download_client_config_resource: + :type download_client_config_resource: DownloadClientConfigResource + :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(DownloadClientConfigResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'download_client_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_download_client_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['download_client_config_resource']: + _body_params = _params['download_client_config_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "DownloadClientConfigResource", + } + + return self.api_client.call_api( + '/api/v1/config/downloadclient/{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/prowlarr/api/file_system_api.py b/prowlarr/api/file_system_api.py new file mode 100644 index 0000000..0d8199a --- /dev/null +++ b/prowlarr/api/file_system_api.py @@ -0,0 +1,326 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 StrictBool, StrictStr + +from typing import Optional + + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class FileSystemApi(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_file_system(self, path : Optional[StrictStr] = None, include_files : Optional[StrictBool] = None, allow_folders_without_trailing_slashes : Optional[StrictBool] = None, **kwargs) -> None: # noqa: E501 + """get_file_system # 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_file_system(path, include_files, allow_folders_without_trailing_slashes, async_req=True) + >>> result = thread.get() + + :param path: + :type path: str + :param include_files: + :type include_files: bool + :param allow_folders_without_trailing_slashes: + :type allow_folders_without_trailing_slashes: 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 + 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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_file_system_with_http_info(path, include_files, allow_folders_without_trailing_slashes, **kwargs) # noqa: E501 + + @validate_arguments + def get_file_system_with_http_info(self, path : Optional[StrictStr] = None, include_files : Optional[StrictBool] = None, allow_folders_without_trailing_slashes : Optional[StrictBool] = None, **kwargs): # noqa: E501 + """get_file_system # 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_file_system_with_http_info(path, include_files, allow_folders_without_trailing_slashes, async_req=True) + >>> result = thread.get() + + :param path: + :type path: str + :param include_files: + :type include_files: bool + :param allow_folders_without_trailing_slashes: + :type allow_folders_without_trailing_slashes: 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 + 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: None + """ + + _params = locals() + + _all_params = [ + 'path', + 'include_files', + 'allow_folders_without_trailing_slashes' + ] + _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_file_system" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('path') is not None: # noqa: E501 + _query_params.append(('path', _params['path'])) + if _params.get('include_files') is not None: # noqa: E501 + _query_params.append(('includeFiles', _params['include_files'])) + if _params.get('allow_folders_without_trailing_slashes') is not None: # noqa: E501 + _query_params.append(('allowFoldersWithoutTrailingSlashes', _params['allow_folders_without_trailing_slashes'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + + # process the form parameters + _form_params = [] + _files = {} + + # process the body parameter + _body_params = None + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/filesystem', '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_file_system_type(self, path : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501 + """get_file_system_type # 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_file_system_type(path, async_req=True) + >>> result = thread.get() + + :param path: + :type path: str + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_file_system_type_with_http_info(path, **kwargs) # noqa: E501 + + @validate_arguments + def get_file_system_type_with_http_info(self, path : Optional[StrictStr] = None, **kwargs): # noqa: E501 + """get_file_system_type # 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_file_system_type_with_http_info(path, async_req=True) + >>> result = thread.get() + + :param path: + :type path: str + :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: None + """ + + _params = locals() + + _all_params = [ + 'path' + ] + _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_file_system_type" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('path') is not None: # noqa: E501 + _query_params.append(('path', _params['path'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + + # process the form parameters + _form_params = [] + _files = {} + + # process the body parameter + _body_params = None + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/filesystem/type', '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')) diff --git a/prowlarr/api/health_api.py b/prowlarr/api/health_api.py new file mode 100644 index 0000000..b3c3171 --- /dev/null +++ b/prowlarr/api/health_api.py @@ -0,0 +1,318 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 + +from typing import List + +from prowlarr.models.health_resource import HealthResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class HealthApi(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_health_by_id(self, id : StrictInt, **kwargs) -> HealthResource: # noqa: E501 + """get_health_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_health_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: HealthResource + """ + kwargs['_return_http_data_only'] = True + return self.get_health_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_health_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_health_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_health_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(HealthResource, 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_health_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "HealthResource", + } + + return self.api_client.call_api( + '/api/v1/health/{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 list_health(self, **kwargs) -> List[HealthResource]: # noqa: E501 + """list_health # 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_health(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: List[HealthResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_health_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_health_with_http_info(self, **kwargs): # noqa: E501 + """list_health # 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_health_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(List[HealthResource], 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 list_health" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[HealthResource]", + } + + return self.api_client.call_api( + '/api/v1/health', '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')) diff --git a/prowlarr/api/history_api.py b/prowlarr/api/history_api.py new file mode 100644 index 0000000..40603c4 --- /dev/null +++ b/prowlarr/api/history_api.py @@ -0,0 +1,477 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 datetime import datetime + +from pydantic import StrictInt + +from typing import List, Optional + +from prowlarr.models.history_event_type import HistoryEventType +from prowlarr.models.history_resource import HistoryResource +from prowlarr.models.history_resource_paging_resource import HistoryResourcePagingResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class HistoryApi(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_history(self, **kwargs) -> HistoryResourcePagingResource: # noqa: E501 + """get_history # 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_history(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: HistoryResourcePagingResource + """ + kwargs['_return_http_data_only'] = True + return self.get_history_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_history_with_http_info(self, **kwargs): # noqa: E501 + """get_history # 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_history_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(HistoryResourcePagingResource, 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_history" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "HistoryResourcePagingResource", + } + + return self.api_client.call_api( + '/api/v1/history', '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 list_history_indexer(self, indexer_id : Optional[StrictInt] = None, event_type : Optional[HistoryEventType] = None, **kwargs) -> List[HistoryResource]: # noqa: E501 + """list_history_indexer # 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_history_indexer(indexer_id, event_type, async_req=True) + >>> result = thread.get() + + :param indexer_id: + :type indexer_id: int + :param event_type: + :type event_type: HistoryEventType + :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: List[HistoryResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_history_indexer_with_http_info(indexer_id, event_type, **kwargs) # noqa: E501 + + @validate_arguments + def list_history_indexer_with_http_info(self, indexer_id : Optional[StrictInt] = None, event_type : Optional[HistoryEventType] = None, **kwargs): # noqa: E501 + """list_history_indexer # 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_history_indexer_with_http_info(indexer_id, event_type, async_req=True) + >>> result = thread.get() + + :param indexer_id: + :type indexer_id: int + :param event_type: + :type event_type: HistoryEventType + :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(List[HistoryResource], status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'indexer_id', + 'event_type' + ] + _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 list_history_indexer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('indexer_id') is not None: # noqa: E501 + _query_params.append(('indexerId', _params['indexer_id'])) + if _params.get('event_type') is not None: # noqa: E501 + _query_params.append(('eventType', _params['event_type'])) + + # 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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[HistoryResource]", + } + + return self.api_client.call_api( + '/api/v1/history/indexer', '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 list_history_since(self, var_date : Optional[datetime] = None, event_type : Optional[HistoryEventType] = None, **kwargs) -> List[HistoryResource]: # noqa: E501 + """list_history_since # 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_history_since(var_date, event_type, async_req=True) + >>> result = thread.get() + + :param var_date: + :type var_date: datetime + :param event_type: + :type event_type: HistoryEventType + :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: List[HistoryResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_history_since_with_http_info(var_date, event_type, **kwargs) # noqa: E501 + + @validate_arguments + def list_history_since_with_http_info(self, var_date : Optional[datetime] = None, event_type : Optional[HistoryEventType] = None, **kwargs): # noqa: E501 + """list_history_since # 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_history_since_with_http_info(var_date, event_type, async_req=True) + >>> result = thread.get() + + :param var_date: + :type var_date: datetime + :param event_type: + :type event_type: HistoryEventType + :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(List[HistoryResource], status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'var_date', + 'event_type' + ] + _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 list_history_since" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('var_date') is not None: # noqa: E501 + _query_params.append(('date', _params['var_date'])) + if _params.get('event_type') is not None: # noqa: E501 + _query_params.append(('eventType', _params['event_type'])) + + # 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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[HistoryResource]", + } + + return self.api_client.call_api( + '/api/v1/history/since', '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')) diff --git a/prowlarr/api/host_config_api.py b/prowlarr/api/host_config_api.py new file mode 100644 index 0000000..c514383 --- /dev/null +++ b/prowlarr/api/host_config_api.py @@ -0,0 +1,473 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 prowlarr.models.host_config_resource import HostConfigResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class HostConfigApi(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_host_config(self, **kwargs) -> HostConfigResource: # noqa: E501 + """get_host_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_host_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: HostConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.get_host_config_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_host_config_with_http_info(self, **kwargs): # noqa: E501 + """get_host_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_host_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(HostConfigResource, 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_host_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "HostConfigResource", + } + + return self.api_client.call_api( + '/api/v1/config/host', '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_host_config_by_id(self, id : StrictInt, **kwargs) -> HostConfigResource: # noqa: E501 + """get_host_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_host_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: HostConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.get_host_config_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_host_config_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_host_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_host_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(HostConfigResource, 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_host_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "HostConfigResource", + } + + return self.api_client.call_api( + '/api/v1/config/host/{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_host_config(self, id : StrictStr, host_config_resource : Optional[HostConfigResource] = None, **kwargs) -> HostConfigResource: # noqa: E501 + """update_host_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_host_config(id, host_config_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param host_config_resource: + :type host_config_resource: HostConfigResource + :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: HostConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.update_host_config_with_http_info(id, host_config_resource, **kwargs) # noqa: E501 + + @validate_arguments + def update_host_config_with_http_info(self, id : StrictStr, host_config_resource : Optional[HostConfigResource] = None, **kwargs): # noqa: E501 + """update_host_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_host_config_with_http_info(id, host_config_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param host_config_resource: + :type host_config_resource: HostConfigResource + :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(HostConfigResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'host_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_host_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['host_config_resource']: + _body_params = _params['host_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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "HostConfigResource", + } + + return self.api_client.call_api( + '/api/v1/config/host/{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/prowlarr/api/indexer_api.py b/prowlarr/api/indexer_api.py new file mode 100644 index 0000000..20b0f1b --- /dev/null +++ b/prowlarr/api/indexer_api.py @@ -0,0 +1,1309 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional + +from prowlarr.models.indexer_resource import IndexerResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class IndexerApi(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 create_indexer(self, indexer_resource : Optional[IndexerResource] = None, **kwargs) -> IndexerResource: # noqa: E501 + """create_indexer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_indexer(indexer_resource, async_req=True) + >>> result = thread.get() + + :param indexer_resource: + :type indexer_resource: IndexerResource + :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: IndexerResource + """ + kwargs['_return_http_data_only'] = True + return self.create_indexer_with_http_info(indexer_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_indexer_with_http_info(self, indexer_resource : Optional[IndexerResource] = None, **kwargs): # noqa: E501 + """create_indexer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_indexer_with_http_info(indexer_resource, async_req=True) + >>> result = thread.get() + + :param indexer_resource: + :type indexer_resource: IndexerResource + :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(IndexerResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'indexer_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 create_indexer" % _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 + if _params['indexer_resource']: + _body_params = _params['indexer_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "IndexerResource", + } + + return self.api_client.call_api( + '/api/v1/indexer', 'POST', + _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 create_indexer_action_by_name(self, name : StrictStr, indexer_resource : Optional[IndexerResource] = None, **kwargs) -> None: # noqa: E501 + """create_indexer_action_by_name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_indexer_action_by_name(name, indexer_resource, async_req=True) + >>> result = thread.get() + + :param name: (required) + :type name: str + :param indexer_resource: + :type indexer_resource: IndexerResource + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.create_indexer_action_by_name_with_http_info(name, indexer_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_indexer_action_by_name_with_http_info(self, name : StrictStr, indexer_resource : Optional[IndexerResource] = None, **kwargs): # noqa: E501 + """create_indexer_action_by_name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_indexer_action_by_name_with_http_info(name, indexer_resource, async_req=True) + >>> result = thread.get() + + :param name: (required) + :type name: str + :param indexer_resource: + :type indexer_resource: IndexerResource + :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: None + """ + + _params = locals() + + _all_params = [ + 'name', + 'indexer_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 create_indexer_action_by_name" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['name']: + _path_params['name'] = _params['name'] + + # 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['indexer_resource']: + _body_params = _params['indexer_resource'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/indexer/action/{name}', 'POST', + _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 delete_indexer(self, id : StrictInt, **kwargs) -> None: # noqa: E501 + """delete_indexer # 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_indexer(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: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_indexer_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_indexer_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """delete_indexer # 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_indexer_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: None + """ + + _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 delete_indexer" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/indexer/{id}', 'DELETE', + _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_indexer_by_id(self, id : StrictInt, **kwargs) -> IndexerResource: # noqa: E501 + """get_indexer_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_indexer_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: IndexerResource + """ + kwargs['_return_http_data_only'] = True + return self.get_indexer_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_indexer_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_indexer_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_indexer_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(IndexerResource, 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_indexer_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "IndexerResource", + } + + return self.api_client.call_api( + '/api/v1/indexer/{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 list_indexer(self, **kwargs) -> List[IndexerResource]: # noqa: E501 + """list_indexer # 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_indexer(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: List[IndexerResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_indexer_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_indexer_with_http_info(self, **kwargs): # noqa: E501 + """list_indexer # 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_indexer_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(List[IndexerResource], 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 list_indexer" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[IndexerResource]", + } + + return self.api_client.call_api( + '/api/v1/indexer', '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 list_indexer_schema(self, **kwargs) -> List[IndexerResource]: # noqa: E501 + """list_indexer_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_indexer_schema(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: List[IndexerResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_indexer_schema_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_indexer_schema_with_http_info(self, **kwargs): # noqa: E501 + """list_indexer_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_indexer_schema_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(List[IndexerResource], 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 list_indexer_schema" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[IndexerResource]", + } + + return self.api_client.call_api( + '/api/v1/indexer/schema', '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 test_indexer(self, indexer_resource : Optional[IndexerResource] = None, **kwargs) -> None: # noqa: E501 + """test_indexer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_indexer(indexer_resource, async_req=True) + >>> result = thread.get() + + :param indexer_resource: + :type indexer_resource: IndexerResource + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.test_indexer_with_http_info(indexer_resource, **kwargs) # noqa: E501 + + @validate_arguments + def test_indexer_with_http_info(self, indexer_resource : Optional[IndexerResource] = None, **kwargs): # noqa: E501 + """test_indexer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_indexer_with_http_info(indexer_resource, async_req=True) + >>> result = thread.get() + + :param indexer_resource: + :type indexer_resource: IndexerResource + :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: None + """ + + _params = locals() + + _all_params = [ + 'indexer_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 test_indexer" % _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 + if _params['indexer_resource']: + _body_params = _params['indexer_resource'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/indexer/test', 'POST', + _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 testall_indexer(self, **kwargs) -> None: # noqa: E501 + """testall_indexer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.testall_indexer(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: None + """ + kwargs['_return_http_data_only'] = True + return self.testall_indexer_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def testall_indexer_with_http_info(self, **kwargs): # noqa: E501 + """testall_indexer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.testall_indexer_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: None + """ + + _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 testall_indexer" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/indexer/testall', 'POST', + _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_indexer(self, id : StrictStr, indexer_resource : Optional[IndexerResource] = None, **kwargs) -> IndexerResource: # noqa: E501 + """update_indexer # 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_indexer(id, indexer_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param indexer_resource: + :type indexer_resource: IndexerResource + :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: IndexerResource + """ + kwargs['_return_http_data_only'] = True + return self.update_indexer_with_http_info(id, indexer_resource, **kwargs) # noqa: E501 + + @validate_arguments + def update_indexer_with_http_info(self, id : StrictStr, indexer_resource : Optional[IndexerResource] = None, **kwargs): # noqa: E501 + """update_indexer # 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_indexer_with_http_info(id, indexer_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param indexer_resource: + :type indexer_resource: IndexerResource + :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(IndexerResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'indexer_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_indexer" % _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['indexer_resource']: + _body_params = _params['indexer_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "IndexerResource", + } + + return self.api_client.call_api( + '/api/v1/indexer/{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/prowlarr/api/indexer_default_categories_api.py b/prowlarr/api/indexer_default_categories_api.py new file mode 100644 index 0000000..5d6c9f9 --- /dev/null +++ b/prowlarr/api/indexer_default_categories_api.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 typing import List + +from prowlarr.models.indexer_category import IndexerCategory + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class IndexerDefaultCategoriesApi(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 list_indexer_categories(self, **kwargs) -> List[IndexerCategory]: # noqa: E501 + """list_indexer_categories # 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_indexer_categories(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: List[IndexerCategory] + """ + kwargs['_return_http_data_only'] = True + return self.list_indexer_categories_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_indexer_categories_with_http_info(self, **kwargs): # noqa: E501 + """list_indexer_categories # 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_indexer_categories_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(List[IndexerCategory], 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 list_indexer_categories" % _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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[IndexerCategory]", + } + + return self.api_client.call_api( + '/api/v1/indexer/categories', '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')) diff --git a/prowlarr/api/indexer_editor_api.py b/prowlarr/api/indexer_editor_api.py new file mode 100644 index 0000000..b2773f9 --- /dev/null +++ b/prowlarr/api/indexer_editor_api.py @@ -0,0 +1,325 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 typing import Optional + +from prowlarr.models.indexer_editor_resource import IndexerEditorResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class IndexerEditorApi(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 delete_indexer_editor(self, indexer_editor_resource : Optional[IndexerEditorResource] = None, **kwargs) -> None: # noqa: E501 + """delete_indexer_editor # 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_indexer_editor(indexer_editor_resource, async_req=True) + >>> result = thread.get() + + :param indexer_editor_resource: + :type indexer_editor_resource: IndexerEditorResource + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_indexer_editor_with_http_info(indexer_editor_resource, **kwargs) # noqa: E501 + + @validate_arguments + def delete_indexer_editor_with_http_info(self, indexer_editor_resource : Optional[IndexerEditorResource] = None, **kwargs): # noqa: E501 + """delete_indexer_editor # 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_indexer_editor_with_http_info(indexer_editor_resource, async_req=True) + >>> result = thread.get() + + :param indexer_editor_resource: + :type indexer_editor_resource: IndexerEditorResource + :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: None + """ + + _params = locals() + + _all_params = [ + 'indexer_editor_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 delete_indexer_editor" % _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 + if _params['indexer_editor_resource']: + _body_params = _params['indexer_editor_resource'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/indexer/editor', 'DELETE', + _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 put_indexer_editor(self, indexer_editor_resource : Optional[IndexerEditorResource] = None, **kwargs) -> None: # noqa: E501 + """put_indexer_editor # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.put_indexer_editor(indexer_editor_resource, async_req=True) + >>> result = thread.get() + + :param indexer_editor_resource: + :type indexer_editor_resource: IndexerEditorResource + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.put_indexer_editor_with_http_info(indexer_editor_resource, **kwargs) # noqa: E501 + + @validate_arguments + def put_indexer_editor_with_http_info(self, indexer_editor_resource : Optional[IndexerEditorResource] = None, **kwargs): # noqa: E501 + """put_indexer_editor # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.put_indexer_editor_with_http_info(indexer_editor_resource, async_req=True) + >>> result = thread.get() + + :param indexer_editor_resource: + :type indexer_editor_resource: IndexerEditorResource + :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: None + """ + + _params = locals() + + _all_params = [ + 'indexer_editor_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 put_indexer_editor" % _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 + if _params['indexer_editor_resource']: + _body_params = _params['indexer_editor_resource'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/indexer/editor', '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/prowlarr/api/indexer_proxy_api.py b/prowlarr/api/indexer_proxy_api.py new file mode 100644 index 0000000..320a4b2 --- /dev/null +++ b/prowlarr/api/indexer_proxy_api.py @@ -0,0 +1,1309 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional + +from prowlarr.models.indexer_proxy_resource import IndexerProxyResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class IndexerProxyApi(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 create_indexer_proxy(self, indexer_proxy_resource : Optional[IndexerProxyResource] = None, **kwargs) -> IndexerProxyResource: # noqa: E501 + """create_indexer_proxy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_indexer_proxy(indexer_proxy_resource, async_req=True) + >>> result = thread.get() + + :param indexer_proxy_resource: + :type indexer_proxy_resource: IndexerProxyResource + :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: IndexerProxyResource + """ + kwargs['_return_http_data_only'] = True + return self.create_indexer_proxy_with_http_info(indexer_proxy_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_indexer_proxy_with_http_info(self, indexer_proxy_resource : Optional[IndexerProxyResource] = None, **kwargs): # noqa: E501 + """create_indexer_proxy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_indexer_proxy_with_http_info(indexer_proxy_resource, async_req=True) + >>> result = thread.get() + + :param indexer_proxy_resource: + :type indexer_proxy_resource: IndexerProxyResource + :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(IndexerProxyResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'indexer_proxy_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 create_indexer_proxy" % _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 + if _params['indexer_proxy_resource']: + _body_params = _params['indexer_proxy_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "IndexerProxyResource", + } + + return self.api_client.call_api( + '/api/v1/indexerproxy', 'POST', + _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 create_indexer_proxy_action_by_name(self, name : StrictStr, indexer_proxy_resource : Optional[IndexerProxyResource] = None, **kwargs) -> None: # noqa: E501 + """create_indexer_proxy_action_by_name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_indexer_proxy_action_by_name(name, indexer_proxy_resource, async_req=True) + >>> result = thread.get() + + :param name: (required) + :type name: str + :param indexer_proxy_resource: + :type indexer_proxy_resource: IndexerProxyResource + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.create_indexer_proxy_action_by_name_with_http_info(name, indexer_proxy_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_indexer_proxy_action_by_name_with_http_info(self, name : StrictStr, indexer_proxy_resource : Optional[IndexerProxyResource] = None, **kwargs): # noqa: E501 + """create_indexer_proxy_action_by_name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_indexer_proxy_action_by_name_with_http_info(name, indexer_proxy_resource, async_req=True) + >>> result = thread.get() + + :param name: (required) + :type name: str + :param indexer_proxy_resource: + :type indexer_proxy_resource: IndexerProxyResource + :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: None + """ + + _params = locals() + + _all_params = [ + 'name', + 'indexer_proxy_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 create_indexer_proxy_action_by_name" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['name']: + _path_params['name'] = _params['name'] + + # 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['indexer_proxy_resource']: + _body_params = _params['indexer_proxy_resource'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/indexerproxy/action/{name}', 'POST', + _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 delete_indexer_proxy(self, id : StrictInt, **kwargs) -> None: # noqa: E501 + """delete_indexer_proxy # 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_indexer_proxy(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: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_indexer_proxy_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_indexer_proxy_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """delete_indexer_proxy # 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_indexer_proxy_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: None + """ + + _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 delete_indexer_proxy" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/indexerproxy/{id}', 'DELETE', + _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_indexer_proxy_by_id(self, id : StrictInt, **kwargs) -> IndexerProxyResource: # noqa: E501 + """get_indexer_proxy_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_indexer_proxy_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: IndexerProxyResource + """ + kwargs['_return_http_data_only'] = True + return self.get_indexer_proxy_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_indexer_proxy_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_indexer_proxy_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_indexer_proxy_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(IndexerProxyResource, 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_indexer_proxy_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "IndexerProxyResource", + } + + return self.api_client.call_api( + '/api/v1/indexerproxy/{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 list_indexer_proxy(self, **kwargs) -> List[IndexerProxyResource]: # noqa: E501 + """list_indexer_proxy # 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_indexer_proxy(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: List[IndexerProxyResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_indexer_proxy_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_indexer_proxy_with_http_info(self, **kwargs): # noqa: E501 + """list_indexer_proxy # 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_indexer_proxy_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(List[IndexerProxyResource], 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 list_indexer_proxy" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[IndexerProxyResource]", + } + + return self.api_client.call_api( + '/api/v1/indexerproxy', '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 list_indexer_proxy_schema(self, **kwargs) -> List[IndexerProxyResource]: # noqa: E501 + """list_indexer_proxy_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_indexer_proxy_schema(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: List[IndexerProxyResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_indexer_proxy_schema_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_indexer_proxy_schema_with_http_info(self, **kwargs): # noqa: E501 + """list_indexer_proxy_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_indexer_proxy_schema_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(List[IndexerProxyResource], 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 list_indexer_proxy_schema" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[IndexerProxyResource]", + } + + return self.api_client.call_api( + '/api/v1/indexerproxy/schema', '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 test_indexer_proxy(self, indexer_proxy_resource : Optional[IndexerProxyResource] = None, **kwargs) -> None: # noqa: E501 + """test_indexer_proxy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_indexer_proxy(indexer_proxy_resource, async_req=True) + >>> result = thread.get() + + :param indexer_proxy_resource: + :type indexer_proxy_resource: IndexerProxyResource + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.test_indexer_proxy_with_http_info(indexer_proxy_resource, **kwargs) # noqa: E501 + + @validate_arguments + def test_indexer_proxy_with_http_info(self, indexer_proxy_resource : Optional[IndexerProxyResource] = None, **kwargs): # noqa: E501 + """test_indexer_proxy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_indexer_proxy_with_http_info(indexer_proxy_resource, async_req=True) + >>> result = thread.get() + + :param indexer_proxy_resource: + :type indexer_proxy_resource: IndexerProxyResource + :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: None + """ + + _params = locals() + + _all_params = [ + 'indexer_proxy_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 test_indexer_proxy" % _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 + if _params['indexer_proxy_resource']: + _body_params = _params['indexer_proxy_resource'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/indexerproxy/test', 'POST', + _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 testall_indexer_proxy(self, **kwargs) -> None: # noqa: E501 + """testall_indexer_proxy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.testall_indexer_proxy(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: None + """ + kwargs['_return_http_data_only'] = True + return self.testall_indexer_proxy_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def testall_indexer_proxy_with_http_info(self, **kwargs): # noqa: E501 + """testall_indexer_proxy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.testall_indexer_proxy_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: None + """ + + _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 testall_indexer_proxy" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/indexerproxy/testall', 'POST', + _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_indexer_proxy(self, id : StrictStr, indexer_proxy_resource : Optional[IndexerProxyResource] = None, **kwargs) -> IndexerProxyResource: # noqa: E501 + """update_indexer_proxy # 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_indexer_proxy(id, indexer_proxy_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param indexer_proxy_resource: + :type indexer_proxy_resource: IndexerProxyResource + :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: IndexerProxyResource + """ + kwargs['_return_http_data_only'] = True + return self.update_indexer_proxy_with_http_info(id, indexer_proxy_resource, **kwargs) # noqa: E501 + + @validate_arguments + def update_indexer_proxy_with_http_info(self, id : StrictStr, indexer_proxy_resource : Optional[IndexerProxyResource] = None, **kwargs): # noqa: E501 + """update_indexer_proxy # 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_indexer_proxy_with_http_info(id, indexer_proxy_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param indexer_proxy_resource: + :type indexer_proxy_resource: IndexerProxyResource + :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(IndexerProxyResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'indexer_proxy_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_indexer_proxy" % _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['indexer_proxy_resource']: + _body_params = _params['indexer_proxy_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "IndexerProxyResource", + } + + return self.api_client.call_api( + '/api/v1/indexerproxy/{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/prowlarr/api/indexer_stats_api.py b/prowlarr/api/indexer_stats_api.py new file mode 100644 index 0000000..c362336 --- /dev/null +++ b/prowlarr/api/indexer_stats_api.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 datetime import datetime + +from typing import Optional + +from prowlarr.models.indexer_stats_resource import IndexerStatsResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class IndexerStatsApi(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_indexer_stats(self, start_date : Optional[datetime] = None, end_date : Optional[datetime] = None, **kwargs) -> IndexerStatsResource: # noqa: E501 + """get_indexer_stats # 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_indexer_stats(start_date, end_date, async_req=True) + >>> result = thread.get() + + :param start_date: + :type start_date: datetime + :param end_date: + :type end_date: datetime + :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: IndexerStatsResource + """ + kwargs['_return_http_data_only'] = True + return self.get_indexer_stats_with_http_info(start_date, end_date, **kwargs) # noqa: E501 + + @validate_arguments + def get_indexer_stats_with_http_info(self, start_date : Optional[datetime] = None, end_date : Optional[datetime] = None, **kwargs): # noqa: E501 + """get_indexer_stats # 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_indexer_stats_with_http_info(start_date, end_date, async_req=True) + >>> result = thread.get() + + :param start_date: + :type start_date: datetime + :param end_date: + :type end_date: datetime + :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(IndexerStatsResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'start_date', + 'end_date' + ] + _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_indexer_stats" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('start_date') is not None: # noqa: E501 + _query_params.append(('startDate', _params['start_date'])) + if _params.get('end_date') is not None: # noqa: E501 + _query_params.append(('endDate', _params['end_date'])) + + # 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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "IndexerStatsResource", + } + + return self.api_client.call_api( + '/api/v1/indexerstats', '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')) diff --git a/prowlarr/api/indexer_status_api.py b/prowlarr/api/indexer_status_api.py new file mode 100644 index 0000000..1244983 --- /dev/null +++ b/prowlarr/api/indexer_status_api.py @@ -0,0 +1,318 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 + +from typing import List + +from prowlarr.models.indexer_status_resource import IndexerStatusResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class IndexerStatusApi(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_indexer_status_by_id(self, id : StrictInt, **kwargs) -> IndexerStatusResource: # noqa: E501 + """get_indexer_status_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_indexer_status_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: IndexerStatusResource + """ + kwargs['_return_http_data_only'] = True + return self.get_indexer_status_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_indexer_status_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_indexer_status_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_indexer_status_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(IndexerStatusResource, 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_indexer_status_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "IndexerStatusResource", + } + + return self.api_client.call_api( + '/api/v1/indexerstatus/{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 list_indexer_status(self, **kwargs) -> List[IndexerStatusResource]: # noqa: E501 + """list_indexer_status # 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_indexer_status(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: List[IndexerStatusResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_indexer_status_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_indexer_status_with_http_info(self, **kwargs): # noqa: E501 + """list_indexer_status # 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_indexer_status_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(List[IndexerStatusResource], 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 list_indexer_status" % _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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[IndexerStatusResource]", + } + + return self.api_client.call_api( + '/api/v1/indexerstatus', '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')) diff --git a/prowlarr/api/initialize_js_api.py b/prowlarr/api/initialize_js_api.py new file mode 100644 index 0000000..6b85d46 --- /dev/null +++ b/prowlarr/api/initialize_js_api.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class InitializeJsApi(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_initialize_js(self, **kwargs) -> None: # noqa: E501 + """get_initialize_js # 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_initialize_js(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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_initialize_js_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_initialize_js_with_http_info(self, **kwargs): # noqa: E501 + """get_initialize_js # 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_initialize_js_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: None + """ + + _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_initialize_js" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/initialize.js', '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')) diff --git a/prowlarr/api/localization_api.py b/prowlarr/api/localization_api.py new file mode 100644 index 0000000..a8b5880 --- /dev/null +++ b/prowlarr/api/localization_api.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 typing import List + +from prowlarr.models.localization_option import LocalizationOption + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class LocalizationApi(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_localization(self, **kwargs) -> None: # noqa: E501 + """get_localization # 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_localization(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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_localization_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_localization_with_http_info(self, **kwargs): # noqa: E501 + """get_localization # 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_localization_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: None + """ + + _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_localization" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/localization', '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 list_localization_options(self, **kwargs) -> List[LocalizationOption]: # noqa: E501 + """list_localization_options # 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_localization_options(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: List[LocalizationOption] + """ + kwargs['_return_http_data_only'] = True + return self.list_localization_options_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_localization_options_with_http_info(self, **kwargs): # noqa: E501 + """list_localization_options # 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_localization_options_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(List[LocalizationOption], 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 list_localization_options" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[LocalizationOption]", + } + + return self.api_client.call_api( + '/api/v1/localization/options', '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')) diff --git a/prowlarr/api/log_api.py b/prowlarr/api/log_api.py new file mode 100644 index 0000000..6ebfa83 --- /dev/null +++ b/prowlarr/api/log_api.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 prowlarr.models.log_resource_paging_resource import LogResourcePagingResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class LogApi(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_log(self, **kwargs) -> LogResourcePagingResource: # noqa: E501 + """get_log # 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_log(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: LogResourcePagingResource + """ + kwargs['_return_http_data_only'] = True + return self.get_log_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_log_with_http_info(self, **kwargs): # noqa: E501 + """get_log # 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_log_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(LogResourcePagingResource, 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_log" % _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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "LogResourcePagingResource", + } + + return self.api_client.call_api( + '/api/v1/log', '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')) diff --git a/prowlarr/api/log_file_api.py b/prowlarr/api/log_file_api.py new file mode 100644 index 0000000..6c4c661 --- /dev/null +++ b/prowlarr/api/log_file_api.py @@ -0,0 +1,312 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 constr, validator + +from typing import List + +from prowlarr.models.log_file_resource import LogFileResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class LogFileApi(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_log_file_by_filename(self, filename : constr(strict=True), **kwargs) -> None: # noqa: E501 + """get_log_file_by_filename # 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_log_file_by_filename(filename, async_req=True) + >>> result = thread.get() + + :param filename: (required) + :type filename: str + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_log_file_by_filename_with_http_info(filename, **kwargs) # noqa: E501 + + @validate_arguments + def get_log_file_by_filename_with_http_info(self, filename : constr(strict=True), **kwargs): # noqa: E501 + """get_log_file_by_filename # 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_log_file_by_filename_with_http_info(filename, async_req=True) + >>> result = thread.get() + + :param filename: (required) + :type filename: str + :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: None + """ + + _params = locals() + + _all_params = [ + 'filename' + ] + _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_log_file_by_filename" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['filename']: + _path_params['filename'] = _params['filename'] + + # 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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/log/file/{filename}', '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 list_log_file(self, **kwargs) -> List[LogFileResource]: # noqa: E501 + """list_log_file # 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_log_file(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: List[LogFileResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_log_file_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_log_file_with_http_info(self, **kwargs): # noqa: E501 + """list_log_file # 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_log_file_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(List[LogFileResource], 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 list_log_file" % _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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[LogFileResource]", + } + + return self.api_client.call_api( + '/api/v1/log/file', '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')) diff --git a/prowlarr/api/newznab_api.py b/prowlarr/api/newznab_api.py new file mode 100644 index 0000000..34cd930 --- /dev/null +++ b/prowlarr/api/newznab_api.py @@ -0,0 +1,1002 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class NewznabApi(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_indexerid_download(self, id : StrictInt, link : Optional[StrictStr] = None, file : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501 + """get_indexerid_download # 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_indexerid_download(id, link, file, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: int + :param link: + :type link: str + :param file: + :type file: str + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_indexerid_download_with_http_info(id, link, file, **kwargs) # noqa: E501 + + @validate_arguments + def get_indexerid_download_with_http_info(self, id : StrictInt, link : Optional[StrictStr] = None, file : Optional[StrictStr] = None, **kwargs): # noqa: E501 + """get_indexerid_download # 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_indexerid_download_with_http_info(id, link, file, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: int + :param link: + :type link: str + :param file: + :type file: str + :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: None + """ + + _params = locals() + + _all_params = [ + 'id', + 'link', + 'file' + ] + _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_indexerid_download" % _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 = [] + if _params.get('link') is not None: # noqa: E501 + _query_params.append(('link', _params['link'])) + if _params.get('file') is not None: # noqa: E501 + _query_params.append(('file', _params['file'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + + # process the form parameters + _form_params = [] + _files = {} + + # process the body parameter + _body_params = None + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/indexer/{id}/download', '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_indexerid_newznab(self, id : StrictInt, t : Optional[StrictStr] = None, q : Optional[StrictStr] = None, cat : Optional[StrictStr] = None, imdbid : Optional[StrictStr] = None, tmdbid : Optional[StrictInt] = None, extended : Optional[StrictStr] = None, limit : Optional[StrictInt] = None, offset : Optional[StrictInt] = None, rid : Optional[StrictInt] = None, tvmazeid : Optional[StrictInt] = None, traktid : Optional[StrictInt] = None, tvdbid : Optional[StrictInt] = None, doubanid : Optional[StrictInt] = None, season : Optional[StrictInt] = None, ep : Optional[StrictStr] = None, album : Optional[StrictStr] = None, artist : Optional[StrictStr] = None, label : Optional[StrictStr] = None, track : Optional[StrictStr] = None, year : Optional[StrictInt] = None, genre : Optional[StrictStr] = None, author : Optional[StrictStr] = None, title : Optional[StrictStr] = None, publisher : Optional[StrictStr] = None, configured : Optional[StrictStr] = None, source : Optional[StrictStr] = None, host : Optional[StrictStr] = None, server : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501 + """get_indexerid_newznab # 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_indexerid_newznab(id, t, q, cat, imdbid, tmdbid, extended, limit, offset, rid, tvmazeid, traktid, tvdbid, doubanid, season, ep, album, artist, label, track, year, genre, author, title, publisher, configured, source, host, server, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: int + :param t: + :type t: str + :param q: + :type q: str + :param cat: + :type cat: str + :param imdbid: + :type imdbid: str + :param tmdbid: + :type tmdbid: int + :param extended: + :type extended: str + :param limit: + :type limit: int + :param offset: + :type offset: int + :param rid: + :type rid: int + :param tvmazeid: + :type tvmazeid: int + :param traktid: + :type traktid: int + :param tvdbid: + :type tvdbid: int + :param doubanid: + :type doubanid: int + :param season: + :type season: int + :param ep: + :type ep: str + :param album: + :type album: str + :param artist: + :type artist: str + :param label: + :type label: str + :param track: + :type track: str + :param year: + :type year: int + :param genre: + :type genre: str + :param author: + :type author: str + :param title: + :type title: str + :param publisher: + :type publisher: str + :param configured: + :type configured: str + :param source: + :type source: str + :param host: + :type host: str + :param server: + :type server: str + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_indexerid_newznab_with_http_info(id, t, q, cat, imdbid, tmdbid, extended, limit, offset, rid, tvmazeid, traktid, tvdbid, doubanid, season, ep, album, artist, label, track, year, genre, author, title, publisher, configured, source, host, server, **kwargs) # noqa: E501 + + @validate_arguments + def get_indexerid_newznab_with_http_info(self, id : StrictInt, t : Optional[StrictStr] = None, q : Optional[StrictStr] = None, cat : Optional[StrictStr] = None, imdbid : Optional[StrictStr] = None, tmdbid : Optional[StrictInt] = None, extended : Optional[StrictStr] = None, limit : Optional[StrictInt] = None, offset : Optional[StrictInt] = None, rid : Optional[StrictInt] = None, tvmazeid : Optional[StrictInt] = None, traktid : Optional[StrictInt] = None, tvdbid : Optional[StrictInt] = None, doubanid : Optional[StrictInt] = None, season : Optional[StrictInt] = None, ep : Optional[StrictStr] = None, album : Optional[StrictStr] = None, artist : Optional[StrictStr] = None, label : Optional[StrictStr] = None, track : Optional[StrictStr] = None, year : Optional[StrictInt] = None, genre : Optional[StrictStr] = None, author : Optional[StrictStr] = None, title : Optional[StrictStr] = None, publisher : Optional[StrictStr] = None, configured : Optional[StrictStr] = None, source : Optional[StrictStr] = None, host : Optional[StrictStr] = None, server : Optional[StrictStr] = None, **kwargs): # noqa: E501 + """get_indexerid_newznab # 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_indexerid_newznab_with_http_info(id, t, q, cat, imdbid, tmdbid, extended, limit, offset, rid, tvmazeid, traktid, tvdbid, doubanid, season, ep, album, artist, label, track, year, genre, author, title, publisher, configured, source, host, server, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: int + :param t: + :type t: str + :param q: + :type q: str + :param cat: + :type cat: str + :param imdbid: + :type imdbid: str + :param tmdbid: + :type tmdbid: int + :param extended: + :type extended: str + :param limit: + :type limit: int + :param offset: + :type offset: int + :param rid: + :type rid: int + :param tvmazeid: + :type tvmazeid: int + :param traktid: + :type traktid: int + :param tvdbid: + :type tvdbid: int + :param doubanid: + :type doubanid: int + :param season: + :type season: int + :param ep: + :type ep: str + :param album: + :type album: str + :param artist: + :type artist: str + :param label: + :type label: str + :param track: + :type track: str + :param year: + :type year: int + :param genre: + :type genre: str + :param author: + :type author: str + :param title: + :type title: str + :param publisher: + :type publisher: str + :param configured: + :type configured: str + :param source: + :type source: str + :param host: + :type host: str + :param server: + :type server: str + :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: None + """ + + _params = locals() + + _all_params = [ + 'id', + 't', + 'q', + 'cat', + 'imdbid', + 'tmdbid', + 'extended', + 'limit', + 'offset', + 'rid', + 'tvmazeid', + 'traktid', + 'tvdbid', + 'doubanid', + 'season', + 'ep', + 'album', + 'artist', + 'label', + 'track', + 'year', + 'genre', + 'author', + 'title', + 'publisher', + 'configured', + 'source', + 'host', + 'server' + ] + _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_indexerid_newznab" % _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 = [] + if _params.get('t') is not None: # noqa: E501 + _query_params.append(('t', _params['t'])) + if _params.get('q') is not None: # noqa: E501 + _query_params.append(('q', _params['q'])) + if _params.get('cat') is not None: # noqa: E501 + _query_params.append(('cat', _params['cat'])) + if _params.get('imdbid') is not None: # noqa: E501 + _query_params.append(('imdbid', _params['imdbid'])) + if _params.get('tmdbid') is not None: # noqa: E501 + _query_params.append(('tmdbid', _params['tmdbid'])) + if _params.get('extended') is not None: # noqa: E501 + _query_params.append(('extended', _params['extended'])) + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + if _params.get('rid') is not None: # noqa: E501 + _query_params.append(('rid', _params['rid'])) + if _params.get('tvmazeid') is not None: # noqa: E501 + _query_params.append(('tvmazeid', _params['tvmazeid'])) + if _params.get('traktid') is not None: # noqa: E501 + _query_params.append(('traktid', _params['traktid'])) + if _params.get('tvdbid') is not None: # noqa: E501 + _query_params.append(('tvdbid', _params['tvdbid'])) + if _params.get('doubanid') is not None: # noqa: E501 + _query_params.append(('doubanid', _params['doubanid'])) + if _params.get('season') is not None: # noqa: E501 + _query_params.append(('season', _params['season'])) + if _params.get('ep') is not None: # noqa: E501 + _query_params.append(('ep', _params['ep'])) + if _params.get('album') is not None: # noqa: E501 + _query_params.append(('album', _params['album'])) + if _params.get('artist') is not None: # noqa: E501 + _query_params.append(('artist', _params['artist'])) + if _params.get('label') is not None: # noqa: E501 + _query_params.append(('label', _params['label'])) + if _params.get('track') is not None: # noqa: E501 + _query_params.append(('track', _params['track'])) + if _params.get('year') is not None: # noqa: E501 + _query_params.append(('year', _params['year'])) + if _params.get('genre') is not None: # noqa: E501 + _query_params.append(('genre', _params['genre'])) + if _params.get('author') is not None: # noqa: E501 + _query_params.append(('author', _params['author'])) + if _params.get('title') is not None: # noqa: E501 + _query_params.append(('title', _params['title'])) + if _params.get('publisher') is not None: # noqa: E501 + _query_params.append(('publisher', _params['publisher'])) + if _params.get('configured') is not None: # noqa: E501 + _query_params.append(('configured', _params['configured'])) + if _params.get('source') is not None: # noqa: E501 + _query_params.append(('source', _params['source'])) + if _params.get('host') is not None: # noqa: E501 + _query_params.append(('host', _params['host'])) + if _params.get('server') is not None: # noqa: E501 + _query_params.append(('server', _params['server'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + + # process the form parameters + _form_params = [] + _files = {} + + # process the body parameter + _body_params = None + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/indexer/{id}/newznab', '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 getid_api(self, id : StrictInt, t : Optional[StrictStr] = None, q : Optional[StrictStr] = None, cat : Optional[StrictStr] = None, imdbid : Optional[StrictStr] = None, tmdbid : Optional[StrictInt] = None, extended : Optional[StrictStr] = None, limit : Optional[StrictInt] = None, offset : Optional[StrictInt] = None, rid : Optional[StrictInt] = None, tvmazeid : Optional[StrictInt] = None, traktid : Optional[StrictInt] = None, tvdbid : Optional[StrictInt] = None, doubanid : Optional[StrictInt] = None, season : Optional[StrictInt] = None, ep : Optional[StrictStr] = None, album : Optional[StrictStr] = None, artist : Optional[StrictStr] = None, label : Optional[StrictStr] = None, track : Optional[StrictStr] = None, year : Optional[StrictInt] = None, genre : Optional[StrictStr] = None, author : Optional[StrictStr] = None, title : Optional[StrictStr] = None, publisher : Optional[StrictStr] = None, configured : Optional[StrictStr] = None, source : Optional[StrictStr] = None, host : Optional[StrictStr] = None, server : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501 + """getid_api # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.getid_api(id, t, q, cat, imdbid, tmdbid, extended, limit, offset, rid, tvmazeid, traktid, tvdbid, doubanid, season, ep, album, artist, label, track, year, genre, author, title, publisher, configured, source, host, server, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: int + :param t: + :type t: str + :param q: + :type q: str + :param cat: + :type cat: str + :param imdbid: + :type imdbid: str + :param tmdbid: + :type tmdbid: int + :param extended: + :type extended: str + :param limit: + :type limit: int + :param offset: + :type offset: int + :param rid: + :type rid: int + :param tvmazeid: + :type tvmazeid: int + :param traktid: + :type traktid: int + :param tvdbid: + :type tvdbid: int + :param doubanid: + :type doubanid: int + :param season: + :type season: int + :param ep: + :type ep: str + :param album: + :type album: str + :param artist: + :type artist: str + :param label: + :type label: str + :param track: + :type track: str + :param year: + :type year: int + :param genre: + :type genre: str + :param author: + :type author: str + :param title: + :type title: str + :param publisher: + :type publisher: str + :param configured: + :type configured: str + :param source: + :type source: str + :param host: + :type host: str + :param server: + :type server: str + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.getid_api_with_http_info(id, t, q, cat, imdbid, tmdbid, extended, limit, offset, rid, tvmazeid, traktid, tvdbid, doubanid, season, ep, album, artist, label, track, year, genre, author, title, publisher, configured, source, host, server, **kwargs) # noqa: E501 + + @validate_arguments + def getid_api_with_http_info(self, id : StrictInt, t : Optional[StrictStr] = None, q : Optional[StrictStr] = None, cat : Optional[StrictStr] = None, imdbid : Optional[StrictStr] = None, tmdbid : Optional[StrictInt] = None, extended : Optional[StrictStr] = None, limit : Optional[StrictInt] = None, offset : Optional[StrictInt] = None, rid : Optional[StrictInt] = None, tvmazeid : Optional[StrictInt] = None, traktid : Optional[StrictInt] = None, tvdbid : Optional[StrictInt] = None, doubanid : Optional[StrictInt] = None, season : Optional[StrictInt] = None, ep : Optional[StrictStr] = None, album : Optional[StrictStr] = None, artist : Optional[StrictStr] = None, label : Optional[StrictStr] = None, track : Optional[StrictStr] = None, year : Optional[StrictInt] = None, genre : Optional[StrictStr] = None, author : Optional[StrictStr] = None, title : Optional[StrictStr] = None, publisher : Optional[StrictStr] = None, configured : Optional[StrictStr] = None, source : Optional[StrictStr] = None, host : Optional[StrictStr] = None, server : Optional[StrictStr] = None, **kwargs): # noqa: E501 + """getid_api # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.getid_api_with_http_info(id, t, q, cat, imdbid, tmdbid, extended, limit, offset, rid, tvmazeid, traktid, tvdbid, doubanid, season, ep, album, artist, label, track, year, genre, author, title, publisher, configured, source, host, server, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: int + :param t: + :type t: str + :param q: + :type q: str + :param cat: + :type cat: str + :param imdbid: + :type imdbid: str + :param tmdbid: + :type tmdbid: int + :param extended: + :type extended: str + :param limit: + :type limit: int + :param offset: + :type offset: int + :param rid: + :type rid: int + :param tvmazeid: + :type tvmazeid: int + :param traktid: + :type traktid: int + :param tvdbid: + :type tvdbid: int + :param doubanid: + :type doubanid: int + :param season: + :type season: int + :param ep: + :type ep: str + :param album: + :type album: str + :param artist: + :type artist: str + :param label: + :type label: str + :param track: + :type track: str + :param year: + :type year: int + :param genre: + :type genre: str + :param author: + :type author: str + :param title: + :type title: str + :param publisher: + :type publisher: str + :param configured: + :type configured: str + :param source: + :type source: str + :param host: + :type host: str + :param server: + :type server: str + :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: None + """ + + _params = locals() + + _all_params = [ + 'id', + 't', + 'q', + 'cat', + 'imdbid', + 'tmdbid', + 'extended', + 'limit', + 'offset', + 'rid', + 'tvmazeid', + 'traktid', + 'tvdbid', + 'doubanid', + 'season', + 'ep', + 'album', + 'artist', + 'label', + 'track', + 'year', + 'genre', + 'author', + 'title', + 'publisher', + 'configured', + 'source', + 'host', + 'server' + ] + _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 getid_api" % _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 = [] + if _params.get('t') is not None: # noqa: E501 + _query_params.append(('t', _params['t'])) + if _params.get('q') is not None: # noqa: E501 + _query_params.append(('q', _params['q'])) + if _params.get('cat') is not None: # noqa: E501 + _query_params.append(('cat', _params['cat'])) + if _params.get('imdbid') is not None: # noqa: E501 + _query_params.append(('imdbid', _params['imdbid'])) + if _params.get('tmdbid') is not None: # noqa: E501 + _query_params.append(('tmdbid', _params['tmdbid'])) + if _params.get('extended') is not None: # noqa: E501 + _query_params.append(('extended', _params['extended'])) + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + if _params.get('rid') is not None: # noqa: E501 + _query_params.append(('rid', _params['rid'])) + if _params.get('tvmazeid') is not None: # noqa: E501 + _query_params.append(('tvmazeid', _params['tvmazeid'])) + if _params.get('traktid') is not None: # noqa: E501 + _query_params.append(('traktid', _params['traktid'])) + if _params.get('tvdbid') is not None: # noqa: E501 + _query_params.append(('tvdbid', _params['tvdbid'])) + if _params.get('doubanid') is not None: # noqa: E501 + _query_params.append(('doubanid', _params['doubanid'])) + if _params.get('season') is not None: # noqa: E501 + _query_params.append(('season', _params['season'])) + if _params.get('ep') is not None: # noqa: E501 + _query_params.append(('ep', _params['ep'])) + if _params.get('album') is not None: # noqa: E501 + _query_params.append(('album', _params['album'])) + if _params.get('artist') is not None: # noqa: E501 + _query_params.append(('artist', _params['artist'])) + if _params.get('label') is not None: # noqa: E501 + _query_params.append(('label', _params['label'])) + if _params.get('track') is not None: # noqa: E501 + _query_params.append(('track', _params['track'])) + if _params.get('year') is not None: # noqa: E501 + _query_params.append(('year', _params['year'])) + if _params.get('genre') is not None: # noqa: E501 + _query_params.append(('genre', _params['genre'])) + if _params.get('author') is not None: # noqa: E501 + _query_params.append(('author', _params['author'])) + if _params.get('title') is not None: # noqa: E501 + _query_params.append(('title', _params['title'])) + if _params.get('publisher') is not None: # noqa: E501 + _query_params.append(('publisher', _params['publisher'])) + if _params.get('configured') is not None: # noqa: E501 + _query_params.append(('configured', _params['configured'])) + if _params.get('source') is not None: # noqa: E501 + _query_params.append(('source', _params['source'])) + if _params.get('host') is not None: # noqa: E501 + _query_params.append(('host', _params['host'])) + if _params.get('server') is not None: # noqa: E501 + _query_params.append(('server', _params['server'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + + # process the form parameters + _form_params = [] + _files = {} + + # process the body parameter + _body_params = None + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/{id}/api', '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 getid_download(self, id : StrictInt, link : Optional[StrictStr] = None, file : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501 + """getid_download # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.getid_download(id, link, file, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: int + :param link: + :type link: str + :param file: + :type file: str + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.getid_download_with_http_info(id, link, file, **kwargs) # noqa: E501 + + @validate_arguments + def getid_download_with_http_info(self, id : StrictInt, link : Optional[StrictStr] = None, file : Optional[StrictStr] = None, **kwargs): # noqa: E501 + """getid_download # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.getid_download_with_http_info(id, link, file, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: int + :param link: + :type link: str + :param file: + :type file: str + :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: None + """ + + _params = locals() + + _all_params = [ + 'id', + 'link', + 'file' + ] + _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 getid_download" % _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 = [] + if _params.get('link') is not None: # noqa: E501 + _query_params.append(('link', _params['link'])) + if _params.get('file') is not None: # noqa: E501 + _query_params.append(('file', _params['file'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + + # process the form parameters + _form_params = [] + _files = {} + + # process the body parameter + _body_params = None + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/{id}/download', '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')) diff --git a/prowlarr/api/notification_api.py b/prowlarr/api/notification_api.py new file mode 100644 index 0000000..814cd22 --- /dev/null +++ b/prowlarr/api/notification_api.py @@ -0,0 +1,1309 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional + +from prowlarr.models.notification_resource import NotificationResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class NotificationApi(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 create_notification(self, notification_resource : Optional[NotificationResource] = None, **kwargs) -> NotificationResource: # noqa: E501 + """create_notification # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_notification(notification_resource, async_req=True) + >>> result = thread.get() + + :param notification_resource: + :type notification_resource: NotificationResource + :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: NotificationResource + """ + kwargs['_return_http_data_only'] = True + return self.create_notification_with_http_info(notification_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_notification_with_http_info(self, notification_resource : Optional[NotificationResource] = None, **kwargs): # noqa: E501 + """create_notification # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_notification_with_http_info(notification_resource, async_req=True) + >>> result = thread.get() + + :param notification_resource: + :type notification_resource: NotificationResource + :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(NotificationResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'notification_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 create_notification" % _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 + if _params['notification_resource']: + _body_params = _params['notification_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "NotificationResource", + } + + return self.api_client.call_api( + '/api/v1/notification', 'POST', + _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 create_notification_action_by_name(self, name : StrictStr, notification_resource : Optional[NotificationResource] = None, **kwargs) -> None: # noqa: E501 + """create_notification_action_by_name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_notification_action_by_name(name, notification_resource, async_req=True) + >>> result = thread.get() + + :param name: (required) + :type name: str + :param notification_resource: + :type notification_resource: NotificationResource + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.create_notification_action_by_name_with_http_info(name, notification_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_notification_action_by_name_with_http_info(self, name : StrictStr, notification_resource : Optional[NotificationResource] = None, **kwargs): # noqa: E501 + """create_notification_action_by_name # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_notification_action_by_name_with_http_info(name, notification_resource, async_req=True) + >>> result = thread.get() + + :param name: (required) + :type name: str + :param notification_resource: + :type notification_resource: NotificationResource + :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: None + """ + + _params = locals() + + _all_params = [ + 'name', + 'notification_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 create_notification_action_by_name" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['name']: + _path_params['name'] = _params['name'] + + # 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['notification_resource']: + _body_params = _params['notification_resource'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/notification/action/{name}', 'POST', + _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 delete_notification(self, id : StrictInt, **kwargs) -> None: # noqa: E501 + """delete_notification # 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_notification(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: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_notification_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_notification_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """delete_notification # 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_notification_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: None + """ + + _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 delete_notification" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/notification/{id}', 'DELETE', + _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_notification_by_id(self, id : StrictInt, **kwargs) -> NotificationResource: # noqa: E501 + """get_notification_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_notification_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: NotificationResource + """ + kwargs['_return_http_data_only'] = True + return self.get_notification_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_notification_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_notification_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_notification_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(NotificationResource, 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_notification_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "NotificationResource", + } + + return self.api_client.call_api( + '/api/v1/notification/{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 list_notification(self, **kwargs) -> List[NotificationResource]: # noqa: E501 + """list_notification # 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_notification(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: List[NotificationResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_notification_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_notification_with_http_info(self, **kwargs): # noqa: E501 + """list_notification # 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_notification_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(List[NotificationResource], 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 list_notification" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[NotificationResource]", + } + + return self.api_client.call_api( + '/api/v1/notification', '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 list_notification_schema(self, **kwargs) -> List[NotificationResource]: # noqa: E501 + """list_notification_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_notification_schema(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: List[NotificationResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_notification_schema_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_notification_schema_with_http_info(self, **kwargs): # noqa: E501 + """list_notification_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_notification_schema_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(List[NotificationResource], 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 list_notification_schema" % _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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[NotificationResource]", + } + + return self.api_client.call_api( + '/api/v1/notification/schema', '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 test_notification(self, notification_resource : Optional[NotificationResource] = None, **kwargs) -> None: # noqa: E501 + """test_notification # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_notification(notification_resource, async_req=True) + >>> result = thread.get() + + :param notification_resource: + :type notification_resource: NotificationResource + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.test_notification_with_http_info(notification_resource, **kwargs) # noqa: E501 + + @validate_arguments + def test_notification_with_http_info(self, notification_resource : Optional[NotificationResource] = None, **kwargs): # noqa: E501 + """test_notification # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_notification_with_http_info(notification_resource, async_req=True) + >>> result = thread.get() + + :param notification_resource: + :type notification_resource: NotificationResource + :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: None + """ + + _params = locals() + + _all_params = [ + 'notification_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 test_notification" % _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 + if _params['notification_resource']: + _body_params = _params['notification_resource'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/notification/test', 'POST', + _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 testall_notification(self, **kwargs) -> None: # noqa: E501 + """testall_notification # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.testall_notification(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: None + """ + kwargs['_return_http_data_only'] = True + return self.testall_notification_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def testall_notification_with_http_info(self, **kwargs): # noqa: E501 + """testall_notification # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.testall_notification_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: None + """ + + _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 testall_notification" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/notification/testall', 'POST', + _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_notification(self, id : StrictStr, notification_resource : Optional[NotificationResource] = None, **kwargs) -> NotificationResource: # noqa: E501 + """update_notification # 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_notification(id, notification_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param notification_resource: + :type notification_resource: NotificationResource + :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: NotificationResource + """ + kwargs['_return_http_data_only'] = True + return self.update_notification_with_http_info(id, notification_resource, **kwargs) # noqa: E501 + + @validate_arguments + def update_notification_with_http_info(self, id : StrictStr, notification_resource : Optional[NotificationResource] = None, **kwargs): # noqa: E501 + """update_notification # 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_notification_with_http_info(id, notification_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param notification_resource: + :type notification_resource: NotificationResource + :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(NotificationResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'notification_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_notification" % _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['notification_resource']: + _body_params = _params['notification_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "NotificationResource", + } + + return self.api_client.call_api( + '/api/v1/notification/{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/prowlarr/api/quality_profile_schema_api.py b/prowlarr/api/quality_profile_schema_api.py new file mode 100644 index 0000000..2e3caf5 --- /dev/null +++ b/prowlarr/api/quality_profile_schema_api.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 prowlarr.models.app_profile_resource import AppProfileResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class QualityProfileSchemaApi(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_appprofile_schema(self, **kwargs) -> AppProfileResource: # noqa: E501 + """get_appprofile_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.get_appprofile_schema(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: AppProfileResource + """ + kwargs['_return_http_data_only'] = True + return self.get_appprofile_schema_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_appprofile_schema_with_http_info(self, **kwargs): # noqa: E501 + """get_appprofile_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.get_appprofile_schema_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(AppProfileResource, 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_appprofile_schema" % _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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "AppProfileResource", + } + + return self.api_client.call_api( + '/api/v1/appprofile/schema', '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')) diff --git a/prowlarr/api/search_api.py b/prowlarr/api/search_api.py new file mode 100644 index 0000000..96061b1 --- /dev/null +++ b/prowlarr/api/search_api.py @@ -0,0 +1,658 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional + +from prowlarr.models.release_resource import ReleaseResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class SearchApi(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 create_search(self, release_resource : Optional[ReleaseResource] = None, **kwargs) -> ReleaseResource: # noqa: E501 + """create_search # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_search(release_resource, async_req=True) + >>> result = thread.get() + + :param release_resource: + :type release_resource: ReleaseResource + :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: ReleaseResource + """ + kwargs['_return_http_data_only'] = True + return self.create_search_with_http_info(release_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_search_with_http_info(self, release_resource : Optional[ReleaseResource] = None, **kwargs): # noqa: E501 + """create_search # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_search_with_http_info(release_resource, async_req=True) + >>> result = thread.get() + + :param release_resource: + :type release_resource: ReleaseResource + :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(ReleaseResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'release_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 create_search" % _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 + if _params['release_resource']: + _body_params = _params['release_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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "ReleaseResource", + } + + return self.api_client.call_api( + '/api/v1/search', 'POST', + _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 create_search_bulk(self, release_resource : Optional[List[ReleaseResource]] = None, **kwargs) -> ReleaseResource: # noqa: E501 + """create_search_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.create_search_bulk(release_resource, async_req=True) + >>> result = thread.get() + + :param release_resource: + :type release_resource: List[ReleaseResource] + :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: ReleaseResource + """ + kwargs['_return_http_data_only'] = True + return self.create_search_bulk_with_http_info(release_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_search_bulk_with_http_info(self, release_resource : Optional[List[ReleaseResource]] = None, **kwargs): # noqa: E501 + """create_search_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.create_search_bulk_with_http_info(release_resource, async_req=True) + >>> result = thread.get() + + :param release_resource: + :type release_resource: List[ReleaseResource] + :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(ReleaseResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'release_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 create_search_bulk" % _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 + if _params['release_resource']: + _body_params = _params['release_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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "ReleaseResource", + } + + return self.api_client.call_api( + '/api/v1/search/bulk', 'POST', + _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_search_by_id(self, id : StrictInt, **kwargs) -> ReleaseResource: # noqa: E501 + """get_search_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_search_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: ReleaseResource + """ + kwargs['_return_http_data_only'] = True + return self.get_search_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_search_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_search_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_search_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(ReleaseResource, 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_search_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "ReleaseResource", + } + + return self.api_client.call_api( + '/api/v1/search/{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 list_search(self, query : Optional[StrictStr] = None, type : Optional[StrictStr] = None, indexer_ids : Optional[List[StrictInt]] = None, categories : Optional[List[StrictInt]] = None, limit : Optional[StrictInt] = None, offset : Optional[StrictInt] = None, **kwargs) -> List[ReleaseResource]: # noqa: E501 + """list_search # 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_search(query, type, indexer_ids, categories, limit, offset, async_req=True) + >>> result = thread.get() + + :param query: + :type query: str + :param type: + :type type: str + :param indexer_ids: + :type indexer_ids: List[int] + :param categories: + :type categories: List[int] + :param limit: + :type limit: int + :param offset: + :type offset: 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: List[ReleaseResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_search_with_http_info(query, type, indexer_ids, categories, limit, offset, **kwargs) # noqa: E501 + + @validate_arguments + def list_search_with_http_info(self, query : Optional[StrictStr] = None, type : Optional[StrictStr] = None, indexer_ids : Optional[List[StrictInt]] = None, categories : Optional[List[StrictInt]] = None, limit : Optional[StrictInt] = None, offset : Optional[StrictInt] = None, **kwargs): # noqa: E501 + """list_search # 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_search_with_http_info(query, type, indexer_ids, categories, limit, offset, async_req=True) + >>> result = thread.get() + + :param query: + :type query: str + :param type: + :type type: str + :param indexer_ids: + :type indexer_ids: List[int] + :param categories: + :type categories: List[int] + :param limit: + :type limit: int + :param offset: + :type offset: 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(List[ReleaseResource], status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'query', + 'type', + 'indexer_ids', + 'categories', + 'limit', + 'offset' + ] + _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 list_search" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('query') is not None: # noqa: E501 + _query_params.append(('Query', _params['query'])) + if _params.get('type') is not None: # noqa: E501 + _query_params.append(('Type', _params['type'])) + if _params.get('indexer_ids') is not None: # noqa: E501 + _query_params.append(('IndexerIds', _params['indexer_ids'])) + _collection_formats['IndexerIds'] = 'multi' + if _params.get('categories') is not None: # noqa: E501 + _query_params.append(('Categories', _params['categories'])) + _collection_formats['Categories'] = 'multi' + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('Limit', _params['limit'])) + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('Offset', _params['offset'])) + + # 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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[ReleaseResource]", + } + + return self.api_client.call_api( + '/api/v1/search', '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')) diff --git a/prowlarr/api/static_resource_api.py b/prowlarr/api/static_resource_api.py new file mode 100644 index 0000000..c6537e7 --- /dev/null +++ b/prowlarr/api/static_resource_api.py @@ -0,0 +1,573 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 StrictStr, constr, validator + + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class StaticResourceApi(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(self, path : StrictStr, **kwargs) -> None: # noqa: E501 + """get # 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(path, async_req=True) + >>> result = thread.get() + + :param path: (required) + :type path: str + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_with_http_info(path, **kwargs) # noqa: E501 + + @validate_arguments + def get_with_http_info(self, path : StrictStr, **kwargs): # noqa: E501 + """get # 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_with_http_info(path, async_req=True) + >>> result = thread.get() + + :param path: (required) + :type path: str + :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: None + """ + + _params = locals() + + _all_params = [ + 'path' + ] + _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" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['path']: + _path_params['path'] = _params['path'] + + # 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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/', '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_by_path(self, path : constr(strict=True), **kwargs) -> None: # noqa: E501 + """get_by_path # 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_by_path(path, async_req=True) + >>> result = thread.get() + + :param path: (required) + :type path: str + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_by_path_with_http_info(path, **kwargs) # noqa: E501 + + @validate_arguments + def get_by_path_with_http_info(self, path : constr(strict=True), **kwargs): # noqa: E501 + """get_by_path # 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_by_path_with_http_info(path, async_req=True) + >>> result = thread.get() + + :param path: (required) + :type path: str + :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: None + """ + + _params = locals() + + _all_params = [ + 'path' + ] + _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_by_path" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['path']: + _path_params['path'] = _params['path'] + + # 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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/{path}', '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_content_by_path(self, path : constr(strict=True), **kwargs) -> None: # noqa: E501 + """get_content_by_path # 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_content_by_path(path, async_req=True) + >>> result = thread.get() + + :param path: (required) + :type path: str + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_content_by_path_with_http_info(path, **kwargs) # noqa: E501 + + @validate_arguments + def get_content_by_path_with_http_info(self, path : constr(strict=True), **kwargs): # noqa: E501 + """get_content_by_path # 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_content_by_path_with_http_info(path, async_req=True) + >>> result = thread.get() + + :param path: (required) + :type path: str + :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: None + """ + + _params = locals() + + _all_params = [ + 'path' + ] + _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_content_by_path" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['path']: + _path_params['path'] = _params['path'] + + # 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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/content/{path}', '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_login(self, **kwargs) -> None: # noqa: E501 + """get_login # 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_login(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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_login_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_login_with_http_info(self, **kwargs): # noqa: E501 + """get_login # 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_login_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: None + """ + + _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_login" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/login', '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')) diff --git a/prowlarr/api/system_api.py b/prowlarr/api/system_api.py new file mode 100644 index 0000000..5ce3053 --- /dev/null +++ b/prowlarr/api/system_api.py @@ -0,0 +1,678 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class SystemApi(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 create_system_restart(self, **kwargs) -> None: # noqa: E501 + """create_system_restart # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_system_restart(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: None + """ + kwargs['_return_http_data_only'] = True + return self.create_system_restart_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def create_system_restart_with_http_info(self, **kwargs): # noqa: E501 + """create_system_restart # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_system_restart_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: None + """ + + _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 create_system_restart" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/system/restart', 'POST', + _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 create_system_shutdown(self, **kwargs) -> None: # noqa: E501 + """create_system_shutdown # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_system_shutdown(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: None + """ + kwargs['_return_http_data_only'] = True + return self.create_system_shutdown_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def create_system_shutdown_with_http_info(self, **kwargs): # noqa: E501 + """create_system_shutdown # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_system_shutdown_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: None + """ + + _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 create_system_shutdown" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/system/shutdown', 'POST', + _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_system_routes(self, **kwargs) -> None: # noqa: E501 + """get_system_routes # 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_system_routes(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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_system_routes_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_system_routes_with_http_info(self, **kwargs): # noqa: E501 + """get_system_routes # 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_system_routes_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: None + """ + + _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_system_routes" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/system/routes', '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_system_routes_duplicate(self, **kwargs) -> None: # noqa: E501 + """get_system_routes_duplicate # 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_system_routes_duplicate(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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_system_routes_duplicate_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_system_routes_duplicate_with_http_info(self, **kwargs): # noqa: E501 + """get_system_routes_duplicate # 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_system_routes_duplicate_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: None + """ + + _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_system_routes_duplicate" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/system/routes/duplicate', '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_system_status(self, **kwargs) -> None: # noqa: E501 + """get_system_status # 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_system_status(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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_system_status_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_system_status_with_http_info(self, **kwargs): # noqa: E501 + """get_system_status # 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_system_status_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: None + """ + + _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_system_status" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/system/status', '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')) diff --git a/prowlarr/api/tag_api.py b/prowlarr/api/tag_api.py new file mode 100644 index 0000000..860a886 --- /dev/null +++ b/prowlarr/api/tag_api.py @@ -0,0 +1,756 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional + +from prowlarr.models.tag_resource import TagResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TagApi(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 create_tag(self, tag_resource : Optional[TagResource] = None, **kwargs) -> TagResource: # noqa: E501 + """create_tag # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tag(tag_resource, async_req=True) + >>> result = thread.get() + + :param tag_resource: + :type tag_resource: TagResource + :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: TagResource + """ + kwargs['_return_http_data_only'] = True + return self.create_tag_with_http_info(tag_resource, **kwargs) # noqa: E501 + + @validate_arguments + def create_tag_with_http_info(self, tag_resource : Optional[TagResource] = None, **kwargs): # noqa: E501 + """create_tag # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tag_with_http_info(tag_resource, async_req=True) + >>> result = thread.get() + + :param tag_resource: + :type tag_resource: TagResource + :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(TagResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tag_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 create_tag" % _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 + if _params['tag_resource']: + _body_params = _params['tag_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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "TagResource", + } + + return self.api_client.call_api( + '/api/v1/tag', 'POST', + _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 delete_tag(self, id : StrictInt, **kwargs) -> None: # noqa: E501 + """delete_tag # 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_tag(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: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_tag_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_tag_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """delete_tag # 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_tag_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: None + """ + + _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 delete_tag" % _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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/tag/{id}', 'DELETE', + _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_tag_by_id(self, id : StrictInt, **kwargs) -> TagResource: # noqa: E501 + """get_tag_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_tag_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: TagResource + """ + kwargs['_return_http_data_only'] = True + return self.get_tag_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tag_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_tag_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_tag_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(TagResource, 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_tag_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "TagResource", + } + + return self.api_client.call_api( + '/api/v1/tag/{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 list_tag(self, **kwargs) -> List[TagResource]: # noqa: E501 + """list_tag # 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_tag(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: List[TagResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_tag_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_tag_with_http_info(self, **kwargs): # noqa: E501 + """list_tag # 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_tag_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(List[TagResource], 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 list_tag" % _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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[TagResource]", + } + + return self.api_client.call_api( + '/api/v1/tag', '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_tag(self, id : StrictStr, tag_resource : Optional[TagResource] = None, **kwargs) -> TagResource: # noqa: E501 + """update_tag # 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_tag(id, tag_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param tag_resource: + :type tag_resource: TagResource + :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: TagResource + """ + kwargs['_return_http_data_only'] = True + return self.update_tag_with_http_info(id, tag_resource, **kwargs) # noqa: E501 + + @validate_arguments + def update_tag_with_http_info(self, id : StrictStr, tag_resource : Optional[TagResource] = None, **kwargs): # noqa: E501 + """update_tag # 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_tag_with_http_info(id, tag_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param tag_resource: + :type tag_resource: TagResource + :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(TagResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'tag_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_tag" % _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['tag_resource']: + _body_params = _params['tag_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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "TagResource", + } + + return self.api_client.call_api( + '/api/v1/tag/{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/prowlarr/api/tag_details_api.py b/prowlarr/api/tag_details_api.py new file mode 100644 index 0000000..0910a41 --- /dev/null +++ b/prowlarr/api/tag_details_api.py @@ -0,0 +1,318 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 + +from typing import List + +from prowlarr.models.tag_details_resource import TagDetailsResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TagDetailsApi(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_tag_detail_by_id(self, id : StrictInt, **kwargs) -> TagDetailsResource: # noqa: E501 + """get_tag_detail_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_tag_detail_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: TagDetailsResource + """ + kwargs['_return_http_data_only'] = True + return self.get_tag_detail_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tag_detail_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_tag_detail_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_tag_detail_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(TagDetailsResource, 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_tag_detail_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "TagDetailsResource", + } + + return self.api_client.call_api( + '/api/v1/tag/detail/{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 list_tag_detail(self, **kwargs) -> List[TagDetailsResource]: # noqa: E501 + """list_tag_detail # 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_tag_detail(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: List[TagDetailsResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_tag_detail_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_tag_detail_with_http_info(self, **kwargs): # noqa: E501 + """list_tag_detail # 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_tag_detail_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(List[TagDetailsResource], 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 list_tag_detail" % _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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[TagDetailsResource]", + } + + return self.api_client.call_api( + '/api/v1/tag/detail', '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')) diff --git a/prowlarr/api/task_api.py b/prowlarr/api/task_api.py new file mode 100644 index 0000000..9c2ba93 --- /dev/null +++ b/prowlarr/api/task_api.py @@ -0,0 +1,318 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 + +from typing import List + +from prowlarr.models.task_resource import TaskResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TaskApi(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_system_task_by_id(self, id : StrictInt, **kwargs) -> TaskResource: # noqa: E501 + """get_system_task_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_system_task_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: TaskResource + """ + kwargs['_return_http_data_only'] = True + return self.get_system_task_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_system_task_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_system_task_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_system_task_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(TaskResource, 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_system_task_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "TaskResource", + } + + return self.api_client.call_api( + '/api/v1/system/task/{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 list_system_task(self, **kwargs) -> List[TaskResource]: # noqa: E501 + """list_system_task # 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_system_task(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: List[TaskResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_system_task_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_system_task_with_http_info(self, **kwargs): # noqa: E501 + """list_system_task # 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_system_task_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(List[TaskResource], 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 list_system_task" % _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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[TaskResource]", + } + + return self.api_client.call_api( + '/api/v1/system/task', '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')) diff --git a/prowlarr/api/ui_config_api.py b/prowlarr/api/ui_config_api.py new file mode 100644 index 0000000..e90092a --- /dev/null +++ b/prowlarr/api/ui_config_api.py @@ -0,0 +1,473 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 prowlarr.models.ui_config_resource import UiConfigResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class UiConfigApi(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_ui_config(self, **kwargs) -> UiConfigResource: # noqa: E501 + """get_ui_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_ui_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: UiConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.get_ui_config_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_ui_config_with_http_info(self, **kwargs): # noqa: E501 + """get_ui_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_ui_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(UiConfigResource, 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_ui_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 = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "UiConfigResource", + } + + return self.api_client.call_api( + '/api/v1/config/ui', '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_ui_config_by_id(self, id : StrictInt, **kwargs) -> UiConfigResource: # noqa: E501 + """get_ui_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_ui_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: UiConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.get_ui_config_by_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_ui_config_by_id_with_http_info(self, id : StrictInt, **kwargs): # noqa: E501 + """get_ui_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_ui_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(UiConfigResource, 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_ui_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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "UiConfigResource", + } + + return self.api_client.call_api( + '/api/v1/config/ui/{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_ui_config(self, id : StrictStr, ui_config_resource : Optional[UiConfigResource] = None, **kwargs) -> UiConfigResource: # noqa: E501 + """update_ui_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_ui_config(id, ui_config_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param ui_config_resource: + :type ui_config_resource: UiConfigResource + :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: UiConfigResource + """ + kwargs['_return_http_data_only'] = True + return self.update_ui_config_with_http_info(id, ui_config_resource, **kwargs) # noqa: E501 + + @validate_arguments + def update_ui_config_with_http_info(self, id : StrictStr, ui_config_resource : Optional[UiConfigResource] = None, **kwargs): # noqa: E501 + """update_ui_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_ui_config_with_http_info(id, ui_config_resource, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param ui_config_resource: + :type ui_config_resource: UiConfigResource + :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(UiConfigResource, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'ui_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_ui_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['ui_config_resource']: + _body_params = _params['ui_config_resource'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/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', 'text/json', 'application/*+json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "UiConfigResource", + } + + return self.api_client.call_api( + '/api/v1/config/ui/{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/prowlarr/api/update_api.py b/prowlarr/api/update_api.py new file mode 100644 index 0000000..5d6fa7e --- /dev/null +++ b/prowlarr/api/update_api.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 typing import List + +from prowlarr.models.update_resource import UpdateResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class UpdateApi(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 list_update(self, **kwargs) -> List[UpdateResource]: # noqa: E501 + """list_update # 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_update(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: List[UpdateResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_update_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_update_with_http_info(self, **kwargs): # noqa: E501 + """list_update # 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_update_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(List[UpdateResource], 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 list_update" % _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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[UpdateResource]", + } + + return self.api_client.call_api( + '/api/v1/update', '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')) diff --git a/prowlarr/api/update_log_file_api.py b/prowlarr/api/update_log_file_api.py new file mode 100644 index 0000000..8665b0d --- /dev/null +++ b/prowlarr/api/update_log_file_api.py @@ -0,0 +1,312 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 constr, validator + +from typing import List + +from prowlarr.models.log_file_resource import LogFileResource + +from prowlarr.api_client import ApiClient +from prowlarr.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class UpdateLogFileApi(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_log_file_update_by_filename(self, filename : constr(strict=True), **kwargs) -> None: # noqa: E501 + """get_log_file_update_by_filename # 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_log_file_update_by_filename(filename, async_req=True) + >>> result = thread.get() + + :param filename: (required) + :type filename: str + :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: None + """ + kwargs['_return_http_data_only'] = True + return self.get_log_file_update_by_filename_with_http_info(filename, **kwargs) # noqa: E501 + + @validate_arguments + def get_log_file_update_by_filename_with_http_info(self, filename : constr(strict=True), **kwargs): # noqa: E501 + """get_log_file_update_by_filename # 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_log_file_update_by_filename_with_http_info(filename, async_req=True) + >>> result = thread.get() + + :param filename: (required) + :type filename: str + :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: None + """ + + _params = locals() + + _all_params = [ + 'filename' + ] + _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_log_file_update_by_filename" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['filename']: + _path_params['filename'] = _params['filename'] + + # 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 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/v1/log/file/update/{filename}', '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 list_log_file_update(self, **kwargs) -> List[LogFileResource]: # noqa: E501 + """list_log_file_update # 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_log_file_update(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: List[LogFileResource] + """ + kwargs['_return_http_data_only'] = True + return self.list_log_file_update_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def list_log_file_update_with_http_info(self, **kwargs): # noqa: E501 + """list_log_file_update # 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_log_file_update_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(List[LogFileResource], 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 list_log_file_update" % _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( + ['text/plain', 'application/json', 'text/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['X-Api-Key', 'apikey'] # noqa: E501 + + _response_types_map = { + '200': "List[LogFileResource]", + } + + return self.api_client.call_api( + '/api/v1/log/file/update', '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')) diff --git a/prowlarr/api_client.py b/prowlarr/api_client.py new file mode 100644 index 0000000..34d0216 --- /dev/null +++ b/prowlarr/api_client.py @@ -0,0 +1,749 @@ +# coding: utf-8 +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from __future__ import absolute_import + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from prowlarr.configuration import Configuration +import prowlarr.models +from prowlarr import rest +from prowlarr.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuraiton if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'Prowlarr-py/v0.0.1' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = response_data + + if not _preload_content: + return return_data + + response_type = response_types_map.get(str(response_data.status), None) + + # fix response type in case of wrong documented 200 + if response_type == None and 299>response_data.status>199: + response_type = response_types_map.get("200", None) + + if response_type not in ["file", "bytes"]: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(prowlarr.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None,_preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, v)) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/prowlarr/configuration.py b/prowlarr/configuration.py new file mode 100644 index 0000000..61a342b --- /dev/null +++ b/prowlarr/configuration.py @@ -0,0 +1,508 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from prowlarr.exceptions import ApiValueError + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """NOTE: This class is auto generated by OpenAPI Generator + + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = prowlarr.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "http://localhost:9696" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.discard_unknown_keys = discard_unknown_keys + self.disabled_client_side_validations = disabled_client_side_validations + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("prowlarr") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + if name == 'disabled_client_side_validations': + s = set(filter(None, value.split(','))) + for v in s: + if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: + raise ApiValueError( + "Invalid keyword: '{0}''".format(v)) + self._disabled_client_side_validations = s + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if 'X-Api-Key' in self.api_key: + auth['X-Api-Key'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'X-Api-Key', + 'value': self.get_api_key_with_prefix( + 'X-Api-Key', + ), + } + if 'apikey' in self.api_key: + auth['apikey'] = { + 'type': 'api_key', + 'in': 'query', + 'key': 'apikey', + 'value': self.get_api_key_with_prefix( + 'apikey', + ), + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 0.0.1".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "{protocol}://{hostpath}", + 'description': "No description provided", + 'variables': { + 'protocol': { + 'description': "No description provided", + 'default_value': "http", + 'enum_values': [ + "http", + "https" + ] + }, + 'hostpath': { + 'description': "No description provided", + 'default_value': "localhost:9696", + } + } + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/prowlarr/exceptions.py b/prowlarr/exceptions.py new file mode 100644 index 0000000..5ac4466 --- /dev/null +++ b/prowlarr/exceptions.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/prowlarr/models/__init__.py b/prowlarr/models/__init__.py new file mode 100644 index 0000000..640e0e2 --- /dev/null +++ b/prowlarr/models/__init__.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +# import models into model package +from prowlarr.models.api_info_resource import ApiInfoResource +from prowlarr.models.app_profile_resource import AppProfileResource +from prowlarr.models.application_resource import ApplicationResource +from prowlarr.models.application_sync_level import ApplicationSyncLevel +from prowlarr.models.apply_tags import ApplyTags +from prowlarr.models.authentication_required_type import AuthenticationRequiredType +from prowlarr.models.authentication_type import AuthenticationType +from prowlarr.models.backup_resource import BackupResource +from prowlarr.models.backup_type import BackupType +from prowlarr.models.book_search_param import BookSearchParam +from prowlarr.models.certificate_validation_type import CertificateValidationType +from prowlarr.models.command import Command +from prowlarr.models.command_priority import CommandPriority +from prowlarr.models.command_resource import CommandResource +from prowlarr.models.command_status import CommandStatus +from prowlarr.models.command_trigger import CommandTrigger +from prowlarr.models.custom_filter_resource import CustomFilterResource +from prowlarr.models.development_config_resource import DevelopmentConfigResource +from prowlarr.models.download_client_category import DownloadClientCategory +from prowlarr.models.download_client_config_resource import DownloadClientConfigResource +from prowlarr.models.download_client_resource import DownloadClientResource +from prowlarr.models.download_protocol import DownloadProtocol +from prowlarr.models.field import Field +from prowlarr.models.health_check_result import HealthCheckResult +from prowlarr.models.health_resource import HealthResource +from prowlarr.models.history_event_type import HistoryEventType +from prowlarr.models.history_resource import HistoryResource +from prowlarr.models.history_resource_paging_resource import HistoryResourcePagingResource +from prowlarr.models.host_config_resource import HostConfigResource +from prowlarr.models.host_statistics import HostStatistics +from prowlarr.models.http_uri import HttpUri +from prowlarr.models.indexer_capability_resource import IndexerCapabilityResource +from prowlarr.models.indexer_category import IndexerCategory +from prowlarr.models.indexer_editor_resource import IndexerEditorResource +from prowlarr.models.indexer_privacy import IndexerPrivacy +from prowlarr.models.indexer_proxy_resource import IndexerProxyResource +from prowlarr.models.indexer_resource import IndexerResource +from prowlarr.models.indexer_statistics import IndexerStatistics +from prowlarr.models.indexer_stats_resource import IndexerStatsResource +from prowlarr.models.indexer_status_resource import IndexerStatusResource +from prowlarr.models.localization_option import LocalizationOption +from prowlarr.models.log_file_resource import LogFileResource +from prowlarr.models.log_resource import LogResource +from prowlarr.models.log_resource_paging_resource import LogResourcePagingResource +from prowlarr.models.movie_search_param import MovieSearchParam +from prowlarr.models.music_search_param import MusicSearchParam +from prowlarr.models.notification_resource import NotificationResource +from prowlarr.models.paging_resource_filter import PagingResourceFilter +from prowlarr.models.provider_message import ProviderMessage +from prowlarr.models.provider_message_type import ProviderMessageType +from prowlarr.models.proxy_type import ProxyType +from prowlarr.models.release_resource import ReleaseResource +from prowlarr.models.search_param import SearchParam +from prowlarr.models.select_option import SelectOption +from prowlarr.models.sort_direction import SortDirection +from prowlarr.models.tag_details_resource import TagDetailsResource +from prowlarr.models.tag_resource import TagResource +from prowlarr.models.task_resource import TaskResource +from prowlarr.models.time_span import TimeSpan +from prowlarr.models.tv_search_param import TvSearchParam +from prowlarr.models.ui_config_resource import UiConfigResource +from prowlarr.models.update_changes import UpdateChanges +from prowlarr.models.update_mechanism import UpdateMechanism +from prowlarr.models.update_resource import UpdateResource +from prowlarr.models.user_agent_statistics import UserAgentStatistics +from prowlarr.models.version import Version diff --git a/prowlarr/models/api_info_resource.py b/prowlarr/models/api_info_resource.py new file mode 100644 index 0000000..35a86cc --- /dev/null +++ b/prowlarr/models/api_info_resource.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel + +class ApiInfoResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + current: Optional[str] + deprecated: Optional[List] + __properties = ["current", "deprecated"] + + 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) -> ApiInfoResource: + """Create an instance of ApiInfoResource 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) + # set to None if current (nullable) is None + if self.current is None: + _dict['current'] = None + + # set to None if deprecated (nullable) is None + if self.deprecated is None: + _dict['deprecated'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ApiInfoResource: + """Create an instance of ApiInfoResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return ApiInfoResource.parse_obj(obj) + + _obj = ApiInfoResource.parse_obj({ + "current": obj.get("current"), + "deprecated": obj.get("deprecated") + }) + return _obj + diff --git a/prowlarr/models/app_profile_resource.py b/prowlarr/models/app_profile_resource.py new file mode 100644 index 0000000..2cb298e --- /dev/null +++ b/prowlarr/models/app_profile_resource.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class AppProfileResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + name: Optional[str] + enable_rss: Optional[bool] + enable_interactive_search: Optional[bool] + enable_automatic_search: Optional[bool] + minimum_seeders: Optional[int] + __properties = ["id", "name", "enableRss", "enableInteractiveSearch", "enableAutomaticSearch", "minimumSeeders"] + + 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) -> AppProfileResource: + """Create an instance of AppProfileResource 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) + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> AppProfileResource: + """Create an instance of AppProfileResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return AppProfileResource.parse_obj(obj) + + _obj = AppProfileResource.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "enable_rss": obj.get("enableRss"), + "enable_interactive_search": obj.get("enableInteractiveSearch"), + "enable_automatic_search": obj.get("enableAutomaticSearch"), + "minimum_seeders": obj.get("minimumSeeders") + }) + return _obj + diff --git a/prowlarr/models/application_resource.py b/prowlarr/models/application_resource.py new file mode 100644 index 0000000..1fd3d82 --- /dev/null +++ b/prowlarr/models/application_resource.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel +from prowlarr.models.application_sync_level import ApplicationSyncLevel +from prowlarr.models.field import Field +from prowlarr.models.provider_message import ProviderMessage + +class ApplicationResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + name: Optional[str] + fields: Optional[List] + implementation_name: Optional[str] + implementation: Optional[str] + config_contract: Optional[str] + info_link: Optional[str] + message: Optional[ProviderMessage] + tags: Optional[List] + presets: Optional[List] + sync_level: Optional[ApplicationSyncLevel] + test_command: Optional[str] + __properties = ["id", "name", "fields", "implementationName", "implementation", "configContract", "infoLink", "message", "tags", "presets", "syncLevel", "testCommand"] + + 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) -> ApplicationResource: + """Create an instance of ApplicationResource 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) + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item in self.fields: + if _item: + _items.append(_item.to_dict()) + _dict['fields'] = _items + # override the default output from pydantic by calling `to_dict()` of message + if self.message: + _dict['message'] = self.message.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in presets (list) + _items = [] + if self.presets: + for _item in self.presets: + if _item: + _items.append(_item.to_dict()) + _dict['presets'] = _items + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + # set to None if fields (nullable) is None + if self.fields is None: + _dict['fields'] = None + + # set to None if implementation_name (nullable) is None + if self.implementation_name is None: + _dict['implementationName'] = None + + # set to None if implementation (nullable) is None + if self.implementation is None: + _dict['implementation'] = None + + # set to None if config_contract (nullable) is None + if self.config_contract is None: + _dict['configContract'] = None + + # set to None if info_link (nullable) is None + if self.info_link is None: + _dict['infoLink'] = None + + # set to None if tags (nullable) is None + if self.tags is None: + _dict['tags'] = None + + # set to None if presets (nullable) is None + if self.presets is None: + _dict['presets'] = None + + # set to None if test_command (nullable) is None + if self.test_command is None: + _dict['testCommand'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ApplicationResource: + """Create an instance of ApplicationResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return ApplicationResource.parse_obj(obj) + + _obj = ApplicationResource.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "fields": [Field.from_dict(_item) for _item in obj.get("fields")] if obj.get("fields") is not None else None, + "implementation_name": obj.get("implementationName"), + "implementation": obj.get("implementation"), + "config_contract": obj.get("configContract"), + "info_link": obj.get("infoLink"), + "message": ProviderMessage.from_dict(obj.get("message")) if obj.get("message") is not None else None, + "tags": obj.get("tags"), + "presets": [ApplicationResource.from_dict(_item) for _item in obj.get("presets")] if obj.get("presets") is not None else None, + "sync_level": obj.get("syncLevel"), + "test_command": obj.get("testCommand") + }) + return _obj + diff --git a/prowlarr/models/application_sync_level.py b/prowlarr/models/application_sync_level.py new file mode 100644 index 0000000..a36ff81 --- /dev/null +++ b/prowlarr/models/application_sync_level.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 ApplicationSyncLevel(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' + ADD_ONLY = 'addOnly' + FULL_SYNC = 'fullSync' + diff --git a/prowlarr/models/apply_tags.py b/prowlarr/models/apply_tags.py new file mode 100644 index 0000000..66012e9 --- /dev/null +++ b/prowlarr/models/apply_tags.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 ApplyTags(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 + """ + + ADD = 'add' + REMOVE = 'remove' + REPLACE = 'replace' + diff --git a/prowlarr/models/authentication_required_type.py b/prowlarr/models/authentication_required_type.py new file mode 100644 index 0000000..7ccf279 --- /dev/null +++ b/prowlarr/models/authentication_required_type.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 AuthenticationRequiredType(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 + """ + + ENABLED = 'enabled' + DISABLED_FOR_LOCAL_ADDRESSES = 'disabledForLocalAddresses' + diff --git a/prowlarr/models/authentication_type.py b/prowlarr/models/authentication_type.py new file mode 100644 index 0000000..15c27f4 --- /dev/null +++ b/prowlarr/models/authentication_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 AuthenticationType(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 + """ + + var_NONE = 'none' + BASIC = 'basic' + FORMS = 'forms' + EXTERNAL = 'external' + diff --git a/prowlarr/models/backup_resource.py b/prowlarr/models/backup_resource.py new file mode 100644 index 0000000..ef920ec --- /dev/null +++ b/prowlarr/models/backup_resource.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 datetime import datetime +from typing import Optional +from pydantic import BaseModel +from prowlarr.models.backup_type import BackupType + +class BackupResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + name: Optional[str] + path: Optional[str] + type: Optional[BackupType] + size: Optional[int] + time: Optional[datetime] + __properties = ["id", "name", "path", "type", "size", "time"] + + 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) -> BackupResource: + """Create an instance of BackupResource 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) + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + # set to None if path (nullable) is None + if self.path is None: + _dict['path'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> BackupResource: + """Create an instance of BackupResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return BackupResource.parse_obj(obj) + + _obj = BackupResource.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "path": obj.get("path"), + "type": obj.get("type"), + "size": obj.get("size"), + "time": obj.get("time") + }) + return _obj + diff --git a/prowlarr/models/backup_type.py b/prowlarr/models/backup_type.py new file mode 100644 index 0000000..80d91d2 --- /dev/null +++ b/prowlarr/models/backup_type.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 BackupType(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 + """ + + SCHEDULED = 'scheduled' + MANUAL = 'manual' + UPDATE = 'update' + diff --git a/prowlarr/models/book_search_param.py b/prowlarr/models/book_search_param.py new file mode 100644 index 0000000..90deb2d --- /dev/null +++ b/prowlarr/models/book_search_param.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 BookSearchParam(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 + """ + + Q = 'q' + TITLE = 'title' + AUTHOR = 'author' + PUBLISHER = 'publisher' + GENRE = 'genre' + YEAR = 'year' + diff --git a/prowlarr/models/certificate_validation_type.py b/prowlarr/models/certificate_validation_type.py new file mode 100644 index 0000000..166b416 --- /dev/null +++ b/prowlarr/models/certificate_validation_type.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 CertificateValidationType(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 + """ + + ENABLED = 'enabled' + DISABLED_FOR_LOCAL_ADDRESSES = 'disabledForLocalAddresses' + DISABLED = 'disabled' + diff --git a/prowlarr/models/command.py b/prowlarr/models/command.py new file mode 100644 index 0000000..5ae7e1c --- /dev/null +++ b/prowlarr/models/command.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 datetime import datetime +from typing import Optional +from pydantic import BaseModel +from prowlarr.models.command_trigger import CommandTrigger + +class Command(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + send_updates_to_client: Optional[bool] + update_scheduled_task: Optional[bool] + completion_message: Optional[str] + requires_disk_access: Optional[bool] + is_exclusive: Optional[bool] + is_type_exclusive: Optional[bool] + name: Optional[str] + last_execution_time: Optional[datetime] + last_start_time: Optional[datetime] + trigger: Optional[CommandTrigger] + suppress_messages: Optional[bool] + client_user_agent: Optional[str] + __properties = ["sendUpdatesToClient", "updateScheduledTask", "completionMessage", "requiresDiskAccess", "isExclusive", "isTypeExclusive", "name", "lastExecutionTime", "lastStartTime", "trigger", "suppressMessages", "clientUserAgent"] + + 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) -> Command: + """Create an instance of Command 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={ + "update_scheduled_task", + "completion_message", + "requires_disk_access", + "is_exclusive", + "is_type_exclusive", + "name", + }, + exclude_none=True) + # set to None if completion_message (nullable) is None + if self.completion_message is None: + _dict['completionMessage'] = None + + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + # set to None if last_execution_time (nullable) is None + if self.last_execution_time is None: + _dict['lastExecutionTime'] = None + + # set to None if last_start_time (nullable) is None + if self.last_start_time is None: + _dict['lastStartTime'] = None + + # set to None if client_user_agent (nullable) is None + if self.client_user_agent is None: + _dict['clientUserAgent'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Command: + """Create an instance of Command from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return Command.parse_obj(obj) + + _obj = Command.parse_obj({ + "send_updates_to_client": obj.get("sendUpdatesToClient"), + "update_scheduled_task": obj.get("updateScheduledTask"), + "completion_message": obj.get("completionMessage"), + "requires_disk_access": obj.get("requiresDiskAccess"), + "is_exclusive": obj.get("isExclusive"), + "is_type_exclusive": obj.get("isTypeExclusive"), + "name": obj.get("name"), + "last_execution_time": obj.get("lastExecutionTime"), + "last_start_time": obj.get("lastStartTime"), + "trigger": obj.get("trigger"), + "suppress_messages": obj.get("suppressMessages"), + "client_user_agent": obj.get("clientUserAgent") + }) + return _obj + diff --git a/prowlarr/models/command_priority.py b/prowlarr/models/command_priority.py new file mode 100644 index 0000000..d8d313a --- /dev/null +++ b/prowlarr/models/command_priority.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 CommandPriority(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 + """ + + NORMAL = 'normal' + HIGH = 'high' + LOW = 'low' + diff --git a/prowlarr/models/command_resource.py b/prowlarr/models/command_resource.py new file mode 100644 index 0000000..f7a60ae --- /dev/null +++ b/prowlarr/models/command_resource.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 datetime import datetime +from typing import Optional +from pydantic import BaseModel +from prowlarr.models.command import Command +from prowlarr.models.command_priority import CommandPriority +from prowlarr.models.command_status import CommandStatus +from prowlarr.models.command_trigger import CommandTrigger +from prowlarr.models.time_span import TimeSpan + +class CommandResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + name: Optional[str] + command_name: Optional[str] + message: Optional[str] + body: Optional[Command] + priority: Optional[CommandPriority] + status: Optional[CommandStatus] + queued: Optional[datetime] + started: Optional[datetime] + ended: Optional[datetime] + duration: Optional[TimeSpan] + exception: Optional[str] + trigger: Optional[CommandTrigger] + client_user_agent: Optional[str] + state_change_time: Optional[datetime] + send_updates_to_client: Optional[bool] + update_scheduled_task: Optional[bool] + last_execution_time: Optional[datetime] + __properties = ["id", "name", "commandName", "message", "body", "priority", "status", "queued", "started", "ended", "duration", "exception", "trigger", "clientUserAgent", "stateChangeTime", "sendUpdatesToClient", "updateScheduledTask", "lastExecutionTime"] + + 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) -> CommandResource: + """Create an instance of CommandResource 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) + # override the default output from pydantic by calling `to_dict()` of body + if self.body: + _dict['body'] = self.body.to_dict() + # override the default output from pydantic by calling `to_dict()` of duration + if self.duration: + _dict['duration'] = self.duration.to_dict() + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + # set to None if command_name (nullable) is None + if self.command_name is None: + _dict['commandName'] = None + + # set to None if message (nullable) is None + if self.message is None: + _dict['message'] = None + + # set to None if started (nullable) is None + if self.started is None: + _dict['started'] = None + + # set to None if ended (nullable) is None + if self.ended is None: + _dict['ended'] = None + + # set to None if exception (nullable) is None + if self.exception is None: + _dict['exception'] = None + + # set to None if client_user_agent (nullable) is None + if self.client_user_agent is None: + _dict['clientUserAgent'] = None + + # set to None if state_change_time (nullable) is None + if self.state_change_time is None: + _dict['stateChangeTime'] = None + + # set to None if last_execution_time (nullable) is None + if self.last_execution_time is None: + _dict['lastExecutionTime'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CommandResource: + """Create an instance of CommandResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return CommandResource.parse_obj(obj) + + _obj = CommandResource.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "command_name": obj.get("commandName"), + "message": obj.get("message"), + "body": Command.from_dict(obj.get("body")) if obj.get("body") is not None else None, + "priority": obj.get("priority"), + "status": obj.get("status"), + "queued": obj.get("queued"), + "started": obj.get("started"), + "ended": obj.get("ended"), + "duration": TimeSpan.from_dict(obj.get("duration")) if obj.get("duration") is not None else None, + "exception": obj.get("exception"), + "trigger": obj.get("trigger"), + "client_user_agent": obj.get("clientUserAgent"), + "state_change_time": obj.get("stateChangeTime"), + "send_updates_to_client": obj.get("sendUpdatesToClient"), + "update_scheduled_task": obj.get("updateScheduledTask"), + "last_execution_time": obj.get("lastExecutionTime") + }) + return _obj + diff --git a/prowlarr/models/command_status.py b/prowlarr/models/command_status.py new file mode 100644 index 0000000..793aea1 --- /dev/null +++ b/prowlarr/models/command_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 CommandStatus(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 + """ + + QUEUED = 'queued' + STARTED = 'started' + COMPLETED = 'completed' + FAILED = 'failed' + ABORTED = 'aborted' + CANCELLED = 'cancelled' + ORPHANED = 'orphaned' + diff --git a/prowlarr/models/command_trigger.py b/prowlarr/models/command_trigger.py new file mode 100644 index 0000000..a15d56f --- /dev/null +++ b/prowlarr/models/command_trigger.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 CommandTrigger(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 + """ + + UNSPECIFIED = 'unspecified' + MANUAL = 'manual' + SCHEDULED = 'scheduled' + diff --git a/prowlarr/models/custom_filter_resource.py b/prowlarr/models/custom_filter_resource.py new file mode 100644 index 0000000..53071d0 --- /dev/null +++ b/prowlarr/models/custom_filter_resource.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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, Dict, List, Optional +from pydantic import BaseModel + +class CustomFilterResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + type: Optional[str] + label: Optional[str] + filters: Optional[List] + __properties = ["id", "type", "label", "filters"] + + 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) -> CustomFilterResource: + """Create an instance of CustomFilterResource 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) + # set to None if type (nullable) is None + if self.type is None: + _dict['type'] = None + + # set to None if label (nullable) is None + if self.label is None: + _dict['label'] = None + + # set to None if filters (nullable) is None + if self.filters is None: + _dict['filters'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CustomFilterResource: + """Create an instance of CustomFilterResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return CustomFilterResource.parse_obj(obj) + + _obj = CustomFilterResource.parse_obj({ + "id": obj.get("id"), + "type": obj.get("type"), + "label": obj.get("label"), + "filters": obj.get("filters") + }) + return _obj + diff --git a/prowlarr/models/development_config_resource.py b/prowlarr/models/development_config_resource.py new file mode 100644 index 0000000..2116694 --- /dev/null +++ b/prowlarr/models/development_config_resource.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class DevelopmentConfigResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + console_log_level: Optional[str] + log_sql: Optional[bool] + log_indexer_response: Optional[bool] + log_rotate: Optional[int] + filter_sentry_events: Optional[bool] + __properties = ["id", "consoleLogLevel", "logSql", "logIndexerResponse", "logRotate", "filterSentryEvents"] + + 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) -> DevelopmentConfigResource: + """Create an instance of DevelopmentConfigResource 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) + # set to None if console_log_level (nullable) is None + if self.console_log_level is None: + _dict['consoleLogLevel'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> DevelopmentConfigResource: + """Create an instance of DevelopmentConfigResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return DevelopmentConfigResource.parse_obj(obj) + + _obj = DevelopmentConfigResource.parse_obj({ + "id": obj.get("id"), + "console_log_level": obj.get("consoleLogLevel"), + "log_sql": obj.get("logSql"), + "log_indexer_response": obj.get("logIndexerResponse"), + "log_rotate": obj.get("logRotate"), + "filter_sentry_events": obj.get("filterSentryEvents") + }) + return _obj + diff --git a/prowlarr/models/download_client_category.py b/prowlarr/models/download_client_category.py new file mode 100644 index 0000000..66e20f3 --- /dev/null +++ b/prowlarr/models/download_client_category.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel + +class DownloadClientCategory(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + client_category: Optional[str] + categories: Optional[List] + __properties = ["clientCategory", "categories"] + + 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) -> DownloadClientCategory: + """Create an instance of DownloadClientCategory 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) + # set to None if client_category (nullable) is None + if self.client_category is None: + _dict['clientCategory'] = None + + # set to None if categories (nullable) is None + if self.categories is None: + _dict['categories'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> DownloadClientCategory: + """Create an instance of DownloadClientCategory from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return DownloadClientCategory.parse_obj(obj) + + _obj = DownloadClientCategory.parse_obj({ + "client_category": obj.get("clientCategory"), + "categories": obj.get("categories") + }) + return _obj + diff --git a/prowlarr/models/download_client_config_resource.py b/prowlarr/models/download_client_config_resource.py new file mode 100644 index 0000000..50700ab --- /dev/null +++ b/prowlarr/models/download_client_config_resource.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class DownloadClientConfigResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + __properties = ["id"] + + 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) -> DownloadClientConfigResource: + """Create an instance of DownloadClientConfigResource 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) -> DownloadClientConfigResource: + """Create an instance of DownloadClientConfigResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return DownloadClientConfigResource.parse_obj(obj) + + _obj = DownloadClientConfigResource.parse_obj({ + "id": obj.get("id") + }) + return _obj + diff --git a/prowlarr/models/download_client_resource.py b/prowlarr/models/download_client_resource.py new file mode 100644 index 0000000..1094a0d --- /dev/null +++ b/prowlarr/models/download_client_resource.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel +from prowlarr.models.download_client_category import DownloadClientCategory +from prowlarr.models.download_protocol import DownloadProtocol +from prowlarr.models.field import Field +from prowlarr.models.provider_message import ProviderMessage + +class DownloadClientResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + name: Optional[str] + fields: Optional[List] + implementation_name: Optional[str] + implementation: Optional[str] + config_contract: Optional[str] + info_link: Optional[str] + message: Optional[ProviderMessage] + tags: Optional[List] + presets: Optional[List] + enable: Optional[bool] + protocol: Optional[DownloadProtocol] + priority: Optional[int] + categories: Optional[List] + supports_categories: Optional[bool] + __properties = ["id", "name", "fields", "implementationName", "implementation", "configContract", "infoLink", "message", "tags", "presets", "enable", "protocol", "priority", "categories", "supportsCategories"] + + 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) -> DownloadClientResource: + """Create an instance of DownloadClientResource 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) + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item in self.fields: + if _item: + _items.append(_item.to_dict()) + _dict['fields'] = _items + # override the default output from pydantic by calling `to_dict()` of message + if self.message: + _dict['message'] = self.message.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in presets (list) + _items = [] + if self.presets: + for _item in self.presets: + if _item: + _items.append(_item.to_dict()) + _dict['presets'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in categories (list) + _items = [] + if self.categories: + for _item in self.categories: + if _item: + _items.append(_item.to_dict()) + _dict['categories'] = _items + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + # set to None if fields (nullable) is None + if self.fields is None: + _dict['fields'] = None + + # set to None if implementation_name (nullable) is None + if self.implementation_name is None: + _dict['implementationName'] = None + + # set to None if implementation (nullable) is None + if self.implementation is None: + _dict['implementation'] = None + + # set to None if config_contract (nullable) is None + if self.config_contract is None: + _dict['configContract'] = None + + # set to None if info_link (nullable) is None + if self.info_link is None: + _dict['infoLink'] = None + + # set to None if tags (nullable) is None + if self.tags is None: + _dict['tags'] = None + + # set to None if presets (nullable) is None + if self.presets is None: + _dict['presets'] = None + + # set to None if categories (nullable) is None + if self.categories is None: + _dict['categories'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> DownloadClientResource: + """Create an instance of DownloadClientResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return DownloadClientResource.parse_obj(obj) + + _obj = DownloadClientResource.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "fields": [Field.from_dict(_item) for _item in obj.get("fields")] if obj.get("fields") is not None else None, + "implementation_name": obj.get("implementationName"), + "implementation": obj.get("implementation"), + "config_contract": obj.get("configContract"), + "info_link": obj.get("infoLink"), + "message": ProviderMessage.from_dict(obj.get("message")) if obj.get("message") is not None else None, + "tags": obj.get("tags"), + "presets": [DownloadClientResource.from_dict(_item) for _item in obj.get("presets")] if obj.get("presets") is not None else None, + "enable": obj.get("enable"), + "protocol": obj.get("protocol"), + "priority": obj.get("priority"), + "categories": [DownloadClientCategory.from_dict(_item) for _item in obj.get("categories")] if obj.get("categories") is not None else None, + "supports_categories": obj.get("supportsCategories") + }) + return _obj + diff --git a/prowlarr/models/download_protocol.py b/prowlarr/models/download_protocol.py new file mode 100644 index 0000000..03d0616 --- /dev/null +++ b/prowlarr/models/download_protocol.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 DownloadProtocol(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 + """ + + UNKNOWN = 'unknown' + USENET = 'usenet' + TORRENT = 'torrent' + diff --git a/prowlarr/models/field.py b/prowlarr/models/field.py new file mode 100644 index 0000000..15cd4ef --- /dev/null +++ b/prowlarr/models/field.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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, List, Optional +from pydantic import BaseModel +from prowlarr.models.select_option import SelectOption + +class Field(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + order: Optional[int] + name: Optional[str] + label: Optional[str] + unit: Optional[str] + help_text: Optional[str] + help_link: Optional[str] + value: Optional[object] + type: Optional[str] + advanced: Optional[bool] + select_options: Optional[List] + select_options_provider_action: Optional[str] + section: Optional[str] + hidden: Optional[str] + placeholder: Optional[str] + __properties = ["order", "name", "label", "unit", "helpText", "helpLink", "value", "type", "advanced", "selectOptions", "selectOptionsProviderAction", "section", "hidden", "placeholder"] + + 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) -> Field: + """Create an instance of Field 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) + # override the default output from pydantic by calling `to_dict()` of each item in select_options (list) + _items = [] + if self.select_options: + for _item in self.select_options: + if _item: + _items.append(_item.to_dict()) + _dict['selectOptions'] = _items + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + # set to None if label (nullable) is None + if self.label is None: + _dict['label'] = None + + # set to None if unit (nullable) is None + if self.unit is None: + _dict['unit'] = None + + # set to None if help_text (nullable) is None + if self.help_text is None: + _dict['helpText'] = None + + # set to None if help_link (nullable) is None + if self.help_link is None: + _dict['helpLink'] = None + + # set to None if value (nullable) is None + if self.value is None: + _dict['value'] = None + + # set to None if type (nullable) is None + if self.type is None: + _dict['type'] = None + + # set to None if select_options (nullable) is None + if self.select_options is None: + _dict['selectOptions'] = None + + # set to None if select_options_provider_action (nullable) is None + if self.select_options_provider_action is None: + _dict['selectOptionsProviderAction'] = None + + # set to None if section (nullable) is None + if self.section is None: + _dict['section'] = None + + # set to None if hidden (nullable) is None + if self.hidden is None: + _dict['hidden'] = None + + # set to None if placeholder (nullable) is None + if self.placeholder is None: + _dict['placeholder'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Field: + """Create an instance of Field from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return Field.parse_obj(obj) + + _obj = Field.parse_obj({ + "order": obj.get("order"), + "name": obj.get("name"), + "label": obj.get("label"), + "unit": obj.get("unit"), + "help_text": obj.get("helpText"), + "help_link": obj.get("helpLink"), + "value": obj.get("value"), + "type": obj.get("type"), + "advanced": obj.get("advanced"), + "select_options": [SelectOption.from_dict(_item) for _item in obj.get("selectOptions")] if obj.get("selectOptions") is not None else None, + "select_options_provider_action": obj.get("selectOptionsProviderAction"), + "section": obj.get("section"), + "hidden": obj.get("hidden"), + "placeholder": obj.get("placeholder") + }) + return _obj + diff --git a/prowlarr/models/health_check_result.py b/prowlarr/models/health_check_result.py new file mode 100644 index 0000000..263b101 --- /dev/null +++ b/prowlarr/models/health_check_result.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 HealthCheckResult(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 + """ + + OK = 'ok' + NOTICE = 'notice' + WARNING = 'warning' + ERROR = 'error' + diff --git a/prowlarr/models/health_resource.py b/prowlarr/models/health_resource.py new file mode 100644 index 0000000..06e5ade --- /dev/null +++ b/prowlarr/models/health_resource.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel +from prowlarr.models.health_check_result import HealthCheckResult +from prowlarr.models.http_uri import HttpUri + +class HealthResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + source: Optional[str] + type: Optional[HealthCheckResult] + message: Optional[str] + wiki_url: Optional[HttpUri] + __properties = ["id", "source", "type", "message", "wikiUrl"] + + 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) -> HealthResource: + """Create an instance of HealthResource 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) + # override the default output from pydantic by calling `to_dict()` of wiki_url + if self.wiki_url: + _dict['wikiUrl'] = self.wiki_url.to_dict() + # set to None if source (nullable) is None + if self.source is None: + _dict['source'] = None + + # set to None if message (nullable) is None + if self.message is None: + _dict['message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> HealthResource: + """Create an instance of HealthResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return HealthResource.parse_obj(obj) + + _obj = HealthResource.parse_obj({ + "id": obj.get("id"), + "source": obj.get("source"), + "type": obj.get("type"), + "message": obj.get("message"), + "wiki_url": HttpUri.from_dict(obj.get("wikiUrl")) if obj.get("wikiUrl") is not None else None + }) + return _obj + diff --git a/prowlarr/models/history_event_type.py b/prowlarr/models/history_event_type.py new file mode 100644 index 0000000..a8327f6 --- /dev/null +++ b/prowlarr/models/history_event_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 HistoryEventType(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 + """ + + UNKNOWN = 'unknown' + RELEASE_GRABBED = 'releaseGrabbed' + INDEXER_QUERY = 'indexerQuery' + INDEXER_RSS = 'indexerRss' + INDEXER_AUTH = 'indexerAuth' + INDEXER_INFO = 'indexerInfo' + diff --git a/prowlarr/models/history_resource.py b/prowlarr/models/history_resource.py new file mode 100644 index 0000000..9aa514e --- /dev/null +++ b/prowlarr/models/history_resource.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 datetime import datetime +from typing import Dict, Optional +from pydantic import BaseModel +from prowlarr.models.history_event_type import HistoryEventType + +class HistoryResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + indexer_id: Optional[int] + var_date: Optional[datetime] + download_id: Optional[str] + successful: Optional[bool] + event_type: Optional[HistoryEventType] + data: Optional[Dict] + __properties = ["id", "indexerId", "date", "downloadId", "successful", "eventType", "data"] + + 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) -> HistoryResource: + """Create an instance of HistoryResource 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) + # set to None if download_id (nullable) is None + if self.download_id is None: + _dict['downloadId'] = None + + # set to None if data (nullable) is None + if self.data is None: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> HistoryResource: + """Create an instance of HistoryResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return HistoryResource.parse_obj(obj) + + _obj = HistoryResource.parse_obj({ + "id": obj.get("id"), + "indexer_id": obj.get("indexerId"), + "var_date": obj.get("date"), + "download_id": obj.get("downloadId"), + "successful": obj.get("successful"), + "event_type": obj.get("eventType"), + "data": obj.get("data") + }) + return _obj + diff --git a/prowlarr/models/history_resource_paging_resource.py b/prowlarr/models/history_resource_paging_resource.py new file mode 100644 index 0000000..eb27a5d --- /dev/null +++ b/prowlarr/models/history_resource_paging_resource.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel +from prowlarr.models.history_resource import HistoryResource +from prowlarr.models.paging_resource_filter import PagingResourceFilter +from prowlarr.models.sort_direction import SortDirection + +class HistoryResourcePagingResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + page: Optional[int] + page_size: Optional[int] + sort_key: Optional[str] + sort_direction: Optional[SortDirection] + filters: Optional[List] + total_records: Optional[int] + records: Optional[List] + __properties = ["page", "pageSize", "sortKey", "sortDirection", "filters", "totalRecords", "records"] + + 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) -> HistoryResourcePagingResource: + """Create an instance of HistoryResourcePagingResource 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) + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item in self.filters: + if _item: + _items.append(_item.to_dict()) + _dict['filters'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in records (list) + _items = [] + if self.records: + for _item in self.records: + if _item: + _items.append(_item.to_dict()) + _dict['records'] = _items + # set to None if sort_key (nullable) is None + if self.sort_key is None: + _dict['sortKey'] = None + + # set to None if filters (nullable) is None + if self.filters is None: + _dict['filters'] = None + + # set to None if records (nullable) is None + if self.records is None: + _dict['records'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> HistoryResourcePagingResource: + """Create an instance of HistoryResourcePagingResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return HistoryResourcePagingResource.parse_obj(obj) + + _obj = HistoryResourcePagingResource.parse_obj({ + "page": obj.get("page"), + "page_size": obj.get("pageSize"), + "sort_key": obj.get("sortKey"), + "sort_direction": obj.get("sortDirection"), + "filters": [PagingResourceFilter.from_dict(_item) for _item in obj.get("filters")] if obj.get("filters") is not None else None, + "total_records": obj.get("totalRecords"), + "records": [HistoryResource.from_dict(_item) for _item in obj.get("records")] if obj.get("records") is not None else None + }) + return _obj + diff --git a/prowlarr/models/host_config_resource.py b/prowlarr/models/host_config_resource.py new file mode 100644 index 0000000..06669ea --- /dev/null +++ b/prowlarr/models/host_config_resource.py @@ -0,0 +1,215 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel +from prowlarr.models.authentication_required_type import AuthenticationRequiredType +from prowlarr.models.authentication_type import AuthenticationType +from prowlarr.models.certificate_validation_type import CertificateValidationType +from prowlarr.models.proxy_type import ProxyType +from prowlarr.models.update_mechanism import UpdateMechanism + +class HostConfigResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + bind_address: Optional[str] + port: Optional[int] + ssl_port: Optional[int] + enable_ssl: Optional[bool] + launch_browser: Optional[bool] + authentication_method: Optional[AuthenticationType] + authentication_required: Optional[AuthenticationRequiredType] + analytics_enabled: Optional[bool] + username: Optional[str] + password: Optional[str] + log_level: Optional[str] + console_log_level: Optional[str] + branch: Optional[str] + api_key: Optional[str] + ssl_cert_path: Optional[str] + ssl_cert_password: Optional[str] + url_base: Optional[str] + instance_name: Optional[str] + update_automatically: Optional[bool] + update_mechanism: Optional[UpdateMechanism] + update_script_path: Optional[str] + proxy_enabled: Optional[bool] + proxy_type: Optional[ProxyType] + proxy_hostname: Optional[str] + proxy_port: Optional[int] + proxy_username: Optional[str] + proxy_password: Optional[str] + proxy_bypass_filter: Optional[str] + proxy_bypass_local_addresses: Optional[bool] + certificate_validation: Optional[CertificateValidationType] + backup_folder: Optional[str] + backup_interval: Optional[int] + backup_retention: Optional[int] + history_cleanup_days: Optional[int] + __properties = ["id", "bindAddress", "port", "sslPort", "enableSsl", "launchBrowser", "authenticationMethod", "authenticationRequired", "analyticsEnabled", "username", "password", "logLevel", "consoleLogLevel", "branch", "apiKey", "sslCertPath", "sslCertPassword", "urlBase", "instanceName", "updateAutomatically", "updateMechanism", "updateScriptPath", "proxyEnabled", "proxyType", "proxyHostname", "proxyPort", "proxyUsername", "proxyPassword", "proxyBypassFilter", "proxyBypassLocalAddresses", "certificateValidation", "backupFolder", "backupInterval", "backupRetention", "historyCleanupDays"] + + 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) -> HostConfigResource: + """Create an instance of HostConfigResource 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) + # set to None if bind_address (nullable) is None + if self.bind_address is None: + _dict['bindAddress'] = None + + # set to None if username (nullable) is None + if self.username is None: + _dict['username'] = None + + # set to None if password (nullable) is None + if self.password is None: + _dict['password'] = None + + # set to None if log_level (nullable) is None + if self.log_level is None: + _dict['logLevel'] = None + + # set to None if console_log_level (nullable) is None + if self.console_log_level is None: + _dict['consoleLogLevel'] = None + + # set to None if branch (nullable) is None + if self.branch is None: + _dict['branch'] = None + + # set to None if api_key (nullable) is None + if self.api_key is None: + _dict['apiKey'] = None + + # set to None if ssl_cert_path (nullable) is None + if self.ssl_cert_path is None: + _dict['sslCertPath'] = None + + # set to None if ssl_cert_password (nullable) is None + if self.ssl_cert_password is None: + _dict['sslCertPassword'] = None + + # set to None if url_base (nullable) is None + if self.url_base is None: + _dict['urlBase'] = None + + # set to None if instance_name (nullable) is None + if self.instance_name is None: + _dict['instanceName'] = None + + # set to None if update_script_path (nullable) is None + if self.update_script_path is None: + _dict['updateScriptPath'] = None + + # set to None if proxy_hostname (nullable) is None + if self.proxy_hostname is None: + _dict['proxyHostname'] = None + + # set to None if proxy_username (nullable) is None + if self.proxy_username is None: + _dict['proxyUsername'] = None + + # set to None if proxy_password (nullable) is None + if self.proxy_password is None: + _dict['proxyPassword'] = None + + # set to None if proxy_bypass_filter (nullable) is None + if self.proxy_bypass_filter is None: + _dict['proxyBypassFilter'] = None + + # set to None if backup_folder (nullable) is None + if self.backup_folder is None: + _dict['backupFolder'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> HostConfigResource: + """Create an instance of HostConfigResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return HostConfigResource.parse_obj(obj) + + _obj = HostConfigResource.parse_obj({ + "id": obj.get("id"), + "bind_address": obj.get("bindAddress"), + "port": obj.get("port"), + "ssl_port": obj.get("sslPort"), + "enable_ssl": obj.get("enableSsl"), + "launch_browser": obj.get("launchBrowser"), + "authentication_method": obj.get("authenticationMethod"), + "authentication_required": obj.get("authenticationRequired"), + "analytics_enabled": obj.get("analyticsEnabled"), + "username": obj.get("username"), + "password": obj.get("password"), + "log_level": obj.get("logLevel"), + "console_log_level": obj.get("consoleLogLevel"), + "branch": obj.get("branch"), + "api_key": obj.get("apiKey"), + "ssl_cert_path": obj.get("sslCertPath"), + "ssl_cert_password": obj.get("sslCertPassword"), + "url_base": obj.get("urlBase"), + "instance_name": obj.get("instanceName"), + "update_automatically": obj.get("updateAutomatically"), + "update_mechanism": obj.get("updateMechanism"), + "update_script_path": obj.get("updateScriptPath"), + "proxy_enabled": obj.get("proxyEnabled"), + "proxy_type": obj.get("proxyType"), + "proxy_hostname": obj.get("proxyHostname"), + "proxy_port": obj.get("proxyPort"), + "proxy_username": obj.get("proxyUsername"), + "proxy_password": obj.get("proxyPassword"), + "proxy_bypass_filter": obj.get("proxyBypassFilter"), + "proxy_bypass_local_addresses": obj.get("proxyBypassLocalAddresses"), + "certificate_validation": obj.get("certificateValidation"), + "backup_folder": obj.get("backupFolder"), + "backup_interval": obj.get("backupInterval"), + "backup_retention": obj.get("backupRetention"), + "history_cleanup_days": obj.get("historyCleanupDays") + }) + return _obj + diff --git a/prowlarr/models/host_statistics.py b/prowlarr/models/host_statistics.py new file mode 100644 index 0000000..96a53a8 --- /dev/null +++ b/prowlarr/models/host_statistics.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class HostStatistics(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + host: Optional[str] + number_of_queries: Optional[int] + number_of_grabs: Optional[int] + __properties = ["host", "numberOfQueries", "numberOfGrabs"] + + 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) -> HostStatistics: + """Create an instance of HostStatistics 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) + # set to None if host (nullable) is None + if self.host is None: + _dict['host'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> HostStatistics: + """Create an instance of HostStatistics from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return HostStatistics.parse_obj(obj) + + _obj = HostStatistics.parse_obj({ + "host": obj.get("host"), + "number_of_queries": obj.get("numberOfQueries"), + "number_of_grabs": obj.get("numberOfGrabs") + }) + return _obj + diff --git a/prowlarr/models/http_uri.py b/prowlarr/models/http_uri.py new file mode 100644 index 0000000..6a2f7d3 --- /dev/null +++ b/prowlarr/models/http_uri.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class HttpUri(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + full_uri: Optional[str] + scheme: Optional[str] + host: Optional[str] + port: Optional[int] + path: Optional[str] + query: Optional[str] + fragment: Optional[str] + __properties = ["fullUri", "scheme", "host", "port", "path", "query", "fragment"] + + 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) -> HttpUri: + """Create an instance of HttpUri 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={ + "full_uri", + "scheme", + "host", + "port", + "path", + "query", + "fragment", + }, + exclude_none=True) + # set to None if full_uri (nullable) is None + if self.full_uri is None: + _dict['fullUri'] = None + + # set to None if scheme (nullable) is None + if self.scheme is None: + _dict['scheme'] = None + + # set to None if host (nullable) is None + if self.host is None: + _dict['host'] = None + + # set to None if port (nullable) is None + if self.port is None: + _dict['port'] = None + + # set to None if path (nullable) is None + if self.path is None: + _dict['path'] = None + + # set to None if query (nullable) is None + if self.query is None: + _dict['query'] = None + + # set to None if fragment (nullable) is None + if self.fragment is None: + _dict['fragment'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> HttpUri: + """Create an instance of HttpUri from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return HttpUri.parse_obj(obj) + + _obj = HttpUri.parse_obj({ + "full_uri": obj.get("fullUri"), + "scheme": obj.get("scheme"), + "host": obj.get("host"), + "port": obj.get("port"), + "path": obj.get("path"), + "query": obj.get("query"), + "fragment": obj.get("fragment") + }) + return _obj + diff --git a/prowlarr/models/indexer_capability_resource.py b/prowlarr/models/indexer_capability_resource.py new file mode 100644 index 0000000..50aeed8 --- /dev/null +++ b/prowlarr/models/indexer_capability_resource.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel +from prowlarr.models.book_search_param import BookSearchParam +from prowlarr.models.indexer_category import IndexerCategory +from prowlarr.models.movie_search_param import MovieSearchParam +from prowlarr.models.music_search_param import MusicSearchParam +from prowlarr.models.search_param import SearchParam +from prowlarr.models.tv_search_param import TvSearchParam + +class IndexerCapabilityResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + limits_max: Optional[int] + limits_default: Optional[int] + categories: Optional[List] + supports_raw_search: Optional[bool] + search_params: Optional[List] + tv_search_params: Optional[List] + movie_search_params: Optional[List] + music_search_params: Optional[List] + book_search_params: Optional[List] + __properties = ["id", "limitsMax", "limitsDefault", "categories", "supportsRawSearch", "searchParams", "tvSearchParams", "movieSearchParams", "musicSearchParams", "bookSearchParams"] + + 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) -> IndexerCapabilityResource: + """Create an instance of IndexerCapabilityResource 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) + # override the default output from pydantic by calling `to_dict()` of each item in categories (list) + _items = [] + if self.categories: + for _item in self.categories: + if _item: + _items.append(_item.to_dict()) + _dict['categories'] = _items + # set to None if limits_max (nullable) is None + if self.limits_max is None: + _dict['limitsMax'] = None + + # set to None if limits_default (nullable) is None + if self.limits_default is None: + _dict['limitsDefault'] = None + + # set to None if categories (nullable) is None + if self.categories is None: + _dict['categories'] = None + + # set to None if search_params (nullable) is None + if self.search_params is None: + _dict['searchParams'] = None + + # set to None if tv_search_params (nullable) is None + if self.tv_search_params is None: + _dict['tvSearchParams'] = None + + # set to None if movie_search_params (nullable) is None + if self.movie_search_params is None: + _dict['movieSearchParams'] = None + + # set to None if music_search_params (nullable) is None + if self.music_search_params is None: + _dict['musicSearchParams'] = None + + # set to None if book_search_params (nullable) is None + if self.book_search_params is None: + _dict['bookSearchParams'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IndexerCapabilityResource: + """Create an instance of IndexerCapabilityResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return IndexerCapabilityResource.parse_obj(obj) + + _obj = IndexerCapabilityResource.parse_obj({ + "id": obj.get("id"), + "limits_max": obj.get("limitsMax"), + "limits_default": obj.get("limitsDefault"), + "categories": [IndexerCategory.from_dict(_item) for _item in obj.get("categories")] if obj.get("categories") is not None else None, + "supports_raw_search": obj.get("supportsRawSearch"), + "search_params": obj.get("searchParams"), + "tv_search_params": obj.get("tvSearchParams"), + "movie_search_params": obj.get("movieSearchParams"), + "music_search_params": obj.get("musicSearchParams"), + "book_search_params": obj.get("bookSearchParams") + }) + return _obj + diff --git a/prowlarr/models/indexer_category.py b/prowlarr/models/indexer_category.py new file mode 100644 index 0000000..b629129 --- /dev/null +++ b/prowlarr/models/indexer_category.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel + +class IndexerCategory(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + name: Optional[str] + description: Optional[str] + sub_categories: Optional[List] + __properties = ["id", "name", "description", "subCategories"] + + 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) -> IndexerCategory: + """Create an instance of IndexerCategory 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={ + "sub_categories", + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in sub_categories (list) + _items = [] + if self.sub_categories: + for _item in self.sub_categories: + if _item: + _items.append(_item.to_dict()) + _dict['subCategories'] = _items + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + # set to None if description (nullable) is None + if self.description is None: + _dict['description'] = None + + # set to None if sub_categories (nullable) is None + if self.sub_categories is None: + _dict['subCategories'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IndexerCategory: + """Create an instance of IndexerCategory from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return IndexerCategory.parse_obj(obj) + + _obj = IndexerCategory.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "description": obj.get("description"), + "sub_categories": [IndexerCategory.from_dict(_item) for _item in obj.get("subCategories")] if obj.get("subCategories") is not None else None + }) + return _obj + diff --git a/prowlarr/models/indexer_editor_resource.py b/prowlarr/models/indexer_editor_resource.py new file mode 100644 index 0000000..1a5874a --- /dev/null +++ b/prowlarr/models/indexer_editor_resource.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel +from prowlarr.models.apply_tags import ApplyTags + +class IndexerEditorResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + indexer_ids: Optional[List] + enable: Optional[str] + app_profile_id: Optional[int] + tags: Optional[List] + apply_tags: Optional[ApplyTags] + __properties = ["indexerIds", "enable", "appProfileId", "tags", "applyTags"] + + 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) -> IndexerEditorResource: + """Create an instance of IndexerEditorResource 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) + # set to None if indexer_ids (nullable) is None + if self.indexer_ids is None: + _dict['indexerIds'] = None + + # set to None if enable (nullable) is None + if self.enable is None: + _dict['enable'] = None + + # set to None if app_profile_id (nullable) is None + if self.app_profile_id is None: + _dict['appProfileId'] = None + + # set to None if tags (nullable) is None + if self.tags is None: + _dict['tags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IndexerEditorResource: + """Create an instance of IndexerEditorResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return IndexerEditorResource.parse_obj(obj) + + _obj = IndexerEditorResource.parse_obj({ + "indexer_ids": obj.get("indexerIds"), + "enable": obj.get("enable"), + "app_profile_id": obj.get("appProfileId"), + "tags": obj.get("tags"), + "apply_tags": obj.get("applyTags") + }) + return _obj + diff --git a/prowlarr/models/indexer_privacy.py b/prowlarr/models/indexer_privacy.py new file mode 100644 index 0000000..6155d6a --- /dev/null +++ b/prowlarr/models/indexer_privacy.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 IndexerPrivacy(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 + """ + + PUBLIC = 'public' + SEMI_PRIVATE = 'semiPrivate' + PRIVATE = 'private' + diff --git a/prowlarr/models/indexer_proxy_resource.py b/prowlarr/models/indexer_proxy_resource.py new file mode 100644 index 0000000..8e8db0c --- /dev/null +++ b/prowlarr/models/indexer_proxy_resource.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel +from prowlarr.models.field import Field +from prowlarr.models.provider_message import ProviderMessage + +class IndexerProxyResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + name: Optional[str] + fields: Optional[List] + implementation_name: Optional[str] + implementation: Optional[str] + config_contract: Optional[str] + info_link: Optional[str] + message: Optional[ProviderMessage] + tags: Optional[List] + presets: Optional[List] + link: Optional[str] + on_health_issue: Optional[bool] + supports_on_health_issue: Optional[bool] + include_health_warnings: Optional[bool] + test_command: Optional[str] + __properties = ["id", "name", "fields", "implementationName", "implementation", "configContract", "infoLink", "message", "tags", "presets", "link", "onHealthIssue", "supportsOnHealthIssue", "includeHealthWarnings", "testCommand"] + + 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) -> IndexerProxyResource: + """Create an instance of IndexerProxyResource 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) + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item in self.fields: + if _item: + _items.append(_item.to_dict()) + _dict['fields'] = _items + # override the default output from pydantic by calling `to_dict()` of message + if self.message: + _dict['message'] = self.message.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in presets (list) + _items = [] + if self.presets: + for _item in self.presets: + if _item: + _items.append(_item.to_dict()) + _dict['presets'] = _items + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + # set to None if fields (nullable) is None + if self.fields is None: + _dict['fields'] = None + + # set to None if implementation_name (nullable) is None + if self.implementation_name is None: + _dict['implementationName'] = None + + # set to None if implementation (nullable) is None + if self.implementation is None: + _dict['implementation'] = None + + # set to None if config_contract (nullable) is None + if self.config_contract is None: + _dict['configContract'] = None + + # set to None if info_link (nullable) is None + if self.info_link is None: + _dict['infoLink'] = None + + # set to None if tags (nullable) is None + if self.tags is None: + _dict['tags'] = None + + # set to None if presets (nullable) is None + if self.presets is None: + _dict['presets'] = None + + # set to None if link (nullable) is None + if self.link is None: + _dict['link'] = None + + # set to None if test_command (nullable) is None + if self.test_command is None: + _dict['testCommand'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IndexerProxyResource: + """Create an instance of IndexerProxyResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return IndexerProxyResource.parse_obj(obj) + + _obj = IndexerProxyResource.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "fields": [Field.from_dict(_item) for _item in obj.get("fields")] if obj.get("fields") is not None else None, + "implementation_name": obj.get("implementationName"), + "implementation": obj.get("implementation"), + "config_contract": obj.get("configContract"), + "info_link": obj.get("infoLink"), + "message": ProviderMessage.from_dict(obj.get("message")) if obj.get("message") is not None else None, + "tags": obj.get("tags"), + "presets": [IndexerProxyResource.from_dict(_item) for _item in obj.get("presets")] if obj.get("presets") is not None else None, + "link": obj.get("link"), + "on_health_issue": obj.get("onHealthIssue"), + "supports_on_health_issue": obj.get("supportsOnHealthIssue"), + "include_health_warnings": obj.get("includeHealthWarnings"), + "test_command": obj.get("testCommand") + }) + return _obj + diff --git a/prowlarr/models/indexer_resource.py b/prowlarr/models/indexer_resource.py new file mode 100644 index 0000000..436521d --- /dev/null +++ b/prowlarr/models/indexer_resource.py @@ -0,0 +1,219 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 datetime import datetime +from typing import List, Optional +from pydantic import BaseModel +from prowlarr.models.download_protocol import DownloadProtocol +from prowlarr.models.field import Field +from prowlarr.models.indexer_capability_resource import IndexerCapabilityResource +from prowlarr.models.indexer_privacy import IndexerPrivacy +from prowlarr.models.indexer_status_resource import IndexerStatusResource +from prowlarr.models.provider_message import ProviderMessage + +class IndexerResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + name: Optional[str] + fields: Optional[List] + implementation_name: Optional[str] + implementation: Optional[str] + config_contract: Optional[str] + info_link: Optional[str] + message: Optional[ProviderMessage] + tags: Optional[List] + presets: Optional[List] + indexer_urls: Optional[List] + legacy_urls: Optional[List] + definition_name: Optional[str] + description: Optional[str] + language: Optional[str] + encoding: Optional[str] + enable: Optional[bool] + redirect: Optional[bool] + supports_rss: Optional[bool] + supports_search: Optional[bool] + supports_redirect: Optional[bool] + app_profile_id: Optional[int] + protocol: Optional[DownloadProtocol] + privacy: Optional[IndexerPrivacy] + capabilities: Optional[IndexerCapabilityResource] + priority: Optional[int] + added: Optional[datetime] + status: Optional[IndexerStatusResource] + sort_name: Optional[str] + __properties = ["id", "name", "fields", "implementationName", "implementation", "configContract", "infoLink", "message", "tags", "presets", "indexerUrls", "legacyUrls", "definitionName", "description", "language", "encoding", "enable", "redirect", "supportsRss", "supportsSearch", "supportsRedirect", "appProfileId", "protocol", "privacy", "capabilities", "priority", "added", "status", "sortName"] + + 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) -> IndexerResource: + """Create an instance of IndexerResource 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) + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item in self.fields: + if _item: + _items.append(_item.to_dict()) + _dict['fields'] = _items + # override the default output from pydantic by calling `to_dict()` of message + if self.message: + _dict['message'] = self.message.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in presets (list) + _items = [] + if self.presets: + for _item in self.presets: + if _item: + _items.append(_item.to_dict()) + _dict['presets'] = _items + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict['capabilities'] = self.capabilities.to_dict() + # override the default output from pydantic by calling `to_dict()` of status + if self.status: + _dict['status'] = self.status.to_dict() + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + # set to None if fields (nullable) is None + if self.fields is None: + _dict['fields'] = None + + # set to None if implementation_name (nullable) is None + if self.implementation_name is None: + _dict['implementationName'] = None + + # set to None if implementation (nullable) is None + if self.implementation is None: + _dict['implementation'] = None + + # set to None if config_contract (nullable) is None + if self.config_contract is None: + _dict['configContract'] = None + + # set to None if info_link (nullable) is None + if self.info_link is None: + _dict['infoLink'] = None + + # set to None if tags (nullable) is None + if self.tags is None: + _dict['tags'] = None + + # set to None if presets (nullable) is None + if self.presets is None: + _dict['presets'] = None + + # set to None if indexer_urls (nullable) is None + if self.indexer_urls is None: + _dict['indexerUrls'] = None + + # set to None if legacy_urls (nullable) is None + if self.legacy_urls is None: + _dict['legacyUrls'] = None + + # set to None if definition_name (nullable) is None + if self.definition_name is None: + _dict['definitionName'] = None + + # set to None if description (nullable) is None + if self.description is None: + _dict['description'] = None + + # set to None if language (nullable) is None + if self.language is None: + _dict['language'] = None + + # set to None if encoding (nullable) is None + if self.encoding is None: + _dict['encoding'] = None + + # set to None if sort_name (nullable) is None + if self.sort_name is None: + _dict['sortName'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IndexerResource: + """Create an instance of IndexerResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return IndexerResource.parse_obj(obj) + + _obj = IndexerResource.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "fields": [Field.from_dict(_item) for _item in obj.get("fields")] if obj.get("fields") is not None else None, + "implementation_name": obj.get("implementationName"), + "implementation": obj.get("implementation"), + "config_contract": obj.get("configContract"), + "info_link": obj.get("infoLink"), + "message": ProviderMessage.from_dict(obj.get("message")) if obj.get("message") is not None else None, + "tags": obj.get("tags"), + "presets": [IndexerResource.from_dict(_item) for _item in obj.get("presets")] if obj.get("presets") is not None else None, + "indexer_urls": obj.get("indexerUrls"), + "legacy_urls": obj.get("legacyUrls"), + "definition_name": obj.get("definitionName"), + "description": obj.get("description"), + "language": obj.get("language"), + "encoding": obj.get("encoding"), + "enable": obj.get("enable"), + "redirect": obj.get("redirect"), + "supports_rss": obj.get("supportsRss"), + "supports_search": obj.get("supportsSearch"), + "supports_redirect": obj.get("supportsRedirect"), + "app_profile_id": obj.get("appProfileId"), + "protocol": obj.get("protocol"), + "privacy": obj.get("privacy"), + "capabilities": IndexerCapabilityResource.from_dict(obj.get("capabilities")) if obj.get("capabilities") is not None else None, + "priority": obj.get("priority"), + "added": obj.get("added"), + "status": IndexerStatusResource.from_dict(obj.get("status")) if obj.get("status") is not None else None, + "sort_name": obj.get("sortName") + }) + return _obj + diff --git a/prowlarr/models/indexer_statistics.py b/prowlarr/models/indexer_statistics.py new file mode 100644 index 0000000..22423f8 --- /dev/null +++ b/prowlarr/models/indexer_statistics.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class IndexerStatistics(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + indexer_id: Optional[int] + indexer_name: Optional[str] + average_response_time: Optional[int] + number_of_queries: Optional[int] + number_of_grabs: Optional[int] + number_of_rss_queries: Optional[int] + number_of_auth_queries: Optional[int] + number_of_failed_queries: Optional[int] + number_of_failed_grabs: Optional[int] + number_of_failed_rss_queries: Optional[int] + number_of_failed_auth_queries: Optional[int] + __properties = ["indexerId", "indexerName", "averageResponseTime", "numberOfQueries", "numberOfGrabs", "numberOfRssQueries", "numberOfAuthQueries", "numberOfFailedQueries", "numberOfFailedGrabs", "numberOfFailedRssQueries", "numberOfFailedAuthQueries"] + + 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) -> IndexerStatistics: + """Create an instance of IndexerStatistics 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) + # set to None if indexer_name (nullable) is None + if self.indexer_name is None: + _dict['indexerName'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IndexerStatistics: + """Create an instance of IndexerStatistics from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return IndexerStatistics.parse_obj(obj) + + _obj = IndexerStatistics.parse_obj({ + "indexer_id": obj.get("indexerId"), + "indexer_name": obj.get("indexerName"), + "average_response_time": obj.get("averageResponseTime"), + "number_of_queries": obj.get("numberOfQueries"), + "number_of_grabs": obj.get("numberOfGrabs"), + "number_of_rss_queries": obj.get("numberOfRssQueries"), + "number_of_auth_queries": obj.get("numberOfAuthQueries"), + "number_of_failed_queries": obj.get("numberOfFailedQueries"), + "number_of_failed_grabs": obj.get("numberOfFailedGrabs"), + "number_of_failed_rss_queries": obj.get("numberOfFailedRssQueries"), + "number_of_failed_auth_queries": obj.get("numberOfFailedAuthQueries") + }) + return _obj + diff --git a/prowlarr/models/indexer_stats_resource.py b/prowlarr/models/indexer_stats_resource.py new file mode 100644 index 0000000..8e25722 --- /dev/null +++ b/prowlarr/models/indexer_stats_resource.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel +from prowlarr.models.host_statistics import HostStatistics +from prowlarr.models.indexer_statistics import IndexerStatistics +from prowlarr.models.user_agent_statistics import UserAgentStatistics + +class IndexerStatsResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + indexers: Optional[List] + user_agents: Optional[List] + hosts: Optional[List] + __properties = ["id", "indexers", "userAgents", "hosts"] + + 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) -> IndexerStatsResource: + """Create an instance of IndexerStatsResource 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) + # override the default output from pydantic by calling `to_dict()` of each item in indexers (list) + _items = [] + if self.indexers: + for _item in self.indexers: + if _item: + _items.append(_item.to_dict()) + _dict['indexers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in user_agents (list) + _items = [] + if self.user_agents: + for _item in self.user_agents: + if _item: + _items.append(_item.to_dict()) + _dict['userAgents'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in hosts (list) + _items = [] + if self.hosts: + for _item in self.hosts: + if _item: + _items.append(_item.to_dict()) + _dict['hosts'] = _items + # set to None if indexers (nullable) is None + if self.indexers is None: + _dict['indexers'] = None + + # set to None if user_agents (nullable) is None + if self.user_agents is None: + _dict['userAgents'] = None + + # set to None if hosts (nullable) is None + if self.hosts is None: + _dict['hosts'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IndexerStatsResource: + """Create an instance of IndexerStatsResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return IndexerStatsResource.parse_obj(obj) + + _obj = IndexerStatsResource.parse_obj({ + "id": obj.get("id"), + "indexers": [IndexerStatistics.from_dict(_item) for _item in obj.get("indexers")] if obj.get("indexers") is not None else None, + "user_agents": [UserAgentStatistics.from_dict(_item) for _item in obj.get("userAgents")] if obj.get("userAgents") is not None else None, + "hosts": [HostStatistics.from_dict(_item) for _item in obj.get("hosts")] if obj.get("hosts") is not None else None + }) + return _obj + diff --git a/prowlarr/models/indexer_status_resource.py b/prowlarr/models/indexer_status_resource.py new file mode 100644 index 0000000..cc51f9b --- /dev/null +++ b/prowlarr/models/indexer_status_resource.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 datetime import datetime +from typing import Optional +from pydantic import BaseModel + +class IndexerStatusResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + indexer_id: Optional[int] + disabled_till: Optional[datetime] + __properties = ["id", "indexerId", "disabledTill"] + + 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) -> IndexerStatusResource: + """Create an instance of IndexerStatusResource 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) + # set to None if disabled_till (nullable) is None + if self.disabled_till is None: + _dict['disabledTill'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IndexerStatusResource: + """Create an instance of IndexerStatusResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return IndexerStatusResource.parse_obj(obj) + + _obj = IndexerStatusResource.parse_obj({ + "id": obj.get("id"), + "indexer_id": obj.get("indexerId"), + "disabled_till": obj.get("disabledTill") + }) + return _obj + diff --git a/prowlarr/models/localization_option.py b/prowlarr/models/localization_option.py new file mode 100644 index 0000000..5c6a76f --- /dev/null +++ b/prowlarr/models/localization_option.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class LocalizationOption(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + name: Optional[str] + value: Optional[str] + __properties = ["name", "value"] + + 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) -> LocalizationOption: + """Create an instance of LocalizationOption 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) + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + # set to None if value (nullable) is None + if self.value is None: + _dict['value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> LocalizationOption: + """Create an instance of LocalizationOption from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return LocalizationOption.parse_obj(obj) + + _obj = LocalizationOption.parse_obj({ + "name": obj.get("name"), + "value": obj.get("value") + }) + return _obj + diff --git a/prowlarr/models/log_file_resource.py b/prowlarr/models/log_file_resource.py new file mode 100644 index 0000000..6e6d956 --- /dev/null +++ b/prowlarr/models/log_file_resource.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 datetime import datetime +from typing import Optional +from pydantic import BaseModel + +class LogFileResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + filename: Optional[str] + last_write_time: Optional[datetime] + contents_url: Optional[str] + download_url: Optional[str] + __properties = ["id", "filename", "lastWriteTime", "contentsUrl", "downloadUrl"] + + 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) -> LogFileResource: + """Create an instance of LogFileResource 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) + # set to None if filename (nullable) is None + if self.filename is None: + _dict['filename'] = None + + # set to None if contents_url (nullable) is None + if self.contents_url is None: + _dict['contentsUrl'] = None + + # set to None if download_url (nullable) is None + if self.download_url is None: + _dict['downloadUrl'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> LogFileResource: + """Create an instance of LogFileResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return LogFileResource.parse_obj(obj) + + _obj = LogFileResource.parse_obj({ + "id": obj.get("id"), + "filename": obj.get("filename"), + "last_write_time": obj.get("lastWriteTime"), + "contents_url": obj.get("contentsUrl"), + "download_url": obj.get("downloadUrl") + }) + return _obj + diff --git a/prowlarr/models/log_resource.py b/prowlarr/models/log_resource.py new file mode 100644 index 0000000..285e0af --- /dev/null +++ b/prowlarr/models/log_resource.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 datetime import datetime +from typing import Optional +from pydantic import BaseModel + +class LogResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + time: Optional[datetime] + exception: Optional[str] + exception_type: Optional[str] + level: Optional[str] + logger: Optional[str] + message: Optional[str] + method: Optional[str] + __properties = ["id", "time", "exception", "exceptionType", "level", "logger", "message", "method"] + + 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) -> LogResource: + """Create an instance of LogResource 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) + # set to None if exception (nullable) is None + if self.exception is None: + _dict['exception'] = None + + # set to None if exception_type (nullable) is None + if self.exception_type is None: + _dict['exceptionType'] = None + + # set to None if level (nullable) is None + if self.level is None: + _dict['level'] = None + + # set to None if logger (nullable) is None + if self.logger is None: + _dict['logger'] = None + + # set to None if message (nullable) is None + if self.message is None: + _dict['message'] = None + + # set to None if method (nullable) is None + if self.method is None: + _dict['method'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> LogResource: + """Create an instance of LogResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return LogResource.parse_obj(obj) + + _obj = LogResource.parse_obj({ + "id": obj.get("id"), + "time": obj.get("time"), + "exception": obj.get("exception"), + "exception_type": obj.get("exceptionType"), + "level": obj.get("level"), + "logger": obj.get("logger"), + "message": obj.get("message"), + "method": obj.get("method") + }) + return _obj + diff --git a/prowlarr/models/log_resource_paging_resource.py b/prowlarr/models/log_resource_paging_resource.py new file mode 100644 index 0000000..e429f39 --- /dev/null +++ b/prowlarr/models/log_resource_paging_resource.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel +from prowlarr.models.log_resource import LogResource +from prowlarr.models.paging_resource_filter import PagingResourceFilter +from prowlarr.models.sort_direction import SortDirection + +class LogResourcePagingResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + page: Optional[int] + page_size: Optional[int] + sort_key: Optional[str] + sort_direction: Optional[SortDirection] + filters: Optional[List] + total_records: Optional[int] + records: Optional[List] + __properties = ["page", "pageSize", "sortKey", "sortDirection", "filters", "totalRecords", "records"] + + 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) -> LogResourcePagingResource: + """Create an instance of LogResourcePagingResource 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) + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item in self.filters: + if _item: + _items.append(_item.to_dict()) + _dict['filters'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in records (list) + _items = [] + if self.records: + for _item in self.records: + if _item: + _items.append(_item.to_dict()) + _dict['records'] = _items + # set to None if sort_key (nullable) is None + if self.sort_key is None: + _dict['sortKey'] = None + + # set to None if filters (nullable) is None + if self.filters is None: + _dict['filters'] = None + + # set to None if records (nullable) is None + if self.records is None: + _dict['records'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> LogResourcePagingResource: + """Create an instance of LogResourcePagingResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return LogResourcePagingResource.parse_obj(obj) + + _obj = LogResourcePagingResource.parse_obj({ + "page": obj.get("page"), + "page_size": obj.get("pageSize"), + "sort_key": obj.get("sortKey"), + "sort_direction": obj.get("sortDirection"), + "filters": [PagingResourceFilter.from_dict(_item) for _item in obj.get("filters")] if obj.get("filters") is not None else None, + "total_records": obj.get("totalRecords"), + "records": [LogResource.from_dict(_item) for _item in obj.get("records")] if obj.get("records") is not None else None + }) + return _obj + diff --git a/prowlarr/models/movie_search_param.py b/prowlarr/models/movie_search_param.py new file mode 100644 index 0000000..87ffeb7 --- /dev/null +++ b/prowlarr/models/movie_search_param.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 MovieSearchParam(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 + """ + + Q = 'q' + IMDB_ID = 'imdbId' + TMDB_ID = 'tmdbId' + IMDB_TITLE = 'imdbTitle' + IMDB_YEAR = 'imdbYear' + TRAKT_ID = 'traktId' + GENRE = 'genre' + DOUBAN_ID = 'doubanId' + YEAR = 'year' + diff --git a/prowlarr/models/music_search_param.py b/prowlarr/models/music_search_param.py new file mode 100644 index 0000000..d1503af --- /dev/null +++ b/prowlarr/models/music_search_param.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 MusicSearchParam(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 + """ + + Q = 'q' + ALBUM = 'album' + ARTIST = 'artist' + LABEL = 'label' + YEAR = 'year' + GENRE = 'genre' + TRACK = 'track' + diff --git a/prowlarr/models/notification_resource.py b/prowlarr/models/notification_resource.py new file mode 100644 index 0000000..ba9343a --- /dev/null +++ b/prowlarr/models/notification_resource.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel +from prowlarr.models.field import Field +from prowlarr.models.provider_message import ProviderMessage + +class NotificationResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + name: Optional[str] + fields: Optional[List] + implementation_name: Optional[str] + implementation: Optional[str] + config_contract: Optional[str] + info_link: Optional[str] + message: Optional[ProviderMessage] + tags: Optional[List] + presets: Optional[List] + link: Optional[str] + on_health_issue: Optional[bool] + on_application_update: Optional[bool] + supports_on_health_issue: Optional[bool] + include_health_warnings: Optional[bool] + supports_on_application_update: Optional[bool] + test_command: Optional[str] + __properties = ["id", "name", "fields", "implementationName", "implementation", "configContract", "infoLink", "message", "tags", "presets", "link", "onHealthIssue", "onApplicationUpdate", "supportsOnHealthIssue", "includeHealthWarnings", "supportsOnApplicationUpdate", "testCommand"] + + 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) -> NotificationResource: + """Create an instance of NotificationResource 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) + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item in self.fields: + if _item: + _items.append(_item.to_dict()) + _dict['fields'] = _items + # override the default output from pydantic by calling `to_dict()` of message + if self.message: + _dict['message'] = self.message.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in presets (list) + _items = [] + if self.presets: + for _item in self.presets: + if _item: + _items.append(_item.to_dict()) + _dict['presets'] = _items + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + # set to None if fields (nullable) is None + if self.fields is None: + _dict['fields'] = None + + # set to None if implementation_name (nullable) is None + if self.implementation_name is None: + _dict['implementationName'] = None + + # set to None if implementation (nullable) is None + if self.implementation is None: + _dict['implementation'] = None + + # set to None if config_contract (nullable) is None + if self.config_contract is None: + _dict['configContract'] = None + + # set to None if info_link (nullable) is None + if self.info_link is None: + _dict['infoLink'] = None + + # set to None if tags (nullable) is None + if self.tags is None: + _dict['tags'] = None + + # set to None if presets (nullable) is None + if self.presets is None: + _dict['presets'] = None + + # set to None if link (nullable) is None + if self.link is None: + _dict['link'] = None + + # set to None if test_command (nullable) is None + if self.test_command is None: + _dict['testCommand'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> NotificationResource: + """Create an instance of NotificationResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return NotificationResource.parse_obj(obj) + + _obj = NotificationResource.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "fields": [Field.from_dict(_item) for _item in obj.get("fields")] if obj.get("fields") is not None else None, + "implementation_name": obj.get("implementationName"), + "implementation": obj.get("implementation"), + "config_contract": obj.get("configContract"), + "info_link": obj.get("infoLink"), + "message": ProviderMessage.from_dict(obj.get("message")) if obj.get("message") is not None else None, + "tags": obj.get("tags"), + "presets": [NotificationResource.from_dict(_item) for _item in obj.get("presets")] if obj.get("presets") is not None else None, + "link": obj.get("link"), + "on_health_issue": obj.get("onHealthIssue"), + "on_application_update": obj.get("onApplicationUpdate"), + "supports_on_health_issue": obj.get("supportsOnHealthIssue"), + "include_health_warnings": obj.get("includeHealthWarnings"), + "supports_on_application_update": obj.get("supportsOnApplicationUpdate"), + "test_command": obj.get("testCommand") + }) + return _obj + diff --git a/prowlarr/models/paging_resource_filter.py b/prowlarr/models/paging_resource_filter.py new file mode 100644 index 0000000..39b33b7 --- /dev/null +++ b/prowlarr/models/paging_resource_filter.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class PagingResourceFilter(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + key: Optional[str] + value: Optional[str] + __properties = ["key", "value"] + + 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) -> PagingResourceFilter: + """Create an instance of PagingResourceFilter 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) + # set to None if key (nullable) is None + if self.key is None: + _dict['key'] = None + + # set to None if value (nullable) is None + if self.value is None: + _dict['value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PagingResourceFilter: + """Create an instance of PagingResourceFilter from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return PagingResourceFilter.parse_obj(obj) + + _obj = PagingResourceFilter.parse_obj({ + "key": obj.get("key"), + "value": obj.get("value") + }) + return _obj + diff --git a/prowlarr/models/provider_message.py b/prowlarr/models/provider_message.py new file mode 100644 index 0000000..afc89de --- /dev/null +++ b/prowlarr/models/provider_message.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel +from prowlarr.models.provider_message_type import ProviderMessageType + +class ProviderMessage(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + message: Optional[str] + type: Optional[ProviderMessageType] + __properties = ["message", "type"] + + 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) -> ProviderMessage: + """Create an instance of ProviderMessage 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) + # set to None if message (nullable) is None + if self.message is None: + _dict['message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ProviderMessage: + """Create an instance of ProviderMessage from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return ProviderMessage.parse_obj(obj) + + _obj = ProviderMessage.parse_obj({ + "message": obj.get("message"), + "type": obj.get("type") + }) + return _obj + diff --git a/prowlarr/models/provider_message_type.py b/prowlarr/models/provider_message_type.py new file mode 100644 index 0000000..e70bae0 --- /dev/null +++ b/prowlarr/models/provider_message_type.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 ProviderMessageType(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 + """ + + INFO = 'info' + WARNING = 'warning' + ERROR = 'error' + diff --git a/prowlarr/models/proxy_type.py b/prowlarr/models/proxy_type.py new file mode 100644 index 0000000..9417ff7 --- /dev/null +++ b/prowlarr/models/proxy_type.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 ProxyType(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 + """ + + HTTP = 'http' + SOCKS4 = 'socks4' + SOCKS5 = 'socks5' + diff --git a/prowlarr/models/release_resource.py b/prowlarr/models/release_resource.py new file mode 100644 index 0000000..01a27c6 --- /dev/null +++ b/prowlarr/models/release_resource.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 datetime import datetime +from typing import List, Optional +from pydantic import BaseModel +from prowlarr.models.download_protocol import DownloadProtocol +from prowlarr.models.indexer_category import IndexerCategory + +class ReleaseResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + guid: Optional[str] + age: Optional[int] + age_hours: Optional[float] + age_minutes: Optional[float] + size: Optional[int] + files: Optional[int] + grabs: Optional[int] + indexer_id: Optional[int] + indexer: Optional[str] + sub_group: Optional[str] + release_hash: Optional[str] + title: Optional[str] + approved: Optional[bool] + imdb_id: Optional[int] + publish_date: Optional[datetime] + comment_url: Optional[str] + download_url: Optional[str] + info_url: Optional[str] + poster_url: Optional[str] + indexer_flags: Optional[List] + categories: Optional[List] + magnet_url: Optional[str] + info_hash: Optional[str] + seeders: Optional[int] + leechers: Optional[int] + protocol: Optional[DownloadProtocol] + __properties = ["id", "guid", "age", "ageHours", "ageMinutes", "size", "files", "grabs", "indexerId", "indexer", "subGroup", "releaseHash", "title", "approved", "imdbId", "publishDate", "commentUrl", "downloadUrl", "infoUrl", "posterUrl", "indexerFlags", "categories", "magnetUrl", "infoHash", "seeders", "leechers", "protocol"] + + 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) -> ReleaseResource: + """Create an instance of ReleaseResource 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) + # override the default output from pydantic by calling `to_dict()` of each item in categories (list) + _items = [] + if self.categories: + for _item in self.categories: + if _item: + _items.append(_item.to_dict()) + _dict['categories'] = _items + # set to None if guid (nullable) is None + if self.guid is None: + _dict['guid'] = None + + # set to None if files (nullable) is None + if self.files is None: + _dict['files'] = None + + # set to None if grabs (nullable) is None + if self.grabs is None: + _dict['grabs'] = None + + # set to None if indexer (nullable) is None + if self.indexer is None: + _dict['indexer'] = None + + # set to None if sub_group (nullable) is None + if self.sub_group is None: + _dict['subGroup'] = None + + # set to None if release_hash (nullable) is None + if self.release_hash is None: + _dict['releaseHash'] = None + + # set to None if title (nullable) is None + if self.title is None: + _dict['title'] = None + + # set to None if comment_url (nullable) is None + if self.comment_url is None: + _dict['commentUrl'] = None + + # set to None if download_url (nullable) is None + if self.download_url is None: + _dict['downloadUrl'] = None + + # set to None if info_url (nullable) is None + if self.info_url is None: + _dict['infoUrl'] = None + + # set to None if poster_url (nullable) is None + if self.poster_url is None: + _dict['posterUrl'] = None + + # set to None if indexer_flags (nullable) is None + if self.indexer_flags is None: + _dict['indexerFlags'] = None + + # set to None if categories (nullable) is None + if self.categories is None: + _dict['categories'] = None + + # set to None if magnet_url (nullable) is None + if self.magnet_url is None: + _dict['magnetUrl'] = None + + # set to None if info_hash (nullable) is None + if self.info_hash is None: + _dict['infoHash'] = None + + # set to None if seeders (nullable) is None + if self.seeders is None: + _dict['seeders'] = None + + # set to None if leechers (nullable) is None + if self.leechers is None: + _dict['leechers'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ReleaseResource: + """Create an instance of ReleaseResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return ReleaseResource.parse_obj(obj) + + _obj = ReleaseResource.parse_obj({ + "id": obj.get("id"), + "guid": obj.get("guid"), + "age": obj.get("age"), + "age_hours": obj.get("ageHours"), + "age_minutes": obj.get("ageMinutes"), + "size": obj.get("size"), + "files": obj.get("files"), + "grabs": obj.get("grabs"), + "indexer_id": obj.get("indexerId"), + "indexer": obj.get("indexer"), + "sub_group": obj.get("subGroup"), + "release_hash": obj.get("releaseHash"), + "title": obj.get("title"), + "approved": obj.get("approved"), + "imdb_id": obj.get("imdbId"), + "publish_date": obj.get("publishDate"), + "comment_url": obj.get("commentUrl"), + "download_url": obj.get("downloadUrl"), + "info_url": obj.get("infoUrl"), + "poster_url": obj.get("posterUrl"), + "indexer_flags": obj.get("indexerFlags"), + "categories": [IndexerCategory.from_dict(_item) for _item in obj.get("categories")] if obj.get("categories") is not None else None, + "magnet_url": obj.get("magnetUrl"), + "info_hash": obj.get("infoHash"), + "seeders": obj.get("seeders"), + "leechers": obj.get("leechers"), + "protocol": obj.get("protocol") + }) + return _obj + diff --git a/prowlarr/models/search_param.py b/prowlarr/models/search_param.py new file mode 100644 index 0000000..935fcc1 --- /dev/null +++ b/prowlarr/models/search_param.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 SearchParam(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 + """ + + Q = 'q' + diff --git a/prowlarr/models/select_option.py b/prowlarr/models/select_option.py new file mode 100644 index 0000000..137fc2b --- /dev/null +++ b/prowlarr/models/select_option.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class SelectOption(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + value: Optional[int] + name: Optional[str] + order: Optional[int] + hint: Optional[str] + parent_value: Optional[int] + __properties = ["value", "name", "order", "hint", "parentValue"] + + 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) -> SelectOption: + """Create an instance of SelectOption 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) + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + # set to None if hint (nullable) is None + if self.hint is None: + _dict['hint'] = None + + # set to None if parent_value (nullable) is None + if self.parent_value is None: + _dict['parentValue'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SelectOption: + """Create an instance of SelectOption from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return SelectOption.parse_obj(obj) + + _obj = SelectOption.parse_obj({ + "value": obj.get("value"), + "name": obj.get("name"), + "order": obj.get("order"), + "hint": obj.get("hint"), + "parent_value": obj.get("parentValue") + }) + return _obj + diff --git a/prowlarr/models/sort_direction.py b/prowlarr/models/sort_direction.py new file mode 100644 index 0000000..9d76b9f --- /dev/null +++ b/prowlarr/models/sort_direction.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 SortDirection(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 + """ + + DEFAULT = 'default' + ASCENDING = 'ascending' + DESCENDING = 'descending' + diff --git a/prowlarr/models/tag_details_resource.py b/prowlarr/models/tag_details_resource.py new file mode 100644 index 0000000..fcc14de --- /dev/null +++ b/prowlarr/models/tag_details_resource.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel + +class TagDetailsResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + label: Optional[str] + notification_ids: Optional[List] + indexer_ids: Optional[List] + indexer_proxy_ids: Optional[List] + __properties = ["id", "label", "notificationIds", "indexerIds", "indexerProxyIds"] + + 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) -> TagDetailsResource: + """Create an instance of TagDetailsResource 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) + # set to None if label (nullable) is None + if self.label is None: + _dict['label'] = None + + # set to None if notification_ids (nullable) is None + if self.notification_ids is None: + _dict['notificationIds'] = None + + # set to None if indexer_ids (nullable) is None + if self.indexer_ids is None: + _dict['indexerIds'] = None + + # set to None if indexer_proxy_ids (nullable) is None + if self.indexer_proxy_ids is None: + _dict['indexerProxyIds'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TagDetailsResource: + """Create an instance of TagDetailsResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return TagDetailsResource.parse_obj(obj) + + _obj = TagDetailsResource.parse_obj({ + "id": obj.get("id"), + "label": obj.get("label"), + "notification_ids": obj.get("notificationIds"), + "indexer_ids": obj.get("indexerIds"), + "indexer_proxy_ids": obj.get("indexerProxyIds") + }) + return _obj + diff --git a/prowlarr/models/tag_resource.py b/prowlarr/models/tag_resource.py new file mode 100644 index 0000000..8de3129 --- /dev/null +++ b/prowlarr/models/tag_resource.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class TagResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + label: Optional[str] + __properties = ["id", "label"] + + 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) -> TagResource: + """Create an instance of TagResource 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) + # set to None if label (nullable) is None + if self.label is None: + _dict['label'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TagResource: + """Create an instance of TagResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return TagResource.parse_obj(obj) + + _obj = TagResource.parse_obj({ + "id": obj.get("id"), + "label": obj.get("label") + }) + return _obj + diff --git a/prowlarr/models/task_resource.py b/prowlarr/models/task_resource.py new file mode 100644 index 0000000..d4b8c63 --- /dev/null +++ b/prowlarr/models/task_resource.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 datetime import datetime +from typing import Optional +from pydantic import BaseModel +from prowlarr.models.time_span import TimeSpan + +class TaskResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + name: Optional[str] + task_name: Optional[str] + interval: Optional[int] + last_execution: Optional[datetime] + last_start_time: Optional[datetime] + next_execution: Optional[datetime] + last_duration: Optional[TimeSpan] + __properties = ["id", "name", "taskName", "interval", "lastExecution", "lastStartTime", "nextExecution", "lastDuration"] + + 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) -> TaskResource: + """Create an instance of TaskResource 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) + # override the default output from pydantic by calling `to_dict()` of last_duration + if self.last_duration: + _dict['lastDuration'] = self.last_duration.to_dict() + # set to None if name (nullable) is None + if self.name is None: + _dict['name'] = None + + # set to None if task_name (nullable) is None + if self.task_name is None: + _dict['taskName'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TaskResource: + """Create an instance of TaskResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return TaskResource.parse_obj(obj) + + _obj = TaskResource.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "task_name": obj.get("taskName"), + "interval": obj.get("interval"), + "last_execution": obj.get("lastExecution"), + "last_start_time": obj.get("lastStartTime"), + "next_execution": obj.get("nextExecution"), + "last_duration": TimeSpan.from_dict(obj.get("lastDuration")) if obj.get("lastDuration") is not None else None + }) + return _obj + diff --git a/prowlarr/models/time_span.py b/prowlarr/models/time_span.py new file mode 100644 index 0000000..c9dce7c --- /dev/null +++ b/prowlarr/models/time_span.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class TimeSpan(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + ticks: Optional[int] + days: Optional[int] + hours: Optional[int] + milliseconds: Optional[int] + minutes: Optional[int] + seconds: Optional[int] + total_days: Optional[float] + total_hours: Optional[float] + total_milliseconds: Optional[float] + total_minutes: Optional[float] + total_seconds: Optional[float] + __properties = ["ticks", "days", "hours", "milliseconds", "minutes", "seconds", "totalDays", "totalHours", "totalMilliseconds", "totalMinutes", "totalSeconds"] + + 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) -> TimeSpan: + """Create an instance of TimeSpan 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={ + "days", + "hours", + "milliseconds", + "minutes", + "seconds", + "total_days", + "total_hours", + "total_milliseconds", + "total_minutes", + "total_seconds", + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TimeSpan: + """Create an instance of TimeSpan from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return TimeSpan.parse_obj(obj) + + _obj = TimeSpan.parse_obj({ + "ticks": obj.get("ticks"), + "days": obj.get("days"), + "hours": obj.get("hours"), + "milliseconds": obj.get("milliseconds"), + "minutes": obj.get("minutes"), + "seconds": obj.get("seconds"), + "total_days": obj.get("totalDays"), + "total_hours": obj.get("totalHours"), + "total_milliseconds": obj.get("totalMilliseconds"), + "total_minutes": obj.get("totalMinutes"), + "total_seconds": obj.get("totalSeconds") + }) + return _obj + diff --git a/prowlarr/models/tv_search_param.py b/prowlarr/models/tv_search_param.py new file mode 100644 index 0000000..50fb9ba --- /dev/null +++ b/prowlarr/models/tv_search_param.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 TvSearchParam(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 + """ + + Q = 'q' + SEASON = 'season' + EP = 'ep' + IMDB_ID = 'imdbId' + TVDB_ID = 'tvdbId' + R_ID = 'rId' + TV_MAZE_ID = 'tvMazeId' + TRAKT_ID = 'traktId' + TMDB_ID = 'tmdbId' + DOUBAN_ID = 'doubanId' + GENRE = 'genre' + YEAR = 'year' + diff --git a/prowlarr/models/ui_config_resource.py b/prowlarr/models/ui_config_resource.py new file mode 100644 index 0000000..1ec3f27 --- /dev/null +++ b/prowlarr/models/ui_config_resource.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class UiConfigResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + first_day_of_week: Optional[int] + calendar_week_column_header: Optional[str] + short_date_format: Optional[str] + long_date_format: Optional[str] + time_format: Optional[str] + show_relative_dates: Optional[bool] + enable_color_impaired_mode: Optional[bool] + ui_language: Optional[str] + theme: Optional[str] + __properties = ["id", "firstDayOfWeek", "calendarWeekColumnHeader", "shortDateFormat", "longDateFormat", "timeFormat", "showRelativeDates", "enableColorImpairedMode", "uiLanguage", "theme"] + + 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) -> UiConfigResource: + """Create an instance of UiConfigResource 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) + # set to None if calendar_week_column_header (nullable) is None + if self.calendar_week_column_header is None: + _dict['calendarWeekColumnHeader'] = None + + # set to None if short_date_format (nullable) is None + if self.short_date_format is None: + _dict['shortDateFormat'] = None + + # set to None if long_date_format (nullable) is None + if self.long_date_format is None: + _dict['longDateFormat'] = None + + # set to None if time_format (nullable) is None + if self.time_format is None: + _dict['timeFormat'] = None + + # set to None if ui_language (nullable) is None + if self.ui_language is None: + _dict['uiLanguage'] = None + + # set to None if theme (nullable) is None + if self.theme is None: + _dict['theme'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UiConfigResource: + """Create an instance of UiConfigResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return UiConfigResource.parse_obj(obj) + + _obj = UiConfigResource.parse_obj({ + "id": obj.get("id"), + "first_day_of_week": obj.get("firstDayOfWeek"), + "calendar_week_column_header": obj.get("calendarWeekColumnHeader"), + "short_date_format": obj.get("shortDateFormat"), + "long_date_format": obj.get("longDateFormat"), + "time_format": obj.get("timeFormat"), + "show_relative_dates": obj.get("showRelativeDates"), + "enable_color_impaired_mode": obj.get("enableColorImpairedMode"), + "ui_language": obj.get("uiLanguage"), + "theme": obj.get("theme") + }) + return _obj + diff --git a/prowlarr/models/update_changes.py b/prowlarr/models/update_changes.py new file mode 100644 index 0000000..633b8f8 --- /dev/null +++ b/prowlarr/models/update_changes.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 List, Optional +from pydantic import BaseModel + +class UpdateChanges(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + new: Optional[List] + fixed: Optional[List] + __properties = ["new", "fixed"] + + 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) -> UpdateChanges: + """Create an instance of UpdateChanges 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) + # set to None if new (nullable) is None + if self.new is None: + _dict['new'] = None + + # set to None if fixed (nullable) is None + if self.fixed is None: + _dict['fixed'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateChanges: + """Create an instance of UpdateChanges from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return UpdateChanges.parse_obj(obj) + + _obj = UpdateChanges.parse_obj({ + "new": obj.get("new"), + "fixed": obj.get("fixed") + }) + return _obj + diff --git a/prowlarr/models/update_mechanism.py b/prowlarr/models/update_mechanism.py new file mode 100644 index 0000000..76dc06b --- /dev/null +++ b/prowlarr/models/update_mechanism.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 UpdateMechanism(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 + """ + + BUILT_IN = 'builtIn' + SCRIPT = 'script' + EXTERNAL = 'external' + APT = 'apt' + DOCKER = 'docker' + diff --git a/prowlarr/models/update_resource.py b/prowlarr/models/update_resource.py new file mode 100644 index 0000000..e1a4d04 --- /dev/null +++ b/prowlarr/models/update_resource.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 datetime import datetime +from typing import Optional +from pydantic import BaseModel +from prowlarr.models.update_changes import UpdateChanges + +class UpdateResource(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + id: Optional[int] + version: Optional[str] + branch: Optional[str] + release_date: Optional[datetime] + file_name: Optional[str] + url: Optional[str] + installed: Optional[bool] + installed_on: Optional[datetime] + installable: Optional[bool] + latest: Optional[bool] + changes: Optional[UpdateChanges] + hash: Optional[str] + __properties = ["id", "version", "branch", "releaseDate", "fileName", "url", "installed", "installedOn", "installable", "latest", "changes", "hash"] + + 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) -> UpdateResource: + """Create an instance of UpdateResource 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) + # override the default output from pydantic by calling `to_dict()` of changes + if self.changes: + _dict['changes'] = self.changes.to_dict() + # set to None if branch (nullable) is None + if self.branch is None: + _dict['branch'] = None + + # set to None if file_name (nullable) is None + if self.file_name is None: + _dict['fileName'] = None + + # set to None if url (nullable) is None + if self.url is None: + _dict['url'] = None + + # set to None if installed_on (nullable) is None + if self.installed_on is None: + _dict['installedOn'] = None + + # set to None if hash (nullable) is None + if self.hash is None: + _dict['hash'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateResource: + """Create an instance of UpdateResource from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return UpdateResource.parse_obj(obj) + + _obj = UpdateResource.parse_obj({ + "id": obj.get("id"), + "version": obj.get("version"), + "branch": obj.get("branch"), + "release_date": obj.get("releaseDate"), + "file_name": obj.get("fileName"), + "url": obj.get("url"), + "installed": obj.get("installed"), + "installed_on": obj.get("installedOn"), + "installable": obj.get("installable"), + "latest": obj.get("latest"), + "changes": UpdateChanges.from_dict(obj.get("changes")) if obj.get("changes") is not None else None, + "hash": obj.get("hash") + }) + return _obj + diff --git a/prowlarr/models/user_agent_statistics.py b/prowlarr/models/user_agent_statistics.py new file mode 100644 index 0000000..2b7e466 --- /dev/null +++ b/prowlarr/models/user_agent_statistics.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class UserAgentStatistics(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + user_agent: Optional[str] + number_of_queries: Optional[int] + number_of_grabs: Optional[int] + __properties = ["userAgent", "numberOfQueries", "numberOfGrabs"] + + 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) -> UserAgentStatistics: + """Create an instance of UserAgentStatistics 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) + # set to None if user_agent (nullable) is None + if self.user_agent is None: + _dict['userAgent'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UserAgentStatistics: + """Create an instance of UserAgentStatistics from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return UserAgentStatistics.parse_obj(obj) + + _obj = UserAgentStatistics.parse_obj({ + "user_agent": obj.get("userAgent"), + "number_of_queries": obj.get("numberOfQueries"), + "number_of_grabs": obj.get("numberOfGrabs") + }) + return _obj + diff --git a/prowlarr/models/version.py b/prowlarr/models/version.py new file mode 100644 index 0000000..a8db110 --- /dev/null +++ b/prowlarr/models/version.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.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 Optional +from pydantic import BaseModel + +class Version(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + major: Optional[int] + minor: Optional[int] + build: Optional[int] + revision: Optional[int] + major_revision: Optional[int] + minor_revision: Optional[int] + __properties = ["major", "minor", "build", "revision", "majorRevision", "minorRevision"] + + 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) -> Version: + """Create an instance of Version 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={ + "major", + "minor", + "build", + "revision", + "major_revision", + "minor_revision", + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Version: + """Create an instance of Version from a dict""" + if obj is None: + return None + + if type(obj) is not dict: + return Version.parse_obj(obj) + + _obj = Version.parse_obj({ + "major": obj.get("major"), + "minor": obj.get("minor"), + "build": obj.get("build"), + "revision": obj.get("revision"), + "major_revision": obj.get("majorRevision"), + "minor_revision": obj.get("minorRevision") + }) + return _obj + diff --git a/prowlarr/rest.py b/prowlarr/rest.py new file mode 100644 index 0000000..7e66e1f --- /dev/null +++ b/prowlarr/rest.py @@ -0,0 +1,296 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from prowlarr.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0d9ec98 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,24 @@ +# coding: utf-8 + +[project] +name = "prowlarr-py" +version = "0.0.1" +dependencies = [ + "urllib3 >= 1.25.3", + "python-dateutil", + "requests>=2.28.1", + "pydantic>=1.10.2", + "aenum" +] +description = "Prowlarr API wrapper" +readme = "README.md" +requires-python = ">=3.7" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", + "Operating System :: OS Independent", +] + +[project.urls] +"Homepage" = "https://github.com/devopsarr/prowlarr-py" +"Bug Tracker" = "https://github.com/devopsarr/prowlarr-py/issues" \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..9bbf298 --- /dev/null +++ b/setup.py @@ -0,0 +1,15 @@ +# coding: utf-8 + +""" + Prowlarr + + Prowlarr API docs # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from setuptools import setup + +setup()