Skip to content

Latest commit

 

History

History
437 lines (293 loc) · 13.5 KB

SeriesApi.md

File metadata and controls

437 lines (293 loc) · 13.5 KB

sonarr.SeriesApi

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

Method HTTP request Description
create_series POST /api/v3/series
delete_series DELETE /api/v3/series/{id}
get_series_by_id GET /api/v3/series/{id}
list_series GET /api/v3/series
update_series PUT /api/v3/series/{id}

create_series

SeriesResource create_series(series_resource=series_resource)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.series_resource import SeriesResource
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.SeriesApi(api_client)
    series_resource = sonarr.SeriesResource() # SeriesResource |  (optional)

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

Parameters

Name Type Description Notes
series_resource SeriesResource [optional]

Return type

SeriesResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: application/json
  • 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]

delete_series

delete_series(id, delete_files=delete_files, add_import_list_exclusion=add_import_list_exclusion)

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.SeriesApi(api_client)
    id = 56 # int | 
    delete_files = False # bool |  (optional) (default to False)
    add_import_list_exclusion = False # bool |  (optional) (default to False)

    try:
        api_instance.delete_series(id, delete_files=delete_files, add_import_list_exclusion=add_import_list_exclusion)
    except Exception as e:
        print("Exception when calling SeriesApi->delete_series: %s\n" % e)

Parameters

Name Type Description Notes
id int
delete_files bool [optional] [default to False]
add_import_list_exclusion bool [optional] [default to False]

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]

get_series_by_id

SeriesResource get_series_by_id(id, include_season_images=include_season_images)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.series_resource import SeriesResource
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.SeriesApi(api_client)
    id = 56 # int | 
    include_season_images = False # bool |  (optional) (default to False)

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

Parameters

Name Type Description Notes
id int
include_season_images bool [optional] [default to False]

Return type

SeriesResource

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]

list_series

List[SeriesResource] list_series(tvdb_id=tvdb_id, include_season_images=include_season_images)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.series_resource import SeriesResource
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.SeriesApi(api_client)
    tvdb_id = 56 # int |  (optional)
    include_season_images = False # bool |  (optional) (default to False)

    try:
        api_response = api_instance.list_series(tvdb_id=tvdb_id, include_season_images=include_season_images)
        print("The response of SeriesApi->list_series:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SeriesApi->list_series: %s\n" % e)

Parameters

Name Type Description Notes
tvdb_id int [optional]
include_season_images bool [optional] [default to False]

Return type

List[SeriesResource]

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]

update_series

SeriesResource update_series(id, move_files=move_files, series_resource=series_resource)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.series_resource import SeriesResource
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.SeriesApi(api_client)
    id = 'id_example' # str | 
    move_files = False # bool |  (optional) (default to False)
    series_resource = sonarr.SeriesResource() # SeriesResource |  (optional)

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

Parameters

Name Type Description Notes
id str
move_files bool [optional] [default to False]
series_resource SeriesResource [optional]

Return type

SeriesResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: application/json
  • 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]