Files
plexpy/docs/sdks/watchlist/README.md

3.1 KiB
Raw Blame History

Watchlist

(watchlist)

Overview

API Calls that perform operations with Plex Media Server Watchlists

Available Operations

get_watch_list

Get User Watchlist

Example Usage

from plex_api_client import PlexAPI
from plex_api_client.models import operations

s = PlexAPI(
    access_token="<YOUR_API_KEY_HERE>",
    client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
    client_name="Plex for Roku",
    client_version="2.4.1",
    platform="Roku",
    device_nickname="Roku 3",
)

res = s.watchlist.get_watch_list(request={
    "filter_": operations.Filter.AVAILABLE,
    "x_plex_token": "CV5xoxjTpFKUzBTShsaf",
    "x_plex_container_start": 0,
    "x_plex_container_size": 50,
})

if res.object is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request operations.GetWatchListRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.
server_url Optional[str] An optional server URL to use.

Response

operations.GetWatchListResponse

Errors

Error Type Status Code Content Type
errors.GetWatchListBadRequest 400 application/json
errors.GetWatchListUnauthorized 401 application/json
errors.SDKError 4XX, 5XX */*