mirror of
https://github.com/LukeHagar/plexpy.git
synced 2025-12-07 20:57:45 +00:00
* `plex_api.library_playlists.add_playlist_items()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.hubs.get_metadata_hubs()`: * `request.only_transient` **Changed** * `response.media_container.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library_collections.move_collection_item()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library_collections.delete_collection_item()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library_collections.add_collection_items()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.content.get_sonically_similar()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.butler.stop_task()`: `request` **Changed** **Breaking** ⚠️ * `plex_api.butler.start_task()`: `request` **Changed** **Breaking** ⚠️ * `plex_api.content.get_sonic_path()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.download_queue.get_item_decision()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.hubs.get_all_hubs()`: * `request.only_transient` **Changed** * `response.media_container.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.hubs.get_continue_watching()`: `response.media_container.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.hubs.get_promoted_hubs()`: `response.media_container.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.content.get_all_leaves()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.hubs.get_postplay_hubs()`: * `request.only_transient` **Changed** * `response.media_container.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.hubs.get_related_hubs()`: * `request.only_transient` **Changed** * `response.media_container.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.hubs.get_section_hubs()`: * `request.only_transient` **Changed** * `response.media_container.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.content.list_content()`: * `request` **Changed** * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.content.get_albums()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.search.search_hubs()`: `response.media_container.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.search.voice_search_hubs()`: * `request.type` **Changed** **Breaking** ⚠️ * `response.media_container.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.get_library_items()`: * `request.media_query` **Changed** * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.ingest_transient_item()`: * `request` **Changed** * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.get_library_matches()`: * `request` **Changed** **Breaking** ⚠️ * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.content.get_metadata_item()`: * `request` **Changed** * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.get_sections()`: `response.media_container.directory.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.add_section()`: * `request` **Changed** * `response.media_container.directory.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.get_tags()`: * `request.type` **Changed** **Breaking** ⚠️ * `plex_api.content.get_collection_items()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.get_all_item_leaves()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.status.list_sessions()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.play_queue.move_play_queue_item()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.get_extras()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.play_queue.delete_play_queue_item()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.play_queue.unshuffle()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.list_matches()`: * `request.manual` **Changed** * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.list_sonically_similar()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.play_queue.reset_play_queue()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.get_related_items()`: `response.media_container.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.list_similar()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.play_queue.clear_play_queue()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.get_item_tree()`: `response.media_container.metadata_item.[]` **Changed** **Breaking** ⚠️ * `plex_api.play_queue.add_to_play_queue()`: * `request.next` **Changed** * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.play_queue.get_play_queue()`: * `request` **Changed** * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library_playlists.move_playlist_item()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.get_person()`: `response.media_container.directory.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.list_person_media()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library_playlists.get_playlist_generator_items()`: `response.media_container.metadata` **Changed** **Breaking** ⚠️ * `plex_api.library.get_library_details()`: * `request.include_details` **Changed** * `response.media_container.directory.[]` **Changed** **Breaking** ⚠️ * `plex_api.library_playlists.modify_playlist_generator()`: * `request.item` **Changed** * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.autocomplete()`: * `request.media_query` **Changed** * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.get_collections()`: * `request.media_query` **Changed** * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.get_common()`: * `request.media_query` **Changed** * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library_playlists.delete_playlist_item()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library_playlists.clear_playlist_items()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.play_queue.shuffle()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library_playlists.create_playlist()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.playlist.get_playlist_items()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.playlist.get_playlist()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.collections.create_collection()`: * `request.type` **Changed** **Breaking** ⚠️ * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.dv_rs.tune_channel()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.live_tv.get_sessions()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.live_tv.get_live_tv_session()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.playlist.list_playlists()`: `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.subscriptions.get_all_subscriptions()`: * `request` **Changed** * `response.media_container.media_subscription.[].media_grab_operation.[].metadata` **Changed** **Breaking** ⚠️ * `plex_api.subscriptions.create_subscription()`: `response.media_container.media_subscription.[].media_grab_operation.[].metadata` **Changed** **Breaking** ⚠️ * `plex_api.subscriptions.get_scheduled_recordings()`: `response.media_container.media_grab_operation.[].metadata` **Changed** **Breaking** ⚠️ * `plex_api.subscriptions.get_template()`: `response.media_container.subscription_template.[].media_subscription.[].media_grab_operation.[].metadata` **Changed** **Breaking** ⚠️ * `plex_api.subscriptions.get_subscription()`: * `request` **Changed** * `response.media_container.media_subscription.[].media_grab_operation.[].metadata` **Changed** **Breaking** ⚠️ * `plex_api.subscriptions.edit_subscription_preferences()`: `response.media_container.media_subscription.[].media_grab_operation.[].metadata` **Changed** **Breaking** ⚠️ * `plex_api.subscriptions.reorder_subscription()`: `response.media_container.media_subscription.[].media_grab_operation.[].metadata` **Changed** **Breaking** ⚠️ * `plex_api.transcoder.make_decision()`: * `request` **Changed** * `response.media_container.metadata.[]` **Changed** **Breaking** ⚠️ * `plex_api.library.refresh_items_metadata()`: * `request.mark_updated` **Changed** * `plex_api.authentication.post-users-sign-in-data()`: **Added** * `plex_api.transcoder.start_transcode_session()`: `request` **Changed** * `plex_api.devices.modify_device()`: * `request.enabled` **Changed** * `plex_api.library.get_media_part()`: * `request.download` **Changed** * `plex_api.library.detect_intros()`: * `request.force` **Changed** * `plex_api.library.refresh_section()`: * `request.force` **Changed** * `plex_api.library_playlists.upload_playlist()`: * `request.force` **Changed** * `plex_api.library.delete_media_item()`: * `request.proxy` **Changed** * `plex_api.authentication.get_token_details()`: **Added** * `plex_api.library.get_first_characters()`: * `request.media_query` **Changed** * `plex_api.library.update_items()`: * `request.field.locked` **Changed** * `plex_api.library.delete_library_section()`: * `request.async` **Changed** * `plex_api.library.set_stream_selection()`: * `request.all_parts` **Changed** * `plex_api.play_queue.create_play_queue()`: `request` **Changed** * `plex_api.library.get_augmentation_status()`: * `request.wait` **Changed** * `plex_api.library.detect_voice_activity()`: `request` **Changed** * `plex_api.transcoder.transcode_image()`: `request` **Changed** * `plex_api.transcoder.transcode_subtitles()`: `request` **Changed** * `plex_api.library.add_subtitles()`: `request` **Changed** * `plex_api.library.get_stream()`: * `request.auto_adjust_subtitle` **Changed** * `plex_api.library.start_bif_generation()`: * `request.force` **Changed** * `plex_api.library.detect_credits()`: `request` **Changed** * `plex_api.ultra_blur.get_image()`: * `request.noise` **Changed** * `plex_api.library.generate_thumbs()`: * `request.force` **Changed** * `plex_api.updater.apply_updates()`: `request` **Changed** * `plex_api.updater.check_updates()`: * `request.download` **Changed** * `plex_api.library.delete_metadata_item()`: * `request.proxy` **Changed** * `plex_api.library.optimize_database()`: * `request.async` **Changed** * `plex_api.hubs.update_hub_visibility()`: `request` **Changed** * `plex_api.hubs.create_custom_hub()`: `request` **Changed** * `plex_api.library.get_section_image()`: * `request.media_query` **Changed** * `plex_api.download_queue.add_download_queue_items()`: `request` **Changed** * `plex_api.timeline.report()`: `request` **Changed** * `plex_api.general.get_source_connection_information()`: * `request.refresh` **Changed** * `plex_api.plex.get-server-resources()`: **Added** * `plex_api.users.get-users()`: **Added**
756 lines
34 KiB
Markdown
756 lines
34 KiB
Markdown
# Content
|
|
(*content*)
|
|
|
|
## Overview
|
|
|
|
The actual content of the media provider
|
|
|
|
### Available Operations
|
|
|
|
* [get_collection_items](#get_collection_items) - Get items in a collection
|
|
* [get_metadata_item](#get_metadata_item) - Get a metadata item
|
|
* [get_albums](#get_albums) - Set section albums
|
|
* [list_content](#list_content) - Get items in the section
|
|
* [get_all_leaves](#get_all_leaves) - Set section leaves
|
|
* [get_arts](#get_arts) - Set section artwork
|
|
* [get_categories](#get_categories) - Set section categories
|
|
* [get_cluster](#get_cluster) - Set section clusters
|
|
* [get_sonic_path](#get_sonic_path) - Similar tracks to transition from one to another
|
|
* [get_folders](#get_folders) - Get all folder locations
|
|
* [list_moments](#list_moments) - Set section moments
|
|
* [get_sonically_similar](#get_sonically_similar) - The nearest audio tracks
|
|
* [get_collection_image](#get_collection_image) - Get a collection's image
|
|
|
|
## get_collection_items
|
|
|
|
Get items in a collection. Note if this collection contains more than 100 items, paging must be used.
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="python" operationID="getCollectionItems" method="get" path="/library/collections/{collectionId}/items" -->
|
|
```python
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
product="Plex for Roku",
|
|
version="2.4.1",
|
|
platform="Roku",
|
|
platform_version="4.3 build 1057",
|
|
device="Roku 3",
|
|
model="4200X",
|
|
device_vendor="Roku",
|
|
device_name="Living Room TV",
|
|
marketplace="googlePlay",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.content.get_collection_items(request={
|
|
"collection_id": 314585,
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
| `request` | [operations.GetCollectionItemsRequest](../../models/operations/getcollectionitemsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
|
|
### Response
|
|
|
|
**[operations.GetCollectionItemsResponse](../../models/operations/getcollectionitemsresponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## get_metadata_item
|
|
|
|
Get one or more metadata items.
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="python" operationID="getMetadataItem" method="get" path="/library/metadata/{ids}" -->
|
|
```python
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components, operations
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
product="Plex for Roku",
|
|
version="2.4.1",
|
|
platform="Roku",
|
|
platform_version="4.3 build 1057",
|
|
device="Roku 3",
|
|
model="4200X",
|
|
device_vendor="Roku",
|
|
device_name="Living Room TV",
|
|
marketplace="googlePlay",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.content.get_metadata_item(request=operations.GetMetadataItemRequest(
|
|
ids=[],
|
|
async_check_files=components.BoolInt.TRUE,
|
|
async_refresh_local_media_agent=components.BoolInt.TRUE,
|
|
async_refresh_analysis=components.BoolInt.TRUE,
|
|
check_files=components.BoolInt.TRUE,
|
|
skip_refresh=components.BoolInt.TRUE,
|
|
check_file_availability=components.BoolInt.TRUE,
|
|
async_augment_metadata=components.BoolInt.TRUE,
|
|
augment_count=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
| `request` | [operations.GetMetadataItemRequest](../../models/operations/getmetadataitemrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
|
|
### Response
|
|
|
|
**[operations.GetMetadataItemResponse](../../models/operations/getmetadataitemresponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## get_albums
|
|
|
|
Get all albums in a music section
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="python" operationID="getAlbums" method="get" path="/library/sections/{sectionId}/albums" -->
|
|
```python
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
product="Plex for Roku",
|
|
version="2.4.1",
|
|
platform="Roku",
|
|
platform_version="4.3 build 1057",
|
|
device="Roku 3",
|
|
model="4200X",
|
|
device_vendor="Roku",
|
|
device_name="Living Room TV",
|
|
marketplace="googlePlay",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.content.get_albums(request={
|
|
"section_id": 817133,
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
| `request` | [operations.GetAlbumsRequest](../../models/operations/getalbumsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
|
|
### Response
|
|
|
|
**[operations.GetAlbumsResponse](../../models/operations/getalbumsresponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## list_content
|
|
|
|
Get the items in a section, potentially filtering them
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="python" operationID="listContent" method="get" path="/library/sections/{sectionId}/all" -->
|
|
```python
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components, operations
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
product="Plex for Roku",
|
|
version="2.4.1",
|
|
platform="Roku",
|
|
platform_version="4.3 build 1057",
|
|
device="Roku 3",
|
|
model="4200X",
|
|
device_vendor="Roku",
|
|
device_name="Living Room TV",
|
|
marketplace="googlePlay",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.content.list_content(request=operations.ListContentRequest(
|
|
media_query=components.MediaQuery(
|
|
type=components.MediaType.EPISODE,
|
|
source_type=2,
|
|
sort="duration:desc,index",
|
|
),
|
|
include_meta=components.BoolInt.TRUE,
|
|
include_guids=components.BoolInt.TRUE,
|
|
section_id="<id>",
|
|
))
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ListContentRequest](../../models/operations/listcontentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
|
|
### Response
|
|
|
|
**[operations.ListContentResponse](../../models/operations/listcontentresponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## get_all_leaves
|
|
|
|
Get all leaves in a section (such as episodes in a show section)
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="python" operationID="getAllLeaves" method="get" path="/library/sections/{sectionId}/allLeaves" -->
|
|
```python
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
product="Plex for Roku",
|
|
version="2.4.1",
|
|
platform="Roku",
|
|
platform_version="4.3 build 1057",
|
|
device="Roku 3",
|
|
model="4200X",
|
|
device_vendor="Roku",
|
|
device_name="Living Room TV",
|
|
marketplace="googlePlay",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.content.get_all_leaves(request={
|
|
"section_id": 633197,
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
| `request` | [operations.GetAllLeavesRequest](../../models/operations/getallleavesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
|
|
### Response
|
|
|
|
**[operations.GetAllLeavesResponse](../../models/operations/getallleavesresponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## get_arts
|
|
|
|
Get artwork for a library section
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="python" operationID="getArts" method="get" path="/library/sections/{sectionId}/arts" -->
|
|
```python
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
product="Plex for Roku",
|
|
version="2.4.1",
|
|
platform="Roku",
|
|
platform_version="4.3 build 1057",
|
|
device="Roku 3",
|
|
model="4200X",
|
|
device_vendor="Roku",
|
|
device_name="Living Room TV",
|
|
marketplace="googlePlay",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.content.get_arts(request={
|
|
"section_id": 859200,
|
|
})
|
|
|
|
assert res.media_container_with_artwork is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_artwork)
|
|
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
| `request` | [operations.GetArtsRequest](../../models/operations/getartsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
|
|
### Response
|
|
|
|
**[operations.GetArtsResponse](../../models/operations/getartsresponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## get_categories
|
|
|
|
Get categories in a library section
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="python" operationID="getCategories" method="get" path="/library/sections/{sectionId}/categories" -->
|
|
```python
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
product="Plex for Roku",
|
|
version="2.4.1",
|
|
platform="Roku",
|
|
platform_version="4.3 build 1057",
|
|
device="Roku 3",
|
|
model="4200X",
|
|
device_vendor="Roku",
|
|
device_name="Living Room TV",
|
|
marketplace="googlePlay",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.content.get_categories(request={
|
|
"section_id": 21841,
|
|
})
|
|
|
|
assert res.media_container_with_artwork is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_artwork)
|
|
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
| `request` | [operations.GetCategoriesRequest](../../models/operations/getcategoriesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
|
|
### Response
|
|
|
|
**[operations.GetCategoriesResponse](../../models/operations/getcategoriesresponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## get_cluster
|
|
|
|
Get clusters in a library section (typically for photos)
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="python" operationID="getCluster" method="get" path="/library/sections/{sectionId}/cluster" -->
|
|
```python
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
product="Plex for Roku",
|
|
version="2.4.1",
|
|
platform="Roku",
|
|
platform_version="4.3 build 1057",
|
|
device="Roku 3",
|
|
model="4200X",
|
|
device_vendor="Roku",
|
|
device_name="Living Room TV",
|
|
marketplace="googlePlay",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.content.get_cluster(request={
|
|
"section_id": 138560,
|
|
})
|
|
|
|
assert res.media_container_with_artwork is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_artwork)
|
|
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
| `request` | [operations.GetClusterRequest](../../models/operations/getclusterrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
|
|
### Response
|
|
|
|
**[operations.GetClusterResponse](../../models/operations/getclusterresponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## get_sonic_path
|
|
|
|
Get a list of audio tracks starting at one and ending at another which are similar across the path
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="python" operationID="getSonicPath" method="get" path="/library/sections/{sectionId}/computePath" -->
|
|
```python
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
product="Plex for Roku",
|
|
version="2.4.1",
|
|
platform="Roku",
|
|
platform_version="4.3 build 1057",
|
|
device="Roku 3",
|
|
model="4200X",
|
|
device_vendor="Roku",
|
|
device_name="Living Room TV",
|
|
marketplace="googlePlay",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.content.get_sonic_path(request={
|
|
"section_id": 914549,
|
|
"start_id": 629990,
|
|
"end_id": 687740,
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
| `request` | [operations.GetSonicPathRequest](../../models/operations/getsonicpathrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
|
|
### Response
|
|
|
|
**[operations.GetSonicPathResponse](../../models/operations/getsonicpathresponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## get_folders
|
|
|
|
Get all folder locations of the media in a section
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="python" operationID="getFolders" method="get" path="/library/sections/{sectionId}/location" -->
|
|
```python
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
product="Plex for Roku",
|
|
version="2.4.1",
|
|
platform="Roku",
|
|
platform_version="4.3 build 1057",
|
|
device="Roku 3",
|
|
model="4200X",
|
|
device_vendor="Roku",
|
|
device_name="Living Room TV",
|
|
marketplace="googlePlay",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.content.get_folders(request={
|
|
"section_id": 892532,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
| `request` | [operations.GetFoldersRequest](../../models/operations/getfoldersrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
|
|
### Response
|
|
|
|
**[operations.GetFoldersResponse](../../models/operations/getfoldersresponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## list_moments
|
|
|
|
Get moments in a library section (typically for photos)
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="python" operationID="listMoments" method="get" path="/library/sections/{sectionId}/moment" -->
|
|
```python
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
product="Plex for Roku",
|
|
version="2.4.1",
|
|
platform="Roku",
|
|
platform_version="4.3 build 1057",
|
|
device="Roku 3",
|
|
model="4200X",
|
|
device_vendor="Roku",
|
|
device_name="Living Room TV",
|
|
marketplace="googlePlay",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.content.list_moments(request={
|
|
"section_id": 403239,
|
|
})
|
|
|
|
assert res.media_container_with_artwork is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_artwork)
|
|
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ListMomentsRequest](../../models/operations/listmomentsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
|
|
### Response
|
|
|
|
**[operations.ListMomentsResponse](../../models/operations/listmomentsresponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## get_sonically_similar
|
|
|
|
Get the nearest audio tracks to a particular analysis
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="python" operationID="getSonicallySimilar" method="get" path="/library/sections/{sectionId}/nearest" -->
|
|
```python
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
product="Plex for Roku",
|
|
version="2.4.1",
|
|
platform="Roku",
|
|
platform_version="4.3 build 1057",
|
|
device="Roku 3",
|
|
model="4200X",
|
|
device_vendor="Roku",
|
|
device_name="Living Room TV",
|
|
marketplace="googlePlay",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.content.get_sonically_similar(request={
|
|
"section_id": 525956,
|
|
"values": [],
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
| `request` | [operations.GetSonicallySimilarRequest](../../models/operations/getsonicallysimilarrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
|
|
### Response
|
|
|
|
**[operations.GetSonicallySimilarResponse](../../models/operations/getsonicallysimilarresponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## get_collection_image
|
|
|
|
Get an image for the collection based on the items within
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="python" operationID="getCollectionImage" method="get" path="/library/collections/{collectionId}/composite/{updatedAt}" -->
|
|
```python
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
product="Plex for Roku",
|
|
version="2.4.1",
|
|
platform="Roku",
|
|
platform_version="4.3 build 1057",
|
|
device="Roku 3",
|
|
model="4200X",
|
|
device_vendor="Roku",
|
|
device_name="Living Room TV",
|
|
marketplace="googlePlay",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.content.get_collection_image(request={
|
|
"collection_id": 474227,
|
|
"updated_at": 759379,
|
|
})
|
|
|
|
assert res.response_stream is not None
|
|
|
|
# Handle response
|
|
print(res.response_stream)
|
|
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
| `request` | [operations.GetCollectionImageRequest](../../models/operations/getcollectionimagerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
|
|
### Response
|
|
|
|
**[operations.GetCollectionImageResponse](../../models/operations/getcollectionimageresponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| errors.SDKError | 4XX, 5XX | \*/\* | |