mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 04:20:46 +00:00
## Typescript SDK Changes Detected:
* `plex-api.general.getServerInfo()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.general.getSourceConnectionInformation()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.general.getTransientToken()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.events.getNotifications()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.events.connectWebSocket()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.preferences.setPreferences()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.preferences.getPreference()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.rate.setRating()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.timeline.markPlayed()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.timeline.report()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.timeline.unscrobble()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.activities.cancelActivity()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.butler.stopTask()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.butler.startTask()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.downloadQueue.getDownloadQueue()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.downloadQueue.addDownloadQueueItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.downloadQueue.listDownloadQueueItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.downloadQueue.getItemDecision()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.downloadQueue.getDownloadQueueMedia()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.downloadQueue.removeDownloadQueueItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.downloadQueue.getDownloadQueueItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.downloadQueue.restartProcessingDownloadQueueItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getAllHubs()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getContinueWatching()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getHubItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getPromotedHubs()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getMetadataHubs()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getPostplayHubs()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getRelatedHubs()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getSectionHubs()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.resetSectionDefaults()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.listHubs()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.createCustomHub()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.moveHub()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.deleteCustomHub()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.hubs.updateHubVisibility()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.search.searchHubs()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.search.voiceSearchHubs()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getLibraryItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.ingestTransientItem()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getLibraryMatches()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.optimizeDatabase()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getRandomArtwork()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.addSection()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getSectionsPrefs()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.refreshSectionsMetadata()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getTags()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.deleteMetadataItem()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.editMetadataItem()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.detectAds()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getAllItemLeaves()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.analyzeMetadata()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.generateThumbs()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.detectCredits()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getExtras()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.addExtras()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getFile()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.startBifGeneration()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.detectIntros()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.createMarker()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.matchItem()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.listMatches()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.mergeItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.listSonicallySimilar()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.setItemPreferences()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.refreshItemsMetadata()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getRelatedItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.listSimilar()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.splitItem()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.addSubtitles()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getItemTree()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.unmatch()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.listTopUsers()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.detectVoiceActivity()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getAugmentationStatus()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.setStreamSelection()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getPerson()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.listPersonMedia()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.deleteLibrarySection()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getLibraryDetails()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.editSection()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.updateItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.startAnalysis()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.autocomplete()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getCollections()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getCommon()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.emptyTrash()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getSectionFilters()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getFirstCharacters()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.deleteIndexes()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.deleteIntros()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getSectionPreferences()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.setSectionPreferences()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.cancelRefresh()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.refreshSection()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getAvailableSorts()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getStreamLevels()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getStreamLoudness()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getChapterImage()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.setItemArtwork()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.updateItemArtwork()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.deleteMarker()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.editMarker()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.deleteMediaItem()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getPartIndex()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.deleteCollection()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getSectionImage()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.deleteStream()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getStream()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.setStreamOffset()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getItemArtwork()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getMediaPart()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.library.getImageFromBif()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.collections.createCollection()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.dvRs.createDvr()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.dvRs.deleteDvr()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.dvRs.getDvr()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.dvRs.deleteLineup()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.dvRs.addLineup()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.dvRs.setDvrPreferences()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.dvRs.stopDvrReload()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.dvRs.reloadGuide()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.dvRs.tuneChannel()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.dvRs.removeDeviceFromDvr()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.dvRs.addDeviceToDvr()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.epg.computeChannelMap()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.epg.getChannels()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.epg.getLineup()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.epg.getLineupChannels()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.epg.getCountriesLineups()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.epg.getCountryRegions()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.epg.listLineups()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.liveTv.getLiveTvSession()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.liveTv.getSessionPlaylistIndex()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.liveTv.getSessionSegment()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.log.writeMessage()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.log.enablePapertrail()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.devices.getAvailableGrabbers()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.devices.addDevice()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.devices.removeDevice()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.devices.getDeviceDetails()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.devices.modifyDevice()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.devices.setChannelmap()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.devices.getDevicesChannels()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.devices.setDevicePreferences()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.devices.stopScan()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.devices.scan()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.devices.getThumb()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.provider.addProvider()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.provider.deleteMediaProvider()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.getAllSubscriptions()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.createSubscription()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.getTemplate()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.cancelGrab()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.deleteSubscription()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.getSubscription()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.editSubscriptionPreferences()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.reorderSubscription()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.transcoder.transcodeImage()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.transcoder.makeDecision()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.transcoder.triggerFallback()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.transcoder.transcodeSubtitles()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.transcoder.startTranscodeSession()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.playlist.listPlaylists()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.playlist.getPlaylist()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.playlist.getPlaylistItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.createPlaylist()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.uploadPlaylist()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.deletePlaylist()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.updatePlaylist()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.getPlaylistGenerators()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.clearPlaylistItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.addPlaylistItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.deletePlaylistItem()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.getPlaylistGenerator()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.modifyPlaylistGenerator()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.getPlaylistGeneratorItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.movePlaylistItem()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.refreshPlaylist()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.createPlayQueue()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.getPlayQueue()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.addToPlayQueue()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.clearPlayQueue()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.resetPlayQueue()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.shuffle()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.unshuffle()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.deletePlayQueueItem()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.movePlayQueueItem()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.ultraBlur.getColors()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.ultraBlur.getImage()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.status.listPlaybackHistory()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.status.terminateSession()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.status.deleteHistory()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.status.getHistoryItem()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.updater.applyUpdates()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.updater.checkUpdates()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.getCollectionItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.getMetadataItem()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.getAlbums()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.listContent()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.getAllLeaves()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.getArts()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.getCategories()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.getCluster()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.getSonicPath()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.getFolders()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.listMoments()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.getSonicallySimilar()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.getCollectionImage()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryCollections.addCollectionItems()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryCollections.deleteCollectionItem()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.libraryCollections.moveCollectionItem()`: `request` **Changed** **Breaking** ⚠️
This commit is contained in:
@@ -30,18 +30,20 @@ Get items in a collection. Note if this collection contains more than 100 items
|
||||
<!-- UsageSnippet language="typescript" operationID="getCollectionItems" method="get" path="/library/collections/{collectionId}/items" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -62,20 +64,22 @@ The standalone function version of this method:
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { contentGetCollectionItems } from "@lukehagar/plexjs/funcs/contentGetCollectionItems.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({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -121,19 +125,20 @@ Get one or more metadata items.
|
||||
<!-- UsageSnippet language="typescript" operationID="getMetadataItem" method="get" path="/library/metadata/{ids}" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -162,21 +167,22 @@ The standalone function version of this method:
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { contentGetMetadataItem } from "@lukehagar/plexjs/funcs/contentGetMetadataItem.js";
|
||||
import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
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({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -230,18 +236,20 @@ Get all albums in a music section
|
||||
<!-- UsageSnippet language="typescript" operationID="getAlbums" method="get" path="/library/sections/{sectionId}/albums" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -262,20 +270,22 @@ The standalone function version of this method:
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { contentGetAlbums } from "@lukehagar/plexjs/funcs/contentGetAlbums.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({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -321,18 +331,20 @@ Get the items in a section, potentially filtering them
|
||||
<!-- UsageSnippet language="typescript" operationID="listContent" method="get" path="/library/sections/{sectionId}/all" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -353,20 +365,22 @@ The standalone function version of this method:
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { contentListContent } from "@lukehagar/plexjs/funcs/contentListContent.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({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -412,18 +426,20 @@ Get all leaves in a section (such as episodes in a show section)
|
||||
<!-- UsageSnippet language="typescript" operationID="getAllLeaves" method="get" path="/library/sections/{sectionId}/allLeaves" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -444,20 +460,22 @@ The standalone function version of this method:
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { contentGetAllLeaves } from "@lukehagar/plexjs/funcs/contentGetAllLeaves.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({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -503,18 +521,20 @@ Get artwork for a library section
|
||||
<!-- UsageSnippet language="typescript" operationID="getArts" method="get" path="/library/sections/{sectionId}/arts" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -535,20 +555,22 @@ The standalone function version of this method:
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { contentGetArts } from "@lukehagar/plexjs/funcs/contentGetArts.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({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -594,18 +616,20 @@ Get categories in a library section
|
||||
<!-- UsageSnippet language="typescript" operationID="getCategories" method="get" path="/library/sections/{sectionId}/categories" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -626,20 +650,22 @@ The standalone function version of this method:
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { contentGetCategories } from "@lukehagar/plexjs/funcs/contentGetCategories.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({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -685,18 +711,20 @@ Get clusters in a library section (typically for photos)
|
||||
<!-- UsageSnippet language="typescript" operationID="getCluster" method="get" path="/library/sections/{sectionId}/cluster" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -717,20 +745,22 @@ The standalone function version of this method:
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { contentGetCluster } from "@lukehagar/plexjs/funcs/contentGetCluster.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({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -776,18 +806,20 @@ Get a list of audio tracks starting at one and ending at another which are simil
|
||||
<!-- UsageSnippet language="typescript" operationID="getSonicPath" method="get" path="/library/sections/{sectionId}/computePath" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -810,20 +842,22 @@ The standalone function version of this method:
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { contentGetSonicPath } from "@lukehagar/plexjs/funcs/contentGetSonicPath.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({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -871,18 +905,20 @@ Get all folder locations of the media in a section
|
||||
<!-- UsageSnippet language="typescript" operationID="getFolders" method="get" path="/library/sections/{sectionId}/location" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -903,20 +939,22 @@ The standalone function version of this method:
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { contentGetFolders } from "@lukehagar/plexjs/funcs/contentGetFolders.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({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -962,18 +1000,20 @@ Get moments in a library section (typically for photos)
|
||||
<!-- UsageSnippet language="typescript" operationID="listMoments" method="get" path="/library/sections/{sectionId}/moment" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -994,20 +1034,22 @@ The standalone function version of this method:
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { contentListMoments } from "@lukehagar/plexjs/funcs/contentListMoments.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({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -1053,18 +1095,20 @@ Get the nearest audio tracks to a particular analysis
|
||||
<!-- UsageSnippet language="typescript" operationID="getSonicallySimilar" method="get" path="/library/sections/{sectionId}/nearest" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -1086,20 +1130,22 @@ The standalone function version of this method:
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { contentGetSonicallySimilar } from "@lukehagar/plexjs/funcs/contentGetSonicallySimilar.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({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -1146,18 +1192,20 @@ Get an image for the collection based on the items within
|
||||
<!-- UsageSnippet language="typescript" operationID="getCollectionImage" method="get" path="/library/collections/{collectionId}/composite/{updatedAt}" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
@@ -1179,20 +1227,22 @@ The standalone function version of this method:
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { contentGetCollectionImage } from "@lukehagar/plexjs/funcs/contentGetCollectionImage.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({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
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",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
|
||||
Reference in New Issue
Block a user