# 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 ```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 ```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 ```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 ```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 ```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 ```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 ```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 ```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 ```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 | \*/\* |