From d6b8a60d280d697bd59aaef848b2a7fe80d6b556 Mon Sep 17 00:00:00 2001 From: "devopsarr[bot]" <127950054+devopsarr[bot]@users.noreply.github.com> Date: Sun, 5 May 2024 20:07:59 +0000 Subject: [PATCH] chore(deps): update openapitools/openapi-generator-cli docker tag to v7.5.0 --- README.md | 2 +- docs/ApiInfoResource.md | 2 +- docs/AppProfileResource.md | 2 +- docs/ApplicationBulkResource.md | 2 +- docs/ApplicationResource.md | 2 +- docs/BackupResource.md | 2 +- docs/Command.md | 2 +- docs/CommandResource.md | 2 +- docs/ContractField.md | 2 +- docs/CustomFilterResource.md | 2 +- docs/DevelopmentConfigResource.md | 2 +- docs/DownloadClientBulkResource.md | 2 +- docs/DownloadClientCategory.md | 2 +- docs/DownloadClientConfigResource.md | 2 +- docs/DownloadClientResource.md | 2 +- docs/HealthResource.md | 2 +- docs/HistoryResource.md | 2 +- docs/HistoryResourcePagingResource.md | 2 +- docs/HostConfigResource.md | 2 +- docs/HostStatistics.md | 2 +- docs/IndexerBulkResource.md | 2 +- docs/IndexerCapabilityResource.md | 2 +- docs/IndexerCategory.md | 2 +- docs/IndexerProxyResource.md | 2 +- docs/IndexerResource.md | 2 +- docs/IndexerStatistics.md | 2 +- docs/IndexerStatsResource.md | 2 +- docs/IndexerStatusResource.md | 2 +- docs/LocalizationOption.md | 2 +- docs/LogFileResource.md | 2 +- docs/LogResource.md | 2 +- docs/LogResourcePagingResource.md | 2 +- docs/NotificationResource.md | 2 +- docs/PingResource.md | 2 +- docs/ProviderMessage.md | 2 +- docs/ReleaseResource.md | 2 +- docs/SelectOption.md | 2 +- docs/SystemResource.md | 2 +- docs/TagDetailsResource.md | 2 +- docs/TagResource.md | 2 +- docs/TaskResource.md | 2 +- docs/UiConfigResource.md | 2 +- docs/UpdateChanges.md | 2 +- docs/UpdateResource.md | 2 +- docs/UserAgentStatistics.md | 2 +- prowlarr/api/api_info_api.py | 2 +- prowlarr/api/app_profile_api.py | 14 ++--- prowlarr/api/application_api.py | 24 ++++---- prowlarr/api/authentication_api.py | 4 +- prowlarr/api/backup_api.py | 9 +-- prowlarr/api/command_api.py | 10 ++-- prowlarr/api/custom_filter_api.py | 12 ++-- prowlarr/api/development_config_api.py | 6 +- prowlarr/api/download_client_api.py | 24 ++++---- prowlarr/api/download_client_config_api.py | 6 +- prowlarr/api/file_system_api.py | 4 +- prowlarr/api/health_api.py | 3 +- prowlarr/api/history_api.py | 6 +- prowlarr/api/host_config_api.py | 6 +- prowlarr/api/indexer_api.py | 24 ++++---- .../api/indexer_default_categories_api.py | 3 +- prowlarr/api/indexer_proxy_api.py | 20 +++---- prowlarr/api/indexer_stats_api.py | 2 +- prowlarr/api/indexer_status_api.py | 3 +- prowlarr/api/localization_api.py | 5 +- prowlarr/api/log_api.py | 2 +- prowlarr/api/log_file_api.py | 5 +- prowlarr/api/newznab_api.py | 4 +- prowlarr/api/notification_api.py | 20 +++---- prowlarr/api/ping_api.py | 4 +- prowlarr/api/search_api.py | 6 +- prowlarr/api/static_resource_api.py | 8 +-- prowlarr/api/system_api.py | 10 ++-- prowlarr/api/tag_api.py | 12 ++-- prowlarr/api/tag_details_api.py | 5 +- prowlarr/api/task_api.py | 5 +- prowlarr/api/ui_config_api.py | 6 +- prowlarr/api/update_api.py | 3 +- prowlarr/api/update_log_file_api.py | 5 +- prowlarr/api_client.py | 58 +++++++++++-------- prowlarr/rest.py | 2 + 81 files changed, 228 insertions(+), 204 deletions(-) diff --git a/README.md b/README.md index 738c5e7..6f1ef3c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https: - API version: v1.16.2.4435 - Package version: 1.0.1 -- Generator version: 7.4.0 +- Generator version: 7.5.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. diff --git a/docs/ApiInfoResource.md b/docs/ApiInfoResource.md index 62a6c5c..1ac63f1 100644 --- a/docs/ApiInfoResource.md +++ b/docs/ApiInfoResource.md @@ -23,7 +23,7 @@ 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) +api_info_resource_from_dict = ApiInfoResource.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/AppProfileResource.md b/docs/AppProfileResource.md index 232f0b2..0ea9ed0 100644 --- a/docs/AppProfileResource.md +++ b/docs/AppProfileResource.md @@ -27,7 +27,7 @@ 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) +app_profile_resource_from_dict = AppProfileResource.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/ApplicationBulkResource.md b/docs/ApplicationBulkResource.md index 90aa981..e2d440b 100644 --- a/docs/ApplicationBulkResource.md +++ b/docs/ApplicationBulkResource.md @@ -25,7 +25,7 @@ print(ApplicationBulkResource.to_json()) # convert the object into a dict application_bulk_resource_dict = application_bulk_resource_instance.to_dict() # create an instance of ApplicationBulkResource from a dict -application_bulk_resource_form_dict = application_bulk_resource.from_dict(application_bulk_resource_dict) +application_bulk_resource_from_dict = ApplicationBulkResource.from_dict(application_bulk_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/ApplicationResource.md b/docs/ApplicationResource.md index 8aa0fcb..16a1aca 100644 --- a/docs/ApplicationResource.md +++ b/docs/ApplicationResource.md @@ -33,7 +33,7 @@ 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) +application_resource_from_dict = ApplicationResource.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/BackupResource.md b/docs/BackupResource.md index b22126b..311be42 100644 --- a/docs/BackupResource.md +++ b/docs/BackupResource.md @@ -27,7 +27,7 @@ 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) +backup_resource_from_dict = BackupResource.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/Command.md b/docs/Command.md index ae98889..56e4ca1 100644 --- a/docs/Command.md +++ b/docs/Command.md @@ -33,7 +33,7 @@ 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) +command_from_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/CommandResource.md b/docs/CommandResource.md index 2de9830..21e8854 100644 --- a/docs/CommandResource.md +++ b/docs/CommandResource.md @@ -39,7 +39,7 @@ 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) +command_resource_from_dict = CommandResource.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/ContractField.md b/docs/ContractField.md index 5aa9346..573e900 100644 --- a/docs/ContractField.md +++ b/docs/ContractField.md @@ -38,7 +38,7 @@ print(ContractField.to_json()) # convert the object into a dict contract_field_dict = contract_field_instance.to_dict() # create an instance of ContractField from a dict -contract_field_form_dict = contract_field.from_dict(contract_field_dict) +contract_field_from_dict = ContractField.from_dict(contract_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/CustomFilterResource.md b/docs/CustomFilterResource.md index 3fc4960..a27e718 100644 --- a/docs/CustomFilterResource.md +++ b/docs/CustomFilterResource.md @@ -25,7 +25,7 @@ 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) +custom_filter_resource_from_dict = CustomFilterResource.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/DevelopmentConfigResource.md b/docs/DevelopmentConfigResource.md index f7ad8e4..74177ce 100644 --- a/docs/DevelopmentConfigResource.md +++ b/docs/DevelopmentConfigResource.md @@ -27,7 +27,7 @@ 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) +development_config_resource_from_dict = DevelopmentConfigResource.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/DownloadClientBulkResource.md b/docs/DownloadClientBulkResource.md index 4f55da0..94ffb52 100644 --- a/docs/DownloadClientBulkResource.md +++ b/docs/DownloadClientBulkResource.md @@ -26,7 +26,7 @@ print(DownloadClientBulkResource.to_json()) # convert the object into a dict download_client_bulk_resource_dict = download_client_bulk_resource_instance.to_dict() # create an instance of DownloadClientBulkResource from a dict -download_client_bulk_resource_form_dict = download_client_bulk_resource.from_dict(download_client_bulk_resource_dict) +download_client_bulk_resource_from_dict = DownloadClientBulkResource.from_dict(download_client_bulk_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/DownloadClientCategory.md b/docs/DownloadClientCategory.md index 71c416f..9be7b72 100644 --- a/docs/DownloadClientCategory.md +++ b/docs/DownloadClientCategory.md @@ -23,7 +23,7 @@ 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) +download_client_category_from_dict = DownloadClientCategory.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/DownloadClientConfigResource.md b/docs/DownloadClientConfigResource.md index 7aff802..8c94a19 100644 --- a/docs/DownloadClientConfigResource.md +++ b/docs/DownloadClientConfigResource.md @@ -22,7 +22,7 @@ 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) +download_client_config_resource_from_dict = DownloadClientConfigResource.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 index 774cd57..d7c175b 100644 --- a/docs/DownloadClientResource.md +++ b/docs/DownloadClientResource.md @@ -36,7 +36,7 @@ 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) +download_client_resource_from_dict = DownloadClientResource.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/HealthResource.md b/docs/HealthResource.md index 212d2e6..affe6ac 100644 --- a/docs/HealthResource.md +++ b/docs/HealthResource.md @@ -26,7 +26,7 @@ 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) +health_resource_from_dict = HealthResource.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/HistoryResource.md b/docs/HistoryResource.md index 9ac7659..0e1aa58 100644 --- a/docs/HistoryResource.md +++ b/docs/HistoryResource.md @@ -28,7 +28,7 @@ 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) +history_resource_from_dict = HistoryResource.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 index 01d103c..23f986f 100644 --- a/docs/HistoryResourcePagingResource.md +++ b/docs/HistoryResourcePagingResource.md @@ -27,7 +27,7 @@ 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) +history_resource_paging_resource_from_dict = HistoryResourcePagingResource.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/HostConfigResource.md b/docs/HostConfigResource.md index d6d049c..c8126da 100644 --- a/docs/HostConfigResource.md +++ b/docs/HostConfigResource.md @@ -58,7 +58,7 @@ 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) +host_config_resource_from_dict = HostConfigResource.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 index 2d129fd..306f2f2 100644 --- a/docs/HostStatistics.md +++ b/docs/HostStatistics.md @@ -24,7 +24,7 @@ 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) +host_statistics_from_dict = HostStatistics.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/IndexerBulkResource.md b/docs/IndexerBulkResource.md index 9fd3517..33f45d5 100644 --- a/docs/IndexerBulkResource.md +++ b/docs/IndexerBulkResource.md @@ -31,7 +31,7 @@ print(IndexerBulkResource.to_json()) # convert the object into a dict indexer_bulk_resource_dict = indexer_bulk_resource_instance.to_dict() # create an instance of IndexerBulkResource from a dict -indexer_bulk_resource_form_dict = indexer_bulk_resource.from_dict(indexer_bulk_resource_dict) +indexer_bulk_resource_from_dict = IndexerBulkResource.from_dict(indexer_bulk_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/IndexerCapabilityResource.md b/docs/IndexerCapabilityResource.md index ef04d83..e956b07 100644 --- a/docs/IndexerCapabilityResource.md +++ b/docs/IndexerCapabilityResource.md @@ -31,7 +31,7 @@ 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) +indexer_capability_resource_from_dict = IndexerCapabilityResource.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 index 5f38c56..4824c9f 100644 --- a/docs/IndexerCategory.md +++ b/docs/IndexerCategory.md @@ -25,7 +25,7 @@ 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) +indexer_category_from_dict = IndexerCategory.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/IndexerProxyResource.md b/docs/IndexerProxyResource.md index ff5047a..d5c1a3f 100644 --- a/docs/IndexerProxyResource.md +++ b/docs/IndexerProxyResource.md @@ -36,7 +36,7 @@ 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) +indexer_proxy_resource_from_dict = IndexerProxyResource.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 index cf957f7..a185a01 100644 --- a/docs/IndexerResource.md +++ b/docs/IndexerResource.md @@ -52,7 +52,7 @@ 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) +indexer_resource_from_dict = IndexerResource.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 index 43fc1ff..8572786 100644 --- a/docs/IndexerStatistics.md +++ b/docs/IndexerStatistics.md @@ -32,7 +32,7 @@ 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) +indexer_statistics_from_dict = IndexerStatistics.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/IndexerStatsResource.md b/docs/IndexerStatsResource.md index ed16761..6a7c6c7 100644 --- a/docs/IndexerStatsResource.md +++ b/docs/IndexerStatsResource.md @@ -25,7 +25,7 @@ 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) +indexer_stats_resource_from_dict = IndexerStatsResource.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/IndexerStatusResource.md b/docs/IndexerStatusResource.md index 1b27c98..9587e50 100644 --- a/docs/IndexerStatusResource.md +++ b/docs/IndexerStatusResource.md @@ -26,7 +26,7 @@ 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) +indexer_status_resource_from_dict = IndexerStatusResource.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/LocalizationOption.md b/docs/LocalizationOption.md index 7dfba04..bd88c21 100644 --- a/docs/LocalizationOption.md +++ b/docs/LocalizationOption.md @@ -23,7 +23,7 @@ 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) +localization_option_from_dict = LocalizationOption.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/LogFileResource.md b/docs/LogFileResource.md index d790c58..a49aeac 100644 --- a/docs/LogFileResource.md +++ b/docs/LogFileResource.md @@ -26,7 +26,7 @@ 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) +log_file_resource_from_dict = LogFileResource.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 index 2f1c5cc..fd247fc 100644 --- a/docs/LogResource.md +++ b/docs/LogResource.md @@ -29,7 +29,7 @@ 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) +log_resource_from_dict = LogResource.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 index dc49bb3..05d7a51 100644 --- a/docs/LogResourcePagingResource.md +++ b/docs/LogResourcePagingResource.md @@ -27,7 +27,7 @@ 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) +log_resource_paging_resource_from_dict = LogResourcePagingResource.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/NotificationResource.md b/docs/NotificationResource.md index c46a230..aeaa379 100644 --- a/docs/NotificationResource.md +++ b/docs/NotificationResource.md @@ -43,7 +43,7 @@ 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) +notification_resource_from_dict = NotificationResource.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/PingResource.md b/docs/PingResource.md index a0591aa..7dc4f59 100644 --- a/docs/PingResource.md +++ b/docs/PingResource.md @@ -22,7 +22,7 @@ print(PingResource.to_json()) # convert the object into a dict ping_resource_dict = ping_resource_instance.to_dict() # create an instance of PingResource from a dict -ping_resource_form_dict = ping_resource.from_dict(ping_resource_dict) +ping_resource_from_dict = PingResource.from_dict(ping_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/ProviderMessage.md b/docs/ProviderMessage.md index 1965f84..fe35063 100644 --- a/docs/ProviderMessage.md +++ b/docs/ProviderMessage.md @@ -23,7 +23,7 @@ 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) +provider_message_from_dict = ProviderMessage.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/ReleaseResource.md b/docs/ReleaseResource.md index 539b34f..76e313c 100644 --- a/docs/ReleaseResource.md +++ b/docs/ReleaseResource.md @@ -52,7 +52,7 @@ 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) +release_resource_from_dict = ReleaseResource.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/SelectOption.md b/docs/SelectOption.md index a1e377b..b0f292d 100644 --- a/docs/SelectOption.md +++ b/docs/SelectOption.md @@ -26,7 +26,7 @@ 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) +select_option_from_dict = SelectOption.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/SystemResource.md b/docs/SystemResource.md index a6ff093..3de0db3 100644 --- a/docs/SystemResource.md +++ b/docs/SystemResource.md @@ -52,7 +52,7 @@ print(SystemResource.to_json()) # convert the object into a dict system_resource_dict = system_resource_instance.to_dict() # create an instance of SystemResource from a dict -system_resource_form_dict = system_resource.from_dict(system_resource_dict) +system_resource_from_dict = SystemResource.from_dict(system_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/TagDetailsResource.md b/docs/TagDetailsResource.md index d7dedf7..c685773 100644 --- a/docs/TagDetailsResource.md +++ b/docs/TagDetailsResource.md @@ -27,7 +27,7 @@ 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) +tag_details_resource_from_dict = TagDetailsResource.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 index 8428bb7..9d330d0 100644 --- a/docs/TagResource.md +++ b/docs/TagResource.md @@ -23,7 +23,7 @@ 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) +tag_resource_from_dict = TagResource.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/TaskResource.md b/docs/TaskResource.md index b2b9524..775facd 100644 --- a/docs/TaskResource.md +++ b/docs/TaskResource.md @@ -29,7 +29,7 @@ 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) +task_resource_from_dict = TaskResource.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/UiConfigResource.md b/docs/UiConfigResource.md index 4dd2a63..25d43ba 100644 --- a/docs/UiConfigResource.md +++ b/docs/UiConfigResource.md @@ -31,7 +31,7 @@ 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) +ui_config_resource_from_dict = UiConfigResource.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/UpdateChanges.md b/docs/UpdateChanges.md index d7fae47..a73ccb4 100644 --- a/docs/UpdateChanges.md +++ b/docs/UpdateChanges.md @@ -23,7 +23,7 @@ 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) +update_changes_from_dict = UpdateChanges.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/UpdateResource.md b/docs/UpdateResource.md index 5836158..3e516d5 100644 --- a/docs/UpdateResource.md +++ b/docs/UpdateResource.md @@ -33,7 +33,7 @@ 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) +update_resource_from_dict = UpdateResource.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 index fa4fe9e..8d28df5 100644 --- a/docs/UserAgentStatistics.md +++ b/docs/UserAgentStatistics.md @@ -24,7 +24,7 @@ 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) +user_agent_statistics_from_dict = UserAgentStatistics.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/prowlarr/api/api_info_api.py b/prowlarr/api/api_info_api.py index 5d79f1c..a04cd00 100644 --- a/prowlarr/api/api_info_api.py +++ b/prowlarr/api/api_info_api.py @@ -235,7 +235,7 @@ def _get_api_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/app_profile_api.py b/prowlarr/api/app_profile_api.py index e27153d..2fe679c 100644 --- a/prowlarr/api/app_profile_api.py +++ b/prowlarr/api/app_profile_api.py @@ -17,7 +17,7 @@ from typing_extensions import Annotated from pydantic import StrictInt, StrictStr -from typing import Optional +from typing import List, Optional from prowlarr.models.app_profile_resource import AppProfileResource from prowlarr.api_client import ApiClient, RequestSerialized @@ -250,7 +250,7 @@ def _create_app_profile_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -519,7 +519,7 @@ def _delete_app_profile_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -775,7 +775,7 @@ def _get_app_profile_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1018,7 +1018,7 @@ def _get_app_profile_schema_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1259,7 +1259,7 @@ def _list_app_profile_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1526,7 +1526,7 @@ def _update_app_profile_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/application_api.py b/prowlarr/api/application_api.py index 152ebe0..bd3dc46 100644 --- a/prowlarr/api/application_api.py +++ b/prowlarr/api/application_api.py @@ -17,7 +17,7 @@ from typing_extensions import Annotated from pydantic import StrictBool, StrictInt, StrictStr -from typing import Optional +from typing import List, Optional from prowlarr.models.application_bulk_resource import ApplicationBulkResource from prowlarr.models.application_resource import ApplicationResource @@ -264,7 +264,7 @@ def _create_applications_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -550,7 +550,7 @@ def _create_applications_action_by_name_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -815,7 +815,7 @@ def _delete_applications_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1065,7 +1065,7 @@ def _delete_applications_bulk_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1328,7 +1328,7 @@ def _get_applications_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1571,7 +1571,7 @@ def _list_applications_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1812,7 +1812,7 @@ def _list_applications_schema_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2066,7 +2066,7 @@ def _put_applications_bulk_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2348,7 +2348,7 @@ def _test_applications_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2602,7 +2602,7 @@ def _testall_applications_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2876,7 +2876,7 @@ def _update_applications_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/authentication_api.py b/prowlarr/api/authentication_api.py index 933e1d7..351d601 100644 --- a/prowlarr/api/authentication_api.py +++ b/prowlarr/api/authentication_api.py @@ -288,7 +288,7 @@ def _create_login_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -546,7 +546,7 @@ def _get_logout_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/backup_api.py b/prowlarr/api/backup_api.py index a5e58eb..f834673 100644 --- a/prowlarr/api/backup_api.py +++ b/prowlarr/api/backup_api.py @@ -17,6 +17,7 @@ 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, RequestSerialized @@ -249,7 +250,7 @@ def _create_system_backup_restore_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -486,7 +487,7 @@ def _create_system_backup_restore_upload_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -734,7 +735,7 @@ def _delete_system_backup_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -971,7 +972,7 @@ def _list_system_backup_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/command_api.py b/prowlarr/api/command_api.py index 42a9485..5dbe9e9 100644 --- a/prowlarr/api/command_api.py +++ b/prowlarr/api/command_api.py @@ -17,7 +17,7 @@ from typing_extensions import Annotated from pydantic import StrictInt -from typing import Optional +from typing import List, Optional from prowlarr.models.command_resource import CommandResource from prowlarr.api_client import ApiClient, RequestSerialized @@ -250,7 +250,7 @@ def _create_command_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -519,7 +519,7 @@ def _delete_command_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -769,7 +769,7 @@ def _get_command_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1012,7 +1012,7 @@ def _list_command_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/custom_filter_api.py b/prowlarr/api/custom_filter_api.py index 1829a09..6719f89 100644 --- a/prowlarr/api/custom_filter_api.py +++ b/prowlarr/api/custom_filter_api.py @@ -17,7 +17,7 @@ from typing_extensions import Annotated from pydantic import StrictInt, StrictStr -from typing import Optional +from typing import List, Optional from prowlarr.models.custom_filter_resource import CustomFilterResource from prowlarr.api_client import ApiClient, RequestSerialized @@ -250,7 +250,7 @@ def _create_custom_filter_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -519,7 +519,7 @@ def _delete_custom_filter_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -769,7 +769,7 @@ def _get_custom_filter_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1012,7 +1012,7 @@ def _list_custom_filter_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1279,7 +1279,7 @@ def _update_custom_filter_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/development_config_api.py b/prowlarr/api/development_config_api.py index a4f60e4..1ed37ee 100644 --- a/prowlarr/api/development_config_api.py +++ b/prowlarr/api/development_config_api.py @@ -237,7 +237,7 @@ def _get_development_config_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -491,7 +491,7 @@ def _get_development_config_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -760,7 +760,7 @@ def _update_development_config_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/download_client_api.py b/prowlarr/api/download_client_api.py index 8f63af9..cc5adc3 100644 --- a/prowlarr/api/download_client_api.py +++ b/prowlarr/api/download_client_api.py @@ -17,7 +17,7 @@ from typing_extensions import Annotated from pydantic import StrictBool, StrictInt, StrictStr -from typing import Optional +from typing import List, Optional from prowlarr.models.download_client_bulk_resource import DownloadClientBulkResource from prowlarr.models.download_client_resource import DownloadClientResource @@ -264,7 +264,7 @@ def _create_download_client_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -550,7 +550,7 @@ def _create_download_client_action_by_name_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -815,7 +815,7 @@ def _delete_download_client_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1065,7 +1065,7 @@ def _delete_download_client_bulk_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1328,7 +1328,7 @@ def _get_download_client_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1571,7 +1571,7 @@ def _list_download_client_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1812,7 +1812,7 @@ def _list_download_client_schema_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2066,7 +2066,7 @@ def _put_download_client_bulk_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2348,7 +2348,7 @@ def _test_download_client_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2602,7 +2602,7 @@ def _testall_download_client_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2876,7 +2876,7 @@ def _update_download_client_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/download_client_config_api.py b/prowlarr/api/download_client_config_api.py index 4cb84b0..0b530d6 100644 --- a/prowlarr/api/download_client_config_api.py +++ b/prowlarr/api/download_client_config_api.py @@ -237,7 +237,7 @@ def _get_download_client_config_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -491,7 +491,7 @@ def _get_download_client_config_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -760,7 +760,7 @@ def _update_download_client_config_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/file_system_api.py b/prowlarr/api/file_system_api.py index b2c2fe5..722699b 100644 --- a/prowlarr/api/file_system_api.py +++ b/prowlarr/api/file_system_api.py @@ -275,7 +275,7 @@ def _get_file_system_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -535,7 +535,7 @@ def _get_file_system_type_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/health_api.py b/prowlarr/api/health_api.py index 31e5637..d77ef1c 100644 --- a/prowlarr/api/health_api.py +++ b/prowlarr/api/health_api.py @@ -16,6 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from typing import List from prowlarr.models.health_resource import HealthResource from prowlarr.api_client import ApiClient, RequestSerialized @@ -235,7 +236,7 @@ def _list_health_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/history_api.py b/prowlarr/api/history_api.py index 67cea2e..eed0644 100644 --- a/prowlarr/api/history_api.py +++ b/prowlarr/api/history_api.py @@ -347,7 +347,7 @@ def _get_history_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -659,7 +659,7 @@ def _list_history_indexer_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -938,7 +938,7 @@ def _list_history_since_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/host_config_api.py b/prowlarr/api/host_config_api.py index 4fa9464..db6db66 100644 --- a/prowlarr/api/host_config_api.py +++ b/prowlarr/api/host_config_api.py @@ -237,7 +237,7 @@ def _get_host_config_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -491,7 +491,7 @@ def _get_host_config_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -760,7 +760,7 @@ def _update_host_config_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/indexer_api.py b/prowlarr/api/indexer_api.py index 314dd0d..622e35c 100644 --- a/prowlarr/api/indexer_api.py +++ b/prowlarr/api/indexer_api.py @@ -17,7 +17,7 @@ from typing_extensions import Annotated from pydantic import StrictBool, StrictInt, StrictStr -from typing import Optional +from typing import List, Optional from prowlarr.models.indexer_bulk_resource import IndexerBulkResource from prowlarr.models.indexer_resource import IndexerResource @@ -264,7 +264,7 @@ def _create_indexer_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -550,7 +550,7 @@ def _create_indexer_action_by_name_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -815,7 +815,7 @@ def _delete_indexer_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1065,7 +1065,7 @@ def _delete_indexer_bulk_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1328,7 +1328,7 @@ def _get_indexer_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1571,7 +1571,7 @@ def _list_indexer_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1812,7 +1812,7 @@ def _list_indexer_schema_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2066,7 +2066,7 @@ def _put_indexer_bulk_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2348,7 +2348,7 @@ def _test_indexer_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2602,7 +2602,7 @@ def _testall_indexer_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2876,7 +2876,7 @@ def _update_indexer_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/indexer_default_categories_api.py b/prowlarr/api/indexer_default_categories_api.py index 562a221..b91b803 100644 --- a/prowlarr/api/indexer_default_categories_api.py +++ b/prowlarr/api/indexer_default_categories_api.py @@ -16,6 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from typing import List from prowlarr.models.indexer_category import IndexerCategory from prowlarr.api_client import ApiClient, RequestSerialized @@ -235,7 +236,7 @@ def _list_indexer_categories_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/indexer_proxy_api.py b/prowlarr/api/indexer_proxy_api.py index 6fbc8ab..5fc08f4 100644 --- a/prowlarr/api/indexer_proxy_api.py +++ b/prowlarr/api/indexer_proxy_api.py @@ -17,7 +17,7 @@ from typing_extensions import Annotated from pydantic import StrictBool, StrictInt, StrictStr -from typing import Optional +from typing import List, Optional from prowlarr.models.indexer_proxy_resource import IndexerProxyResource from prowlarr.api_client import ApiClient, RequestSerialized @@ -263,7 +263,7 @@ def _create_indexer_proxy_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -549,7 +549,7 @@ def _create_indexer_proxy_action_by_name_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -814,7 +814,7 @@ def _delete_indexer_proxy_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1064,7 +1064,7 @@ def _get_indexer_proxy_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1307,7 +1307,7 @@ def _list_indexer_proxy_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1548,7 +1548,7 @@ def _list_indexer_proxy_schema_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1815,7 +1815,7 @@ def _test_indexer_proxy_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2069,7 +2069,7 @@ def _testall_indexer_proxy_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2343,7 +2343,7 @@ def _update_indexer_proxy_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/indexer_stats_api.py b/prowlarr/api/indexer_stats_api.py index 1befd52..5dcb094 100644 --- a/prowlarr/api/indexer_stats_api.py +++ b/prowlarr/api/indexer_stats_api.py @@ -303,7 +303,7 @@ def _get_indexer_stats_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/indexer_status_api.py b/prowlarr/api/indexer_status_api.py index a329695..71e7516 100644 --- a/prowlarr/api/indexer_status_api.py +++ b/prowlarr/api/indexer_status_api.py @@ -16,6 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from typing import List from prowlarr.models.indexer_status_resource import IndexerStatusResource from prowlarr.api_client import ApiClient, RequestSerialized @@ -235,7 +236,7 @@ def _list_indexer_status_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/localization_api.py b/prowlarr/api/localization_api.py index ec7b139..94c3315 100644 --- a/prowlarr/api/localization_api.py +++ b/prowlarr/api/localization_api.py @@ -16,6 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from typing import List from prowlarr.models.localization_option import LocalizationOption from prowlarr.api_client import ApiClient, RequestSerialized @@ -235,7 +236,7 @@ def _get_localization_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -470,7 +471,7 @@ def _list_localization_options_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/log_api.py b/prowlarr/api/log_api.py index bd88603..c1cd798 100644 --- a/prowlarr/api/log_api.py +++ b/prowlarr/api/log_api.py @@ -303,7 +303,7 @@ def _get_log_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/log_file_api.py b/prowlarr/api/log_file_api.py index cb0d471..6e1d95e 100644 --- a/prowlarr/api/log_file_api.py +++ b/prowlarr/api/log_file_api.py @@ -17,6 +17,7 @@ from typing_extensions import Annotated from pydantic import Field, field_validator +from typing import Any, Dict, List from typing_extensions import Annotated from prowlarr.models.log_file_resource import LogFileResource @@ -250,7 +251,7 @@ def _get_log_file_by_filename_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -493,7 +494,7 @@ def _list_log_file_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/newznab_api.py b/prowlarr/api/newznab_api.py index c67af68..e4223f8 100644 --- a/prowlarr/api/newznab_api.py +++ b/prowlarr/api/newznab_api.py @@ -275,7 +275,7 @@ def _get_indexer_download_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -949,7 +949,7 @@ def _get_indexer_newznab_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/notification_api.py b/prowlarr/api/notification_api.py index eccfd68..4a25cb9 100644 --- a/prowlarr/api/notification_api.py +++ b/prowlarr/api/notification_api.py @@ -17,7 +17,7 @@ from typing_extensions import Annotated from pydantic import StrictBool, StrictInt, StrictStr -from typing import Optional +from typing import List, Optional from prowlarr.models.notification_resource import NotificationResource from prowlarr.api_client import ApiClient, RequestSerialized @@ -263,7 +263,7 @@ def _create_notification_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -549,7 +549,7 @@ def _create_notification_action_by_name_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -814,7 +814,7 @@ def _delete_notification_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1064,7 +1064,7 @@ def _get_notification_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1307,7 +1307,7 @@ def _list_notification_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1548,7 +1548,7 @@ def _list_notification_schema_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1815,7 +1815,7 @@ def _test_notification_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2069,7 +2069,7 @@ def _testall_notification_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2343,7 +2343,7 @@ def _update_notification_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/ping_api.py b/prowlarr/api/ping_api.py index a2d9731..fd345eb 100644 --- a/prowlarr/api/ping_api.py +++ b/prowlarr/api/ping_api.py @@ -235,7 +235,7 @@ def _get_ping_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -476,7 +476,7 @@ def _head_ping_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/search_api.py b/prowlarr/api/search_api.py index 78df7af..e86d58d 100644 --- a/prowlarr/api/search_api.py +++ b/prowlarr/api/search_api.py @@ -250,7 +250,7 @@ def _create_search_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -520,7 +520,7 @@ def _create_search_bulk_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -856,7 +856,7 @@ def _list_search_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/static_resource_api.py b/prowlarr/api/static_resource_api.py index 8c078bb..48cd5b8 100644 --- a/prowlarr/api/static_resource_api.py +++ b/prowlarr/api/static_resource_api.py @@ -249,7 +249,7 @@ def _get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -499,7 +499,7 @@ def _get_by_path_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -749,7 +749,7 @@ def _get_content_by_path_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -986,7 +986,7 @@ def _get_login_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/system_api.py b/prowlarr/api/system_api.py index 533e8c4..f164954 100644 --- a/prowlarr/api/system_api.py +++ b/prowlarr/api/system_api.py @@ -235,7 +235,7 @@ def _create_system_restart_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -470,7 +470,7 @@ def _create_system_shutdown_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -705,7 +705,7 @@ def _get_system_routes_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -940,7 +940,7 @@ def _get_system_routes_duplicate_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1175,7 +1175,7 @@ def _get_system_status_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/tag_api.py b/prowlarr/api/tag_api.py index de29cc3..19ed1dc 100644 --- a/prowlarr/api/tag_api.py +++ b/prowlarr/api/tag_api.py @@ -17,7 +17,7 @@ from typing_extensions import Annotated from pydantic import StrictInt, StrictStr -from typing import Optional +from typing import List, Optional from prowlarr.models.tag_resource import TagResource from prowlarr.api_client import ApiClient, RequestSerialized @@ -250,7 +250,7 @@ def _create_tag_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -519,7 +519,7 @@ def _delete_tag_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -769,7 +769,7 @@ def _get_tag_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1012,7 +1012,7 @@ def _list_tag_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1279,7 +1279,7 @@ def _update_tag_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/tag_details_api.py b/prowlarr/api/tag_details_api.py index 0b8d409..d958f58 100644 --- a/prowlarr/api/tag_details_api.py +++ b/prowlarr/api/tag_details_api.py @@ -17,6 +17,7 @@ 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, RequestSerialized @@ -249,7 +250,7 @@ def _get_tag_detail_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -492,7 +493,7 @@ def _list_tag_detail_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/task_api.py b/prowlarr/api/task_api.py index 9a6b6e9..4e44fa5 100644 --- a/prowlarr/api/task_api.py +++ b/prowlarr/api/task_api.py @@ -17,6 +17,7 @@ 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, RequestSerialized @@ -249,7 +250,7 @@ def _get_system_task_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -492,7 +493,7 @@ def _list_system_task_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/ui_config_api.py b/prowlarr/api/ui_config_api.py index 8b9ef36..fb188ec 100644 --- a/prowlarr/api/ui_config_api.py +++ b/prowlarr/api/ui_config_api.py @@ -237,7 +237,7 @@ def _get_ui_config_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -491,7 +491,7 @@ def _get_ui_config_by_id_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -760,7 +760,7 @@ def _update_ui_config_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/update_api.py b/prowlarr/api/update_api.py index 5bd271e..7c6fe22 100644 --- a/prowlarr/api/update_api.py +++ b/prowlarr/api/update_api.py @@ -16,6 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from typing import List from prowlarr.models.update_resource import UpdateResource from prowlarr.api_client import ApiClient, RequestSerialized @@ -235,7 +236,7 @@ def _list_update_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api/update_log_file_api.py b/prowlarr/api/update_log_file_api.py index d337192..16fc84a 100644 --- a/prowlarr/api/update_log_file_api.py +++ b/prowlarr/api/update_log_file_api.py @@ -17,6 +17,7 @@ from typing_extensions import Annotated from pydantic import Field, field_validator +from typing import Any, Dict, List from typing_extensions import Annotated from prowlarr.models.log_file_resource import LogFileResource @@ -250,7 +251,7 @@ def _get_log_file_update_by_filename_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -493,7 +494,7 @@ def _list_log_file_update_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/prowlarr/api_client.py b/prowlarr/api_client.py index 092cd9c..62340dd 100644 --- a/prowlarr/api_client.py +++ b/prowlarr/api_client.py @@ -22,7 +22,8 @@ import tempfile from urllib.parse import quote -from typing import Tuple, Optional, List, Dict +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr from prowlarr.configuration import Configuration from prowlarr.api_response import ApiResponse, T as ApiResponseT @@ -207,7 +208,8 @@ def param_serialize( post_params, collection_formats ) - post_params.extend(self.files_parameters(files)) + if files: + post_params.extend(self.files_parameters(files)) # auth setting self.update_params_for_auth( @@ -312,7 +314,10 @@ def response_deserialize( match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) finally: if not 200 <= response_data.status <= 299: raise ApiException.from_response( @@ -332,6 +337,7 @@ def sanitize_for_serialization(self, obj): """Builds a JSON POST object. If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. @@ -344,6 +350,10 @@ def sanitize_for_serialization(self, obj): """ if obj is None: return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): @@ -365,7 +375,10 @@ def sanitize_for_serialization(self, obj): # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - obj_dict = obj.to_dict() + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ return { key: self.sanitize_for_serialization(val) @@ -504,31 +517,30 @@ def parameters_to_url_query(self, params, collection_formats): return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, files=None): + def files_parameters(self, files: Dict[str, Union[str, bytes]]): """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])]) - ) - + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + 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: List[str]) -> Optional[str]: diff --git a/prowlarr/rest.py b/prowlarr/rest.py index a787c36..55c5053 100644 --- a/prowlarr/rest.py +++ b/prowlarr/rest.py @@ -202,6 +202,8 @@ def request( # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] r = self.pool_manager.request( method, url,