Skip to content

Latest commit

 

History

History
423 lines (289 loc) · 13.1 KB

ArtistApi.md

File metadata and controls

423 lines (289 loc) · 13.1 KB

lidarr.ArtistApi

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

Method HTTP request Description
create_artist POST /api/v1/artist
delete_artist DELETE /api/v1/artist/{id}
get_artist_by_id GET /api/v1/artist/{id}
list_artist GET /api/v1/artist
update_artist PUT /api/v1/artist/{id}

create_artist

ArtistResource create_artist(artist_resource=artist_resource)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import lidarr
from lidarr.models.artist_resource import ArtistResource
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.ArtistApi(api_client)
    artist_resource = lidarr.ArtistResource() # ArtistResource |  (optional)

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

Parameters

Name Type Description Notes
artist_resource ArtistResource [optional]

Return type

ArtistResource

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_artist

delete_artist(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 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.ArtistApi(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_artist(id, delete_files=delete_files, add_import_list_exclusion=add_import_list_exclusion)
    except Exception as e:
        print("Exception when calling ArtistApi->delete_artist: %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_artist_by_id

ArtistResource get_artist_by_id(id)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import lidarr
from lidarr.models.artist_resource import ArtistResource
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.ArtistApi(api_client)
    id = 56 # int | 

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

Parameters

Name Type Description Notes
id int

Return type

ArtistResource

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]

list_artist

List[ArtistResource] list_artist(mb_id=mb_id)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import lidarr
from lidarr.models.artist_resource import ArtistResource
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.ArtistApi(api_client)
    mb_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |  (optional)

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

Parameters

Name Type Description Notes
mb_id UUID [optional]

Return type

List[ArtistResource]

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_artist

ArtistResource update_artist(id, move_files=move_files, artist_resource=artist_resource)

Example

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

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

Parameters

Name Type Description Notes
id str
move_files bool [optional] [default to False]
artist_resource ArtistResource [optional]

Return type

ArtistResource

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]