Files
plexjs/docs/sdks/watchlist

Watchlist

(watchlist)

Overview

API Calls that perform operations with Plex Media Server Watchlists

Available Operations

getWatchlist

Get User Watchlist

Example Usage

import { Filter, PlexAPI } from "@lukehagar/plexjs";

const plexAPI = new PlexAPI({
  accessToken: "<YOUR_API_KEY_HERE>",
  xPlexClientIdentifier: "Postman",
});

async function run() {
  const result = await plexAPI.watchlist.getWatchlist({
    filter: Filter.Released,
    xPlexToken: "<value>",
  });

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request models.GetWatchlistRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.serverURL string An optional server URL to use.

Response

Promise<models.GetWatchlistResponse>

Errors

Error Object Status Code Content Type
models.GetWatchlistWatchlistResponseBody 401 application/json
models.SDKError 4xx-5xx /