mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 04:20:46 +00:00
* `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** ⚠️
7632 lines
238 KiB
YAML
7632 lines
238 KiB
YAML
overlay: 1.0.0
|
|
info:
|
|
title: CodeSamples overlay for typescript target
|
|
version: 0.0.0
|
|
actions:
|
|
- target: $["paths"]["/"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.general.getServerInfo({});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/:/eventsource/notifications"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.events.getNotifications({});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/:/prefs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.preferences.getAllPreferences();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/:/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.preferences.setPreferences({
|
|
prefs: {},
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/:/prefs/get"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.preferences.getPreference({});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/:/rate"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.rate.setRating({
|
|
identifier: "<value>",
|
|
key: "<key>",
|
|
rating: 8722.46,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/:/scrobble"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.timeline.markPlayed({
|
|
identifier: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/:/timeline"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { ReportState } from "@lukehagar/plexjs/sdk/models/operations";
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.timeline.report({
|
|
key: "/foo",
|
|
ratingKey: "xyz",
|
|
state: ReportState.Playing,
|
|
playQueueItemID: "123",
|
|
time: 0,
|
|
duration: 10000,
|
|
continuing: BoolInt.One,
|
|
updated: 14200000,
|
|
offline: BoolInt.One,
|
|
timeToFirstFrame: 1000,
|
|
timeStalled: 1000,
|
|
bandwidth: 100,
|
|
bufferedTime: 100,
|
|
bufferedSize: 1024,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/:/unscrobble"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.timeline.unscrobble({
|
|
identifier: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/:/websocket/notifications"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.events.connectWebSocket({});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/activities"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.activities.listActivities();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/activities/{activityId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.activities.cancelActivity({
|
|
activityId: "d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/butler"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.butler.stopTasks();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/butler"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.butler.getTasks();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/butler"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.butler.startTasks();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/butler/{task}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { StopTaskTask } 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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.butler.stopTask({
|
|
task: StopTaskTask.CleanOldBundles,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/butler/{task}"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { StartTaskTask } 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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.butler.startTask({
|
|
task: StartTaskTask.RefreshLocalMedia,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/downloadQueue"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.downloadQueue.createDownloadQueue();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/downloadQueue/{queueId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.downloadQueue.getDownloadQueue({
|
|
queueId: 922802,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/downloadQueue/{queueId}/add"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { Accepts, AdvancedSubtitles, BoolInt, LocationParameter, Protocol } 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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.downloadQueue.addDownloadQueueItems({
|
|
queueId: 984925,
|
|
keys: [
|
|
"/library/metadata/3",
|
|
"/library/metadata/6",
|
|
],
|
|
advancedSubtitles: AdvancedSubtitles.Burn,
|
|
audioBoost: 50,
|
|
audioChannelCount: 5,
|
|
autoAdjustQuality: BoolInt.One,
|
|
autoAdjustSubtitle: BoolInt.One,
|
|
directPlay: BoolInt.One,
|
|
directStream: BoolInt.One,
|
|
directStreamAudio: BoolInt.One,
|
|
disableResolutionRotation: BoolInt.One,
|
|
hasMDE: BoolInt.One,
|
|
location: LocationParameter.Wan,
|
|
mediaBufferSize: 102400,
|
|
mediaIndex: 0,
|
|
musicBitrate: 5000,
|
|
offset: 90.5,
|
|
partIndex: 0,
|
|
path: "/library/metadata/151671",
|
|
peakBitrate: 12000,
|
|
photoResolution: "1080x1080",
|
|
protocol: Protocol.Dash,
|
|
secondsPerSegment: 5,
|
|
subtitleSize: 50,
|
|
videoBitrate: 12000,
|
|
videoQuality: 50,
|
|
videoResolution: "1080x1080",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/downloadQueue/{queueId}/item/{itemId}/decision"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.downloadQueue.getItemDecision({
|
|
queueId: 231605,
|
|
itemId: 32,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/downloadQueue/{queueId}/item/{itemId}/media"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.downloadQueue.getDownloadQueueMedia({
|
|
queueId: 663184,
|
|
itemId: 32,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.downloadQueue.listDownloadQueueItems({
|
|
queueId: 524138,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.downloadQueue.removeDownloadQueueItems({
|
|
queueId: 946275,
|
|
itemId: [
|
|
32,
|
|
345,
|
|
23,
|
|
],
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.downloadQueue.getDownloadQueueItems({
|
|
queueId: 809886,
|
|
itemId: [
|
|
32,
|
|
345,
|
|
23,
|
|
],
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}/restart"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.downloadQueue.restartProcessingDownloadQueueItems({
|
|
queueId: 713001,
|
|
itemId: [
|
|
32,
|
|
345,
|
|
23,
|
|
],
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.getAllHubs({
|
|
onlyTransient: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/continueWatching"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.getContinueWatching({});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.getHubItems({
|
|
identifier: [
|
|
"<value 1>",
|
|
"<value 2>",
|
|
"<value 3>",
|
|
],
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/metadata/{metadataId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.getMetadataHubs({
|
|
metadataId: 605482,
|
|
onlyTransient: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/metadata/{metadataId}/postplay"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.getPostplayHubs({
|
|
metadataId: 441419,
|
|
onlyTransient: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/metadata/{metadataId}/related"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.getRelatedHubs({
|
|
metadataId: 8858,
|
|
onlyTransient: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/promoted"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.getPromotedHubs({});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/search"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.search.searchHubs({
|
|
query: "<value>",
|
|
sectionId: 1,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/search/voice"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.search.voiceSearchHubs({
|
|
query: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/sections/{sectionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.getSectionHubs({
|
|
sectionId: 336924,
|
|
onlyTransient: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.resetSectionDefaults({
|
|
sectionId: 383022,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.listHubs({
|
|
sectionId: 442546,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.createCustomHub({
|
|
sectionId: 869922,
|
|
metadataItemId: 703843,
|
|
promotedToRecommended: BoolInt.One,
|
|
promotedToOwnHome: BoolInt.One,
|
|
promotedToSharedHome: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.moveHub({
|
|
sectionId: 755710,
|
|
identifier: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage/{identifier}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.deleteCustomHub({
|
|
sectionId: 625677,
|
|
identifier: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage/{identifier}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.hubs.updateHubVisibility({
|
|
sectionId: 341650,
|
|
identifier: "<value>",
|
|
promotedToRecommended: BoolInt.One,
|
|
promotedToOwnHome: BoolInt.One,
|
|
promotedToSharedHome: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/identity"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.general.getIdentity();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getLibraryItems({});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/caches"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.deleteCaches();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/clean/bundles"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.cleanBundles();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/collections"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.collections.createCollection({
|
|
sectionId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/collections/{collectionId}/composite/{updatedAt}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.content.getCollectionImage({
|
|
collectionId: 474227,
|
|
updatedAt: 759379,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/collections/{collectionId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.content.getCollectionItems({
|
|
collectionId: 314585,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/collections/{collectionId}/items"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryCollections.addCollectionItems({
|
|
collectionId: 338144,
|
|
uri: "https://expensive-bakeware.com",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/collections/{collectionId}/items/{itemId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryCollections.deleteCollectionItem({
|
|
collectionId: 320928,
|
|
itemId: 406983,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/collections/{collectionId}/items/{itemId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryCollections.moveCollectionItem({
|
|
collectionId: 239532,
|
|
itemId: 513864,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/file"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.ingestTransientItem({
|
|
url: "file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv",
|
|
virtualFilePath: "/Avatar.mkv",
|
|
computeHashes: BoolInt.One,
|
|
ingestNonMatches: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/matches"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getLibraryMatches({
|
|
includeFullMetadata: BoolInt.One,
|
|
includeAncestorMetadata: BoolInt.One,
|
|
includeAlternateMetadataSources: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/media/{mediaId}/chapterImages/{chapter}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getChapterImage({
|
|
mediaId: 892563,
|
|
chapter: 48348,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/augmentations/{augmentationId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getAugmentationStatus({
|
|
augmentationId: "<id>",
|
|
wait: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.deleteMetadataItem({
|
|
ids: "<value>",
|
|
proxy: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.content.getMetadataItem({
|
|
ids: [],
|
|
asyncCheckFiles: BoolInt.One,
|
|
asyncRefreshLocalMediaAgent: BoolInt.One,
|
|
asyncRefreshAnalysis: BoolInt.One,
|
|
checkFiles: BoolInt.One,
|
|
skipRefresh: BoolInt.One,
|
|
checkFileAvailability: BoolInt.One,
|
|
asyncAugmentMetadata: BoolInt.One,
|
|
augmentCount: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.editMetadataItem({
|
|
ids: [
|
|
"<value 1>",
|
|
"<value 2>",
|
|
],
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/addetect"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.detectAds({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/allLeaves"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getAllItemLeaves({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/analyze"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.analyzeMetadata({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/chapterThumbs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.generateThumbs({
|
|
ids: "<value>",
|
|
force: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/credits"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.detectCredits({
|
|
ids: "<value>",
|
|
force: BoolInt.One,
|
|
manual: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/extras"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getExtras({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/extras"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.addExtras({
|
|
ids: "<value>",
|
|
url: "https://super-mortise.biz/",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/file"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getFile({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/index"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.startBifGeneration({
|
|
ids: "<value>",
|
|
force: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/intro"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.detectIntros({
|
|
ids: "<value>",
|
|
force: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/marker"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.createMarker({
|
|
ids: "<value>",
|
|
type: 248391,
|
|
startTimeOffset: 535191,
|
|
attributes: {},
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/marker/{marker}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.deleteMarker({
|
|
ids: "<value>",
|
|
marker: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/marker/{marker}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.editMarker({
|
|
ids: "<value>",
|
|
marker: "<value>",
|
|
type: 884347,
|
|
startTimeOffset: 517251,
|
|
attributes: {},
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/match"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.matchItem({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/matches"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.listMatches({
|
|
ids: "<value>",
|
|
manual: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/media/{mediaItem}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.deleteMediaItem({
|
|
ids: "<value>",
|
|
mediaItem: "<value>",
|
|
proxy: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/merge"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.mergeItems({
|
|
idsPathParameter: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/nearest"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.listSonicallySimilar({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.setItemPreferences({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/refresh"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.refreshItemsMetadata({
|
|
ids: "<value>",
|
|
markUpdated: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/related"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getRelatedItems({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/similar"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.listSimilar({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/split"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.splitItem({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/subtitles"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.addSubtitles({
|
|
ids: "<value>",
|
|
forced: BoolInt.One,
|
|
hearingImpaired: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/tree"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getItemTree({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/unmatch"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.unmatch({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/users/top"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.listTopUsers({
|
|
ids: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/voiceActivity"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.detectVoiceActivity({
|
|
ids: "<value>",
|
|
force: BoolInt.One,
|
|
manual: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/{element}"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { SetItemArtworkElement } 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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.setItemArtwork({
|
|
ids: "<value>",
|
|
element: SetItemArtworkElement.Banner,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/{element}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { UpdateItemArtworkElement } 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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.updateItemArtwork({
|
|
ids: "<value>",
|
|
element: UpdateItemArtworkElement.ClearLogo,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/metadata/{ids}/{element}/{timestamp}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { GetItemArtworkElement } 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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getItemArtwork({
|
|
ids: "<value>",
|
|
element: GetItemArtworkElement.Poster,
|
|
timestamp: 999555,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/optimize"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.optimizeDatabase({
|
|
async: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/parts/{partId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.setStreamSelection({
|
|
partId: 360489,
|
|
allParts: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/parts/{partId}/indexes/{index}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { GetPartIndexIndex } 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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getPartIndex({
|
|
partId: 724750,
|
|
index: GetPartIndexIndex.Sd,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/parts/{partId}/indexes/{index}/{offset}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { GetImageFromBifIndex } 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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getImageFromBif({
|
|
partId: 304273,
|
|
index: GetImageFromBifIndex.Sd,
|
|
offset: 939569,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/parts/{partId}/{changestamp}/{filename}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getMediaPart({
|
|
partId: 877105,
|
|
changestamp: 970622,
|
|
filename: "example.file",
|
|
download: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/people/{personId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getPerson({
|
|
personId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/people/{personId}/media"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.listPersonMedia({
|
|
personId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/randomArtwork"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getRandomArtwork({
|
|
sections: [
|
|
5,
|
|
6,
|
|
],
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getSections();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/all"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.addSection({
|
|
name: "<value>",
|
|
type: 39544,
|
|
agent: "<value>",
|
|
language: "<value>",
|
|
locations: [
|
|
"O:\fatboy\\Media\\Ripped\\Music",
|
|
"O:\fatboy\\Media\\My Music",
|
|
],
|
|
prefs: {},
|
|
relative: BoolInt.One,
|
|
importFromiTunes: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/all/refresh"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.stopAllRefreshes();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/prefs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getSectionsPrefs({
|
|
type: 460221,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/refresh"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.refreshSectionsMetadata({});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.deleteLibrarySection({
|
|
sectionId: "<id>",
|
|
async: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getLibraryDetails({
|
|
sectionId: "<id>",
|
|
includeDetails: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.editSection({
|
|
sectionId: "<id>",
|
|
agent: "<value>",
|
|
locations: [
|
|
"O:\fatboy\\Media\\Ripped\\Music",
|
|
"O:\fatboy\\Media\\My Music",
|
|
],
|
|
prefs: {},
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/albums"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.content.getAlbums({
|
|
sectionId: 817133,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.content.listContent({
|
|
sectionId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/all"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.updateItems({
|
|
sectionId: "<id>",
|
|
fieldLocked: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/allLeaves"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.content.getAllLeaves({
|
|
sectionId: 633197,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/analyze"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.startAnalysis({
|
|
sectionId: 158829,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/arts"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.content.getArts({
|
|
sectionId: 859200,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/autocomplete"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.autocomplete({
|
|
sectionId: 942007,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/categories"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.content.getCategories({
|
|
sectionId: 21841,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/cluster"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.content.getCluster({
|
|
sectionId: 138560,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/collection/{collectionId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.deleteCollection({
|
|
sectionId: 283619,
|
|
collectionId: 680895,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/collections"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getCollections({
|
|
sectionId: 348838,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/common"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getCommon({
|
|
sectionId: 298154,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/composite/{updatedAt}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getSectionImage({
|
|
sectionId: 925611,
|
|
updatedAt: 117413,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/computePath"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.content.getSonicPath({
|
|
sectionId: 914549,
|
|
startID: 629990,
|
|
endID: 687740,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/emptyTrash"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.emptyTrash({
|
|
sectionId: 30052,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/filters"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getSectionFilters({
|
|
sectionId: 380557,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/firstCharacters"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getFirstCharacters({
|
|
sectionId: 3947,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/indexes"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.deleteIndexes({
|
|
sectionId: 588437,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/intros"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.deleteIntros({
|
|
sectionId: 498656,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/location"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.content.getFolders({
|
|
sectionId: 892532,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/moment"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.content.listMoments({
|
|
sectionId: 403239,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/nearest"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.content.getSonicallySimilar({
|
|
sectionId: 525956,
|
|
values: [],
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/prefs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getSectionPreferences({
|
|
sectionId: 754869,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.setSectionPreferences({
|
|
sectionId: 349936,
|
|
prefs: {},
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/refresh"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.cancelRefresh({
|
|
sectionId: 326852,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/refresh"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.refreshSection({
|
|
sectionId: 450300,
|
|
force: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/sections/{sectionId}/sorts"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getAvailableSorts({
|
|
sectionId: 212498,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/streams/{streamId}.{ext}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.deleteStream({
|
|
streamId: 841510,
|
|
ext: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/streams/{streamId}.{ext}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getStream({
|
|
streamId: 314506,
|
|
ext: "<value>",
|
|
autoAdjustSubtitle: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/streams/{streamId}.{ext}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.setStreamOffset({
|
|
streamId: 606295,
|
|
ext: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/streams/{streamId}/levels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getStreamLevels({
|
|
streamId: 447611,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/streams/{streamId}/loudness"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getStreamLoudness({
|
|
streamId: 277271,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/library/tags"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.library.getTags({});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/dvrs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.dvRs.listDVRs();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/dvrs"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.dvRs.createDVR({
|
|
lineup: "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT",
|
|
deviceQueryParameter: [
|
|
"d",
|
|
"e",
|
|
"v",
|
|
"i",
|
|
"c",
|
|
"e",
|
|
"[",
|
|
"]",
|
|
"=",
|
|
"d",
|
|
"e",
|
|
"v",
|
|
"i",
|
|
"c",
|
|
"e",
|
|
":",
|
|
"/",
|
|
"/",
|
|
"t",
|
|
"v",
|
|
".",
|
|
"p",
|
|
"l",
|
|
"e",
|
|
"x",
|
|
".",
|
|
"g",
|
|
"r",
|
|
"a",
|
|
"b",
|
|
"b",
|
|
"e",
|
|
"r",
|
|
"s",
|
|
".",
|
|
"h",
|
|
"d",
|
|
"h",
|
|
"o",
|
|
"m",
|
|
"e",
|
|
"r",
|
|
"u",
|
|
"n",
|
|
"/",
|
|
"1",
|
|
"0",
|
|
"5",
|
|
"3",
|
|
"C",
|
|
"0",
|
|
"C",
|
|
"A",
|
|
],
|
|
language: "eng",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.dvRs.deleteDVR({
|
|
dvrId: 855088,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.dvRs.getDVR({
|
|
dvrId: 973518,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/channels/{channel}/tune"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.dvRs.tuneChannel({
|
|
dvrId: 834281,
|
|
channel: "2.1",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/devices/{deviceId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.dvRs.removeDeviceFromDVR({
|
|
dvrId: 945416,
|
|
deviceId: 260761,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/devices/{deviceId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.dvRs.addDeviceToDVR({
|
|
dvrId: 334755,
|
|
deviceId: 852930,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/lineups"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.dvRs.deleteLineup({
|
|
dvrId: 454470,
|
|
lineup: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/lineups"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.dvRs.addLineup({
|
|
dvrId: 945235,
|
|
lineup: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.dvRs.setDVRPreferences({
|
|
dvrId: 116357,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/reloadGuide"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.dvRs.stopDVRReload({
|
|
dvrId: 348053,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/reloadGuide"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.dvRs.reloadGuide({
|
|
dvrId: 140753,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/epg/channelmap"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.epg.computeChannelMap({
|
|
deviceQueryParameter: "<value>",
|
|
lineup: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/epg/channels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.epg.getChannels({
|
|
lineup: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/epg/countries"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.epg.getCountries();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/lineups"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.epg.getCountriesLineups({
|
|
country: "Malawi",
|
|
epgId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/regions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.epg.getCountryRegions({
|
|
country: "Morocco",
|
|
epgId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/regions/{region}/lineups"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.epg.listLineups({
|
|
country: "Vanuatu",
|
|
epgId: "<id>",
|
|
region: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/epg/languages"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.epg.getAllLanguages();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/epg/lineup"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.epg.getLineup({
|
|
deviceQueryParameter: "<value>",
|
|
lineupGroup: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/epg/lineupchannels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.epg.getLineupChannels({
|
|
lineup: [
|
|
"<value 1>",
|
|
"<value 2>",
|
|
],
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/sessions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.liveTV.getSessions();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/sessions/{sessionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.liveTV.getLiveTVSession({
|
|
sessionId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/sessions/{sessionId}/{consumerId}/index.m3u8"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.liveTV.getSessionPlaylistIndex({
|
|
sessionId: "<id>",
|
|
consumerId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/livetv/sessions/{sessionId}/{consumerId}/{segmentId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.liveTV.getSessionSegment({
|
|
sessionId: "<id>",
|
|
consumerId: "<id>",
|
|
segmentId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/log"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { openAsBlob } from "node:fs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.log.writeLog(await openAsBlob("example.file"));
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/log"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.log.writeMessage({});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/log/networked"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.log.enablePapertrail({});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.devices.getAvailableGrabbers({
|
|
protocol: "livetv",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers/devices"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.devices.listDevices();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers/devices"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.devices.addDevice({
|
|
uri: "http://10.0.0.5",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers/devices/discover"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.devices.discoverDevices();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.devices.removeDevice({
|
|
deviceId: 685908,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.devices.getDeviceDetails({
|
|
deviceId: 170949,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.devices.modifyDevice({
|
|
deviceId: 879135,
|
|
enabled: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/channelmap"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.devices.setChannelmap({
|
|
deviceId: 937661,
|
|
channelMapping: {},
|
|
channelMappingByKey: {},
|
|
channelsEnabled: [
|
|
"4",
|
|
"6",
|
|
".",
|
|
"1",
|
|
",",
|
|
"4",
|
|
"4",
|
|
".",
|
|
"1",
|
|
",",
|
|
"4",
|
|
"5",
|
|
".",
|
|
"1",
|
|
],
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/channels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.devices.getDevicesChannels({
|
|
deviceId: 517209,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.devices.setDevicePreferences({
|
|
deviceId: 420973,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/scan"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.devices.stopScan({
|
|
deviceId: 576494,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/scan"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.devices.scan({
|
|
deviceId: 57391,
|
|
source: "Cable",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/thumb/{version}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.devices.getThumb({
|
|
deviceId: 960617,
|
|
versionPathParameter: 1025,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/grabbers/operations/{operationId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.subscriptions.cancelGrab({
|
|
operationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/providers"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.provider.listProviders();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/providers"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.provider.addProvider({
|
|
url: "https://steep-obedience.name/",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/providers/refresh"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.provider.refreshProviders();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/providers/{provider}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.provider.deleteMediaProvider({
|
|
provider: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/subscriptions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.subscriptions.getAllSubscriptions({
|
|
includeGrabs: BoolInt.One,
|
|
includeStorage: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/subscriptions"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.subscriptions.createSubscription({
|
|
targetLibrarySectionID: 1,
|
|
targetSectionLocationID: 3,
|
|
type: 2,
|
|
hints: {},
|
|
prefs: {},
|
|
params: {},
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/subscriptions/process"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.subscriptions.processSubscriptions();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/subscriptions/scheduled"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.subscriptions.getScheduledRecordings();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/subscriptions/template"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.subscriptions.getTemplate({
|
|
guid: "plex://episode/5fc70265c40548002d539d23",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.subscriptions.deleteSubscription({
|
|
subscriptionId: 974618,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.subscriptions.getSubscription({
|
|
subscriptionId: 186713,
|
|
includeGrabs: BoolInt.One,
|
|
includeStorage: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.subscriptions.editSubscriptionPreferences({
|
|
subscriptionId: 673918,
|
|
prefs: {},
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.subscriptions.reorderSubscription({
|
|
subscriptionId: 440634,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/photo/:/transcode"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.transcoder.transcodeImage({
|
|
url: "/library/metadata/265/thumb/1715112705",
|
|
background: "#ff5522",
|
|
upscale: BoolInt.One,
|
|
minSize: BoolInt.One,
|
|
rotate: BoolInt.One,
|
|
blendColor: "#ff5522",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playQueues"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { CreatePlayQueueType } from "@lukehagar/plexjs/sdk/models/operations";
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.playQueue.createPlayQueue({
|
|
type: CreatePlayQueueType.Audio,
|
|
shuffle: BoolInt.One,
|
|
repeat: BoolInt.One,
|
|
continuous: BoolInt.One,
|
|
recursive: BoolInt.One,
|
|
onDeck: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playQueues/{playQueueId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.playQueue.getPlayQueue({
|
|
playQueueId: 210646,
|
|
own: BoolInt.One,
|
|
includeBefore: BoolInt.One,
|
|
includeAfter: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playQueues/{playQueueId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.playQueue.addToPlayQueue({
|
|
playQueueId: 919248,
|
|
next: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playQueues/{playQueueId}/items"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.playQueue.clearPlayQueue({
|
|
playQueueId: 86357,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playQueues/{playQueueId}/items/{playQueueItemId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.playQueue.deletePlayQueueItem({
|
|
playQueueId: 285738,
|
|
playQueueItemId: 464354,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playQueues/{playQueueId}/items/{playQueueItemId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.playQueue.movePlayQueueItem({
|
|
playQueueId: 31341,
|
|
playQueueItemId: 495865,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playQueues/{playQueueId}/reset"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.playQueue.resetPlayQueue({
|
|
playQueueId: 581891,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playQueues/{playQueueId}/shuffle"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.playQueue.shuffle({
|
|
playQueueId: 316150,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playQueues/{playQueueId}/unshuffle"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.playQueue.unshuffle({
|
|
playQueueId: 484388,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.playlist.listPlaylists({});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryPlaylists.createPlaylist({});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/upload"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryPlaylists.uploadPlaylist({
|
|
path: "/home/barkley/playlist.m3u",
|
|
force: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/{playlistId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryPlaylists.deletePlaylist({
|
|
playlistId: 343293,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/{playlistId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.playlist.getPlaylist({
|
|
playlistId: 841953,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/{playlistId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryPlaylists.updatePlaylist({
|
|
playlistId: 157966,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/{playlistId}/generators"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryPlaylists.getPlaylistGenerators({
|
|
playlistId: 162342,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/{playlistId}/items"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryPlaylists.clearPlaylistItems({
|
|
playlistId: 552140,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/{playlistId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.playlist.getPlaylistItems({
|
|
playlistId: 118195,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/{playlistId}/items"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryPlaylists.addPlaylistItems({
|
|
playlistId: 533723,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryPlaylists.deletePlaylistItem({
|
|
playlistId: 981646,
|
|
generatorId: 194010,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryPlaylists.getPlaylistGenerator({
|
|
playlistId: 744880,
|
|
generatorId: 322168,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { ModifyPlaylistGeneratorScope } from "@lukehagar/plexjs/sdk/models/operations";
|
|
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",
|
|
});
|
|
|
|
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,
|
|
unwatched: BoolInt.Zero,
|
|
},
|
|
target: "",
|
|
targetTagID: 1,
|
|
title: "Jack-Jack Attack",
|
|
type: 42,
|
|
},
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryPlaylists.getPlaylistGeneratorItems({
|
|
playlistId: 77230,
|
|
generatorId: 979714,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}/{metadataId}/{action}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryPlaylists.refreshPlaylist({
|
|
playlistId: 895314,
|
|
generatorId: 629742,
|
|
metadataId: 724422,
|
|
action: Action.Disable,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{playlistItemId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.libraryPlaylists.movePlaylistItem({
|
|
playlistId: 940298,
|
|
playlistItemId: 375626,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/security/resources"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.general.getSourceConnectionInformation({
|
|
source: "<value>",
|
|
refresh: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/security/token"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { GetTransientTokenScope, GetTransientTokenType } 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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.general.getTransientToken({
|
|
type: GetTransientTokenType.Delegation,
|
|
scope: GetTransientTokenScope.All,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/services/ultrablur/colors"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.ultraBlur.getColors({
|
|
url: "/library/metadata/217745/art/1718931408",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/services/ultrablur/image"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.ultraBlur.getImage({
|
|
topLeft: "3f280a",
|
|
topRight: "6b4713",
|
|
bottomRight: "0f2a43",
|
|
bottomLeft: "1c425d",
|
|
width: 1920,
|
|
height: 1080,
|
|
noise: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/status/sessions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.status.listSessions();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/status/sessions/background"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.status.getBackgroundTasks();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/status/sessions/history/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.status.listPlaybackHistory({
|
|
sort: [
|
|
"v",
|
|
"i",
|
|
"e",
|
|
"w",
|
|
"e",
|
|
"d",
|
|
"A",
|
|
"t",
|
|
":",
|
|
"d",
|
|
"e",
|
|
"s",
|
|
"c",
|
|
",",
|
|
"a",
|
|
"c",
|
|
"c",
|
|
"o",
|
|
"u",
|
|
"n",
|
|
"t",
|
|
"I",
|
|
"D",
|
|
],
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/status/sessions/history/{historyId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.status.deleteHistory({
|
|
historyId: 953579,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/status/sessions/history/{historyId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.status.getHistoryItem({
|
|
historyId: 832213,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/status/sessions/terminate"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.status.terminateSession({
|
|
sessionId: "cdefghijklmnopqrstuvwxyz",
|
|
reason: "Stop Playing",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/updater/apply"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.updater.applyUpdates({
|
|
tonight: BoolInt.One,
|
|
skip: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/updater/check"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.updater.checkUpdates({
|
|
download: BoolInt.One,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/updater/status"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
|
|
const plexAPI = new PlexAPI();
|
|
|
|
async function run() {
|
|
const result = await plexAPI.updater.getUpdatesStatus();
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/decision"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { MakeDecisionLocation, MakeDecisionProtocol } from "@lukehagar/plexjs/sdk/models/operations";
|
|
import { Accepts, AdvancedSubtitles, BoolInt, TranscodeType } 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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.transcoder.makeDecision({
|
|
transcodeType: TranscodeType.Music,
|
|
advancedSubtitles: AdvancedSubtitles.Burn,
|
|
audioBoost: 50,
|
|
audioChannelCount: 5,
|
|
autoAdjustQuality: BoolInt.One,
|
|
autoAdjustSubtitle: BoolInt.One,
|
|
directPlay: BoolInt.One,
|
|
directStream: BoolInt.One,
|
|
directStreamAudio: BoolInt.One,
|
|
disableResolutionRotation: BoolInt.One,
|
|
hasMDE: BoolInt.One,
|
|
location: MakeDecisionLocation.Wan,
|
|
mediaBufferSize: 102400,
|
|
mediaIndex: 0,
|
|
musicBitrate: 5000,
|
|
offset: 90.5,
|
|
partIndex: 0,
|
|
path: "/library/metadata/151671",
|
|
peakBitrate: 12000,
|
|
photoResolution: "1080x1080",
|
|
protocol: MakeDecisionProtocol.Dash,
|
|
secondsPerSegment: 5,
|
|
subtitleSize: 50,
|
|
videoBitrate: 12000,
|
|
videoQuality: 50,
|
|
videoResolution: "1080x1080",
|
|
xPlexClientProfileExtra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)",
|
|
xPlexClientProfileName: "generic",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/fallback"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { Accepts, TranscodeType } 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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.transcoder.triggerFallback({
|
|
transcodeType: TranscodeType.Audio,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/start.{extension}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { Extension, StartTranscodeSessionLocation, StartTranscodeSessionProtocol } from "@lukehagar/plexjs/sdk/models/operations";
|
|
import { Accepts, AdvancedSubtitles, BoolInt, TranscodeType } 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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.transcoder.startTranscodeSession({
|
|
transcodeType: TranscodeType.Music,
|
|
extension: Extension.Mpd,
|
|
advancedSubtitles: AdvancedSubtitles.Burn,
|
|
audioBoost: 50,
|
|
audioChannelCount: 5,
|
|
autoAdjustQuality: BoolInt.One,
|
|
autoAdjustSubtitle: BoolInt.One,
|
|
directPlay: BoolInt.One,
|
|
directStream: BoolInt.One,
|
|
directStreamAudio: BoolInt.One,
|
|
disableResolutionRotation: BoolInt.One,
|
|
hasMDE: BoolInt.One,
|
|
location: StartTranscodeSessionLocation.Wan,
|
|
mediaBufferSize: 102400,
|
|
mediaIndex: 0,
|
|
musicBitrate: 5000,
|
|
offset: 90.5,
|
|
partIndex: 0,
|
|
path: "/library/metadata/151671",
|
|
peakBitrate: 12000,
|
|
photoResolution: "1080x1080",
|
|
protocol: StartTranscodeSessionProtocol.Dash,
|
|
secondsPerSegment: 5,
|
|
subtitleSize: 50,
|
|
videoBitrate: 12000,
|
|
videoQuality: 50,
|
|
videoResolution: "1080x1080",
|
|
xPlexClientProfileExtra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)",
|
|
xPlexClientProfileName: "generic",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/subtitles"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: PlexJS
|
|
source: |-
|
|
import { PlexAPI } from "@lukehagar/plexjs";
|
|
import { TranscodeSubtitlesLocation, TranscodeSubtitlesProtocol } from "@lukehagar/plexjs/sdk/models/operations";
|
|
import { Accepts, AdvancedSubtitles, BoolInt, TranscodeType } 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",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await plexAPI.transcoder.transcodeSubtitles({
|
|
transcodeType: TranscodeType.Audio,
|
|
advancedSubtitles: AdvancedSubtitles.Burn,
|
|
audioBoost: 50,
|
|
audioChannelCount: 5,
|
|
autoAdjustQuality: BoolInt.One,
|
|
autoAdjustSubtitle: BoolInt.One,
|
|
directPlay: BoolInt.One,
|
|
directStream: BoolInt.One,
|
|
directStreamAudio: BoolInt.One,
|
|
disableResolutionRotation: BoolInt.One,
|
|
hasMDE: BoolInt.One,
|
|
location: TranscodeSubtitlesLocation.Wan,
|
|
mediaBufferSize: 102400,
|
|
mediaIndex: 0,
|
|
musicBitrate: 5000,
|
|
offset: 90.5,
|
|
partIndex: 0,
|
|
path: "/library/metadata/151671",
|
|
peakBitrate: 12000,
|
|
photoResolution: "1080x1080",
|
|
protocol: TranscodeSubtitlesProtocol.Dash,
|
|
secondsPerSegment: 5,
|
|
subtitleSize: 50,
|
|
videoBitrate: 12000,
|
|
videoQuality: 50,
|
|
videoResolution: "1080x1080",
|
|
xPlexClientProfileExtra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)",
|
|
xPlexClientProfileName: "generic",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|