Skip to content

Latest commit

 

History

History
363 lines (248 loc) · 12.8 KB

NamingConfigApi.md

File metadata and controls

363 lines (248 loc) · 12.8 KB

sonarr.NamingConfigApi

All URIs are relative to http://localhost:8989

Method HTTP request Description
get_naming_config GET /api/v3/config/naming
get_naming_config_by_id GET /api/v3/config/naming/{id}
get_naming_config_examples GET /api/v3/config/naming/examples
update_naming_config PUT /api/v3/config/naming/{id}

get_naming_config

NamingConfigResource get_naming_config()

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.naming_config_resource import NamingConfigResource
from sonarr.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8989
# See configuration.py for a list of all supported configuration parameters.
configuration = sonarr.Configuration(
    host = "http://localhost:8989"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'

# Configure API key authorization: X-Api-Key
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'

# Enter a context with an instance of the API client
with sonarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonarr.NamingConfigApi(api_client)

    try:
        api_response = api_instance.get_naming_config()
        print("The response of NamingConfigApi->get_naming_config:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NamingConfigApi->get_naming_config: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

NamingConfigResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

HTTP response details

Status code Description Response headers
2XX OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_naming_config_by_id

NamingConfigResource get_naming_config_by_id(id)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.naming_config_resource import NamingConfigResource
from sonarr.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8989
# See configuration.py for a list of all supported configuration parameters.
configuration = sonarr.Configuration(
    host = "http://localhost:8989"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'

# Configure API key authorization: X-Api-Key
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'

# Enter a context with an instance of the API client
with sonarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonarr.NamingConfigApi(api_client)
    id = 56 # int | 

    try:
        api_response = api_instance.get_naming_config_by_id(id)
        print("The response of NamingConfigApi->get_naming_config_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NamingConfigApi->get_naming_config_by_id: %s\n" % e)

Parameters

Name Type Description Notes
id int

Return type

NamingConfigResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
2XX OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_naming_config_examples

get_naming_config_examples(rename_episodes=rename_episodes, replace_illegal_characters=replace_illegal_characters, colon_replacement_format=colon_replacement_format, custom_colon_replacement_format=custom_colon_replacement_format, multi_episode_style=multi_episode_style, standard_episode_format=standard_episode_format, daily_episode_format=daily_episode_format, anime_episode_format=anime_episode_format, series_folder_format=series_folder_format, season_folder_format=season_folder_format, specials_folder_format=specials_folder_format, id=id, resource_name=resource_name)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8989
# See configuration.py for a list of all supported configuration parameters.
configuration = sonarr.Configuration(
    host = "http://localhost:8989"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'

# Configure API key authorization: X-Api-Key
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'

# Enter a context with an instance of the API client
with sonarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonarr.NamingConfigApi(api_client)
    rename_episodes = True # bool |  (optional)
    replace_illegal_characters = True # bool |  (optional)
    colon_replacement_format = 56 # int |  (optional)
    custom_colon_replacement_format = 'custom_colon_replacement_format_example' # str |  (optional)
    multi_episode_style = 56 # int |  (optional)
    standard_episode_format = 'standard_episode_format_example' # str |  (optional)
    daily_episode_format = 'daily_episode_format_example' # str |  (optional)
    anime_episode_format = 'anime_episode_format_example' # str |  (optional)
    series_folder_format = 'series_folder_format_example' # str |  (optional)
    season_folder_format = 'season_folder_format_example' # str |  (optional)
    specials_folder_format = 'specials_folder_format_example' # str |  (optional)
    id = 56 # int |  (optional)
    resource_name = 'resource_name_example' # str |  (optional)

    try:
        api_instance.get_naming_config_examples(rename_episodes=rename_episodes, replace_illegal_characters=replace_illegal_characters, colon_replacement_format=colon_replacement_format, custom_colon_replacement_format=custom_colon_replacement_format, multi_episode_style=multi_episode_style, standard_episode_format=standard_episode_format, daily_episode_format=daily_episode_format, anime_episode_format=anime_episode_format, series_folder_format=series_folder_format, season_folder_format=season_folder_format, specials_folder_format=specials_folder_format, id=id, resource_name=resource_name)
    except Exception as e:
        print("Exception when calling NamingConfigApi->get_naming_config_examples: %s\n" % e)

Parameters

Name Type Description Notes
rename_episodes bool [optional]
replace_illegal_characters bool [optional]
colon_replacement_format int [optional]
custom_colon_replacement_format str [optional]
multi_episode_style int [optional]
standard_episode_format str [optional]
daily_episode_format str [optional]
anime_episode_format str [optional]
series_folder_format str [optional]
season_folder_format str [optional]
specials_folder_format str [optional]
id int [optional]
resource_name str [optional]

Return type

void (empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
2XX OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_naming_config

NamingConfigResource update_naming_config(id, naming_config_resource=naming_config_resource)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.naming_config_resource import NamingConfigResource
from sonarr.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8989
# See configuration.py for a list of all supported configuration parameters.
configuration = sonarr.Configuration(
    host = "http://localhost:8989"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'

# Configure API key authorization: X-Api-Key
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'

# Enter a context with an instance of the API client
with sonarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonarr.NamingConfigApi(api_client)
    id = 'id_example' # str | 
    naming_config_resource = sonarr.NamingConfigResource() # NamingConfigResource |  (optional)

    try:
        api_response = api_instance.update_naming_config(id, naming_config_resource=naming_config_resource)
        print("The response of NamingConfigApi->update_naming_config:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NamingConfigApi->update_naming_config: %s\n" % e)

Parameters

Name Type Description Notes
id str
naming_config_resource NamingConfigResource [optional]

Return type

NamingConfigResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: text/plain, application/json, text/json

HTTP response details

Status code Description Response headers
2XX OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]