Skip to content

Latest commit

 

History

History
350 lines (242 loc) · 11.6 KB

File metadata and controls

350 lines (242 loc) · 11.6 KB

sonarr.EpisodeApi

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

Method HTTP request Description
get_episode_by_id GET /api/v3/episode/{id}
list_episode GET /api/v3/episode
put_episode_monitor PUT /api/v3/episode/monitor
update_episode PUT /api/v3/episode/{id}

get_episode_by_id

EpisodeResource get_episode_by_id(id)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.episode_resource import EpisodeResource
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.EpisodeApi(api_client)
    id = 56 # int | 

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

Parameters

Name Type Description Notes
id int

Return type

EpisodeResource

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_episode

List[EpisodeResource] list_episode(series_id=series_id, season_number=season_number, episode_ids=episode_ids, episode_file_id=episode_file_id, include_series=include_series, include_episode_file=include_episode_file, include_images=include_images)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.episode_resource import EpisodeResource
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.EpisodeApi(api_client)
    series_id = 56 # int |  (optional)
    season_number = 56 # int |  (optional)
    episode_ids = [56] # List[int] |  (optional)
    episode_file_id = 56 # int |  (optional)
    include_series = False # bool |  (optional) (default to False)
    include_episode_file = False # bool |  (optional) (default to False)
    include_images = False # bool |  (optional) (default to False)

    try:
        api_response = api_instance.list_episode(series_id=series_id, season_number=season_number, episode_ids=episode_ids, episode_file_id=episode_file_id, include_series=include_series, include_episode_file=include_episode_file, include_images=include_images)
        print("The response of EpisodeApi->list_episode:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling EpisodeApi->list_episode: %s\n" % e)

Parameters

Name Type Description Notes
series_id int [optional]
season_number int [optional]
episode_ids List[int] [optional]
episode_file_id int [optional]
include_series bool [optional] [default to False]
include_episode_file bool [optional] [default to False]
include_images bool [optional] [default to False]

Return type

List[EpisodeResource]

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]

put_episode_monitor

put_episode_monitor(include_images=include_images, episodes_monitored_resource=episodes_monitored_resource)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.episodes_monitored_resource import EpisodesMonitoredResource
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.EpisodeApi(api_client)
    include_images = False # bool |  (optional) (default to False)
    episodes_monitored_resource = sonarr.EpisodesMonitoredResource() # EpisodesMonitoredResource |  (optional)

    try:
        api_instance.put_episode_monitor(include_images=include_images, episodes_monitored_resource=episodes_monitored_resource)
    except Exception as e:
        print("Exception when calling EpisodeApi->put_episode_monitor: %s\n" % e)

Parameters

Name Type Description Notes
include_images bool [optional] [default to False]
episodes_monitored_resource EpisodesMonitoredResource [optional]

Return type

void (empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

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

EpisodeResource update_episode(id, episode_resource=episode_resource)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.episode_resource import EpisodeResource
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.EpisodeApi(api_client)
    id = 56 # int | 
    episode_resource = sonarr.EpisodeResource() # EpisodeResource |  (optional)

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

Parameters

Name Type Description Notes
id int
episode_resource EpisodeResource [optional]

Return type

EpisodeResource

Authorization

apikey, X-Api-Key

HTTP request headers

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