mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 04:20:46 +00:00
## Typescript SDK Changes Detected:
* `plex-api.butler.startTask()`: * `request` **Changed** **Breaking** ⚠️ * `error` **Changed** **Breaking** ⚠️ * `plex-api.butler.stopTask()`: * `request` **Changed** **Breaking** ⚠️ * `error` **Changed** **Breaking** ⚠️ * `plex-api.updater.applyUpdates()`: * `request` **Changed** **Breaking** ⚠️ * `error` **Changed** **Breaking** ⚠️ * `plex-api.general.getServerInfo()`: **Added** * `plex-api.general.getIdentity()`: **Added** * `plex-api.general.getSourceConnectionInformation()`: **Added** * `plex-api.general.getTransientToken()`: **Added** * `plex-api.events.getNotifications()`: **Added** * `plex-api.events.connectWebSocket()`: **Added** * `plex-api.preferences.getAllPreferences()`: **Added** * `plex-api.preferences.setPreferences()`: **Added** * `plex-api.preferences.getPreference()`: **Added** * `plex-api.rate.setRating()`: **Added** * `plex-api.timeline.markPlayed()`: **Added** * `plex-api.timeline.report()`: **Added** * `plex-api.timeline.unscrobble()`: **Added** * `plex-api.activities.listActivities()`: **Added** * `plex-api.activities.cancelActivity()`: **Added** * `plex-api.butler.stopTasks()`: **Added** * `plex-api.butler.getTasks()`: **Added** * `plex-api.butler.startTasks()`: **Added** * `plex-api.downloadQueue.createDownloadQueue()`: **Added** * `plex-api.downloadQueue.getDownloadQueue()`: **Added** * `plex-api.downloadQueue.addDownloadQueueItems()`: **Added** * `plex-api.downloadQueue.listDownloadQueueItems()`: **Added** * `plex-api.downloadQueue.getItemDecision()`: **Added** * `plex-api.downloadQueue.getDownloadQueueMedia()`: **Added** * `plex-api.downloadQueue.removeDownloadQueueItems()`: **Added** * `plex-api.downloadQueue.getDownloadQueueItems()`: **Added** * `plex-api.downloadQueue.restartProcessingDownloadQueueItems()`: **Added** * `plex-api.hubs.getAllHubs()`: **Added** * `plex-api.hubs.getContinueWatching()`: **Added** * `plex-api.hubs.getHubItems()`: **Added** * `plex-api.hubs.getPromotedHubs()`: **Added** * `plex-api.hubs.getMetadataHubs()`: **Added** * `plex-api.hubs.getPostplayHubs()`: **Added** * `plex-api.hubs.getRelatedHubs()`: **Added** * `plex-api.hubs.getSectionHubs()`: **Added** * `plex-api.hubs.resetSectionDefaults()`: **Added** * `plex-api.hubs.listHubs()`: **Added** * `plex-api.hubs.createCustomHub()`: **Added** * `plex-api.hubs.moveHub()`: **Added** * `plex-api.hubs.deleteCustomHub()`: **Added** * `plex-api.hubs.updateHubVisibility()`: **Added** * `plex-api.search.searchHubs()`: **Added** * `plex-api.search.voiceSearchHubs()`: **Added** * `plex-api.library.getLibraryItems()`: **Added** * `plex-api.library.deleteCaches()`: **Added** * `plex-api.library.cleanBundles()`: **Added** * `plex-api.library.ingestTransientItem()`: **Added** * `plex-api.library.getLibraryMatches()`: **Added** * `plex-api.library.optimizeDatabase()`: **Added** * `plex-api.library.getRandomArtwork()`: **Added** * `plex-api.library.getSections()`: **Added** * `plex-api.library.addSection()`: **Added** * `plex-api.library.stopAllRefreshes()`: **Added** * `plex-api.library.getSectionsPrefs()`: **Added** * `plex-api.library.refreshSectionsMetadata()`: **Added** * `plex-api.library.getTags()`: **Added** * `plex-api.library.deleteMetadataItem()`: **Added** * `plex-api.library.editMetadataItem()`: **Added** * `plex-api.library.detectAds()`: **Added** * `plex-api.library.getAllItemLeaves()`: **Added** * `plex-api.library.analyzeMetadata()`: **Added** * `plex-api.library.generateThumbs()`: **Added** * `plex-api.library.detectCredits()`: **Added** * `plex-api.library.getExtras()`: **Added** * `plex-api.library.addExtras()`: **Added** * `plex-api.library.getFile()`: **Added** * `plex-api.library.startBifGeneration()`: **Added** * `plex-api.library.detectIntros()`: **Added** * `plex-api.library.createMarker()`: **Added** * `plex-api.library.matchItem()`: **Added** * `plex-api.library.listMatches()`: **Added** * `plex-api.library.mergeItems()`: **Added** * `plex-api.library.listSonicallySimilar()`: **Added** * `plex-api.library.setItemPreferences()`: **Added** * `plex-api.library.refreshItemsMetadata()`: **Added** * `plex-api.library.getRelatedItems()`: **Added** * `plex-api.library.listSimilar()`: **Added** * `plex-api.library.splitItem()`: **Added** * `plex-api.library.addSubtitles()`: **Added** * `plex-api.library.getItemTree()`: **Added** * `plex-api.library.unmatch()`: **Added** * `plex-api.library.listTopUsers()`: **Added** * `plex-api.library.detectVoiceActivity()`: **Added** * `plex-api.library.getAugmentationStatus()`: **Added** * `plex-api.library.setStreamSelection()`: **Added** * `plex-api.library.getPerson()`: **Added** * `plex-api.library.listPersonMedia()`: **Added** * `plex-api.library.deleteLibrarySection()`: **Added** * `plex-api.library.getLibraryDetails()`: **Added** * `plex-api.library.editSection()`: **Added** * `plex-api.library.updateItems()`: **Added** * `plex-api.library.startAnalysis()`: **Added** * `plex-api.library.autocomplete()`: **Added** * `plex-api.library.getCollections()`: **Added** * `plex-api.library.getCommon()`: **Added** * `plex-api.library.emptyTrash()`: **Added** * `plex-api.library.getSectionFilters()`: **Added** * `plex-api.library.getFirstCharacters()`: **Added** * `plex-api.library.deleteIndexes()`: **Added** * `plex-api.library.deleteIntros()`: **Added** * `plex-api.library.getSectionPreferences()`: **Added** * `plex-api.library.setSectionPreferences()`: **Added** * `plex-api.library.cancelRefresh()`: **Added** * `plex-api.library.refreshSection()`: **Added** * `plex-api.library.getAvailableSorts()`: **Added** * `plex-api.library.getStreamLevels()`: **Added** * `plex-api.library.getStreamLoudness()`: **Added** * `plex-api.library.getChapterImage()`: **Added** * `plex-api.library.setItemArtwork()`: **Added** * `plex-api.library.updateItemArtwork()`: **Added** * `plex-api.library.deleteMarker()`: **Added** * `plex-api.library.editMarker()`: **Added** * `plex-api.library.deleteMediaItem()`: **Added** * `plex-api.library.getPartIndex()`: **Added** * `plex-api.library.deleteCollection()`: **Added** * `plex-api.library.getSectionImage()`: **Added** * `plex-api.library.deleteStream()`: **Added** * `plex-api.library.getStream()`: **Added** * `plex-api.library.setStreamOffset()`: **Added** * `plex-api.library.getItemArtwork()`: **Added** * `plex-api.library.getMediaPart()`: **Added** * `plex-api.library.getImageFromBif()`: **Added** * `plex-api.collections.createCollection()`: **Added** * `plex-api.dvRs.listDvRs()`: **Added** * `plex-api.dvRs.createDvr()`: **Added** * `plex-api.dvRs.deleteDvr()`: **Added** * `plex-api.dvRs.getDvr()`: **Added** * `plex-api.dvRs.deleteLineup()`: **Added** * `plex-api.dvRs.addLineup()`: **Added** * `plex-api.dvRs.setDvrPreferences()`: **Added** * `plex-api.dvRs.stopDvrReload()`: **Added** * `plex-api.dvRs.reloadGuide()`: **Added** * `plex-api.dvRs.tuneChannel()`: **Added** * `plex-api.dvRs.removeDeviceFromDvr()`: **Added** * `plex-api.dvRs.addDeviceToDvr()`: **Added** * `plex-api.epg.computeChannelMap()`: **Added** * `plex-api.epg.getChannels()`: **Added** * `plex-api.epg.getCountries()`: **Added** * `plex-api.epg.getAllLanguages()`: **Added** * `plex-api.epg.getLineup()`: **Added** * `plex-api.epg.getLineupChannels()`: **Added** * `plex-api.epg.getCountriesLineups()`: **Added** * `plex-api.epg.getCountryRegions()`: **Added** * `plex-api.epg.listLineups()`: **Added** * `plex-api.liveTv.getSessions()`: **Added** * `plex-api.liveTv.getLiveTvSession()`: **Added** * `plex-api.liveTv.getSessionPlaylistIndex()`: **Added** * `plex-api.liveTv.getSessionSegment()`: **Added** * `plex-api.log.writeLog()`: **Added** * `plex-api.log.writeMessage()`: **Added** * `plex-api.log.enablePapertrail()`: **Added** * `plex-api.devices.getAvailableGrabbers()`: **Added** * `plex-api.devices.listDevices()`: **Added** * `plex-api.devices.addDevice()`: **Added** * `plex-api.devices.discoverDevices()`: **Added** * `plex-api.devices.removeDevice()`: **Added** * `plex-api.devices.getDeviceDetails()`: **Added** * `plex-api.devices.modifyDevice()`: **Added** * `plex-api.devices.setChannelmap()`: **Added** * `plex-api.devices.getDevicesChannels()`: **Added** * `plex-api.devices.setDevicePreferences()`: **Added** * `plex-api.devices.stopScan()`: **Added** * `plex-api.devices.scan()`: **Added** * `plex-api.devices.getThumb()`: **Added** * `plex-api.provider.listProviders()`: **Added** * `plex-api.provider.addProvider()`: **Added** * `plex-api.provider.refreshProviders()`: **Added** * `plex-api.provider.deleteMediaProvider()`: **Added** * `plex-api.subscriptions.getAllSubscriptions()`: **Added** * `plex-api.subscriptions.createSubscription()`: **Added** * `plex-api.subscriptions.processSubscriptions()`: **Added** * `plex-api.subscriptions.getScheduledRecordings()`: **Added** * `plex-api.subscriptions.getTemplate()`: **Added** * `plex-api.subscriptions.cancelGrab()`: **Added** * `plex-api.subscriptions.deleteSubscription()`: **Added** * `plex-api.subscriptions.getSubscription()`: **Added** * `plex-api.subscriptions.editSubscriptionPreferences()`: **Added** * `plex-api.subscriptions.reorderSubscription()`: **Added** * `plex-api.transcoder.transcodeImage()`: **Added** * `plex-api.transcoder.makeDecision()`: **Added** * `plex-api.transcoder.triggerFallback()`: **Added** * `plex-api.transcoder.transcodeSubtitles()`: **Added** * `plex-api.transcoder.startTranscodeSession()`: **Added** * `plex-api.playlist.listPlaylists()`: **Added** * `plex-api.playlist.getPlaylist()`: **Added** * `plex-api.playlist.getPlaylistItems()`: **Added** * `plex-api.libraryPlaylists.createPlaylist()`: **Added** * `plex-api.libraryPlaylists.uploadPlaylist()`: **Added** * `plex-api.libraryPlaylists.deletePlaylist()`: **Added** * `plex-api.libraryPlaylists.updatePlaylist()`: **Added** * `plex-api.libraryPlaylists.getPlaylistGenerators()`: **Added** * `plex-api.libraryPlaylists.clearPlaylistItems()`: **Added** * `plex-api.libraryPlaylists.addPlaylistItems()`: **Added** * `plex-api.libraryPlaylists.deletePlaylistItem()`: **Added** * `plex-api.libraryPlaylists.getPlaylistGenerator()`: **Added** * `plex-api.libraryPlaylists.modifyPlaylistGenerator()`: **Added** * `plex-api.libraryPlaylists.getPlaylistGeneratorItems()`: **Added** * `plex-api.libraryPlaylists.movePlaylistItem()`: **Added** * `plex-api.libraryPlaylists.refreshPlaylist()`: **Added** * `plex-api.playQueue.createPlayQueue()`: **Added** * `plex-api.playQueue.getPlayQueue()`: **Added** * `plex-api.playQueue.addToPlayQueue()`: **Added** * `plex-api.playQueue.clearPlayQueue()`: **Added** * `plex-api.playQueue.resetPlayQueue()`: **Added** * `plex-api.playQueue.shuffle()`: **Added** * `plex-api.playQueue.unshuffle()`: **Added** * `plex-api.playQueue.deletePlayQueueItem()`: **Added** * `plex-api.playQueue.movePlayQueueItem()`: **Added** * `plex-api.ultraBlur.getColors()`: **Added** * `plex-api.ultraBlur.getImage()`: **Added** * `plex-api.status.listSessions()`: **Added** * `plex-api.status.getBackgroundTasks()`: **Added** * `plex-api.status.listPlaybackHistory()`: **Added** * `plex-api.status.terminateSession()`: **Added** * `plex-api.status.deleteHistory()`: **Added** * `plex-api.status.getHistoryItem()`: **Added** * `plex-api.updater.checkUpdates()`: **Added** * `plex-api.updater.getUpdatesStatus()`: **Added** * `plex-api.content.getCollectionItems()`: **Added** * `plex-api.content.getMetadataItem()`: **Added** * `plex-api.content.getAlbums()`: **Added** * `plex-api.content.listContent()`: **Added** * `plex-api.content.getAllLeaves()`: **Added** * `plex-api.content.getArts()`: **Added** * `plex-api.content.getCategories()`: **Added** * `plex-api.content.getCluster()`: **Added** * `plex-api.content.getSonicPath()`: **Added** * `plex-api.content.getFolders()`: **Added** * `plex-api.content.listMoments()`: **Added** * `plex-api.content.getSonicallySimilar()`: **Added** * `plex-api.content.getCollectionImage()`: **Added** * `plex-api.libraryCollections.addCollectionItems()`: **Added** * `plex-api.libraryCollections.deleteCollectionItem()`: **Added** * `plex-api.libraryCollections.moveCollectionItem()`: **Added** * `plex-api.server.getServerCapabilities()`: **Deleted** **Breaking** ⚠️ * `plex-api.server.getServerPreferences()`: **Deleted** **Breaking** ⚠️ * `plex-api.server.getAvailableClients()`: **Deleted** **Breaking** ⚠️ * `plex-api.server.getDevices()`: **Deleted** **Breaking** ⚠️ * `plex-api.server.getServerIdentity()`: **Deleted** **Breaking** ⚠️ * `plex-api.server.getMyPlexAccount()`: **Deleted** **Breaking** ⚠️ * `plex-api.server.getResizedPhoto()`: **Deleted** **Breaking** ⚠️ * `plex-api.server.getMediaProviders()`: **Deleted** **Breaking** ⚠️ * `plex-api.server.getServerList()`: **Deleted** **Breaking** ⚠️ * `plex-api.media.markPlayed()`: **Deleted** **Breaking** ⚠️ * `plex-api.media.markUnplayed()`: **Deleted** **Breaking** ⚠️ * `plex-api.media.updatePlayProgress()`: **Deleted** **Breaking** ⚠️ * `plex-api.media.getBannerImage()`: **Deleted** **Breaking** ⚠️ * `plex-api.media.getThumbImage()`: **Deleted** **Breaking** ⚠️ * `plex-api.video.getTimeline()`: **Deleted** **Breaking** ⚠️ * `plex-api.video.startUniversalTranscode()`: **Deleted** **Breaking** ⚠️ * `plex-api.activities.getServerActivities()`: **Deleted** **Breaking** ⚠️ * `plex-api.activities.cancelServerActivities()`: **Deleted** **Breaking** ⚠️ * `plex-api.butler.getButlerTasks()`: **Deleted** **Breaking** ⚠️ * `plex-api.butler.startAllTasks()`: **Deleted** **Breaking** ⚠️ * `plex-api.butler.stopAllTasks()`: **Deleted** **Breaking** ⚠️ * `plex-api.plex.getCompanionsData()`: **Deleted** **Breaking** ⚠️ * `plex-api.plex.getUserFriends()`: **Deleted** **Breaking** ⚠️ * `plex-api.plex.getGeoData()`: **Deleted** **Breaking** ⚠️ * `plex-api.plex.getHomeData()`: **Deleted** **Breaking** ⚠️ * `plex-api.plex.getServerResources()`: **Deleted** **Breaking** ⚠️ * `plex-api.plex.getPin()`: **Deleted** **Breaking** ⚠️ * `plex-api.plex.getTokenByPinId()`: **Deleted** **Breaking** ⚠️ * `plex-api.hubs.getGlobalHubs()`: **Deleted** **Breaking** ⚠️ * `plex-api.hubs.getRecentlyAdded()`: **Deleted** **Breaking** ⚠️ * `plex-api.hubs.getLibraryHubs()`: **Deleted** **Breaking** ⚠️ * `plex-api.search.performSearch()`: **Deleted** **Breaking** ⚠️ * `plex-api.search.performVoiceSearch()`: **Deleted** **Breaking** ⚠️ * `plex-api.search.getSearchResults()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getFileHash()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getRecentlyAddedLibrary()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getAllLibraries()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getLibraryDetails()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.deleteLibrary()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getLibraryItems()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getLibrarySectionsAll()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getRefreshLibraryMetadata()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getSearchLibrary()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getGenresLibrary()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getCountriesLibrary()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getActorsLibrary()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getSearchAllLibraries()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getMediaMetaData()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getMediaArts()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.postMediaArts()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getMediaPosters()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.postMediaPoster()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getMetadataChildren()`: **Deleted** **Breaking** ⚠️ * `plex-api.library.getTopWatchedContent()`: **Deleted** **Breaking** ⚠️ * `plex-api.watchlist.getWatchList()`: **Deleted** **Breaking** ⚠️ * `plex-api.log.logLine()`: **Deleted** **Breaking** ⚠️ * `plex-api.log.logMultiLine()`: **Deleted** **Breaking** ⚠️ * `plex-api.log.enablePaperTrail()`: **Deleted** **Breaking** ⚠️ * `plex-api.playlists.createPlaylist()`: **Deleted** **Breaking** ⚠️ * `plex-api.playlists.getPlaylists()`: **Deleted** **Breaking** ⚠️ * `plex-api.playlists.getPlaylist()`: **Deleted** **Breaking** ⚠️ * `plex-api.playlists.deletePlaylist()`: **Deleted** **Breaking** ⚠️ * `plex-api.playlists.updatePlaylist()`: **Deleted** **Breaking** ⚠️ * `plex-api.playlists.getPlaylistContents()`: **Deleted** **Breaking** ⚠️ * `plex-api.playlists.clearPlaylistContents()`: **Deleted** **Breaking** ⚠️ * `plex-api.playlists.addPlaylistContents()`: **Deleted** **Breaking** ⚠️ * `plex-api.playlists.uploadPlaylist()`: **Deleted** **Breaking** ⚠️ * `plex-api.authentication.getTransientToken()`: **Deleted** **Breaking** ⚠️ * `plex-api.authentication.getSourceConnectionInformation()`: **Deleted** **Breaking** ⚠️ * `plex-api.authentication.getTokenDetails()`: **Deleted** **Breaking** ⚠️ * `plex-api.authentication.postUsersSignInData()`: **Deleted** **Breaking** ⚠️ * `plex-api.statistics.getStatistics()`: **Deleted** **Breaking** ⚠️ * `plex-api.statistics.getResourcesStatistics()`: **Deleted** **Breaking** ⚠️ * `plex-api.statistics.getBandwidthStatistics()`: **Deleted** **Breaking** ⚠️ * `plex-api.sessions.getSessions()`: **Deleted** **Breaking** ⚠️ * `plex-api.sessions.getSessionHistory()`: **Deleted** **Breaking** ⚠️ * `plex-api.sessions.getTranscodeSessions()`: **Deleted** **Breaking** ⚠️ * `plex-api.sessions.stopTranscodeSession()`: **Deleted** **Breaking** ⚠️ * `plex-api.updater.getUpdateStatus()`: **Deleted** **Breaking** ⚠️ * `plex-api.updater.checkForUpdates()`: **Deleted** **Breaking** ⚠️ * `plex-api.users.getUsers()`: **Deleted** **Breaking** ⚠️
This commit is contained in:
928
docs/sdks/downloadqueue/README.md
Normal file
928
docs/sdks/downloadqueue/README.md
Normal file
@@ -0,0 +1,928 @@
|
||||
# DownloadQueue
|
||||
(*downloadQueue*)
|
||||
|
||||
## Overview
|
||||
|
||||
API Operations against the Download Queue
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [createDownloadQueue](#createdownloadqueue) - Create download queue
|
||||
* [getDownloadQueue](#getdownloadqueue) - Get a download queue
|
||||
* [addDownloadQueueItems](#adddownloadqueueitems) - Add to download queue
|
||||
* [listDownloadQueueItems](#listdownloadqueueitems) - Get download queue items
|
||||
* [getItemDecision](#getitemdecision) - Grab download queue item decision
|
||||
* [getDownloadQueueMedia](#getdownloadqueuemedia) - Grab download queue media
|
||||
* [removeDownloadQueueItems](#removedownloadqueueitems) - Delete download queue items
|
||||
* [getDownloadQueueItems](#getdownloadqueueitems) - Get download queue items
|
||||
* [restartProcessingDownloadQueueItems](#restartprocessingdownloadqueueitems) - Restart processing of items from the decision
|
||||
|
||||
## createDownloadQueue
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Creates a download queue for this client if one doesn't exist, or returns the existing queue for this client and user.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="typescript" operationID="createDownloadQueue" method="post" path="/downloadQueue" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI();
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.downloadQueue.createDownloadQueue();
|
||||
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { downloadQueueCreateDownloadQueue } from "@lukehagar/plexjs/funcs/downloadQueueCreateDownloadQueue.js";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore();
|
||||
|
||||
async function run() {
|
||||
const res = await downloadQueueCreateDownloadQueue(plexAPI);
|
||||
if (res.ok) {
|
||||
const { value: result } = res;
|
||||
console.log(result);
|
||||
} else {
|
||||
console.log("downloadQueueCreateDownloadQueue failed:", res.error);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
||||
|
||||
### Response
|
||||
|
||||
**Promise\<[operations.CreateDownloadQueueResponse](../../sdk/models/operations/createdownloadqueueresponse.md)\>**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## getDownloadQueue
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Get a download queue by its id
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="typescript" operationID="getDownloadQueue" method="get" path="/downloadQueue/{queueId}" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.downloadQueue.getDownloadQueue({
|
||||
queueId: 922802,
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { downloadQueueGetDownloadQueue } from "@lukehagar/plexjs/funcs/downloadQueueGetDownloadQueue.js";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const res = await downloadQueueGetDownloadQueue(plexAPI, {
|
||||
queueId: 922802,
|
||||
});
|
||||
if (res.ok) {
|
||||
const { value: result } = res;
|
||||
console.log(result);
|
||||
} else {
|
||||
console.log("downloadQueueGetDownloadQueue failed:", res.error);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `request` | [operations.GetDownloadQueueRequest](../../sdk/models/operations/getdownloadqueuerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
||||
|
||||
### Response
|
||||
|
||||
**Promise\<[operations.GetDownloadQueueResponse](../../sdk/models/operations/getdownloadqueueresponse.md)\>**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## addDownloadQueueItems
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Add items to the download queue
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="typescript" operationID="addDownloadQueueItems" method="post" path="/downloadQueue/{queueId}/add" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { AdvancedSubtitles, BoolInt, LocationParameter, Protocol } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
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();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { downloadQueueAddDownloadQueueItems } from "@lukehagar/plexjs/funcs/downloadQueueAddDownloadQueueItems.js";
|
||||
import { AdvancedSubtitles, BoolInt, LocationParameter, Protocol } from "@lukehagar/plexjs/sdk/models/shared";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const res = await downloadQueueAddDownloadQueueItems(plexAPI, {
|
||||
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",
|
||||
});
|
||||
if (res.ok) {
|
||||
const { value: result } = res;
|
||||
console.log(result);
|
||||
} else {
|
||||
console.log("downloadQueueAddDownloadQueueItems failed:", res.error);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `request` | [operations.AddDownloadQueueItemsRequest](../../sdk/models/operations/adddownloadqueueitemsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
||||
|
||||
### Response
|
||||
|
||||
**Promise\<[operations.AddDownloadQueueItemsResponse](../../sdk/models/operations/adddownloadqueueitemsresponse.md)\>**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## listDownloadQueueItems
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Get items from a download queue
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="typescript" operationID="listDownloadQueueItems" method="get" path="/downloadQueue/{queueId}/items" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.downloadQueue.listDownloadQueueItems({
|
||||
queueId: 524138,
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { downloadQueueListDownloadQueueItems } from "@lukehagar/plexjs/funcs/downloadQueueListDownloadQueueItems.js";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const res = await downloadQueueListDownloadQueueItems(plexAPI, {
|
||||
queueId: 524138,
|
||||
});
|
||||
if (res.ok) {
|
||||
const { value: result } = res;
|
||||
console.log(result);
|
||||
} else {
|
||||
console.log("downloadQueueListDownloadQueueItems failed:", res.error);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `request` | [operations.ListDownloadQueueItemsRequest](../../sdk/models/operations/listdownloadqueueitemsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
||||
|
||||
### Response
|
||||
|
||||
**Promise\<[operations.ListDownloadQueueItemsResponse](../../sdk/models/operations/listdownloadqueueitemsresponse.md)\>**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## getItemDecision
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Grab the decision for a download queue item
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="typescript" operationID="getItemDecision" method="get" path="/downloadQueue/{queueId}/item/{itemId}/decision" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.downloadQueue.getItemDecision({
|
||||
queueId: 231605,
|
||||
itemId: 32,
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { downloadQueueGetItemDecision } from "@lukehagar/plexjs/funcs/downloadQueueGetItemDecision.js";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const res = await downloadQueueGetItemDecision(plexAPI, {
|
||||
queueId: 231605,
|
||||
itemId: 32,
|
||||
});
|
||||
if (res.ok) {
|
||||
const { value: result } = res;
|
||||
console.log(result);
|
||||
} else {
|
||||
console.log("downloadQueueGetItemDecision failed:", res.error);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `request` | [operations.GetItemDecisionRequest](../../sdk/models/operations/getitemdecisionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
||||
|
||||
### Response
|
||||
|
||||
**Promise\<[operations.GetItemDecisionResponse](../../sdk/models/operations/getitemdecisionresponse.md)\>**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## getDownloadQueueMedia
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Grab the media for a download queue item
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="typescript" operationID="getDownloadQueueMedia" method="get" path="/downloadQueue/{queueId}/item/{itemId}/media" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.downloadQueue.getDownloadQueueMedia({
|
||||
queueId: 663184,
|
||||
itemId: 32,
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { downloadQueueGetDownloadQueueMedia } from "@lukehagar/plexjs/funcs/downloadQueueGetDownloadQueueMedia.js";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const res = await downloadQueueGetDownloadQueueMedia(plexAPI, {
|
||||
queueId: 663184,
|
||||
itemId: 32,
|
||||
});
|
||||
if (res.ok) {
|
||||
const { value: result } = res;
|
||||
console.log(result);
|
||||
} else {
|
||||
console.log("downloadQueueGetDownloadQueueMedia failed:", res.error);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `request` | [operations.GetDownloadQueueMediaRequest](../../sdk/models/operations/getdownloadqueuemediarequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
||||
|
||||
### Response
|
||||
|
||||
**Promise\<[operations.GetDownloadQueueMediaResponse](../../sdk/models/operations/getdownloadqueuemediaresponse.md)\>**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## removeDownloadQueueItems
|
||||
|
||||
delete items from a download queue
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="typescript" operationID="removeDownloadQueueItems" method="delete" path="/downloadQueue/{queueId}/items/{itemId}" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.downloadQueue.removeDownloadQueueItems({
|
||||
queueId: 946275,
|
||||
itemId: [
|
||||
32,
|
||||
345,
|
||||
23,
|
||||
],
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { downloadQueueRemoveDownloadQueueItems } from "@lukehagar/plexjs/funcs/downloadQueueRemoveDownloadQueueItems.js";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const res = await downloadQueueRemoveDownloadQueueItems(plexAPI, {
|
||||
queueId: 946275,
|
||||
itemId: [
|
||||
32,
|
||||
345,
|
||||
23,
|
||||
],
|
||||
});
|
||||
if (res.ok) {
|
||||
const { value: result } = res;
|
||||
console.log(result);
|
||||
} else {
|
||||
console.log("downloadQueueRemoveDownloadQueueItems failed:", res.error);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `request` | [operations.RemoveDownloadQueueItemsRequest](../../sdk/models/operations/removedownloadqueueitemsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
||||
|
||||
### Response
|
||||
|
||||
**Promise\<[operations.RemoveDownloadQueueItemsResponse](../../sdk/models/operations/removedownloadqueueitemsresponse.md)\>**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## getDownloadQueueItems
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Get items from a download queue
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="typescript" operationID="getDownloadQueueItems" method="get" path="/downloadQueue/{queueId}/items/{itemId}" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.downloadQueue.getDownloadQueueItems({
|
||||
queueId: 809886,
|
||||
itemId: [
|
||||
32,
|
||||
345,
|
||||
23,
|
||||
],
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { downloadQueueGetDownloadQueueItems } from "@lukehagar/plexjs/funcs/downloadQueueGetDownloadQueueItems.js";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const res = await downloadQueueGetDownloadQueueItems(plexAPI, {
|
||||
queueId: 809886,
|
||||
itemId: [
|
||||
32,
|
||||
345,
|
||||
23,
|
||||
],
|
||||
});
|
||||
if (res.ok) {
|
||||
const { value: result } = res;
|
||||
console.log(result);
|
||||
} else {
|
||||
console.log("downloadQueueGetDownloadQueueItems failed:", res.error);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `request` | [operations.GetDownloadQueueItemsRequest](../../sdk/models/operations/getdownloadqueueitemsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
||||
|
||||
### Response
|
||||
|
||||
**Promise\<[operations.GetDownloadQueueItemsResponse](../../sdk/models/operations/getdownloadqueueitemsresponse.md)\>**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## restartProcessingDownloadQueueItems
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Reprocess download queue items with previous decision parameters
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="typescript" operationID="restartProcessingDownloadQueueItems" method="post" path="/downloadQueue/{queueId}/items/{itemId}/restart" -->
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.downloadQueue.restartProcessingDownloadQueueItems({
|
||||
queueId: 713001,
|
||||
itemId: [
|
||||
32,
|
||||
345,
|
||||
23,
|
||||
],
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { downloadQueueRestartProcessingDownloadQueueItems } from "@lukehagar/plexjs/funcs/downloadQueueRestartProcessingDownloadQueueItems.js";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore({
|
||||
xPlexClientIdentifier: "abc123",
|
||||
xPlexProduct: "Plex for Roku",
|
||||
xPlexVersion: "2.4.1",
|
||||
xPlexPlatform: "Roku",
|
||||
xPlexPlatformVersion: "4.3 build 1057",
|
||||
xPlexDevice: "Roku 3",
|
||||
xPlexModel: "4200X",
|
||||
xPlexDeviceVendor: "Roku",
|
||||
xPlexDeviceName: "Living Room TV",
|
||||
xPlexMarketplace: "googlePlay",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const res = await downloadQueueRestartProcessingDownloadQueueItems(plexAPI, {
|
||||
queueId: 713001,
|
||||
itemId: [
|
||||
32,
|
||||
345,
|
||||
23,
|
||||
],
|
||||
});
|
||||
if (res.ok) {
|
||||
const { value: result } = res;
|
||||
console.log(result);
|
||||
} else {
|
||||
console.log("downloadQueueRestartProcessingDownloadQueueItems failed:", res.error);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `request` | [operations.RestartProcessingDownloadQueueItemsRequest](../../sdk/models/operations/restartprocessingdownloadqueueitemsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
||||
|
||||
### Response
|
||||
|
||||
**Promise\<[operations.RestartProcessingDownloadQueueItemsResponse](../../sdk/models/operations/restartprocessingdownloadqueueitemsresponse.md)\>**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
Reference in New Issue
Block a user