(watchlist)
API Calls that perform operations with Plex Media Server Watchlists
- get_watch_list - Get User Watchlist
Get User Watchlist
from plex_api_client import PlexAPI
from plex_api_client.models import operations
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
) as plex_api:
res = plex_api.watchlist.get_watch_list(request={
"filter_": operations.Filter.AVAILABLE,
"x_plex_token": "CV5xoxjTpFKUzBTShsaf",
})
assert res.object is not None
# Handle response
print(res.object)
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. |
operations.GetWatchListResponse
Error Type | Status Code | Content Type |
---|---|---|
errors.GetWatchListBadRequest | 400 | application/json |
errors.GetWatchListUnauthorized | 401 | application/json |
errors.SDKError | 4XX, 5XX | */* |