jellyfin.generated.api_10_10.DevicesApi
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
delete_device | DELETE /Devices | Deletes a device. |
get_device_info | GET /Devices/Info | Get info for a device. |
get_device_options | GET /Devices/Options | Get options for a device. |
get_devices | GET /Devices | Get Devices. |
update_device_options | POST /Devices/Options | Update device options. |
delete_device
delete_device(id)
Deletes a device.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_10
from jellyfin.generated.api_10_10 import ApiClient, Configuration
from jellyfin.generated.api_10_10.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_10.DevicesApi(api_client)
id = 'id_example' # str | Device Id.
try:
# Deletes a device.
api_instance.delete_device(id)
except Exception as e:
print("Exception when calling DevicesApi->delete_device: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | str | Device Id. |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/json; profile="CamelCase", application/json; profile="PascalCase"
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Device deleted. | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Device not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_device_info
DeviceInfoDto get_device_info(id)
Get info for a device.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_10
from jellyfin.generated.api_10_10 import ApiClient, Configuration
from jellyfin.generated.api_10_10.models.device_info_dto import DeviceInfoDto
from jellyfin.generated.api_10_10.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_10.DevicesApi(api_client)
id = 'id_example' # str | Device Id.
try:
# Get info for a device.
api_response = api_instance.get_device_info(id)
print("The response of DevicesApi->get_device_info:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DevicesApi->get_device_info: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | str | Device Id. |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/json; profile="CamelCase", application/json; profile="PascalCase"
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | Device info retrieved. | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Device not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_device_options
DeviceOptionsDto get_device_options(id)
Get options for a device.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_10
from jellyfin.generated.api_10_10 import ApiClient, Configuration
from jellyfin.generated.api_10_10.models.device_options_dto import DeviceOptionsDto
from jellyfin.generated.api_10_10.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_10.DevicesApi(api_client)
id = 'id_example' # str | Device Id.
try:
# Get options for a device.
api_response = api_instance.get_device_options(id)
print("The response of DevicesApi->get_device_options:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DevicesApi->get_device_options: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | str | Device Id. |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/json; profile="CamelCase", application/json; profile="PascalCase"
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | Device options retrieved. | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Device not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_devices
DeviceInfoDtoQueryResult get_devices(user_id=user_id)
Get Devices.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_10
from jellyfin.generated.api_10_10 import ApiClient, Configuration
from jellyfin.generated.api_10_10.models.device_info_dto_query_result import DeviceInfoDtoQueryResult
from jellyfin.generated.api_10_10.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_10.DevicesApi(api_client)
user_id = 'user_id_example' # str | Gets or sets the user identifier. (optional)
try:
# Get Devices.
api_response = api_instance.get_devices(user_id=user_id)
print("The response of DevicesApi->get_devices:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DevicesApi->get_devices: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
user_id | str | Gets or sets the user identifier. | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/json; profile="CamelCase", application/json; profile="PascalCase"
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | Devices retrieved. | - |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_device_options
update_device_options(id, device_options_dto)
Update device options.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_10
from jellyfin.generated.api_10_10 import ApiClient, Configuration
from jellyfin.generated.api_10_10.models.device_options_dto import DeviceOptionsDto
from jellyfin.generated.api_10_10.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_10.DevicesApi(api_client)
id = 'id_example' # str | Device Id.
device_options_dto = jellyfin.generated.api_10_10.DeviceOptionsDto() # DeviceOptionsDto | Device Options.
try:
# Update device options.
api_instance.update_device_options(id, device_options_dto)
except Exception as e:
print("Exception when calling DevicesApi->update_device_options: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | str | Device Id. | |
device_options_dto | DeviceOptionsDto | Device Options. |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json, text/json, application/*+json
- Accept: Not defined
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Device options updated. | - |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]