Skip to content

Latest commit

 

History

History
337 lines (222 loc) · 9.79 KB

CommandApi.md

File metadata and controls

337 lines (222 loc) · 9.79 KB

lidarr.CommandApi

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

Method HTTP request Description
create_command POST /api/v1/command
delete_command DELETE /api/v1/command/{id}
get_command_by_id GET /api/v1/command/{id}
list_command GET /api/v1/command

create_command

CommandResource create_command(command_resource=command_resource)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import lidarr
from lidarr.models.command_resource import CommandResource
from lidarr.rest import ApiException
from pprint import pprint

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

# 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 lidarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lidarr.CommandApi(api_client)
    command_resource = lidarr.CommandResource() # CommandResource |  (optional)

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

Parameters

Name Type Description Notes
command_resource CommandResource [optional]

Return type

CommandResource

Authorization

apikey, X-Api-Key

HTTP request headers

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

HTTP response details

Status code Description Response headers
2XX Success -

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

delete_command

delete_command(id)

Example

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

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

# 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 lidarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lidarr.CommandApi(api_client)
    id = 56 # int | 

    try:
        api_instance.delete_command(id)
    except Exception as e:
        print("Exception when calling CommandApi->delete_command: %s\n" % e)

Parameters

Name Type Description Notes
id int

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 Success -

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

get_command_by_id

CommandResource get_command_by_id(id)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import lidarr
from lidarr.models.command_resource import CommandResource
from lidarr.rest import ApiException
from pprint import pprint

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

# 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 lidarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lidarr.CommandApi(api_client)
    id = 56 # int | 

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

Parameters

Name Type Description Notes
id int

Return type

CommandResource

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 Success -

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

list_command

List[CommandResource] list_command()

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import lidarr
from lidarr.models.command_resource import CommandResource
from lidarr.rest import ApiException
from pprint import pprint

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

# 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 lidarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lidarr.CommandApi(api_client)

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

Parameters

This endpoint does not need any parameter.

Return type

List[CommandResource]

Authorization

apikey, X-Api-Key

HTTP request headers

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

HTTP response details

Status code Description Response headers
2XX Success -

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