* `plex-api.libraryPlaylists.addPlaylistItems()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getMetadataHubs()`: * `request.onlyTransient` **Changed** * `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryCollections.moveCollectionItem()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryCollections.deleteCollectionItem()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryCollections.addCollectionItems()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.content.getSonicallySimilar()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.butler.stopTask()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.butler.startTask()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.getSonicPath()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.downloadQueue.getItemDecision()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getAllHubs()`: * `request.onlyTransient` **Changed** * `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getContinueWatching()`: `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getPromotedHubs()`: `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.content.getAllLeaves()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getPostplayHubs()`: * `request.onlyTransient` **Changed** * `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getRelatedHubs()`: * `request.onlyTransient` **Changed** * `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getSectionHubs()`: * `request.onlyTransient` **Changed** * `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.content.listContent()`: * `request` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.content.getAlbums()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.search.searchHubs()`: `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.search.voiceSearchHubs()`: * `request.type` **Changed** **Breaking** ⚠️ * `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getLibraryItems()`: * `request.mediaQuery` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.ingestTransientItem()`: * `request` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getLibraryMatches()`: * `request` **Changed** **Breaking** ⚠️ * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.content.getMetadataItem()`: * `request` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getSections()`: `response.mediacontainer.directory.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.addSection()`: * `request` **Changed** * `response.mediacontainer.directory.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getTags()`: * `request.type` **Changed** **Breaking** ⚠️ * `plex-api.content.getCollectionItems()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getAllItemLeaves()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.status.listSessions()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.movePlayQueueItem()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getExtras()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.deletePlayQueueItem()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.unshuffle()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.listMatches()`: * `request.manual` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.listSonicallySimilar()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.resetPlayQueue()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getRelatedItems()`: `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.listSimilar()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.clearPlayQueue()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getItemTree()`: `response.mediacontainer.metadataItem.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.addToPlayQueue()`: * `request.next` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.getPlayQueue()`: * `request` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.movePlaylistItem()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getPerson()`: `response.mediacontainer.directory.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.listPersonMedia()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.getPlaylistGeneratorItems()`: `response.mediacontainer.metadata` **Changed** **Breaking** ⚠️ * `plex-api.library.getLibraryDetails()`: * `request.includeDetails` **Changed** * `response.mediacontainer.directory.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.modifyPlaylistGenerator()`: * `request.item` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.autocomplete()`: * `request.mediaQuery` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getCollections()`: * `request.mediaQuery` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getCommon()`: * `request.mediaQuery` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.deletePlaylistItem()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.clearPlaylistItems()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.shuffle()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.createPlaylist()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playlist.getPlaylistItems()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playlist.getPlaylist()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.collections.createCollection()`: * `request.type` **Changed** **Breaking** ⚠️ * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.dvRs.tuneChannel()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.liveTv.getSessions()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.liveTv.getLiveTvSession()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playlist.listPlaylists()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.getAllSubscriptions()`: * `request` **Changed** * `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.createSubscription()`: `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.getScheduledRecordings()`: `response.mediacontainer.mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.getTemplate()`: `response.mediacontainer.subscriptionTemplate.[].mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.getSubscription()`: * `request` **Changed** * `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.editSubscriptionPreferences()`: `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.reorderSubscription()`: `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.transcoder.makeDecision()`: * `request` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.refreshItemsMetadata()`: * `request.markUpdated` **Changed** * `plex-api.authentication.postUsersSignInData()`: **Added** * `plex-api.transcoder.startTranscodeSession()`: `request` **Changed** * `plex-api.devices.modifyDevice()`: * `request.enabled` **Changed** * `plex-api.library.getMediaPart()`: * `request.download` **Changed** * `plex-api.library.detectIntros()`: * `request.force` **Changed** * `plex-api.library.refreshSection()`: * `request.force` **Changed** * `plex-api.libraryPlaylists.uploadPlaylist()`: * `request.force` **Changed** * `plex-api.library.deleteMediaItem()`: * `request.proxy` **Changed** * `plex-api.authentication.getTokenDetails()`: **Added** * `plex-api.library.getFirstCharacters()`: * `request.mediaQuery` **Changed** * `plex-api.library.updateItems()`: * `request.field.locked` **Changed** * `plex-api.library.deleteLibrarySection()`: * `request.async` **Changed** * `plex-api.library.setStreamSelection()`: * `request.allParts` **Changed** * `plex-api.playQueue.createPlayQueue()`: `request` **Changed** * `plex-api.library.getAugmentationStatus()`: * `request.wait` **Changed** * `plex-api.library.detectVoiceActivity()`: `request` **Changed** * `plex-api.transcoder.transcodeImage()`: `request` **Changed** * `plex-api.transcoder.transcodeSubtitles()`: `request` **Changed** * `plex-api.library.addSubtitles()`: `request` **Changed** * `plex-api.library.getStream()`: * `request.autoAdjustSubtitle` **Changed** * `plex-api.library.startBifGeneration()`: * `request.force` **Changed** * `plex-api.library.detectCredits()`: `request` **Changed** * `plex-api.ultraBlur.getImage()`: * `request.noise` **Changed** * `plex-api.library.generateThumbs()`: * `request.force` **Changed** * `plex-api.updater.applyUpdates()`: `request` **Changed** * `plex-api.updater.checkUpdates()`: * `request.download` **Changed** * `plex-api.library.deleteMetadataItem()`: * `request.proxy` **Changed** * `plex-api.library.optimizeDatabase()`: * `request.async` **Changed** * `plex-api.hubs.updateHubVisibility()`: `request` **Changed** * `plex-api.hubs.createCustomHub()`: `request` **Changed** * `plex-api.library.getSectionImage()`: * `request.mediaQuery` **Changed** * `plex-api.downloadQueue.addDownloadQueueItems()`: `request` **Changed** * `plex-api.timeline.report()`: `request` **Changed** * `plex-api.general.getSourceConnectionInformation()`: * `request.refresh` **Changed** * `plex-api.plex.getServerResources()`: **Added** * `plex-api.users.getUsers()`: **Added**
86 KiB
LibraryPlaylists
(libraryPlaylists)
Overview
Endpoints for manipulating playlists.
Available Operations
- createPlaylist - Create a Playlist
- uploadPlaylist - Upload
- deletePlaylist - Delete a Playlist
- updatePlaylist - Editing a Playlist
- getPlaylistGenerators - Get a playlist's generators
- clearPlaylistItems - Clearing a playlist
- addPlaylistItems - Adding to a Playlist
- deletePlaylistItem - Delete a Generator
- getPlaylistGenerator - Get a playlist generator
- modifyPlaylistGenerator - Modify a Generator
- getPlaylistGeneratorItems - Get a playlist generator's items
- movePlaylistItem - Moving items in a playlist
- refreshPlaylist - Reprocess a generator
createPlaylist
Create a new playlist. By default the playlist is blank.
Example Usage
import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
const plexAPI = new PlexAPI({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.libraryPlaylists.createPlaylist({
uri: "https://short-term-disconnection.name/",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryPlaylistsCreatePlaylist } from "@lukehagar/plexjs/funcs/libraryPlaylistsCreatePlaylist.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryPlaylistsCreatePlaylist(plexAPI, {
uri: "https://short-term-disconnection.name/",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("libraryPlaylistsCreatePlaylist failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CreatePlaylistRequest | ✔️ | 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.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.CreatePlaylistResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
uploadPlaylist
Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
Example Usage
import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";
const plexAPI = new PlexAPI({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.libraryPlaylists.uploadPlaylist({
path: "/home/barkley/playlist.m3u",
force: BoolInt.True,
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryPlaylistsUploadPlaylist } from "@lukehagar/plexjs/funcs/libraryPlaylistsUploadPlaylist.js";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryPlaylistsUploadPlaylist(plexAPI, {
path: "/home/barkley/playlist.m3u",
force: BoolInt.True,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("libraryPlaylistsUploadPlaylist failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UploadPlaylistRequest | ✔️ | 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.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.UploadPlaylistResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
deletePlaylist
Deletes a playlist by provided id
Example Usage
import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
const plexAPI = new PlexAPI({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.libraryPlaylists.deletePlaylist({
playlistId: 343293,
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryPlaylistsDeletePlaylist } from "@lukehagar/plexjs/funcs/libraryPlaylistsDeletePlaylist.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryPlaylistsDeletePlaylist(plexAPI, {
playlistId: 343293,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("libraryPlaylistsDeletePlaylist failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.DeletePlaylistRequest | ✔️ | 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.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.DeletePlaylistResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
updatePlaylist
Edits a playlist in the same manner as editing metadata
Example Usage
import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
const plexAPI = new PlexAPI({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.libraryPlaylists.updatePlaylist({
playlistId: 157966,
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryPlaylistsUpdatePlaylist } from "@lukehagar/plexjs/funcs/libraryPlaylistsUpdatePlaylist.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryPlaylistsUpdatePlaylist(plexAPI, {
playlistId: 157966,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("libraryPlaylistsUpdatePlaylist failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdatePlaylistRequest | ✔️ | 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.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.UpdatePlaylistResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
getPlaylistGenerators
Get all the generators in a playlist
Example Usage
import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
const plexAPI = new PlexAPI({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.libraryPlaylists.getPlaylistGenerators({
playlistId: 162342,
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryPlaylistsGetPlaylistGenerators } from "@lukehagar/plexjs/funcs/libraryPlaylistsGetPlaylistGenerators.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryPlaylistsGetPlaylistGenerators(plexAPI, {
playlistId: 162342,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("libraryPlaylistsGetPlaylistGenerators failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetPlaylistGeneratorsRequest | ✔️ | 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.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.GetPlaylistGeneratorsResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
clearPlaylistItems
Clears a playlist, only works with dumb playlists. Returns the playlist.
Example Usage
import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
const plexAPI = new PlexAPI({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.libraryPlaylists.clearPlaylistItems({
playlistId: 552140,
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryPlaylistsClearPlaylistItems } from "@lukehagar/plexjs/funcs/libraryPlaylistsClearPlaylistItems.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryPlaylistsClearPlaylistItems(plexAPI, {
playlistId: 552140,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("libraryPlaylistsClearPlaylistItems failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ClearPlaylistItemsRequest | ✔️ | 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.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.ClearPlaylistItemsResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
addPlaylistItems
Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. With a smart playlist, passing a new uri parameter replaces the rules for the playlist. Returns the playlist.
Example Usage
import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
const plexAPI = new PlexAPI({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.libraryPlaylists.addPlaylistItems({
playlistId: 533723,
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryPlaylistsAddPlaylistItems } from "@lukehagar/plexjs/funcs/libraryPlaylistsAddPlaylistItems.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryPlaylistsAddPlaylistItems(plexAPI, {
playlistId: 533723,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("libraryPlaylistsAddPlaylistItems failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.AddPlaylistItemsRequest | ✔️ | 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.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.AddPlaylistItemsResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
deletePlaylistItem
Deletes an item from a playlist. Only works with dumb playlists.
Example Usage
import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
const plexAPI = new PlexAPI({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.libraryPlaylists.deletePlaylistItem({
playlistId: 981646,
generatorId: 194010,
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryPlaylistsDeletePlaylistItem } from "@lukehagar/plexjs/funcs/libraryPlaylistsDeletePlaylistItem.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryPlaylistsDeletePlaylistItem(plexAPI, {
playlistId: 981646,
generatorId: 194010,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("libraryPlaylistsDeletePlaylistItem failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.DeletePlaylistItemRequest | ✔️ | 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.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.DeletePlaylistItemResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
getPlaylistGenerator
Get a playlist's generator. Only used for optimized versions
Example Usage
import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
const plexAPI = new PlexAPI({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.libraryPlaylists.getPlaylistGenerator({
playlistId: 744880,
generatorId: 322168,
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryPlaylistsGetPlaylistGenerator } from "@lukehagar/plexjs/funcs/libraryPlaylistsGetPlaylistGenerator.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryPlaylistsGetPlaylistGenerator(plexAPI, {
playlistId: 744880,
generatorId: 322168,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("libraryPlaylistsGetPlaylistGenerator failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetPlaylistGeneratorRequest | ✔️ | 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.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.GetPlaylistGeneratorResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
modifyPlaylistGenerator
Modify a playlist generator. Only used for optimizer
Example Usage
import { PlexAPI } from "@lukehagar/plexjs";
import { ModifyPlaylistGeneratorScope } from "@lukehagar/plexjs/sdk/models/operations";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
const plexAPI = new PlexAPI({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.libraryPlaylists.modifyPlaylistGenerator({
playlistId: 972007,
generatorId: 208334,
item: {
location: {
uri: "library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146",
},
locationID: -1,
policy: {
scope: ModifyPlaylistGeneratorScope.All,
},
target: "",
targetTagID: 1,
title: "Jack-Jack Attack",
type: 42,
},
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryPlaylistsModifyPlaylistGenerator } from "@lukehagar/plexjs/funcs/libraryPlaylistsModifyPlaylistGenerator.js";
import { ModifyPlaylistGeneratorScope } from "@lukehagar/plexjs/sdk/models/operations";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryPlaylistsModifyPlaylistGenerator(plexAPI, {
playlistId: 972007,
generatorId: 208334,
item: {
location: {
uri: "library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146",
},
locationID: -1,
policy: {
scope: ModifyPlaylistGeneratorScope.All,
},
target: "",
targetTagID: 1,
title: "Jack-Jack Attack",
type: 42,
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("libraryPlaylistsModifyPlaylistGenerator failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ModifyPlaylistGeneratorRequest | ✔️ | 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.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.ModifyPlaylistGeneratorResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
getPlaylistGeneratorItems
Get a playlist generator's items
Example Usage
import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
const plexAPI = new PlexAPI({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.libraryPlaylists.getPlaylistGeneratorItems({
playlistId: 77230,
generatorId: 979714,
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryPlaylistsGetPlaylistGeneratorItems } from "@lukehagar/plexjs/funcs/libraryPlaylistsGetPlaylistGeneratorItems.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryPlaylistsGetPlaylistGeneratorItems(plexAPI, {
playlistId: 77230,
generatorId: 979714,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("libraryPlaylistsGetPlaylistGeneratorItems failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetPlaylistGeneratorItemsRequest | ✔️ | 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.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.GetPlaylistGeneratorItemsResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
movePlaylistItem
Moves an item in a playlist. Only works with dumb playlists.
Example Usage
import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
const plexAPI = new PlexAPI({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.libraryPlaylists.movePlaylistItem({
playlistId: 940298,
playlistItemId: 375626,
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryPlaylistsMovePlaylistItem } from "@lukehagar/plexjs/funcs/libraryPlaylistsMovePlaylistItem.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryPlaylistsMovePlaylistItem(plexAPI, {
playlistId: 940298,
playlistItemId: 375626,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("libraryPlaylistsMovePlaylistItem failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.MovePlaylistItemRequest | ✔️ | 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.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.MovePlaylistItemResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |
refreshPlaylist
Make a generator reprocess (refresh)
Example Usage
import { PlexAPI } from "@lukehagar/plexjs";
import { Action } from "@lukehagar/plexjs/sdk/models/operations";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
const plexAPI = new PlexAPI({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.libraryPlaylists.refreshPlaylist({
playlistId: 895314,
generatorId: 629742,
metadataId: 724422,
action: Action.Disable,
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryPlaylistsRefreshPlaylist } from "@lukehagar/plexjs/funcs/libraryPlaylistsRefreshPlaylist.js";
import { Action } from "@lukehagar/plexjs/sdk/models/operations";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accepts: Accepts.ApplicationXml,
clientIdentifier: "abc123",
product: "Plex for Roku",
version: "2.4.1",
platform: "Roku",
platformVersion: "4.3 build 1057",
device: "Roku 3",
model: "4200X",
deviceVendor: "Roku",
deviceName: "Living Room TV",
marketplace: "googlePlay",
token: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryPlaylistsRefreshPlaylist(plexAPI, {
playlistId: 895314,
generatorId: 629742,
metadataId: 724422,
action: Action.Disable,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("libraryPlaylistsRefreshPlaylist failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.RefreshPlaylistRequest | ✔️ | 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.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.RefreshPlaylistResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |