mirror of
https://github.com/LukeHagar/plexpy.git
synced 2025-12-06 04:20:52 +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**
8042 lines
261 KiB
YAML
8042 lines
261 KiB
YAML
overlay: 1.0.0
|
|
info:
|
|
title: CodeSamples overlay for python target
|
|
version: 0.0.0
|
|
actions:
|
|
- target: $["paths"]["/"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.general.get_server_info(request={})
|
|
|
|
assert res.media_container_with_directory is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_directory)
|
|
- target: $["paths"]["/:/eventsource/notifications"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.events.get_notifications(request={})
|
|
|
|
assert res.response_stream is not None
|
|
|
|
# Handle response
|
|
print(res.response_stream)
|
|
- target: $["paths"]["/:/prefs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.preferences.get_all_preferences()
|
|
|
|
assert res.media_container_with_settings is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_settings)
|
|
- target: $["paths"]["/:/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.preferences.set_preferences(request={
|
|
"prefs": {},
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/:/prefs/get"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.preferences.get_preference(request={})
|
|
|
|
assert res.media_container_with_settings is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_settings)
|
|
- target: $["paths"]["/:/rate"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.rate.set_rating(request={
|
|
"identifier": "<value>",
|
|
"key": "<key>",
|
|
"rating": 8722.46,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/:/scrobble"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.timeline.mark_played(request={
|
|
"identifier": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/:/timeline"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.timeline.report(request=operations.ReportRequest(
|
|
key="/foo",
|
|
rating_key="xyz",
|
|
state=operations.State.PLAYING,
|
|
play_queue_item_id="123",
|
|
time=0,
|
|
duration=10000,
|
|
continuing=components.BoolInt.TRUE,
|
|
updated=14200000,
|
|
offline=components.BoolInt.TRUE,
|
|
time_to_first_frame=1000,
|
|
time_stalled=1000,
|
|
bandwidth=100,
|
|
buffered_time=100,
|
|
buffered_size=1024,
|
|
))
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/:/unscrobble"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.timeline.unscrobble(request={
|
|
"identifier": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/:/websocket/notifications"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.events.connect_web_socket(request={})
|
|
|
|
assert res.response_stream is not None
|
|
|
|
# Handle response
|
|
print(res.response_stream)
|
|
- target: $["paths"]["/activities"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.activities.list_activities()
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/activities/{activityId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.activities.cancel_activity(request={
|
|
"activity_id": "d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/butler"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.butler.stop_tasks()
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/butler"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.butler.get_tasks()
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/butler"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.butler.start_tasks()
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/butler/{butlerTask}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.butler.stop_task(request={
|
|
"butler_task": operations.ButlerTask.CLEAN_OLD_BUNDLES,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/butler/{butlerTask}"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.butler.start_task(request={
|
|
"butler_task": operations.PathParamButlerTask.REFRESH_LOCAL_MEDIA,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/downloadQueue"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.download_queue.create_download_queue()
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/downloadQueue/{queueId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.download_queue.get_download_queue(request={
|
|
"queue_id": 922802,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/downloadQueue/{queueId}/add"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.download_queue.add_download_queue_items(request=operations.AddDownloadQueueItemsRequest(
|
|
queue_id=984925,
|
|
keys=[
|
|
"/library/metadata/3",
|
|
"/library/metadata/6",
|
|
],
|
|
advanced_subtitles=components.AdvancedSubtitles.BURN,
|
|
audio_boost=50,
|
|
audio_channel_count=5,
|
|
auto_adjust_quality=components.BoolInt.TRUE,
|
|
auto_adjust_subtitle=components.BoolInt.TRUE,
|
|
direct_play=components.BoolInt.TRUE,
|
|
direct_stream=components.BoolInt.TRUE,
|
|
direct_stream_audio=components.BoolInt.TRUE,
|
|
disable_resolution_rotation=components.BoolInt.TRUE,
|
|
has_mde=components.BoolInt.TRUE,
|
|
location=components.Location.WAN,
|
|
media_buffer_size=102400,
|
|
media_index=0,
|
|
music_bitrate=5000,
|
|
offset=90.5,
|
|
part_index=0,
|
|
path="/library/metadata/151671",
|
|
peak_bitrate=12000,
|
|
photo_resolution="1080x1080",
|
|
protocol=components.Protocol.DASH,
|
|
seconds_per_segment=5,
|
|
subtitle_size=50,
|
|
video_bitrate=12000,
|
|
video_quality=50,
|
|
video_resolution="1080x1080",
|
|
))
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/downloadQueue/{queueId}/item/{itemId}/decision"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.download_queue.get_item_decision(request={
|
|
"queue_id": 231605,
|
|
"item_id": 32,
|
|
})
|
|
|
|
assert res.media_container_with_decision is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_decision)
|
|
- target: $["paths"]["/downloadQueue/{queueId}/item/{itemId}/media"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.download_queue.get_download_queue_media(request={
|
|
"queue_id": 663184,
|
|
"item_id": 32,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.download_queue.list_download_queue_items(request={
|
|
"queue_id": 524138,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.download_queue.remove_download_queue_items(request={
|
|
"queue_id": 946275,
|
|
"item_id": [
|
|
32,
|
|
345,
|
|
23,
|
|
],
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.download_queue.get_download_queue_items(request={
|
|
"queue_id": 809886,
|
|
"item_id": [
|
|
32,
|
|
345,
|
|
23,
|
|
],
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}/restart"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.download_queue.restart_processing_download_queue_items(request={
|
|
"queue_id": 713001,
|
|
"item_id": [
|
|
32,
|
|
345,
|
|
23,
|
|
],
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/hubs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.get_all_hubs(request={
|
|
"only_transient": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/hubs/continueWatching"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.get_continue_watching(request={})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/hubs/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.get_hub_items(request={
|
|
"identifier": [
|
|
"<value 1>",
|
|
"<value 2>",
|
|
"<value 3>",
|
|
],
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/hubs/metadata/{metadataId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.get_metadata_hubs(request={
|
|
"metadata_id": 605482,
|
|
"only_transient": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res.media_container_with_hubs is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_hubs)
|
|
- target: $["paths"]["/hubs/metadata/{metadataId}/postplay"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.get_postplay_hubs(request={
|
|
"metadata_id": 441419,
|
|
"only_transient": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res.media_container_with_hubs is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_hubs)
|
|
- target: $["paths"]["/hubs/metadata/{metadataId}/related"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.get_related_hubs(request={
|
|
"metadata_id": 8858,
|
|
"only_transient": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res.media_container_with_hubs is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_hubs)
|
|
- target: $["paths"]["/hubs/promoted"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.get_promoted_hubs(request={})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/hubs/search"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.search.search_hubs(request={
|
|
"query": "<value>",
|
|
"section_id": 1,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/hubs/search/voice"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.search.voice_search_hubs(request={
|
|
"query": "<value>",
|
|
"type": components.MediaType.TV_SHOW,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/hubs/sections/{sectionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.get_section_hubs(request={
|
|
"section_id": 336924,
|
|
"only_transient": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.reset_section_defaults(request={
|
|
"section_id": 383022,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.list_hubs(request={
|
|
"section_id": 442546,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.create_custom_hub(request=operations.CreateCustomHubRequest(
|
|
section_id=869922,
|
|
metadata_item_id=703843,
|
|
promoted_to_recommended=components.BoolInt.TRUE,
|
|
promoted_to_own_home=components.BoolInt.TRUE,
|
|
promoted_to_shared_home=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.move_hub(request={
|
|
"section_id": 755710,
|
|
"identifier": "<value>",
|
|
})
|
|
|
|
assert res.get_responses_200 is not None
|
|
|
|
# Handle response
|
|
print(res.get_responses_200)
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage/{identifier}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.delete_custom_hub(request={
|
|
"section_id": 625677,
|
|
"identifier": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage/{identifier}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.hubs.update_hub_visibility(request=operations.UpdateHubVisibilityRequest(
|
|
section_id=341650,
|
|
identifier="<value>",
|
|
promoted_to_recommended=components.BoolInt.TRUE,
|
|
promoted_to_own_home=components.BoolInt.TRUE,
|
|
promoted_to_shared_home=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/identity"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI() as plex_api:
|
|
|
|
res = plex_api.general.get_identity()
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/library/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_library_items(request={
|
|
"media_query": {
|
|
"type": components.MediaType.EPISODE,
|
|
"source_type": 2,
|
|
"sort": "duration:desc,index",
|
|
},
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/caches"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.library.delete_caches()
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/clean/bundles"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.library.clean_bundles()
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/collections"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.collections.create_collection(request={
|
|
"section_id": "<id>",
|
|
"type": components.MediaType.TV_SHOW,
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/collections/{collectionId}/composite/{updatedAt}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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)
|
|
- target: $["paths"]["/library/collections/{collectionId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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)
|
|
- target: $["paths"]["/library/collections/{collectionId}/items"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_collections.add_collection_items(request={
|
|
"collection_id": 338144,
|
|
"uri": "https://expensive-bakeware.com",
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/collections/{collectionId}/items/{itemId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_collections.delete_collection_item(request={
|
|
"collection_id": 320928,
|
|
"item_id": 406983,
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/collections/{collectionId}/items/{itemId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_collections.move_collection_item(request={
|
|
"collection_id": 239532,
|
|
"item_id": 513864,
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/file"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.ingest_transient_item(request=operations.IngestTransientItemRequest(
|
|
url="file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv",
|
|
virtual_file_path="/Avatar.mkv",
|
|
compute_hashes=components.BoolInt.TRUE,
|
|
ingest_non_matches=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/matches"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_library_matches(request=operations.GetLibraryMatchesRequest(
|
|
type=components.MediaType.TV_SHOW,
|
|
include_full_metadata=components.BoolInt.TRUE,
|
|
include_ancestor_metadata=components.BoolInt.TRUE,
|
|
include_alternate_metadata_sources=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/media/{mediaId}/chapterImages/{chapter}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_chapter_image(request={
|
|
"media_id": 892563,
|
|
"chapter": 48348,
|
|
})
|
|
|
|
assert res.response_stream is not None
|
|
|
|
# Handle response
|
|
print(res.response_stream)
|
|
- target: $["paths"]["/library/metadata/augmentations/{augmentationId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_augmentation_status(request={
|
|
"augmentation_id": "<id>",
|
|
"wait": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.delete_metadata_item(request={
|
|
"ids": "<value>",
|
|
"proxy": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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)
|
|
- target: $["paths"]["/library/metadata/{ids}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.edit_metadata_item(request={
|
|
"ids": [
|
|
"<value 1>",
|
|
"<value 2>",
|
|
],
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/addetect"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.detect_ads(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/allLeaves"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_all_item_leaves(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/metadata/{ids}/analyze"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.analyze_metadata(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/chapterThumbs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.generate_thumbs(request={
|
|
"ids": "<value>",
|
|
"force": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/credits"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.detect_credits(request=operations.DetectCreditsRequest(
|
|
ids="<value>",
|
|
force=components.BoolInt.TRUE,
|
|
manual=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/extras"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_extras(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/metadata/{ids}/extras"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.add_extras(request={
|
|
"ids": "<value>",
|
|
"url": "https://super-mortise.biz/",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/file"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_file(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res.two_hundred_audio_mpeg3_response_stream is not None
|
|
|
|
# Handle response
|
|
print(res.two_hundred_audio_mpeg3_response_stream)
|
|
- target: $["paths"]["/library/metadata/{ids}/index"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.start_bif_generation(request={
|
|
"ids": "<value>",
|
|
"force": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/intro"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.detect_intros(request={
|
|
"ids": "<value>",
|
|
"force": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/marker"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.create_marker(request={
|
|
"ids": "<value>",
|
|
"type": 248391,
|
|
"start_time_offset": 535191,
|
|
"attributes": {},
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/library/metadata/{ids}/marker/{marker}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.delete_marker(request={
|
|
"ids": "<value>",
|
|
"marker": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/marker/{marker}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.edit_marker(request={
|
|
"ids": "<value>",
|
|
"marker": "<value>",
|
|
"type": 884347,
|
|
"start_time_offset": 517251,
|
|
"attributes": {},
|
|
})
|
|
|
|
assert res.post_responses_200 is not None
|
|
|
|
# Handle response
|
|
print(res.post_responses_200)
|
|
- target: $["paths"]["/library/metadata/{ids}/match"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.match_item(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/matches"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.list_matches(request={
|
|
"ids": "<value>",
|
|
"manual": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/metadata/{ids}/media/{mediaItem}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.delete_media_item(request={
|
|
"ids": "<value>",
|
|
"media_item": "<value>",
|
|
"proxy": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/merge"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.merge_items(request={
|
|
"ids_path_parameter": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/nearest"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.list_sonically_similar(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/metadata/{ids}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.set_item_preferences(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/refresh"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.refresh_items_metadata(request={
|
|
"ids": "<value>",
|
|
"mark_updated": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/related"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_related_items(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/library/metadata/{ids}/similar"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.list_similar(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/metadata/{ids}/split"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.split_item(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/subtitles"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.add_subtitles(request=operations.AddSubtitlesRequest(
|
|
ids="<value>",
|
|
forced=components.BoolInt.TRUE,
|
|
hearing_impaired=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/tree"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_item_tree(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res.media_container_with_nested_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_nested_metadata)
|
|
- target: $["paths"]["/library/metadata/{ids}/unmatch"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.unmatch(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/users/top"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.list_top_users(request={
|
|
"ids": "<value>",
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/library/metadata/{ids}/voiceActivity"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.detect_voice_activity(request=operations.DetectVoiceActivityRequest(
|
|
ids="<value>",
|
|
force=components.BoolInt.TRUE,
|
|
manual=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/{element}"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.set_item_artwork(request={
|
|
"ids": "<value>",
|
|
"element": operations.Element.BANNER,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/{element}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.update_item_artwork(request={
|
|
"ids": "<value>",
|
|
"element": operations.PathParamElement.CLEAR_LOGO,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/metadata/{ids}/{element}/{timestamp}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_item_artwork(request={
|
|
"ids": "<value>",
|
|
"element": operations.GetItemArtworkPathParamElement.POSTER,
|
|
"timestamp": 999555,
|
|
})
|
|
|
|
assert res.two_hundred_audio_mpeg3_response_stream is not None
|
|
|
|
# Handle response
|
|
print(res.two_hundred_audio_mpeg3_response_stream)
|
|
- target: $["paths"]["/library/optimize"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.optimize_database(request={
|
|
"async_": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/parts/{partId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.set_stream_selection(request={
|
|
"part_id": 360489,
|
|
"all_parts": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/parts/{partId}/indexes/{index}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_part_index(request={
|
|
"part_id": 724750,
|
|
"index": operations.Index.SD,
|
|
})
|
|
|
|
assert res.response_stream is not None
|
|
|
|
# Handle response
|
|
print(res.response_stream)
|
|
- target: $["paths"]["/library/parts/{partId}/indexes/{index}/{offset}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_image_from_bif(request={
|
|
"part_id": 304273,
|
|
"index": operations.PathParamIndex.SD,
|
|
"offset": 939569,
|
|
})
|
|
|
|
assert res.response_stream is not None
|
|
|
|
# Handle response
|
|
print(res.response_stream)
|
|
- target: $["paths"]["/library/parts/{partId}/{changestamp}/{filename}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_media_part(request={
|
|
"part_id": 877105,
|
|
"changestamp": 970622,
|
|
"filename": "example.file",
|
|
"download": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/people/{personId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_person(request={
|
|
"person_id": "<id>",
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/library/people/{personId}/media"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.list_person_media(request={
|
|
"person_id": "<id>",
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/randomArtwork"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_random_artwork(request={
|
|
"sections": [
|
|
5,
|
|
6,
|
|
],
|
|
})
|
|
|
|
assert res.media_container_with_artwork is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_artwork)
|
|
- target: $["paths"]["/library/sections/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.library.get_sections()
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/library/sections/all"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.add_section(request=operations.AddSectionRequest(
|
|
name="<value>",
|
|
type=39544,
|
|
agent="<value>",
|
|
language="<value>",
|
|
locations=[
|
|
"O:\fatboy\\Media\\Ripped\\Music",
|
|
"O:\fatboy\\Media\\My Music",
|
|
],
|
|
prefs=operations.QueryParamPrefs(),
|
|
relative=components.BoolInt.TRUE,
|
|
import_fromi_tunes=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res.slash_get_responses_200 is not None
|
|
|
|
# Handle response
|
|
print(res.slash_get_responses_200)
|
|
- target: $["paths"]["/library/sections/all/refresh"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.library.stop_all_refreshes()
|
|
|
|
assert res.library_sections is not None
|
|
|
|
# Handle response
|
|
print(res.library_sections)
|
|
- target: $["paths"]["/library/sections/prefs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_sections_prefs(request={
|
|
"type": 460221,
|
|
})
|
|
|
|
assert res.library_sections is not None
|
|
|
|
# Handle response
|
|
print(res.library_sections)
|
|
- target: $["paths"]["/library/sections/refresh"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.refresh_sections_metadata(request={})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/sections/{sectionId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.delete_library_section(request={
|
|
"section_id": "<id>",
|
|
"async_": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/sections/{sectionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_library_details(request={
|
|
"section_id": "<id>",
|
|
"include_details": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/library/sections/{sectionId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.edit_section(request={
|
|
"section_id": "<id>",
|
|
"agent": "<value>",
|
|
"locations": [
|
|
"O:\fatboy\\Media\\Ripped\\Music",
|
|
"O:\fatboy\\Media\\My Music",
|
|
],
|
|
"prefs": {},
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/sections/{sectionId}/albums"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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)
|
|
- target: $["paths"]["/library/sections/{sectionId}/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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)
|
|
- target: $["paths"]["/library/sections/{sectionId}/all"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.update_items(request={
|
|
"section_id": "<id>",
|
|
"field_locked": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/sections/{sectionId}/allLeaves"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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)
|
|
- target: $["paths"]["/library/sections/{sectionId}/analyze"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.start_analysis(request={
|
|
"section_id": 158829,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/sections/{sectionId}/arts"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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)
|
|
- target: $["paths"]["/library/sections/{sectionId}/autocomplete"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.autocomplete(request={
|
|
"section_id": 942007,
|
|
"media_query": {
|
|
"type": components.MediaType.EPISODE,
|
|
"source_type": 2,
|
|
"sort": "duration:desc,index",
|
|
},
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/sections/{sectionId}/categories"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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)
|
|
- target: $["paths"]["/library/sections/{sectionId}/cluster"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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)
|
|
- target: $["paths"]["/library/sections/{sectionId}/collection/{collectionId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.delete_collection(request={
|
|
"section_id": 283619,
|
|
"collection_id": 680895,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/sections/{sectionId}/collections"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_collections(request={
|
|
"section_id": 348838,
|
|
"media_query": {
|
|
"type": components.MediaType.EPISODE,
|
|
"source_type": 2,
|
|
"sort": "duration:desc,index",
|
|
},
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/sections/{sectionId}/common"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_common(request={
|
|
"section_id": 298154,
|
|
"media_query": {
|
|
"type": components.MediaType.EPISODE,
|
|
"source_type": 2,
|
|
"sort": "duration:desc,index",
|
|
},
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/library/sections/{sectionId}/composite/{updatedAt}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_section_image(request={
|
|
"section_id": 925611,
|
|
"updated_at": 117413,
|
|
"media_query": {
|
|
"type": components.MediaType.EPISODE,
|
|
"source_type": 2,
|
|
"sort": "duration:desc,index",
|
|
},
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/sections/{sectionId}/computePath"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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)
|
|
- target: $["paths"]["/library/sections/{sectionId}/emptyTrash"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.empty_trash(request={
|
|
"section_id": 30052,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/sections/{sectionId}/filters"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_section_filters(request={
|
|
"section_id": 380557,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/library/sections/{sectionId}/firstCharacters"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_first_characters(request={
|
|
"section_id": 3947,
|
|
"media_query": {
|
|
"type": components.MediaType.EPISODE,
|
|
"source_type": 2,
|
|
"sort": "duration:desc,index",
|
|
},
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/library/sections/{sectionId}/indexes"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.delete_indexes(request={
|
|
"section_id": 588437,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/sections/{sectionId}/intros"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.delete_intros(request={
|
|
"section_id": 498656,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/sections/{sectionId}/location"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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)
|
|
- target: $["paths"]["/library/sections/{sectionId}/moment"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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)
|
|
- target: $["paths"]["/library/sections/{sectionId}/nearest"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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)
|
|
- target: $["paths"]["/library/sections/{sectionId}/prefs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_section_preferences(request={
|
|
"section_id": 754869,
|
|
})
|
|
|
|
assert res.media_container_with_settings is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_settings)
|
|
- target: $["paths"]["/library/sections/{sectionId}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.set_section_preferences(request={
|
|
"section_id": 349936,
|
|
"prefs": {},
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/sections/{sectionId}/refresh"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.cancel_refresh(request={
|
|
"section_id": 326852,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/sections/{sectionId}/refresh"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.refresh_section(request={
|
|
"section_id": 450300,
|
|
"force": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/sections/{sectionId}/sorts"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_available_sorts(request={
|
|
"section_id": 212498,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/library/streams/{streamId}.{ext}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.delete_stream(request={
|
|
"stream_id": 841510,
|
|
"ext": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/streams/{streamId}.{ext}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_stream(request={
|
|
"stream_id": 314506,
|
|
"ext": "<value>",
|
|
"auto_adjust_subtitle": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/streams/{streamId}.{ext}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.set_stream_offset(request={
|
|
"stream_id": 606295,
|
|
"ext": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/library/streams/{streamId}/levels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_stream_levels(request={
|
|
"stream_id": 447611,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/library/streams/{streamId}/loudness"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_stream_loudness(request={
|
|
"stream_id": 277271,
|
|
})
|
|
|
|
assert res.res is not None
|
|
|
|
# Handle response
|
|
print(res.res)
|
|
- target: $["paths"]["/library/tags"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library.get_tags(request={
|
|
"type": components.MediaType.TV_SHOW,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/dvrs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.dv_rs.list_dv_rs()
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/dvrs"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.dv_rs.create_dvr(request={
|
|
"lineup": "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT",
|
|
"device_query_parameter": [
|
|
"d",
|
|
"e",
|
|
"v",
|
|
"i",
|
|
"c",
|
|
"e",
|
|
"[",
|
|
"]",
|
|
"=",
|
|
"d",
|
|
"e",
|
|
"v",
|
|
"i",
|
|
"c",
|
|
"e",
|
|
":",
|
|
"/",
|
|
"/",
|
|
"t",
|
|
"v",
|
|
".",
|
|
"p",
|
|
"l",
|
|
"e",
|
|
"x",
|
|
".",
|
|
"g",
|
|
"r",
|
|
"a",
|
|
"b",
|
|
"b",
|
|
"e",
|
|
"r",
|
|
"s",
|
|
".",
|
|
"h",
|
|
"d",
|
|
"h",
|
|
"o",
|
|
"m",
|
|
"e",
|
|
"r",
|
|
"u",
|
|
"n",
|
|
"/",
|
|
"1",
|
|
"0",
|
|
"5",
|
|
"3",
|
|
"C",
|
|
"0",
|
|
"C",
|
|
"A",
|
|
],
|
|
"language": "eng",
|
|
})
|
|
|
|
assert res.dvr_request_handler_slash_get_responses_200 is not None
|
|
|
|
# Handle response
|
|
print(res.dvr_request_handler_slash_get_responses_200)
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.dv_rs.delete_dvr(request={
|
|
"dvr_id": 855088,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.dv_rs.get_dvr(request={
|
|
"dvr_id": 973518,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/channels/{channel}/tune"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.dv_rs.tune_channel(request={
|
|
"dvr_id": 834281,
|
|
"channel": "2.1",
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/devices/{deviceId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.dv_rs.remove_device_from_dvr(request={
|
|
"dvr_id": 945416,
|
|
"device_id": 260761,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/devices/{deviceId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.dv_rs.add_device_to_dvr(request={
|
|
"dvr_id": 334755,
|
|
"device_id": 852930,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/lineups"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.dv_rs.delete_lineup(request={
|
|
"dvr_id": 454470,
|
|
"lineup": "<value>",
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/lineups"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.dv_rs.add_lineup(request={
|
|
"dvr_id": 945235,
|
|
"lineup": "<value>",
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.dv_rs.set_dvr_preferences(request={
|
|
"dvr_id": 116357,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/reloadGuide"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.dv_rs.stop_dvr_reload(request={
|
|
"dvr_id": 348053,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/reloadGuide"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.dv_rs.reload_guide(request={
|
|
"dvr_id": 140753,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/livetv/epg/channelmap"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.epg.compute_channel_map(request={
|
|
"device_query_parameter": "<value>",
|
|
"lineup": "<value>",
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/epg/channels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.epg.get_channels(request={
|
|
"lineup": "<value>",
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/epg/countries"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.epg.get_countries()
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/lineups"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.epg.get_countries_lineups(request={
|
|
"country": "Malawi",
|
|
"epg_id": "<id>",
|
|
})
|
|
|
|
assert res.media_container_with_lineup is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_lineup)
|
|
- target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/regions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.epg.get_country_regions(request={
|
|
"country": "Morocco",
|
|
"epg_id": "<id>",
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/regions/{region}/lineups"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.epg.list_lineups(request={
|
|
"country": "Vanuatu",
|
|
"epg_id": "<id>",
|
|
"region": "<value>",
|
|
})
|
|
|
|
assert res.media_container_with_lineup is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_lineup)
|
|
- target: $["paths"]["/livetv/epg/languages"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.epg.get_all_languages()
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/epg/lineup"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.epg.get_lineup(request={
|
|
"device_query_parameter": "<value>",
|
|
"lineup_group": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/livetv/epg/lineupchannels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.epg.get_lineup_channels(request={
|
|
"lineup": [
|
|
"<value 1>",
|
|
"<value 2>",
|
|
],
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/livetv/sessions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.live_tv.get_sessions()
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/livetv/sessions/{sessionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.live_tv.get_live_tv_session(request={
|
|
"session_id": "<id>",
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/livetv/sessions/{sessionId}/{consumerId}/index.m3u8"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.live_tv.get_session_playlist_index(request={
|
|
"session_id": "<id>",
|
|
"consumer_id": "<id>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/livetv/sessions/{sessionId}/{consumerId}/{segmentId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.live_tv.get_session_segment(request={
|
|
"session_id": "<id>",
|
|
"consumer_id": "<id>",
|
|
"segment_id": "<id>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/log"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.log.write_log(request=open("example.file", "rb"))
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/log"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.log.write_message(request={})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/log/networked"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.log.enable_papertrail(request={})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/media/grabbers"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.devices.get_available_grabbers(request={
|
|
"protocol": "livetv",
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/media/grabbers/devices"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.devices.list_devices()
|
|
|
|
assert res.media_container_with_device is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_device)
|
|
- target: $["paths"]["/media/grabbers/devices"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.devices.add_device(request={
|
|
"uri": "http://10.0.0.5",
|
|
})
|
|
|
|
assert res.media_container_with_device is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_device)
|
|
- target: $["paths"]["/media/grabbers/devices/discover"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.devices.discover_devices()
|
|
|
|
assert res.media_container_with_device is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_device)
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.devices.remove_device(request={
|
|
"device_id": 685908,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.devices.get_device_details(request={
|
|
"device_id": 170949,
|
|
})
|
|
|
|
assert res.media_container_with_device is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_device)
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.devices.modify_device(request={
|
|
"device_id": 879135,
|
|
"enabled": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/channelmap"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.devices.set_channelmap(request={
|
|
"device_id": 937661,
|
|
"channel_mapping": {},
|
|
"channel_mapping_by_key": {},
|
|
"channels_enabled": [
|
|
"4",
|
|
"6",
|
|
".",
|
|
"1",
|
|
",",
|
|
"4",
|
|
"4",
|
|
".",
|
|
"1",
|
|
",",
|
|
"4",
|
|
"5",
|
|
".",
|
|
"1",
|
|
],
|
|
})
|
|
|
|
assert res.media_container_with_device is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_device)
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/channels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.devices.get_devices_channels(request={
|
|
"device_id": 517209,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.devices.set_device_preferences(request={
|
|
"device_id": 420973,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/scan"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.devices.stop_scan(request={
|
|
"device_id": 576494,
|
|
})
|
|
|
|
assert res.media_container_with_device is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_device)
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/scan"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.devices.scan(request={
|
|
"device_id": 57391,
|
|
"source": "Cable",
|
|
})
|
|
|
|
assert res.media_container_with_device is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_device)
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/thumb/{version}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.devices.get_thumb(request={
|
|
"device_id": 960617,
|
|
"version_path_parameter": 1025,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/media/grabbers/operations/{operationId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.subscriptions.cancel_grab(request={
|
|
"operation_id": "<id>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/media/providers"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.provider.list_providers()
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/media/providers"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.provider.add_provider(request={
|
|
"url": "https://steep-obedience.name/",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/media/providers/refresh"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.provider.refresh_providers()
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/media/providers/{provider}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.provider.delete_media_provider(request={
|
|
"provider": "<value>",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/media/subscriptions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.subscriptions.get_all_subscriptions(request=operations.GetAllSubscriptionsRequest(
|
|
include_grabs=components.BoolInt.TRUE,
|
|
include_storage=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res.media_container_with_subscription is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_subscription)
|
|
- target: $["paths"]["/media/subscriptions"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.subscriptions.create_subscription(request={
|
|
"target_library_section_id": 1,
|
|
"target_section_location_id": 3,
|
|
"type": 2,
|
|
"hints": {},
|
|
"prefs": {},
|
|
"params": {},
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/media/subscriptions/process"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.subscriptions.process_subscriptions()
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/media/subscriptions/scheduled"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.subscriptions.get_scheduled_recordings()
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/media/subscriptions/template"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.subscriptions.get_template(request={
|
|
"guid": "plex://episode/5fc70265c40548002d539d23",
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.subscriptions.delete_subscription(request={
|
|
"subscription_id": 974618,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.subscriptions.get_subscription(request=operations.GetSubscriptionRequest(
|
|
subscription_id=186713,
|
|
include_grabs=components.BoolInt.TRUE,
|
|
include_storage=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res.media_container_with_subscription is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_subscription)
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.subscriptions.edit_subscription_preferences(request={
|
|
"subscription_id": 673918,
|
|
"prefs": {},
|
|
})
|
|
|
|
assert res.media_container_with_subscription is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_subscription)
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.subscriptions.reorder_subscription(request={
|
|
"subscription_id": 440634,
|
|
})
|
|
|
|
assert res.media_container_with_subscription is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_subscription)
|
|
- target: $["paths"]["/photo/:/transcode"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.transcoder.transcode_image(request=operations.TranscodeImageRequest(
|
|
url="/library/metadata/265/thumb/1715112705",
|
|
background="#ff5522",
|
|
upscale=components.BoolInt.TRUE,
|
|
min_size=components.BoolInt.TRUE,
|
|
rotate=components.BoolInt.TRUE,
|
|
blend_color="#ff5522",
|
|
))
|
|
|
|
assert res.two_hundred_image_jpeg_response_stream is not None
|
|
|
|
# Handle response
|
|
print(res.two_hundred_image_jpeg_response_stream)
|
|
- target: $["paths"]["/playQueues"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.play_queue.create_play_queue(request=operations.CreatePlayQueueRequest(
|
|
type=operations.Type.AUDIO,
|
|
shuffle=components.BoolInt.TRUE,
|
|
repeat=components.BoolInt.TRUE,
|
|
continuous=components.BoolInt.TRUE,
|
|
recursive=components.BoolInt.TRUE,
|
|
on_deck=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/playQueues/{playQueueId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.play_queue.get_play_queue(request=operations.GetPlayQueueRequest(
|
|
play_queue_id=210646,
|
|
own=components.BoolInt.TRUE,
|
|
include_before=components.BoolInt.TRUE,
|
|
include_after=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playQueues/{playQueueId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.play_queue.add_to_play_queue(request={
|
|
"play_queue_id": 919248,
|
|
"next": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playQueues/{playQueueId}/items"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.play_queue.clear_play_queue(request={
|
|
"play_queue_id": 86357,
|
|
})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playQueues/{playQueueId}/items/{playQueueItemId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.play_queue.delete_play_queue_item(request={
|
|
"play_queue_id": 285738,
|
|
"play_queue_item_id": 464354,
|
|
})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playQueues/{playQueueId}/items/{playQueueItemId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.play_queue.move_play_queue_item(request={
|
|
"play_queue_id": 31341,
|
|
"play_queue_item_id": 495865,
|
|
})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playQueues/{playQueueId}/reset"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.play_queue.reset_play_queue(request={
|
|
"play_queue_id": 581891,
|
|
})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playQueues/{playQueueId}/shuffle"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.play_queue.shuffle(request={
|
|
"play_queue_id": 316150,
|
|
})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playQueues/{playQueueId}/unshuffle"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.play_queue.unshuffle(request={
|
|
"play_queue_id": 484388,
|
|
})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playlists"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.playlist.list_playlists(request={})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playlists"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_playlists.create_playlist(request={})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playlists/upload"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_playlists.upload_playlist(request={
|
|
"path": "/home/barkley/playlist.m3u",
|
|
"force": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/playlists/{playlistId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_playlists.delete_playlist(request={
|
|
"playlist_id": 343293,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/playlists/{playlistId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.playlist.get_playlist(request={
|
|
"playlist_id": 841953,
|
|
})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playlists/{playlistId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_playlists.update_playlist(request={
|
|
"playlist_id": 157966,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/playlists/{playlistId}/generators"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_playlists.get_playlist_generators(request={
|
|
"playlist_id": 162342,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/playlists/{playlistId}/items"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_playlists.clear_playlist_items(request={
|
|
"playlist_id": 552140,
|
|
})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playlists/{playlistId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.playlist.get_playlist_items(request={
|
|
"playlist_id": 118195,
|
|
})
|
|
|
|
assert res.media_container_with_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_metadata)
|
|
- target: $["paths"]["/playlists/{playlistId}/items"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_playlists.add_playlist_items(request={
|
|
"playlist_id": 533723,
|
|
})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_playlists.delete_playlist_item(request={
|
|
"playlist_id": 981646,
|
|
"generator_id": 194010,
|
|
})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_playlists.get_playlist_generator(request={
|
|
"playlist_id": 744880,
|
|
"generator_id": 322168,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_playlists.modify_playlist_generator(request={
|
|
"playlist_id": 972007,
|
|
"generator_id": 208334,
|
|
"item": {
|
|
"location": {
|
|
"uri": "library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146",
|
|
},
|
|
"location_id": -1,
|
|
"policy": {
|
|
"scope": operations.QueryParamScope.ALL,
|
|
},
|
|
"target": "",
|
|
"target_tag_id": 1,
|
|
"title": "Jack-Jack Attack",
|
|
"type": 42,
|
|
},
|
|
})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_playlists.get_playlist_generator_items(request={
|
|
"playlist_id": 77230,
|
|
"generator_id": 979714,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}/{metadataId}/{action}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_playlists.refresh_playlist(request={
|
|
"playlist_id": 895314,
|
|
"generator_id": 629742,
|
|
"metadata_id": 724422,
|
|
"action": operations.Action.DISABLE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{playlistItemId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.library_playlists.move_playlist_item(request={
|
|
"playlist_id": 940298,
|
|
"playlist_item_id": 375626,
|
|
})
|
|
|
|
assert res.media_container_with_playlist_metadata is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_playlist_metadata)
|
|
- target: $["paths"]["/resources"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import components, operations
|
|
|
|
|
|
with PlexAPI(
|
|
accepts=components.Accepts.APPLICATION_XML,
|
|
client_identifier="abc123",
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.plex.get_server_resources(request={
|
|
"include_https": operations.IncludeHTTPS.TRUE,
|
|
"include_relay": operations.IncludeRelay.TRUE,
|
|
"include_i_pv6": operations.IncludeIPv6.TRUE,
|
|
})
|
|
|
|
assert res.plex_devices is not None
|
|
|
|
# Handle response
|
|
print(res.plex_devices)
|
|
- target: $["paths"]["/security/resources"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.general.get_source_connection_information(request={
|
|
"source": "<value>",
|
|
"refresh": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/security/token"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.general.get_transient_token(request={
|
|
"type": operations.QueryParamType.DELEGATION,
|
|
"scope": operations.Scope.ALL,
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/services/ultrablur/colors"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.ultra_blur.get_colors(request={
|
|
"url": "/library/metadata/217745/art/1718931408",
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/services/ultrablur/image"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.ultra_blur.get_image(request={
|
|
"top_left": "3f280a",
|
|
"top_right": "6b4713",
|
|
"bottom_right": "0f2a43",
|
|
"bottom_left": "1c425d",
|
|
"width": 1920,
|
|
"height": 1080,
|
|
"noise": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res.response_stream is not None
|
|
|
|
# Handle response
|
|
print(res.response_stream)
|
|
- target: $["paths"]["/status/sessions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.status.list_sessions()
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/status/sessions/background"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.status.get_background_tasks()
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/status/sessions/history/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.status.list_playback_history(request={
|
|
"sort": [
|
|
"v",
|
|
"i",
|
|
"e",
|
|
"w",
|
|
"e",
|
|
"d",
|
|
"A",
|
|
"t",
|
|
":",
|
|
"d",
|
|
"e",
|
|
"s",
|
|
"c",
|
|
",",
|
|
"a",
|
|
"c",
|
|
"c",
|
|
"o",
|
|
"u",
|
|
"n",
|
|
"t",
|
|
"I",
|
|
"D",
|
|
],
|
|
})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/status/sessions/history/{historyId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.status.delete_history(request={
|
|
"history_id": 953579,
|
|
})
|
|
|
|
assert res.media_container is not None
|
|
|
|
# Handle response
|
|
print(res.media_container)
|
|
- target: $["paths"]["/status/sessions/history/{historyId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.status.get_history_item(request={
|
|
"history_id": 832213,
|
|
})
|
|
|
|
assert res.history_all_get_responses_200 is not None
|
|
|
|
# Handle response
|
|
print(res.history_all_get_responses_200)
|
|
- target: $["paths"]["/status/sessions/terminate"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.status.terminate_session(request={
|
|
"session_id": "cdefghijklmnopqrstuvwxyz",
|
|
"reason": "Stop Playing",
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/updater/apply"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.updater.apply_updates(request=operations.ApplyUpdatesRequest(
|
|
tonight=components.BoolInt.TRUE,
|
|
skip=components.BoolInt.TRUE,
|
|
))
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/updater/check"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.updater.check_updates(request={
|
|
"download": components.BoolInt.TRUE,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/updater/status"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
from plex_api_client import PlexAPI
|
|
|
|
|
|
with PlexAPI(
|
|
token="<YOUR_API_KEY_HERE>",
|
|
) as plex_api:
|
|
|
|
res = plex_api.updater.get_updates_status()
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/user"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.authentication.get_token_details(request={})
|
|
|
|
assert res.user_plex_account is not None
|
|
|
|
# Handle response
|
|
print(res.user_plex_account)
|
|
- target: $["paths"]["/users"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.users.get_users(request={})
|
|
|
|
assert res.object is not None
|
|
|
|
# Handle response
|
|
print(res.object)
|
|
- target: $["paths"]["/users/signin"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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",
|
|
) as plex_api:
|
|
|
|
res = plex_api.authentication.post_users_sign_in_data(request={
|
|
"request_body": {
|
|
"login": "username@email.com",
|
|
"password": "password123",
|
|
"verification_code": "123456",
|
|
},
|
|
})
|
|
|
|
assert res.user_plex_account is not None
|
|
|
|
# Handle response
|
|
print(res.user_plex_account)
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/decision"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.transcoder.make_decision(request=operations.MakeDecisionRequest(
|
|
transcode_type=components.TranscodeType.MUSIC,
|
|
advanced_subtitles=components.AdvancedSubtitles.BURN,
|
|
audio_boost=50,
|
|
audio_channel_count=5,
|
|
auto_adjust_quality=components.BoolInt.TRUE,
|
|
auto_adjust_subtitle=components.BoolInt.TRUE,
|
|
direct_play=components.BoolInt.TRUE,
|
|
direct_stream=components.BoolInt.TRUE,
|
|
direct_stream_audio=components.BoolInt.TRUE,
|
|
disable_resolution_rotation=components.BoolInt.TRUE,
|
|
has_mde=components.BoolInt.TRUE,
|
|
location=operations.Location.WAN,
|
|
media_buffer_size=102400,
|
|
media_index=0,
|
|
music_bitrate=5000,
|
|
offset=90.5,
|
|
part_index=0,
|
|
path="/library/metadata/151671",
|
|
peak_bitrate=12000,
|
|
photo_resolution="1080x1080",
|
|
protocol=operations.Protocol.DASH,
|
|
seconds_per_segment=5,
|
|
subtitle_size=50,
|
|
video_bitrate=12000,
|
|
video_quality=50,
|
|
video_resolution="1080x1080",
|
|
x_plex_client_profile_extra="add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)",
|
|
x_plex_client_profile_name="generic",
|
|
))
|
|
|
|
assert res.media_container_with_decision is not None
|
|
|
|
# Handle response
|
|
print(res.media_container_with_decision)
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/fallback"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.transcoder.trigger_fallback(request={
|
|
"transcode_type": components.TranscodeType.AUDIO,
|
|
})
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/start.{extension}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.transcoder.start_transcode_session(request=operations.StartTranscodeSessionRequest(
|
|
transcode_type=components.TranscodeType.MUSIC,
|
|
extension=operations.Extension.MPD,
|
|
advanced_subtitles=components.AdvancedSubtitles.BURN,
|
|
audio_boost=50,
|
|
audio_channel_count=5,
|
|
auto_adjust_quality=components.BoolInt.TRUE,
|
|
auto_adjust_subtitle=components.BoolInt.TRUE,
|
|
direct_play=components.BoolInt.TRUE,
|
|
direct_stream=components.BoolInt.TRUE,
|
|
direct_stream_audio=components.BoolInt.TRUE,
|
|
disable_resolution_rotation=components.BoolInt.TRUE,
|
|
has_mde=components.BoolInt.TRUE,
|
|
location=operations.StartTranscodeSessionQueryParamLocation.WAN,
|
|
media_buffer_size=102400,
|
|
media_index=0,
|
|
music_bitrate=5000,
|
|
offset=90.5,
|
|
part_index=0,
|
|
path="/library/metadata/151671",
|
|
peak_bitrate=12000,
|
|
photo_resolution="1080x1080",
|
|
protocol=operations.StartTranscodeSessionQueryParamProtocol.DASH,
|
|
seconds_per_segment=5,
|
|
subtitle_size=50,
|
|
video_bitrate=12000,
|
|
video_quality=50,
|
|
video_resolution="1080x1080",
|
|
x_plex_client_profile_extra="add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)",
|
|
x_plex_client_profile_name="generic",
|
|
))
|
|
|
|
assert res.response_stream is not None
|
|
|
|
# Handle response
|
|
print(res.response_stream)
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/subtitles"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: PlexPy
|
|
source: |-
|
|
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.transcoder.transcode_subtitles(request=operations.TranscodeSubtitlesRequest(
|
|
transcode_type=components.TranscodeType.AUDIO,
|
|
advanced_subtitles=components.AdvancedSubtitles.BURN,
|
|
audio_boost=50,
|
|
audio_channel_count=5,
|
|
auto_adjust_quality=components.BoolInt.TRUE,
|
|
auto_adjust_subtitle=components.BoolInt.TRUE,
|
|
direct_play=components.BoolInt.TRUE,
|
|
direct_stream=components.BoolInt.TRUE,
|
|
direct_stream_audio=components.BoolInt.TRUE,
|
|
disable_resolution_rotation=components.BoolInt.TRUE,
|
|
has_mde=components.BoolInt.TRUE,
|
|
location=operations.QueryParamLocation.WAN,
|
|
media_buffer_size=102400,
|
|
media_index=0,
|
|
music_bitrate=5000,
|
|
offset=90.5,
|
|
part_index=0,
|
|
path="/library/metadata/151671",
|
|
peak_bitrate=12000,
|
|
photo_resolution="1080x1080",
|
|
protocol=operations.QueryParamProtocol.DASH,
|
|
seconds_per_segment=5,
|
|
subtitle_size=50,
|
|
video_bitrate=12000,
|
|
video_quality=50,
|
|
video_resolution="1080x1080",
|
|
x_plex_client_profile_extra="add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)",
|
|
x_plex_client_profile_name="generic",
|
|
))
|
|
|
|
assert res is not None
|
|
|
|
# Handle response
|
|
print(res)
|