diff --git a/lidarr/api_client.py b/lidarr/api_client.py index eff367c..7174b1f 100644 --- a/lidarr/api_client.py +++ b/lidarr/api_client.py @@ -191,6 +191,10 @@ def __call_api( resource_path, method, body, request_auth=_request_auth) + # request timeout + if not _request_timeout: + _request_timeout = config.request_timeout + # body if body: body = self.sanitize_for_serialization(body) diff --git a/lidarr/configuration.py b/lidarr/configuration.py index 7da2c5a..2fc77a3 100644 --- a/lidarr/configuration.py +++ b/lidarr/configuration.py @@ -68,6 +68,7 @@ class Configuration(object): disabled. This can be useful to troubleshoot data validation problem, such as when the OpenAPI document validation rules do not match the actual API data received by the server. + :param request_timeout: Default request timeout. :param server_index: Index to servers configuration. :param server_variables: Mapping with string values to replace variables in templated server configuration. The validation of enums is performed for @@ -109,6 +110,7 @@ def __init__(self, host=None, username=None, password=None, discard_unknown_keys=False, disabled_client_side_validations="", + request_timeout=None, server_index=None, server_variables=None, server_operation_index=None, server_operation_variables=None, ssl_ca_cert=None, @@ -151,6 +153,9 @@ def __init__(self, host=None, """ self.discard_unknown_keys = discard_unknown_keys self.disabled_client_side_validations = disabled_client_side_validations + self.request_timeout = request_timeout + """Request Timeout + """ self.logger = {} """Logging Settings """