mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 12:37:46 +00:00
9297 lines
508 KiB
TypeScript
9297 lines
508 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Plex-API
|
|
* An Open API Spec for interacting with Plex.tv and Plex Servers
|
|
*
|
|
* The version of the OpenAPI document: 0.0.3
|
|
* Contact: Lukeslakemail@gmail.com
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
|
|
import { Configuration } from './configuration';
|
|
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
// Some imports not used depending on template conditions
|
|
// @ts-ignore
|
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
// @ts-ignore
|
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface GetPin200Response
|
|
*/
|
|
export interface GetPin200Response {
|
|
/**
|
|
* PinID for use with authentication
|
|
* @type {any}
|
|
* @memberof GetPin200Response
|
|
*/
|
|
'id'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200Response
|
|
*/
|
|
'code'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200Response
|
|
*/
|
|
'product'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200Response
|
|
*/
|
|
'trusted'?: any;
|
|
/**
|
|
* a link to a QR code hosted on plex.tv The QR code redirects to the relevant `plex.tv/link` authentication page Which then prompts the user for the 4 Digit Link Pin
|
|
* @type {any}
|
|
* @memberof GetPin200Response
|
|
*/
|
|
'qr'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200Response
|
|
*/
|
|
'clientIdentifier'?: any;
|
|
/**
|
|
*
|
|
* @type {GetPin200ResponseLocation}
|
|
* @memberof GetPin200Response
|
|
*/
|
|
'location'?: GetPin200ResponseLocation;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200Response
|
|
*/
|
|
'expiresIn'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200Response
|
|
*/
|
|
'createdAt'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200Response
|
|
*/
|
|
'expiresAt'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200Response
|
|
*/
|
|
'authToken'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200Response
|
|
*/
|
|
'newRegistration'?: any;
|
|
}
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface GetPin200ResponseLocation
|
|
*/
|
|
export interface GetPin200ResponseLocation {
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200ResponseLocation
|
|
*/
|
|
'code'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200ResponseLocation
|
|
*/
|
|
'european_union_member'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200ResponseLocation
|
|
*/
|
|
'continent_code'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200ResponseLocation
|
|
*/
|
|
'country'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200ResponseLocation
|
|
*/
|
|
'city'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200ResponseLocation
|
|
*/
|
|
'time_zone'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200ResponseLocation
|
|
*/
|
|
'postal_code'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200ResponseLocation
|
|
*/
|
|
'in_privacy_restricted_country'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200ResponseLocation
|
|
*/
|
|
'subdivisions'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin200ResponseLocation
|
|
*/
|
|
'coordinates'?: any;
|
|
}
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface GetPin400Response
|
|
*/
|
|
export interface GetPin400Response {
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetPin400Response
|
|
*/
|
|
'errors'?: any;
|
|
}
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface GetServerActivities200Response
|
|
*/
|
|
export interface GetServerActivities200Response {
|
|
/**
|
|
*
|
|
* @type {GetServerActivities200ResponseMediaContainer}
|
|
* @memberof GetServerActivities200Response
|
|
*/
|
|
'MediaContainer'?: GetServerActivities200ResponseMediaContainer;
|
|
}
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface GetServerActivities200ResponseMediaContainer
|
|
*/
|
|
export interface GetServerActivities200ResponseMediaContainer {
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerActivities200ResponseMediaContainer
|
|
*/
|
|
'size'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerActivities200ResponseMediaContainer
|
|
*/
|
|
'Activity'?: any;
|
|
}
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface GetServerCapabilities200Response
|
|
*/
|
|
export interface GetServerCapabilities200Response {
|
|
/**
|
|
*
|
|
* @type {GetServerCapabilities200ResponseMediaContainer}
|
|
* @memberof GetServerCapabilities200Response
|
|
*/
|
|
'MediaContainer'?: GetServerCapabilities200ResponseMediaContainer;
|
|
}
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
export interface GetServerCapabilities200ResponseMediaContainer {
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'size'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'allowCameraUpload'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'allowChannelAccess'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'allowMediaDeletion'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'allowSharing'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'allowSync'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'allowTuners'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'backgroundProcessing'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'certificate'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'companionProxy'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'countryCode'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'diagnostics'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'eventStream'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'friendlyName'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'hubSearch'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'itemClusters'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'livetv'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'machineIdentifier'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'mediaProviders'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'multiuser'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'musicAnalysis'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'myPlex'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'myPlexMappingState'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'myPlexSigninState'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'myPlexSubscription'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'myPlexUsername'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'offlineTranscode'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'ownerFeatures'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'photoAutoTag'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'platform'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'platformVersion'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'pluginHost'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'pushNotifications'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'readOnlyLibraries'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'streamingBrainABRVersion'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'streamingBrainVersion'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'sync'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'transcoderActiveVideoSessions'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'transcoderAudio'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'transcoderLyrics'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'transcoderPhoto'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'transcoderSubtitles'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'transcoderVideo'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'transcoderVideoBitrates'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'transcoderVideoQualities'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'transcoderVideoResolutions'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'updatedAt'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'updater'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'version'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'voiceSearch'?: any;
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities200ResponseMediaContainer
|
|
*/
|
|
'Directory'?: any;
|
|
}
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface GetServerCapabilities401Response
|
|
*/
|
|
export interface GetServerCapabilities401Response {
|
|
/**
|
|
*
|
|
* @type {any}
|
|
* @memberof GetServerCapabilities401Response
|
|
*/
|
|
'errors'?: any;
|
|
}
|
|
|
|
/**
|
|
* ActivitiesApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const ActivitiesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* Cancel Server Activities
|
|
* @summary Cancel Server Activities
|
|
* @param {any} activityUUID The UUID of the activity to cancel.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
cancelServerActivities: async (activityUUID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'activityUUID' is not null or undefined
|
|
assertParamExists('cancelServerActivities', 'activityUUID', activityUUID)
|
|
const localVarPath = `/activities/{activityUUID}`
|
|
.replace(`{${"activityUUID"}}`, encodeURIComponent(String(activityUUID)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Get Server Activities
|
|
* @summary Get Server Activities
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getServerActivities: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/activities`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* ActivitiesApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const ActivitiesApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = ActivitiesApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* Cancel Server Activities
|
|
* @summary Cancel Server Activities
|
|
* @param {any} activityUUID The UUID of the activity to cancel.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async cancelServerActivities(activityUUID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.cancelServerActivities(activityUUID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* Get Server Activities
|
|
* @summary Get Server Activities
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getServerActivities(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetServerActivities200Response>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getServerActivities(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* ActivitiesApi - factory interface
|
|
* @export
|
|
*/
|
|
export const ActivitiesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = ActivitiesApiFp(configuration)
|
|
return {
|
|
/**
|
|
* Cancel Server Activities
|
|
* @summary Cancel Server Activities
|
|
* @param {any} activityUUID The UUID of the activity to cancel.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
cancelServerActivities(activityUUID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.cancelServerActivities(activityUUID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Get Server Activities
|
|
* @summary Get Server Activities
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getServerActivities(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<GetServerActivities200Response> {
|
|
return localVarFp.getServerActivities(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for cancelServerActivities operation in ActivitiesApi.
|
|
* @export
|
|
* @interface ActivitiesApiCancelServerActivitiesRequest
|
|
*/
|
|
export interface ActivitiesApiCancelServerActivitiesRequest {
|
|
/**
|
|
* The UUID of the activity to cancel.
|
|
* @type {any}
|
|
* @memberof ActivitiesApiCancelServerActivities
|
|
*/
|
|
readonly activityUUID: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof ActivitiesApiCancelServerActivities
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof ActivitiesApiCancelServerActivities
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof ActivitiesApiCancelServerActivities
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof ActivitiesApiCancelServerActivities
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof ActivitiesApiCancelServerActivities
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof ActivitiesApiCancelServerActivities
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof ActivitiesApiCancelServerActivities
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getServerActivities operation in ActivitiesApi.
|
|
* @export
|
|
* @interface ActivitiesApiGetServerActivitiesRequest
|
|
*/
|
|
export interface ActivitiesApiGetServerActivitiesRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof ActivitiesApiGetServerActivities
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof ActivitiesApiGetServerActivities
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof ActivitiesApiGetServerActivities
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof ActivitiesApiGetServerActivities
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof ActivitiesApiGetServerActivities
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof ActivitiesApiGetServerActivities
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof ActivitiesApiGetServerActivities
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* ActivitiesApi - object-oriented interface
|
|
* @export
|
|
* @class ActivitiesApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class ActivitiesApi extends BaseAPI {
|
|
/**
|
|
* Cancel Server Activities
|
|
* @summary Cancel Server Activities
|
|
* @param {ActivitiesApiCancelServerActivitiesRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ActivitiesApi
|
|
*/
|
|
public cancelServerActivities(requestParameters: ActivitiesApiCancelServerActivitiesRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return ActivitiesApiFp(this.configuration).cancelServerActivities(requestParameters.activityUUID, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Get Server Activities
|
|
* @summary Get Server Activities
|
|
* @param {ActivitiesApiGetServerActivitiesRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ActivitiesApi
|
|
*/
|
|
public getServerActivities(requestParameters: ActivitiesApiGetServerActivitiesRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return ActivitiesApiFp(this.configuration).getServerActivities(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* AuthenticationApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const AuthenticationApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* Retrieve a Pin from Plex.tv for authentication flows
|
|
* @summary Get a Pin
|
|
* @param {any} [strong] Determines the kind of code returned by the API call Strong codes are used for Pin authentication flows Non-Strong codes are used for `Plex.tv/link`
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getPin: async (strong?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/pins`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
if (strong !== undefined) {
|
|
localVarQueryParameter['strong'] = strong;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
|
|
* @summary Get Access Token
|
|
* @param {any} pinID The PinID to retrieve an access token for
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getToken: async (pinID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'pinID' is not null or undefined
|
|
assertParamExists('getToken', 'pinID', pinID)
|
|
const localVarPath = `/pins/{pinID}`
|
|
.replace(`{${"pinID"}}`, encodeURIComponent(String(pinID)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* AuthenticationApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const AuthenticationApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = AuthenticationApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* Retrieve a Pin from Plex.tv for authentication flows
|
|
* @summary Get a Pin
|
|
* @param {any} [strong] Determines the kind of code returned by the API call Strong codes are used for Pin authentication flows Non-Strong codes are used for `Plex.tv/link`
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getPin(strong?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPin200Response>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getPin(strong, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
|
|
* @summary Get Access Token
|
|
* @param {any} pinID The PinID to retrieve an access token for
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getToken(pinID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getToken(pinID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* AuthenticationApi - factory interface
|
|
* @export
|
|
*/
|
|
export const AuthenticationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = AuthenticationApiFp(configuration)
|
|
return {
|
|
/**
|
|
* Retrieve a Pin from Plex.tv for authentication flows
|
|
* @summary Get a Pin
|
|
* @param {any} [strong] Determines the kind of code returned by the API call Strong codes are used for Pin authentication flows Non-Strong codes are used for `Plex.tv/link`
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getPin(strong?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<GetPin200Response> {
|
|
return localVarFp.getPin(strong, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
|
|
* @summary Get Access Token
|
|
* @param {any} pinID The PinID to retrieve an access token for
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getToken(pinID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getToken(pinID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for getPin operation in AuthenticationApi.
|
|
* @export
|
|
* @interface AuthenticationApiGetPinRequest
|
|
*/
|
|
export interface AuthenticationApiGetPinRequest {
|
|
/**
|
|
* Determines the kind of code returned by the API call Strong codes are used for Pin authentication flows Non-Strong codes are used for `Plex.tv/link`
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetPin
|
|
*/
|
|
readonly strong?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetPin
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetPin
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetPin
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetPin
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetPin
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetPin
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetPin
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getToken operation in AuthenticationApi.
|
|
* @export
|
|
* @interface AuthenticationApiGetTokenRequest
|
|
*/
|
|
export interface AuthenticationApiGetTokenRequest {
|
|
/**
|
|
* The PinID to retrieve an access token for
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetToken
|
|
*/
|
|
readonly pinID: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetToken
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetToken
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetToken
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetToken
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetToken
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetToken
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof AuthenticationApiGetToken
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* AuthenticationApi - object-oriented interface
|
|
* @export
|
|
* @class AuthenticationApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class AuthenticationApi extends BaseAPI {
|
|
/**
|
|
* Retrieve a Pin from Plex.tv for authentication flows
|
|
* @summary Get a Pin
|
|
* @param {AuthenticationApiGetPinRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof AuthenticationApi
|
|
*/
|
|
public getPin(requestParameters: AuthenticationApiGetPinRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return AuthenticationApiFp(this.configuration).getPin(requestParameters.strong, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
|
|
* @summary Get Access Token
|
|
* @param {AuthenticationApiGetTokenRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof AuthenticationApi
|
|
*/
|
|
public getToken(requestParameters: AuthenticationApiGetTokenRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return AuthenticationApiFp(this.configuration).getToken(requestParameters.pinID, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* ButlerApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const ButlerApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server\'s Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: 1. Any tasks not scheduled to run on the current day will be skipped. 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. 4. If we are outside the configured window, the task will start immediately.
|
|
* @summary Start all Butler tasks
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
startAllTasks: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/butler`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server\'s Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: 1. Any tasks not scheduled to run on the current day will be skipped. 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. 4. If we are outside the configured window, the task will start immediately.
|
|
* @summary Start a single Butler task
|
|
* @param {any} taskName the name of the task to be started.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
startTask: async (taskName: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'taskName' is not null or undefined
|
|
assertParamExists('startTask', 'taskName', taskName)
|
|
const localVarPath = `/butler/{taskName}`
|
|
.replace(`{${"taskName"}}`, encodeURIComponent(String(taskName)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
|
|
* @summary Stop all Butler tasks
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
stopAllTasks: async (axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/butler`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
|
|
* @summary Stop a single Butler task
|
|
* @param {any} taskName The name of the task to be started.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
stopTask: async (taskName: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'taskName' is not null or undefined
|
|
assertParamExists('stopTask', 'taskName', taskName)
|
|
const localVarPath = `/butler/{taskName}`
|
|
.replace(`{${"taskName"}}`, encodeURIComponent(String(taskName)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* ButlerApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const ButlerApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = ButlerApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server\'s Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: 1. Any tasks not scheduled to run on the current day will be skipped. 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. 4. If we are outside the configured window, the task will start immediately.
|
|
* @summary Start all Butler tasks
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async startAllTasks(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.startAllTasks(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server\'s Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: 1. Any tasks not scheduled to run on the current day will be skipped. 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. 4. If we are outside the configured window, the task will start immediately.
|
|
* @summary Start a single Butler task
|
|
* @param {any} taskName the name of the task to be started.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async startTask(taskName: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.startTask(taskName, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
|
|
* @summary Stop all Butler tasks
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async stopAllTasks(axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.stopAllTasks(axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
|
|
* @summary Stop a single Butler task
|
|
* @param {any} taskName The name of the task to be started.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async stopTask(taskName: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.stopTask(taskName, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* ButlerApi - factory interface
|
|
* @export
|
|
*/
|
|
export const ButlerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = ButlerApiFp(configuration)
|
|
return {
|
|
/**
|
|
* This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server\'s Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: 1. Any tasks not scheduled to run on the current day will be skipped. 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. 4. If we are outside the configured window, the task will start immediately.
|
|
* @summary Start all Butler tasks
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
startAllTasks(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.startAllTasks(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server\'s Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: 1. Any tasks not scheduled to run on the current day will be skipped. 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. 4. If we are outside the configured window, the task will start immediately.
|
|
* @summary Start a single Butler task
|
|
* @param {any} taskName the name of the task to be started.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
startTask(taskName: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.startTask(taskName, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
|
|
* @summary Stop all Butler tasks
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
stopAllTasks(axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.stopAllTasks(axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
|
|
* @summary Stop a single Butler task
|
|
* @param {any} taskName The name of the task to be started.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
stopTask(taskName: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.stopTask(taskName, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for startAllTasks operation in ButlerApi.
|
|
* @export
|
|
* @interface ButlerApiStartAllTasksRequest
|
|
*/
|
|
export interface ButlerApiStartAllTasksRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof ButlerApiStartAllTasks
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof ButlerApiStartAllTasks
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof ButlerApiStartAllTasks
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof ButlerApiStartAllTasks
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof ButlerApiStartAllTasks
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof ButlerApiStartAllTasks
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof ButlerApiStartAllTasks
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for startTask operation in ButlerApi.
|
|
* @export
|
|
* @interface ButlerApiStartTaskRequest
|
|
*/
|
|
export interface ButlerApiStartTaskRequest {
|
|
/**
|
|
* the name of the task to be started.
|
|
* @type {any}
|
|
* @memberof ButlerApiStartTask
|
|
*/
|
|
readonly taskName: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof ButlerApiStartTask
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof ButlerApiStartTask
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof ButlerApiStartTask
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof ButlerApiStartTask
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof ButlerApiStartTask
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof ButlerApiStartTask
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof ButlerApiStartTask
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for stopTask operation in ButlerApi.
|
|
* @export
|
|
* @interface ButlerApiStopTaskRequest
|
|
*/
|
|
export interface ButlerApiStopTaskRequest {
|
|
/**
|
|
* The name of the task to be started.
|
|
* @type {any}
|
|
* @memberof ButlerApiStopTask
|
|
*/
|
|
readonly taskName: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof ButlerApiStopTask
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof ButlerApiStopTask
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof ButlerApiStopTask
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof ButlerApiStopTask
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof ButlerApiStopTask
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof ButlerApiStopTask
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof ButlerApiStopTask
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* ButlerApi - object-oriented interface
|
|
* @export
|
|
* @class ButlerApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class ButlerApi extends BaseAPI {
|
|
/**
|
|
* This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server\'s Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: 1. Any tasks not scheduled to run on the current day will be skipped. 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. 4. If we are outside the configured window, the task will start immediately.
|
|
* @summary Start all Butler tasks
|
|
* @param {ButlerApiStartAllTasksRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ButlerApi
|
|
*/
|
|
public startAllTasks(requestParameters: ButlerApiStartAllTasksRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return ButlerApiFp(this.configuration).startAllTasks(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server\'s Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: 1. Any tasks not scheduled to run on the current day will be skipped. 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. 4. If we are outside the configured window, the task will start immediately.
|
|
* @summary Start a single Butler task
|
|
* @param {ButlerApiStartTaskRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ButlerApi
|
|
*/
|
|
public startTask(requestParameters: ButlerApiStartTaskRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return ButlerApiFp(this.configuration).startTask(requestParameters.taskName, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
|
|
* @summary Stop all Butler tasks
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ButlerApi
|
|
*/
|
|
public stopAllTasks(axiosOptions?: AxiosRequestConfig) {
|
|
return ButlerApiFp(this.configuration).stopAllTasks(axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
|
|
* @summary Stop a single Butler task
|
|
* @param {ButlerApiStopTaskRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ButlerApi
|
|
*/
|
|
public stopTask(requestParameters: ButlerApiStopTaskRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return ButlerApiFp(this.configuration).stopTask(requestParameters.taskName, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* DevicesApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const DevicesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* Get Available Clients
|
|
* @summary Get Available Clients
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getAvailableClients: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/clients`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Get Devices
|
|
* @summary Get Devices
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getDevices: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/resources`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* DevicesApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const DevicesApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = DevicesApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* Get Available Clients
|
|
* @summary Get Available Clients
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getAvailableClients(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getAvailableClients(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* Get Devices
|
|
* @summary Get Devices
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getDevices(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getDevices(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* DevicesApi - factory interface
|
|
* @export
|
|
*/
|
|
export const DevicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = DevicesApiFp(configuration)
|
|
return {
|
|
/**
|
|
* Get Available Clients
|
|
* @summary Get Available Clients
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getAvailableClients(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<any> {
|
|
return localVarFp.getAvailableClients(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Get Devices
|
|
* @summary Get Devices
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getDevices(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<any> {
|
|
return localVarFp.getDevices(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for getAvailableClients operation in DevicesApi.
|
|
* @export
|
|
* @interface DevicesApiGetAvailableClientsRequest
|
|
*/
|
|
export interface DevicesApiGetAvailableClientsRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof DevicesApiGetAvailableClients
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof DevicesApiGetAvailableClients
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof DevicesApiGetAvailableClients
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof DevicesApiGetAvailableClients
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof DevicesApiGetAvailableClients
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof DevicesApiGetAvailableClients
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof DevicesApiGetAvailableClients
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getDevices operation in DevicesApi.
|
|
* @export
|
|
* @interface DevicesApiGetDevicesRequest
|
|
*/
|
|
export interface DevicesApiGetDevicesRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof DevicesApiGetDevices
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof DevicesApiGetDevices
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof DevicesApiGetDevices
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof DevicesApiGetDevices
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof DevicesApiGetDevices
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof DevicesApiGetDevices
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof DevicesApiGetDevices
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* DevicesApi - object-oriented interface
|
|
* @export
|
|
* @class DevicesApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class DevicesApi extends BaseAPI {
|
|
/**
|
|
* Get Available Clients
|
|
* @summary Get Available Clients
|
|
* @param {DevicesApiGetAvailableClientsRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof DevicesApi
|
|
*/
|
|
public getAvailableClients(requestParameters: DevicesApiGetAvailableClientsRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return DevicesApiFp(this.configuration).getAvailableClients(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Get Devices
|
|
* @summary Get Devices
|
|
* @param {DevicesApiGetDevicesRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof DevicesApi
|
|
*/
|
|
public getDevices(requestParameters: DevicesApiGetDevicesRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return DevicesApiFp(this.configuration).getDevices(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* HashesApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const HashesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* This resource returns hash values for local files
|
|
* @summary Get Hash Value
|
|
* @param {any} url This is the path to the local file, must be prefixed by `file://`
|
|
* @param {any} [type] Item type
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getFileHash: async (url: any, type?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'url' is not null or undefined
|
|
assertParamExists('getFileHash', 'url', url)
|
|
const localVarPath = `/library/hashes`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (url !== undefined) {
|
|
localVarQueryParameter['url'] = url;
|
|
}
|
|
|
|
if (type !== undefined) {
|
|
localVarQueryParameter['type'] = type;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* HashesApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const HashesApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = HashesApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* This resource returns hash values for local files
|
|
* @summary Get Hash Value
|
|
* @param {any} url This is the path to the local file, must be prefixed by `file://`
|
|
* @param {any} [type] Item type
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getFileHash(url: any, type?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getFileHash(url, type, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* HashesApi - factory interface
|
|
* @export
|
|
*/
|
|
export const HashesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = HashesApiFp(configuration)
|
|
return {
|
|
/**
|
|
* This resource returns hash values for local files
|
|
* @summary Get Hash Value
|
|
* @param {any} url This is the path to the local file, must be prefixed by `file://`
|
|
* @param {any} [type] Item type
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getFileHash(url: any, type?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getFileHash(url, type, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for getFileHash operation in HashesApi.
|
|
* @export
|
|
* @interface HashesApiGetFileHashRequest
|
|
*/
|
|
export interface HashesApiGetFileHashRequest {
|
|
/**
|
|
* This is the path to the local file, must be prefixed by `file://`
|
|
* @type {any}
|
|
* @memberof HashesApiGetFileHash
|
|
*/
|
|
readonly url: any
|
|
|
|
/**
|
|
* Item type
|
|
* @type {any}
|
|
* @memberof HashesApiGetFileHash
|
|
*/
|
|
readonly type?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof HashesApiGetFileHash
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof HashesApiGetFileHash
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof HashesApiGetFileHash
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof HashesApiGetFileHash
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof HashesApiGetFileHash
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof HashesApiGetFileHash
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof HashesApiGetFileHash
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* HashesApi - object-oriented interface
|
|
* @export
|
|
* @class HashesApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class HashesApi extends BaseAPI {
|
|
/**
|
|
* This resource returns hash values for local files
|
|
* @summary Get Hash Value
|
|
* @param {HashesApiGetFileHashRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof HashesApi
|
|
*/
|
|
public getFileHash(requestParameters: HashesApiGetFileHashRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return HashesApiFp(this.configuration).getFileHash(requestParameters.url, requestParameters.type, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* HubsApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const HubsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
*
|
|
* @summary Get Global Hubs
|
|
* @param {any} [count] The number of items to return with each hub.
|
|
* @param {any} [onlyTransient] Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getGlobalHubs: async (count?: any, onlyTransient?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/hubs`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (count !== undefined) {
|
|
localVarQueryParameter['count'] = count;
|
|
}
|
|
|
|
if (onlyTransient !== undefined) {
|
|
localVarQueryParameter['onlyTransient'] = onlyTransient;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This endpoint will return a list of library specific hubs
|
|
* @summary Get library specific hubs
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} [count] The number of items to return with each hub.
|
|
* @param {any} [onlyTransient] Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getLibraryHubs: async (sectionId: any, count?: any, onlyTransient?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'sectionId' is not null or undefined
|
|
assertParamExists('getLibraryHubs', 'sectionId', sectionId)
|
|
const localVarPath = `/hubs/sections/{sectionId}`
|
|
.replace(`{${"sectionId"}}`, encodeURIComponent(String(sectionId)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (count !== undefined) {
|
|
localVarQueryParameter['count'] = count;
|
|
}
|
|
|
|
if (onlyTransient !== undefined) {
|
|
localVarQueryParameter['onlyTransient'] = onlyTransient;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* HubsApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const HubsApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = HubsApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
*
|
|
* @summary Get Global Hubs
|
|
* @param {any} [count] The number of items to return with each hub.
|
|
* @param {any} [onlyTransient] Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getGlobalHubs(count?: any, onlyTransient?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getGlobalHubs(count, onlyTransient, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This endpoint will return a list of library specific hubs
|
|
* @summary Get library specific hubs
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} [count] The number of items to return with each hub.
|
|
* @param {any} [onlyTransient] Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getLibraryHubs(sectionId: any, count?: any, onlyTransient?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getLibraryHubs(sectionId, count, onlyTransient, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* HubsApi - factory interface
|
|
* @export
|
|
*/
|
|
export const HubsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = HubsApiFp(configuration)
|
|
return {
|
|
/**
|
|
*
|
|
* @summary Get Global Hubs
|
|
* @param {any} [count] The number of items to return with each hub.
|
|
* @param {any} [onlyTransient] Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getGlobalHubs(count?: any, onlyTransient?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getGlobalHubs(count, onlyTransient, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This endpoint will return a list of library specific hubs
|
|
* @summary Get library specific hubs
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} [count] The number of items to return with each hub.
|
|
* @param {any} [onlyTransient] Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getLibraryHubs(sectionId: any, count?: any, onlyTransient?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getLibraryHubs(sectionId, count, onlyTransient, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for getGlobalHubs operation in HubsApi.
|
|
* @export
|
|
* @interface HubsApiGetGlobalHubsRequest
|
|
*/
|
|
export interface HubsApiGetGlobalHubsRequest {
|
|
/**
|
|
* The number of items to return with each hub.
|
|
* @type {any}
|
|
* @memberof HubsApiGetGlobalHubs
|
|
*/
|
|
readonly count?: any
|
|
|
|
/**
|
|
* Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
|
* @type {any}
|
|
* @memberof HubsApiGetGlobalHubs
|
|
*/
|
|
readonly onlyTransient?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof HubsApiGetGlobalHubs
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof HubsApiGetGlobalHubs
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof HubsApiGetGlobalHubs
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof HubsApiGetGlobalHubs
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof HubsApiGetGlobalHubs
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof HubsApiGetGlobalHubs
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof HubsApiGetGlobalHubs
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getLibraryHubs operation in HubsApi.
|
|
* @export
|
|
* @interface HubsApiGetLibraryHubsRequest
|
|
*/
|
|
export interface HubsApiGetLibraryHubsRequest {
|
|
/**
|
|
* the Id of the library to query
|
|
* @type {any}
|
|
* @memberof HubsApiGetLibraryHubs
|
|
*/
|
|
readonly sectionId: any
|
|
|
|
/**
|
|
* The number of items to return with each hub.
|
|
* @type {any}
|
|
* @memberof HubsApiGetLibraryHubs
|
|
*/
|
|
readonly count?: any
|
|
|
|
/**
|
|
* Only return hubs which are \"transient\", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
|
* @type {any}
|
|
* @memberof HubsApiGetLibraryHubs
|
|
*/
|
|
readonly onlyTransient?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof HubsApiGetLibraryHubs
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof HubsApiGetLibraryHubs
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof HubsApiGetLibraryHubs
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof HubsApiGetLibraryHubs
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof HubsApiGetLibraryHubs
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof HubsApiGetLibraryHubs
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof HubsApiGetLibraryHubs
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* HubsApi - object-oriented interface
|
|
* @export
|
|
* @class HubsApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class HubsApi extends BaseAPI {
|
|
/**
|
|
*
|
|
* @summary Get Global Hubs
|
|
* @param {HubsApiGetGlobalHubsRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof HubsApi
|
|
*/
|
|
public getGlobalHubs(requestParameters: HubsApiGetGlobalHubsRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return HubsApiFp(this.configuration).getGlobalHubs(requestParameters.count, requestParameters.onlyTransient, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This endpoint will return a list of library specific hubs
|
|
* @summary Get library specific hubs
|
|
* @param {HubsApiGetLibraryHubsRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof HubsApi
|
|
*/
|
|
public getLibraryHubs(requestParameters: HubsApiGetLibraryHubsRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return HubsApiFp(this.configuration).getLibraryHubs(requestParameters.sectionId, requestParameters.count, requestParameters.onlyTransient, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* LibraryApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const LibraryApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* Represents a \"Common\" item. It contains only the common attributes of the items selected by the provided filter
|
|
* @summary Get Common Library Items
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} type item type
|
|
* @param {any} [filter] the filter parameter
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getCommonLibraryItems: async (sectionId: any, type: any, filter?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'sectionId' is not null or undefined
|
|
assertParamExists('getCommonLibraryItems', 'sectionId', sectionId)
|
|
// verify required parameter 'type' is not null or undefined
|
|
assertParamExists('getCommonLibraryItems', 'type', type)
|
|
const localVarPath = `/library/sections/{sectionId}/common`
|
|
.replace(`{${"sectionId"}}`, encodeURIComponent(String(sectionId)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (type !== undefined) {
|
|
localVarQueryParameter['type'] = type;
|
|
}
|
|
|
|
if (filter !== undefined) {
|
|
localVarQueryParameter['filter'] = filter;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This endpoint will return a list of the latest library items filtered by the filter and type provided
|
|
* @summary Get Latest Library Items
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} type item type
|
|
* @param {any} [filter] the filter parameter
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getLatestLibraryItems: async (sectionId: any, type: any, filter?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'sectionId' is not null or undefined
|
|
assertParamExists('getLatestLibraryItems', 'sectionId', sectionId)
|
|
// verify required parameter 'type' is not null or undefined
|
|
assertParamExists('getLatestLibraryItems', 'type', type)
|
|
const localVarPath = `/library/sections/{sectionId}/latest`
|
|
.replace(`{${"sectionId"}}`, encodeURIComponent(String(sectionId)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (type !== undefined) {
|
|
localVarQueryParameter['type'] = type;
|
|
}
|
|
|
|
if (filter !== undefined) {
|
|
localVarQueryParameter['filter'] = filter;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year).
|
|
* @summary Get All Libraries
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getLibraries: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/library/sections`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. These details are: - A list of `Directory` objects: These used to be used by clients to build a menuing system. There are four flavors of directory found here: - Primary: (e.g. all, On Deck) These are still used in some clients to provide \"shortcuts\" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. - Secondary: These are marked with `secondary=\"1\"` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there\'s a completely obsolete entry marked `search=\"1\"` which used to be used to allow clients to build search dialogs on the fly. - A list of `Type` objects: These represent the types of things found in this library, and for each one, a list of `Filter` and `Sort` objects. These can be used to build rich controls around a grid of media to allow filtering and organizing. Note that these filters and sorts are optional, and without them, the client won\'t render any filtering controls. The `Type` object contains: - `key`: This provides the root endpoint returning the actual media list for the type. - `type`: This is the metadata type for the type (if a standard Plex type). - `title`: The title for for the content of this type (e.g. \"Movies\"). - Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an inportant subset useful for top-level API. - `filter`: This represents the filter name used for the filter, which can be used to construct complex media queries with. - `filterType`: This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. - `key`: This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a \"Genre\" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. - `title`: The title for the filter. - Each `Sort` object contains a description of the sort field. - `defaultDirection`: Can be either `asc` or `desc`, and specifies the default direction for the sort field (e.g. titles default to alphabetically ascending). - `descKey` and `key`: Contains the parameters passed to the `sort=...` media query for each direction of the sort. - `title`: The title of the field.
|
|
* @summary Get Library Details
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} [includeDetails] Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getLibraryDetails: async (sectionId: any, includeDetails?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'sectionId' is not null or undefined
|
|
assertParamExists('getLibraryDetails', 'sectionId', sectionId)
|
|
const localVarPath = `/library/sections/{sectionId}`
|
|
.replace(`{${"sectionId"}}`, encodeURIComponent(String(sectionId)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (includeDetails !== undefined) {
|
|
localVarQueryParameter['includeDetails'] = includeDetails;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This endpoint will return a list of library items filtered by the filter and type provided
|
|
* @summary Get Library Items
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} [type] item type
|
|
* @param {any} [filter] the filter parameter
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getLibraryItems: async (sectionId: any, type?: any, filter?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'sectionId' is not null or undefined
|
|
assertParamExists('getLibraryItems', 'sectionId', sectionId)
|
|
const localVarPath = `/library/sections/{sectionId}/all`
|
|
.replace(`{${"sectionId"}}`, encodeURIComponent(String(sectionId)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (type !== undefined) {
|
|
localVarQueryParameter['type'] = type;
|
|
}
|
|
|
|
if (filter !== undefined) {
|
|
localVarQueryParameter['filter'] = filter;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This endpoint will return the on deck content.
|
|
* @summary Get On Deck
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getOnDeck: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/library/onDeck`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This endpoint Refreshes the library.
|
|
* @summary Refresh Library
|
|
* @param {any} sectionId the Id of the library to refresh
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
refreshLibrary: async (sectionId: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'sectionId' is not null or undefined
|
|
assertParamExists('refreshLibrary', 'sectionId', sectionId)
|
|
const localVarPath = `/library/sections/{sectionId}/refresh`
|
|
.replace(`{${"sectionId"}}`, encodeURIComponent(String(sectionId)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* LibraryApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const LibraryApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = LibraryApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* Represents a \"Common\" item. It contains only the common attributes of the items selected by the provided filter
|
|
* @summary Get Common Library Items
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} type item type
|
|
* @param {any} [filter] the filter parameter
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getCommonLibraryItems(sectionId: any, type: any, filter?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getCommonLibraryItems(sectionId, type, filter, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This endpoint will return a list of the latest library items filtered by the filter and type provided
|
|
* @summary Get Latest Library Items
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} type item type
|
|
* @param {any} [filter] the filter parameter
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getLatestLibraryItems(sectionId: any, type: any, filter?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getLatestLibraryItems(sectionId, type, filter, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year).
|
|
* @summary Get All Libraries
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getLibraries(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getLibraries(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. These details are: - A list of `Directory` objects: These used to be used by clients to build a menuing system. There are four flavors of directory found here: - Primary: (e.g. all, On Deck) These are still used in some clients to provide \"shortcuts\" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. - Secondary: These are marked with `secondary=\"1\"` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there\'s a completely obsolete entry marked `search=\"1\"` which used to be used to allow clients to build search dialogs on the fly. - A list of `Type` objects: These represent the types of things found in this library, and for each one, a list of `Filter` and `Sort` objects. These can be used to build rich controls around a grid of media to allow filtering and organizing. Note that these filters and sorts are optional, and without them, the client won\'t render any filtering controls. The `Type` object contains: - `key`: This provides the root endpoint returning the actual media list for the type. - `type`: This is the metadata type for the type (if a standard Plex type). - `title`: The title for for the content of this type (e.g. \"Movies\"). - Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an inportant subset useful for top-level API. - `filter`: This represents the filter name used for the filter, which can be used to construct complex media queries with. - `filterType`: This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. - `key`: This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a \"Genre\" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. - `title`: The title for the filter. - Each `Sort` object contains a description of the sort field. - `defaultDirection`: Can be either `asc` or `desc`, and specifies the default direction for the sort field (e.g. titles default to alphabetically ascending). - `descKey` and `key`: Contains the parameters passed to the `sort=...` media query for each direction of the sort. - `title`: The title of the field.
|
|
* @summary Get Library Details
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} [includeDetails] Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getLibraryDetails(sectionId: any, includeDetails?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getLibraryDetails(sectionId, includeDetails, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This endpoint will return a list of library items filtered by the filter and type provided
|
|
* @summary Get Library Items
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} [type] item type
|
|
* @param {any} [filter] the filter parameter
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getLibraryItems(sectionId: any, type?: any, filter?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getLibraryItems(sectionId, type, filter, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This endpoint will return the on deck content.
|
|
* @summary Get On Deck
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getOnDeck(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getOnDeck(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This endpoint Refreshes the library.
|
|
* @summary Refresh Library
|
|
* @param {any} sectionId the Id of the library to refresh
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async refreshLibrary(sectionId: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.refreshLibrary(sectionId, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* LibraryApi - factory interface
|
|
* @export
|
|
*/
|
|
export const LibraryApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = LibraryApiFp(configuration)
|
|
return {
|
|
/**
|
|
* Represents a \"Common\" item. It contains only the common attributes of the items selected by the provided filter
|
|
* @summary Get Common Library Items
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} type item type
|
|
* @param {any} [filter] the filter parameter
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getCommonLibraryItems(sectionId: any, type: any, filter?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getCommonLibraryItems(sectionId, type, filter, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This endpoint will return a list of the latest library items filtered by the filter and type provided
|
|
* @summary Get Latest Library Items
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} type item type
|
|
* @param {any} [filter] the filter parameter
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getLatestLibraryItems(sectionId: any, type: any, filter?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getLatestLibraryItems(sectionId, type, filter, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year).
|
|
* @summary Get All Libraries
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getLibraries(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getLibraries(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. These details are: - A list of `Directory` objects: These used to be used by clients to build a menuing system. There are four flavors of directory found here: - Primary: (e.g. all, On Deck) These are still used in some clients to provide \"shortcuts\" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. - Secondary: These are marked with `secondary=\"1\"` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there\'s a completely obsolete entry marked `search=\"1\"` which used to be used to allow clients to build search dialogs on the fly. - A list of `Type` objects: These represent the types of things found in this library, and for each one, a list of `Filter` and `Sort` objects. These can be used to build rich controls around a grid of media to allow filtering and organizing. Note that these filters and sorts are optional, and without them, the client won\'t render any filtering controls. The `Type` object contains: - `key`: This provides the root endpoint returning the actual media list for the type. - `type`: This is the metadata type for the type (if a standard Plex type). - `title`: The title for for the content of this type (e.g. \"Movies\"). - Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an inportant subset useful for top-level API. - `filter`: This represents the filter name used for the filter, which can be used to construct complex media queries with. - `filterType`: This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. - `key`: This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a \"Genre\" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. - `title`: The title for the filter. - Each `Sort` object contains a description of the sort field. - `defaultDirection`: Can be either `asc` or `desc`, and specifies the default direction for the sort field (e.g. titles default to alphabetically ascending). - `descKey` and `key`: Contains the parameters passed to the `sort=...` media query for each direction of the sort. - `title`: The title of the field.
|
|
* @summary Get Library Details
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} [includeDetails] Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getLibraryDetails(sectionId: any, includeDetails?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getLibraryDetails(sectionId, includeDetails, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This endpoint will return a list of library items filtered by the filter and type provided
|
|
* @summary Get Library Items
|
|
* @param {any} sectionId the Id of the library to query
|
|
* @param {any} [type] item type
|
|
* @param {any} [filter] the filter parameter
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getLibraryItems(sectionId: any, type?: any, filter?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getLibraryItems(sectionId, type, filter, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This endpoint will return the on deck content.
|
|
* @summary Get On Deck
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getOnDeck(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getOnDeck(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This endpoint Refreshes the library.
|
|
* @summary Refresh Library
|
|
* @param {any} sectionId the Id of the library to refresh
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
refreshLibrary(sectionId: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.refreshLibrary(sectionId, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for getCommonLibraryItems operation in LibraryApi.
|
|
* @export
|
|
* @interface LibraryApiGetCommonLibraryItemsRequest
|
|
*/
|
|
export interface LibraryApiGetCommonLibraryItemsRequest {
|
|
/**
|
|
* the Id of the library to query
|
|
* @type {any}
|
|
* @memberof LibraryApiGetCommonLibraryItems
|
|
*/
|
|
readonly sectionId: any
|
|
|
|
/**
|
|
* item type
|
|
* @type {any}
|
|
* @memberof LibraryApiGetCommonLibraryItems
|
|
*/
|
|
readonly type: any
|
|
|
|
/**
|
|
* the filter parameter
|
|
* @type {any}
|
|
* @memberof LibraryApiGetCommonLibraryItems
|
|
*/
|
|
readonly filter?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetCommonLibraryItems
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetCommonLibraryItems
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetCommonLibraryItems
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetCommonLibraryItems
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetCommonLibraryItems
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetCommonLibraryItems
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof LibraryApiGetCommonLibraryItems
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getLatestLibraryItems operation in LibraryApi.
|
|
* @export
|
|
* @interface LibraryApiGetLatestLibraryItemsRequest
|
|
*/
|
|
export interface LibraryApiGetLatestLibraryItemsRequest {
|
|
/**
|
|
* the Id of the library to query
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLatestLibraryItems
|
|
*/
|
|
readonly sectionId: any
|
|
|
|
/**
|
|
* item type
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLatestLibraryItems
|
|
*/
|
|
readonly type: any
|
|
|
|
/**
|
|
* the filter parameter
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLatestLibraryItems
|
|
*/
|
|
readonly filter?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLatestLibraryItems
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLatestLibraryItems
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLatestLibraryItems
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLatestLibraryItems
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLatestLibraryItems
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLatestLibraryItems
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLatestLibraryItems
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getLibraries operation in LibraryApi.
|
|
* @export
|
|
* @interface LibraryApiGetLibrariesRequest
|
|
*/
|
|
export interface LibraryApiGetLibrariesRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraries
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraries
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraries
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraries
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraries
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraries
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraries
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getLibraryDetails operation in LibraryApi.
|
|
* @export
|
|
* @interface LibraryApiGetLibraryDetailsRequest
|
|
*/
|
|
export interface LibraryApiGetLibraryDetailsRequest {
|
|
/**
|
|
* the Id of the library to query
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryDetails
|
|
*/
|
|
readonly sectionId: any
|
|
|
|
/**
|
|
* Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always.
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryDetails
|
|
*/
|
|
readonly includeDetails?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryDetails
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryDetails
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryDetails
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryDetails
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryDetails
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryDetails
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryDetails
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getLibraryItems operation in LibraryApi.
|
|
* @export
|
|
* @interface LibraryApiGetLibraryItemsRequest
|
|
*/
|
|
export interface LibraryApiGetLibraryItemsRequest {
|
|
/**
|
|
* the Id of the library to query
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryItems
|
|
*/
|
|
readonly sectionId: any
|
|
|
|
/**
|
|
* item type
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryItems
|
|
*/
|
|
readonly type?: any
|
|
|
|
/**
|
|
* the filter parameter
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryItems
|
|
*/
|
|
readonly filter?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryItems
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryItems
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryItems
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryItems
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryItems
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryItems
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof LibraryApiGetLibraryItems
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getOnDeck operation in LibraryApi.
|
|
* @export
|
|
* @interface LibraryApiGetOnDeckRequest
|
|
*/
|
|
export interface LibraryApiGetOnDeckRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetOnDeck
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetOnDeck
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetOnDeck
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetOnDeck
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetOnDeck
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof LibraryApiGetOnDeck
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof LibraryApiGetOnDeck
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for refreshLibrary operation in LibraryApi.
|
|
* @export
|
|
* @interface LibraryApiRefreshLibraryRequest
|
|
*/
|
|
export interface LibraryApiRefreshLibraryRequest {
|
|
/**
|
|
* the Id of the library to refresh
|
|
* @type {any}
|
|
* @memberof LibraryApiRefreshLibrary
|
|
*/
|
|
readonly sectionId: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof LibraryApiRefreshLibrary
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof LibraryApiRefreshLibrary
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof LibraryApiRefreshLibrary
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof LibraryApiRefreshLibrary
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof LibraryApiRefreshLibrary
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof LibraryApiRefreshLibrary
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof LibraryApiRefreshLibrary
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* LibraryApi - object-oriented interface
|
|
* @export
|
|
* @class LibraryApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class LibraryApi extends BaseAPI {
|
|
/**
|
|
* Represents a \"Common\" item. It contains only the common attributes of the items selected by the provided filter
|
|
* @summary Get Common Library Items
|
|
* @param {LibraryApiGetCommonLibraryItemsRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LibraryApi
|
|
*/
|
|
public getCommonLibraryItems(requestParameters: LibraryApiGetCommonLibraryItemsRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return LibraryApiFp(this.configuration).getCommonLibraryItems(requestParameters.sectionId, requestParameters.type, requestParameters.filter, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This endpoint will return a list of the latest library items filtered by the filter and type provided
|
|
* @summary Get Latest Library Items
|
|
* @param {LibraryApiGetLatestLibraryItemsRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LibraryApi
|
|
*/
|
|
public getLatestLibraryItems(requestParameters: LibraryApiGetLatestLibraryItemsRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return LibraryApiFp(this.configuration).getLatestLibraryItems(requestParameters.sectionId, requestParameters.type, requestParameters.filter, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year).
|
|
* @summary Get All Libraries
|
|
* @param {LibraryApiGetLibrariesRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LibraryApi
|
|
*/
|
|
public getLibraries(requestParameters: LibraryApiGetLibrariesRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return LibraryApiFp(this.configuration).getLibraries(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. These details are: - A list of `Directory` objects: These used to be used by clients to build a menuing system. There are four flavors of directory found here: - Primary: (e.g. all, On Deck) These are still used in some clients to provide \"shortcuts\" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. - Secondary: These are marked with `secondary=\"1\"` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there\'s a completely obsolete entry marked `search=\"1\"` which used to be used to allow clients to build search dialogs on the fly. - A list of `Type` objects: These represent the types of things found in this library, and for each one, a list of `Filter` and `Sort` objects. These can be used to build rich controls around a grid of media to allow filtering and organizing. Note that these filters and sorts are optional, and without them, the client won\'t render any filtering controls. The `Type` object contains: - `key`: This provides the root endpoint returning the actual media list for the type. - `type`: This is the metadata type for the type (if a standard Plex type). - `title`: The title for for the content of this type (e.g. \"Movies\"). - Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an inportant subset useful for top-level API. - `filter`: This represents the filter name used for the filter, which can be used to construct complex media queries with. - `filterType`: This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. - `key`: This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a \"Genre\" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. - `title`: The title for the filter. - Each `Sort` object contains a description of the sort field. - `defaultDirection`: Can be either `asc` or `desc`, and specifies the default direction for the sort field (e.g. titles default to alphabetically ascending). - `descKey` and `key`: Contains the parameters passed to the `sort=...` media query for each direction of the sort. - `title`: The title of the field.
|
|
* @summary Get Library Details
|
|
* @param {LibraryApiGetLibraryDetailsRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LibraryApi
|
|
*/
|
|
public getLibraryDetails(requestParameters: LibraryApiGetLibraryDetailsRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return LibraryApiFp(this.configuration).getLibraryDetails(requestParameters.sectionId, requestParameters.includeDetails, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This endpoint will return a list of library items filtered by the filter and type provided
|
|
* @summary Get Library Items
|
|
* @param {LibraryApiGetLibraryItemsRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LibraryApi
|
|
*/
|
|
public getLibraryItems(requestParameters: LibraryApiGetLibraryItemsRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return LibraryApiFp(this.configuration).getLibraryItems(requestParameters.sectionId, requestParameters.type, requestParameters.filter, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This endpoint will return the on deck content.
|
|
* @summary Get On Deck
|
|
* @param {LibraryApiGetOnDeckRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LibraryApi
|
|
*/
|
|
public getOnDeck(requestParameters: LibraryApiGetOnDeckRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return LibraryApiFp(this.configuration).getOnDeck(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This endpoint Refreshes the library.
|
|
* @summary Refresh Library
|
|
* @param {LibraryApiRefreshLibraryRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LibraryApi
|
|
*/
|
|
public refreshLibrary(requestParameters: LibraryApiRefreshLibraryRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return LibraryApiFp(this.configuration).refreshLibrary(requestParameters.sectionId, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* LogApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const LogApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time.
|
|
* @summary Enabling Papertrail
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
enablePaperTrail: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/log/networked`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
|
|
* @summary Logging a single line message.
|
|
* @param {any} level An integer log level to write to the PMS log with. 0: Error 1: Warning 2: Info 3: Debug 4: Verbose
|
|
* @param {any} message The text of the message to write to the log.
|
|
* @param {any} source a string indicating the source of the message.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
logLine: async (level: any, message: any, source: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'level' is not null or undefined
|
|
assertParamExists('logLine', 'level', level)
|
|
// verify required parameter 'message' is not null or undefined
|
|
assertParamExists('logLine', 'message', message)
|
|
// verify required parameter 'source' is not null or undefined
|
|
assertParamExists('logLine', 'source', source)
|
|
const localVarPath = `/log`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (level !== undefined) {
|
|
localVarQueryParameter['level'] = level;
|
|
}
|
|
|
|
if (message !== undefined) {
|
|
localVarQueryParameter['message'] = message;
|
|
}
|
|
|
|
if (source !== undefined) {
|
|
localVarQueryParameter['source'] = source;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above GET endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above.
|
|
* @summary Logging a multi-line message
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
logMultiLine: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/log`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* LogApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const LogApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = LogApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time.
|
|
* @summary Enabling Papertrail
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async enablePaperTrail(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.enablePaperTrail(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
|
|
* @summary Logging a single line message.
|
|
* @param {any} level An integer log level to write to the PMS log with. 0: Error 1: Warning 2: Info 3: Debug 4: Verbose
|
|
* @param {any} message The text of the message to write to the log.
|
|
* @param {any} source a string indicating the source of the message.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async logLine(level: any, message: any, source: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.logLine(level, message, source, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above GET endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above.
|
|
* @summary Logging a multi-line message
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async logMultiLine(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.logMultiLine(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* LogApi - factory interface
|
|
* @export
|
|
*/
|
|
export const LogApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = LogApiFp(configuration)
|
|
return {
|
|
/**
|
|
* This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time.
|
|
* @summary Enabling Papertrail
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
enablePaperTrail(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.enablePaperTrail(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
|
|
* @summary Logging a single line message.
|
|
* @param {any} level An integer log level to write to the PMS log with. 0: Error 1: Warning 2: Info 3: Debug 4: Verbose
|
|
* @param {any} message The text of the message to write to the log.
|
|
* @param {any} source a string indicating the source of the message.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
logLine(level: any, message: any, source: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.logLine(level, message, source, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above GET endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above.
|
|
* @summary Logging a multi-line message
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
logMultiLine(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.logMultiLine(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for enablePaperTrail operation in LogApi.
|
|
* @export
|
|
* @interface LogApiEnablePaperTrailRequest
|
|
*/
|
|
export interface LogApiEnablePaperTrailRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof LogApiEnablePaperTrail
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof LogApiEnablePaperTrail
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof LogApiEnablePaperTrail
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof LogApiEnablePaperTrail
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof LogApiEnablePaperTrail
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof LogApiEnablePaperTrail
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof LogApiEnablePaperTrail
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for logLine operation in LogApi.
|
|
* @export
|
|
* @interface LogApiLogLineRequest
|
|
*/
|
|
export interface LogApiLogLineRequest {
|
|
/**
|
|
* An integer log level to write to the PMS log with. 0: Error 1: Warning 2: Info 3: Debug 4: Verbose
|
|
* @type {any}
|
|
* @memberof LogApiLogLine
|
|
*/
|
|
readonly level: any
|
|
|
|
/**
|
|
* The text of the message to write to the log.
|
|
* @type {any}
|
|
* @memberof LogApiLogLine
|
|
*/
|
|
readonly message: any
|
|
|
|
/**
|
|
* a string indicating the source of the message.
|
|
* @type {any}
|
|
* @memberof LogApiLogLine
|
|
*/
|
|
readonly source: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof LogApiLogLine
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof LogApiLogLine
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof LogApiLogLine
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof LogApiLogLine
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof LogApiLogLine
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof LogApiLogLine
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof LogApiLogLine
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for logMultiLine operation in LogApi.
|
|
* @export
|
|
* @interface LogApiLogMultiLineRequest
|
|
*/
|
|
export interface LogApiLogMultiLineRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof LogApiLogMultiLine
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof LogApiLogMultiLine
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof LogApiLogMultiLine
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof LogApiLogMultiLine
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof LogApiLogMultiLine
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof LogApiLogMultiLine
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof LogApiLogMultiLine
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* LogApi - object-oriented interface
|
|
* @export
|
|
* @class LogApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class LogApi extends BaseAPI {
|
|
/**
|
|
* This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time.
|
|
* @summary Enabling Papertrail
|
|
* @param {LogApiEnablePaperTrailRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LogApi
|
|
*/
|
|
public enablePaperTrail(requestParameters: LogApiEnablePaperTrailRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return LogApiFp(this.configuration).enablePaperTrail(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
|
|
* @summary Logging a single line message.
|
|
* @param {LogApiLogLineRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LogApi
|
|
*/
|
|
public logLine(requestParameters: LogApiLogLineRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return LogApiFp(this.configuration).logLine(requestParameters.level, requestParameters.message, requestParameters.source, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above GET endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above.
|
|
* @summary Logging a multi-line message
|
|
* @param {LogApiLogMultiLineRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof LogApi
|
|
*/
|
|
public logMultiLine(requestParameters: LogApiLogMultiLineRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return LogApiFp(this.configuration).logMultiLine(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* PlaylistsApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const PlaylistsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist.
|
|
* @summary Adding to a Playlist
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} uri the content URI for the playlist
|
|
* @param {any} playQueueID the play queue to add to a playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
addPlaylistContents: async (playlistID: any, uri: any, playQueueID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'playlistID' is not null or undefined
|
|
assertParamExists('addPlaylistContents', 'playlistID', playlistID)
|
|
// verify required parameter 'uri' is not null or undefined
|
|
assertParamExists('addPlaylistContents', 'uri', uri)
|
|
// verify required parameter 'playQueueID' is not null or undefined
|
|
assertParamExists('addPlaylistContents', 'playQueueID', playQueueID)
|
|
const localVarPath = `/playlists/{playlistID}/items`
|
|
.replace(`{${"playlistID"}}`, encodeURIComponent(String(playlistID)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (uri !== undefined) {
|
|
localVarQueryParameter['uri'] = uri;
|
|
}
|
|
|
|
if (playQueueID !== undefined) {
|
|
localVarQueryParameter['playQueueID'] = playQueueID;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Clears a playlist, only works with dumb playlists. Returns the playlist.
|
|
* @summary Delete Playlist Contents
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
clearPlaylistContents: async (playlistID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'playlistID' is not null or undefined
|
|
assertParamExists('clearPlaylistContents', 'playlistID', playlistID)
|
|
const localVarPath = `/playlists/{playlistID}/items`
|
|
.replace(`{${"playlistID"}}`, encodeURIComponent(String(playlistID)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: - `uri` - The content URI for what we\'re playing (e.g. `library://...`). - `playQueueID` - To create a playlist from an existing play queue.
|
|
* @summary Create a Playlist
|
|
* @param {any} title name of the playlist
|
|
* @param {any} type type of playlist to create
|
|
* @param {any} smart whether the playlist is smart or not
|
|
* @param {any} [uri] the content URI for the playlist
|
|
* @param {any} [playQueueID] the play queue to copy to a playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
createPlaylist: async (title: any, type: any, smart: any, uri?: any, playQueueID?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'title' is not null or undefined
|
|
assertParamExists('createPlaylist', 'title', title)
|
|
// verify required parameter 'type' is not null or undefined
|
|
assertParamExists('createPlaylist', 'type', type)
|
|
// verify required parameter 'smart' is not null or undefined
|
|
assertParamExists('createPlaylist', 'smart', smart)
|
|
const localVarPath = `/playlists`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (title !== undefined) {
|
|
localVarQueryParameter['title'] = title;
|
|
}
|
|
|
|
if (type !== undefined) {
|
|
localVarQueryParameter['type'] = type;
|
|
}
|
|
|
|
if (smart !== undefined) {
|
|
localVarQueryParameter['smart'] = smart;
|
|
}
|
|
|
|
if (uri !== undefined) {
|
|
localVarQueryParameter['uri'] = uri;
|
|
}
|
|
|
|
if (playQueueID !== undefined) {
|
|
localVarQueryParameter['playQueueID'] = playQueueID;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This endpoint will delete a playlist
|
|
* @summary Deletes a Playlist
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
deletePlaylist: async (playlistID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'playlistID' is not null or undefined
|
|
assertParamExists('deletePlaylist', 'playlistID', playlistID)
|
|
const localVarPath = `/playlists/{playlistID}`
|
|
.replace(`{${"playlistID"}}`, encodeURIComponent(String(playlistID)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing.
|
|
* @summary Retrieve Playlist
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getPlaylist: async (playlistID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'playlistID' is not null or undefined
|
|
assertParamExists('getPlaylist', 'playlistID', playlistID)
|
|
const localVarPath = `/playlists/{playlistID}`
|
|
.replace(`{${"playlistID"}}`, encodeURIComponent(String(playlistID)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Gets the contents of a playlist. Should be paged by clients via standard mechanisms. By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. For example, you could use this to display a list of recently added albums vis a smart playlist. Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items.
|
|
* @summary Retrieve Playlist Contents
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} type the metadata type of the item to return
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getPlaylistContents: async (playlistID: any, type: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'playlistID' is not null or undefined
|
|
assertParamExists('getPlaylistContents', 'playlistID', playlistID)
|
|
// verify required parameter 'type' is not null or undefined
|
|
assertParamExists('getPlaylistContents', 'type', type)
|
|
const localVarPath = `/playlists/{playlistID}/items`
|
|
.replace(`{${"playlistID"}}`, encodeURIComponent(String(playlistID)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (type !== undefined) {
|
|
localVarQueryParameter['type'] = type;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
*
|
|
* @summary Get All Playlists
|
|
* @param {any} [playlistType] limit to a type of playlist.
|
|
* @param {any} [smart] type of playlists to return (default is all).
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getPlaylists: async (playlistType?: any, smart?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/playlists/all`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (playlistType !== undefined) {
|
|
localVarQueryParameter['playlistType'] = playlistType;
|
|
}
|
|
|
|
if (smart !== undefined) {
|
|
localVarQueryParameter['smart'] = smart;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
|
|
* @summary Update a Playlist
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
updatePlaylist: async (playlistID: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'playlistID' is not null or undefined
|
|
assertParamExists('updatePlaylist', 'playlistID', playlistID)
|
|
const localVarPath = `/playlists/{playlistID}`
|
|
.replace(`{${"playlistID"}}`, encodeURIComponent(String(playlistID)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
|
|
* @summary Upload Playlist
|
|
* @param {any} path absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename.
|
|
* @param {any} force force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
uploadPlaylist: async (path: any, force: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'path' is not null or undefined
|
|
assertParamExists('uploadPlaylist', 'path', path)
|
|
// verify required parameter 'force' is not null or undefined
|
|
assertParamExists('uploadPlaylist', 'force', force)
|
|
const localVarPath = `/playlists/upload`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (path !== undefined) {
|
|
localVarQueryParameter['path'] = path;
|
|
}
|
|
|
|
if (force !== undefined) {
|
|
localVarQueryParameter['force'] = force;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* PlaylistsApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const PlaylistsApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = PlaylistsApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist.
|
|
* @summary Adding to a Playlist
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} uri the content URI for the playlist
|
|
* @param {any} playQueueID the play queue to add to a playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async addPlaylistContents(playlistID: any, uri: any, playQueueID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.addPlaylistContents(playlistID, uri, playQueueID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* Clears a playlist, only works with dumb playlists. Returns the playlist.
|
|
* @summary Delete Playlist Contents
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async clearPlaylistContents(playlistID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.clearPlaylistContents(playlistID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: - `uri` - The content URI for what we\'re playing (e.g. `library://...`). - `playQueueID` - To create a playlist from an existing play queue.
|
|
* @summary Create a Playlist
|
|
* @param {any} title name of the playlist
|
|
* @param {any} type type of playlist to create
|
|
* @param {any} smart whether the playlist is smart or not
|
|
* @param {any} [uri] the content URI for the playlist
|
|
* @param {any} [playQueueID] the play queue to copy to a playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async createPlaylist(title: any, type: any, smart: any, uri?: any, playQueueID?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createPlaylist(title, type, smart, uri, playQueueID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This endpoint will delete a playlist
|
|
* @summary Deletes a Playlist
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async deletePlaylist(playlistID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePlaylist(playlistID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing.
|
|
* @summary Retrieve Playlist
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getPlaylist(playlistID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getPlaylist(playlistID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* Gets the contents of a playlist. Should be paged by clients via standard mechanisms. By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. For example, you could use this to display a list of recently added albums vis a smart playlist. Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items.
|
|
* @summary Retrieve Playlist Contents
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} type the metadata type of the item to return
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getPlaylistContents(playlistID: any, type: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getPlaylistContents(playlistID, type, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
*
|
|
* @summary Get All Playlists
|
|
* @param {any} [playlistType] limit to a type of playlist.
|
|
* @param {any} [smart] type of playlists to return (default is all).
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getPlaylists(playlistType?: any, smart?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getPlaylists(playlistType, smart, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
|
|
* @summary Update a Playlist
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async updatePlaylist(playlistID: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePlaylist(playlistID, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
|
|
* @summary Upload Playlist
|
|
* @param {any} path absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename.
|
|
* @param {any} force force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async uploadPlaylist(path: any, force: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadPlaylist(path, force, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* PlaylistsApi - factory interface
|
|
* @export
|
|
*/
|
|
export const PlaylistsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = PlaylistsApiFp(configuration)
|
|
return {
|
|
/**
|
|
* Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist.
|
|
* @summary Adding to a Playlist
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} uri the content URI for the playlist
|
|
* @param {any} playQueueID the play queue to add to a playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
addPlaylistContents(playlistID: any, uri: any, playQueueID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.addPlaylistContents(playlistID, uri, playQueueID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Clears a playlist, only works with dumb playlists. Returns the playlist.
|
|
* @summary Delete Playlist Contents
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
clearPlaylistContents(playlistID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.clearPlaylistContents(playlistID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: - `uri` - The content URI for what we\'re playing (e.g. `library://...`). - `playQueueID` - To create a playlist from an existing play queue.
|
|
* @summary Create a Playlist
|
|
* @param {any} title name of the playlist
|
|
* @param {any} type type of playlist to create
|
|
* @param {any} smart whether the playlist is smart or not
|
|
* @param {any} [uri] the content URI for the playlist
|
|
* @param {any} [playQueueID] the play queue to copy to a playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
createPlaylist(title: any, type: any, smart: any, uri?: any, playQueueID?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.createPlaylist(title, type, smart, uri, playQueueID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This endpoint will delete a playlist
|
|
* @summary Deletes a Playlist
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
deletePlaylist(playlistID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.deletePlaylist(playlistID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing.
|
|
* @summary Retrieve Playlist
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getPlaylist(playlistID: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getPlaylist(playlistID, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Gets the contents of a playlist. Should be paged by clients via standard mechanisms. By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. For example, you could use this to display a list of recently added albums vis a smart playlist. Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items.
|
|
* @summary Retrieve Playlist Contents
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {any} type the metadata type of the item to return
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getPlaylistContents(playlistID: any, type: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getPlaylistContents(playlistID, type, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
*
|
|
* @summary Get All Playlists
|
|
* @param {any} [playlistType] limit to a type of playlist.
|
|
* @param {any} [smart] type of playlists to return (default is all).
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getPlaylists(playlistType?: any, smart?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getPlaylists(playlistType, smart, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
|
|
* @summary Update a Playlist
|
|
* @param {any} playlistID the ID of the playlist
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
updatePlaylist(playlistID: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.updatePlaylist(playlistID, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
|
|
* @summary Upload Playlist
|
|
* @param {any} path absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename.
|
|
* @param {any} force force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
uploadPlaylist(path: any, force: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.uploadPlaylist(path, force, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for addPlaylistContents operation in PlaylistsApi.
|
|
* @export
|
|
* @interface PlaylistsApiAddPlaylistContentsRequest
|
|
*/
|
|
export interface PlaylistsApiAddPlaylistContentsRequest {
|
|
/**
|
|
* the ID of the playlist
|
|
* @type {any}
|
|
* @memberof PlaylistsApiAddPlaylistContents
|
|
*/
|
|
readonly playlistID: any
|
|
|
|
/**
|
|
* the content URI for the playlist
|
|
* @type {any}
|
|
* @memberof PlaylistsApiAddPlaylistContents
|
|
*/
|
|
readonly uri: any
|
|
|
|
/**
|
|
* the play queue to add to a playlist
|
|
* @type {any}
|
|
* @memberof PlaylistsApiAddPlaylistContents
|
|
*/
|
|
readonly playQueueID: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiAddPlaylistContents
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiAddPlaylistContents
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiAddPlaylistContents
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiAddPlaylistContents
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiAddPlaylistContents
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiAddPlaylistContents
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof PlaylistsApiAddPlaylistContents
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for clearPlaylistContents operation in PlaylistsApi.
|
|
* @export
|
|
* @interface PlaylistsApiClearPlaylistContentsRequest
|
|
*/
|
|
export interface PlaylistsApiClearPlaylistContentsRequest {
|
|
/**
|
|
* the ID of the playlist
|
|
* @type {any}
|
|
* @memberof PlaylistsApiClearPlaylistContents
|
|
*/
|
|
readonly playlistID: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiClearPlaylistContents
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiClearPlaylistContents
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiClearPlaylistContents
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiClearPlaylistContents
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiClearPlaylistContents
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiClearPlaylistContents
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof PlaylistsApiClearPlaylistContents
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for createPlaylist operation in PlaylistsApi.
|
|
* @export
|
|
* @interface PlaylistsApiCreatePlaylistRequest
|
|
*/
|
|
export interface PlaylistsApiCreatePlaylistRequest {
|
|
/**
|
|
* name of the playlist
|
|
* @type {any}
|
|
* @memberof PlaylistsApiCreatePlaylist
|
|
*/
|
|
readonly title: any
|
|
|
|
/**
|
|
* type of playlist to create
|
|
* @type {any}
|
|
* @memberof PlaylistsApiCreatePlaylist
|
|
*/
|
|
readonly type: any
|
|
|
|
/**
|
|
* whether the playlist is smart or not
|
|
* @type {any}
|
|
* @memberof PlaylistsApiCreatePlaylist
|
|
*/
|
|
readonly smart: any
|
|
|
|
/**
|
|
* the content URI for the playlist
|
|
* @type {any}
|
|
* @memberof PlaylistsApiCreatePlaylist
|
|
*/
|
|
readonly uri?: any
|
|
|
|
/**
|
|
* the play queue to copy to a playlist
|
|
* @type {any}
|
|
* @memberof PlaylistsApiCreatePlaylist
|
|
*/
|
|
readonly playQueueID?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiCreatePlaylist
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiCreatePlaylist
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiCreatePlaylist
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiCreatePlaylist
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiCreatePlaylist
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiCreatePlaylist
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof PlaylistsApiCreatePlaylist
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for deletePlaylist operation in PlaylistsApi.
|
|
* @export
|
|
* @interface PlaylistsApiDeletePlaylistRequest
|
|
*/
|
|
export interface PlaylistsApiDeletePlaylistRequest {
|
|
/**
|
|
* the ID of the playlist
|
|
* @type {any}
|
|
* @memberof PlaylistsApiDeletePlaylist
|
|
*/
|
|
readonly playlistID: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiDeletePlaylist
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiDeletePlaylist
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiDeletePlaylist
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiDeletePlaylist
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiDeletePlaylist
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiDeletePlaylist
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof PlaylistsApiDeletePlaylist
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getPlaylist operation in PlaylistsApi.
|
|
* @export
|
|
* @interface PlaylistsApiGetPlaylistRequest
|
|
*/
|
|
export interface PlaylistsApiGetPlaylistRequest {
|
|
/**
|
|
* the ID of the playlist
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylist
|
|
*/
|
|
readonly playlistID: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylist
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylist
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylist
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylist
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylist
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylist
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylist
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getPlaylistContents operation in PlaylistsApi.
|
|
* @export
|
|
* @interface PlaylistsApiGetPlaylistContentsRequest
|
|
*/
|
|
export interface PlaylistsApiGetPlaylistContentsRequest {
|
|
/**
|
|
* the ID of the playlist
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylistContents
|
|
*/
|
|
readonly playlistID: any
|
|
|
|
/**
|
|
* the metadata type of the item to return
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylistContents
|
|
*/
|
|
readonly type: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylistContents
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylistContents
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylistContents
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylistContents
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylistContents
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylistContents
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylistContents
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getPlaylists operation in PlaylistsApi.
|
|
* @export
|
|
* @interface PlaylistsApiGetPlaylistsRequest
|
|
*/
|
|
export interface PlaylistsApiGetPlaylistsRequest {
|
|
/**
|
|
* limit to a type of playlist.
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylists
|
|
*/
|
|
readonly playlistType?: any
|
|
|
|
/**
|
|
* type of playlists to return (default is all).
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylists
|
|
*/
|
|
readonly smart?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylists
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylists
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylists
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylists
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylists
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylists
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof PlaylistsApiGetPlaylists
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for updatePlaylist operation in PlaylistsApi.
|
|
* @export
|
|
* @interface PlaylistsApiUpdatePlaylistRequest
|
|
*/
|
|
export interface PlaylistsApiUpdatePlaylistRequest {
|
|
/**
|
|
* the ID of the playlist
|
|
* @type {any}
|
|
* @memberof PlaylistsApiUpdatePlaylist
|
|
*/
|
|
readonly playlistID: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for uploadPlaylist operation in PlaylistsApi.
|
|
* @export
|
|
* @interface PlaylistsApiUploadPlaylistRequest
|
|
*/
|
|
export interface PlaylistsApiUploadPlaylistRequest {
|
|
/**
|
|
* absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename.
|
|
* @type {any}
|
|
* @memberof PlaylistsApiUploadPlaylist
|
|
*/
|
|
readonly path: any
|
|
|
|
/**
|
|
* force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
|
|
* @type {any}
|
|
* @memberof PlaylistsApiUploadPlaylist
|
|
*/
|
|
readonly force: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiUploadPlaylist
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiUploadPlaylist
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiUploadPlaylist
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiUploadPlaylist
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiUploadPlaylist
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof PlaylistsApiUploadPlaylist
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof PlaylistsApiUploadPlaylist
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* PlaylistsApi - object-oriented interface
|
|
* @export
|
|
* @class PlaylistsApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class PlaylistsApi extends BaseAPI {
|
|
/**
|
|
* Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist.
|
|
* @summary Adding to a Playlist
|
|
* @param {PlaylistsApiAddPlaylistContentsRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof PlaylistsApi
|
|
*/
|
|
public addPlaylistContents(requestParameters: PlaylistsApiAddPlaylistContentsRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return PlaylistsApiFp(this.configuration).addPlaylistContents(requestParameters.playlistID, requestParameters.uri, requestParameters.playQueueID, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Clears a playlist, only works with dumb playlists. Returns the playlist.
|
|
* @summary Delete Playlist Contents
|
|
* @param {PlaylistsApiClearPlaylistContentsRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof PlaylistsApi
|
|
*/
|
|
public clearPlaylistContents(requestParameters: PlaylistsApiClearPlaylistContentsRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return PlaylistsApiFp(this.configuration).clearPlaylistContents(requestParameters.playlistID, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: - `uri` - The content URI for what we\'re playing (e.g. `library://...`). - `playQueueID` - To create a playlist from an existing play queue.
|
|
* @summary Create a Playlist
|
|
* @param {PlaylistsApiCreatePlaylistRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof PlaylistsApi
|
|
*/
|
|
public createPlaylist(requestParameters: PlaylistsApiCreatePlaylistRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return PlaylistsApiFp(this.configuration).createPlaylist(requestParameters.title, requestParameters.type, requestParameters.smart, requestParameters.uri, requestParameters.playQueueID, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This endpoint will delete a playlist
|
|
* @summary Deletes a Playlist
|
|
* @param {PlaylistsApiDeletePlaylistRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof PlaylistsApi
|
|
*/
|
|
public deletePlaylist(requestParameters: PlaylistsApiDeletePlaylistRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return PlaylistsApiFp(this.configuration).deletePlaylist(requestParameters.playlistID, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing.
|
|
* @summary Retrieve Playlist
|
|
* @param {PlaylistsApiGetPlaylistRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof PlaylistsApi
|
|
*/
|
|
public getPlaylist(requestParameters: PlaylistsApiGetPlaylistRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return PlaylistsApiFp(this.configuration).getPlaylist(requestParameters.playlistID, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Gets the contents of a playlist. Should be paged by clients via standard mechanisms. By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. For example, you could use this to display a list of recently added albums vis a smart playlist. Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items.
|
|
* @summary Retrieve Playlist Contents
|
|
* @param {PlaylistsApiGetPlaylistContentsRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof PlaylistsApi
|
|
*/
|
|
public getPlaylistContents(requestParameters: PlaylistsApiGetPlaylistContentsRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return PlaylistsApiFp(this.configuration).getPlaylistContents(requestParameters.playlistID, requestParameters.type, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @summary Get All Playlists
|
|
* @param {PlaylistsApiGetPlaylistsRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof PlaylistsApi
|
|
*/
|
|
public getPlaylists(requestParameters: PlaylistsApiGetPlaylistsRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return PlaylistsApiFp(this.configuration).getPlaylists(requestParameters.playlistType, requestParameters.smart, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
|
|
* @summary Update a Playlist
|
|
* @param {PlaylistsApiUpdatePlaylistRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof PlaylistsApi
|
|
*/
|
|
public updatePlaylist(requestParameters: PlaylistsApiUpdatePlaylistRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return PlaylistsApiFp(this.configuration).updatePlaylist(requestParameters.playlistID, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
|
|
* @summary Upload Playlist
|
|
* @param {PlaylistsApiUploadPlaylistRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof PlaylistsApi
|
|
*/
|
|
public uploadPlaylist(requestParameters: PlaylistsApiUploadPlaylistRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return PlaylistsApiFp(this.configuration).uploadPlaylist(requestParameters.path, requestParameters.force, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* SearchApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const SearchApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). In the response\'s items, the following extra attributes are returned to further describe or disambiguate the result: - `reason`: The reason for the result, if not because of a direct search term match; can be either: - `section`: There are multiple identical results from different sections. - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). - `<hub identifier>`: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for \"dylan\" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for \"arnold\", there might be movie results returned with a reason of `actor` - `reasonTitle`: The string associated with the reason code. For a section reason, it\'ll be the section name; For a hub identifier, it\'ll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for \"arnold\"). - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. This request is intended to be very fast, and called as the user types.
|
|
* @summary Perform a search
|
|
* @param {any} query The query term
|
|
* @param {any} [sectionId] This gives context to the search, and can result in re-ordering of search result hubs
|
|
* @param {any} [limit] The number of items to return per hub
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
performSearch: async (query: any, sectionId?: any, limit?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'query' is not null or undefined
|
|
assertParamExists('performSearch', 'query', query)
|
|
const localVarPath = `/hubs/search`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (query !== undefined) {
|
|
localVarQueryParameter['query'] = query;
|
|
}
|
|
|
|
if (sectionId !== undefined) {
|
|
localVarQueryParameter['sectionId'] = sectionId;
|
|
}
|
|
|
|
if (limit !== undefined) {
|
|
localVarQueryParameter['limit'] = limit;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. Whenever possible, clients should limit the search to the appropriate type. Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality.
|
|
* @summary Perform a voice search
|
|
* @param {any} query The query term
|
|
* @param {any} [sectionId] This gives context to the search, and can result in re-ordering of search result hubs
|
|
* @param {any} [limit] The number of items to return per hub
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
performVoiceSearch: async (query: any, sectionId?: any, limit?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'query' is not null or undefined
|
|
assertParamExists('performVoiceSearch', 'query', query)
|
|
const localVarPath = `/hubs/search/voice`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (query !== undefined) {
|
|
localVarQueryParameter['query'] = query;
|
|
}
|
|
|
|
if (sectionId !== undefined) {
|
|
localVarQueryParameter['sectionId'] = sectionId;
|
|
}
|
|
|
|
if (limit !== undefined) {
|
|
localVarQueryParameter['limit'] = limit;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* SearchApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const SearchApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = SearchApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). In the response\'s items, the following extra attributes are returned to further describe or disambiguate the result: - `reason`: The reason for the result, if not because of a direct search term match; can be either: - `section`: There are multiple identical results from different sections. - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). - `<hub identifier>`: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for \"dylan\" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for \"arnold\", there might be movie results returned with a reason of `actor` - `reasonTitle`: The string associated with the reason code. For a section reason, it\'ll be the section name; For a hub identifier, it\'ll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for \"arnold\"). - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. This request is intended to be very fast, and called as the user types.
|
|
* @summary Perform a search
|
|
* @param {any} query The query term
|
|
* @param {any} [sectionId] This gives context to the search, and can result in re-ordering of search result hubs
|
|
* @param {any} [limit] The number of items to return per hub
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async performSearch(query: any, sectionId?: any, limit?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.performSearch(query, sectionId, limit, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. Whenever possible, clients should limit the search to the appropriate type. Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality.
|
|
* @summary Perform a voice search
|
|
* @param {any} query The query term
|
|
* @param {any} [sectionId] This gives context to the search, and can result in re-ordering of search result hubs
|
|
* @param {any} [limit] The number of items to return per hub
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async performVoiceSearch(query: any, sectionId?: any, limit?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.performVoiceSearch(query, sectionId, limit, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* SearchApi - factory interface
|
|
* @export
|
|
*/
|
|
export const SearchApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = SearchApiFp(configuration)
|
|
return {
|
|
/**
|
|
* This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). In the response\'s items, the following extra attributes are returned to further describe or disambiguate the result: - `reason`: The reason for the result, if not because of a direct search term match; can be either: - `section`: There are multiple identical results from different sections. - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). - `<hub identifier>`: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for \"dylan\" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for \"arnold\", there might be movie results returned with a reason of `actor` - `reasonTitle`: The string associated with the reason code. For a section reason, it\'ll be the section name; For a hub identifier, it\'ll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for \"arnold\"). - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. This request is intended to be very fast, and called as the user types.
|
|
* @summary Perform a search
|
|
* @param {any} query The query term
|
|
* @param {any} [sectionId] This gives context to the search, and can result in re-ordering of search result hubs
|
|
* @param {any} [limit] The number of items to return per hub
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
performSearch(query: any, sectionId?: any, limit?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.performSearch(query, sectionId, limit, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. Whenever possible, clients should limit the search to the appropriate type. Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality.
|
|
* @summary Perform a voice search
|
|
* @param {any} query The query term
|
|
* @param {any} [sectionId] This gives context to the search, and can result in re-ordering of search result hubs
|
|
* @param {any} [limit] The number of items to return per hub
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
performVoiceSearch(query: any, sectionId?: any, limit?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.performVoiceSearch(query, sectionId, limit, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for performSearch operation in SearchApi.
|
|
* @export
|
|
* @interface SearchApiPerformSearchRequest
|
|
*/
|
|
export interface SearchApiPerformSearchRequest {
|
|
/**
|
|
* The query term
|
|
* @type {any}
|
|
* @memberof SearchApiPerformSearch
|
|
*/
|
|
readonly query: any
|
|
|
|
/**
|
|
* This gives context to the search, and can result in re-ordering of search result hubs
|
|
* @type {any}
|
|
* @memberof SearchApiPerformSearch
|
|
*/
|
|
readonly sectionId?: any
|
|
|
|
/**
|
|
* The number of items to return per hub
|
|
* @type {any}
|
|
* @memberof SearchApiPerformSearch
|
|
*/
|
|
readonly limit?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof SearchApiPerformSearch
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof SearchApiPerformSearch
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof SearchApiPerformSearch
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof SearchApiPerformSearch
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof SearchApiPerformSearch
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof SearchApiPerformSearch
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof SearchApiPerformSearch
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for performVoiceSearch operation in SearchApi.
|
|
* @export
|
|
* @interface SearchApiPerformVoiceSearchRequest
|
|
*/
|
|
export interface SearchApiPerformVoiceSearchRequest {
|
|
/**
|
|
* The query term
|
|
* @type {any}
|
|
* @memberof SearchApiPerformVoiceSearch
|
|
*/
|
|
readonly query: any
|
|
|
|
/**
|
|
* This gives context to the search, and can result in re-ordering of search result hubs
|
|
* @type {any}
|
|
* @memberof SearchApiPerformVoiceSearch
|
|
*/
|
|
readonly sectionId?: any
|
|
|
|
/**
|
|
* The number of items to return per hub
|
|
* @type {any}
|
|
* @memberof SearchApiPerformVoiceSearch
|
|
*/
|
|
readonly limit?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof SearchApiPerformVoiceSearch
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof SearchApiPerformVoiceSearch
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof SearchApiPerformVoiceSearch
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof SearchApiPerformVoiceSearch
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof SearchApiPerformVoiceSearch
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof SearchApiPerformVoiceSearch
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof SearchApiPerformVoiceSearch
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* SearchApi - object-oriented interface
|
|
* @export
|
|
* @class SearchApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class SearchApi extends BaseAPI {
|
|
/**
|
|
* This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). In the response\'s items, the following extra attributes are returned to further describe or disambiguate the result: - `reason`: The reason for the result, if not because of a direct search term match; can be either: - `section`: There are multiple identical results from different sections. - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). - `<hub identifier>`: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for \"dylan\" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for \"arnold\", there might be movie results returned with a reason of `actor` - `reasonTitle`: The string associated with the reason code. For a section reason, it\'ll be the section name; For a hub identifier, it\'ll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for \"arnold\"). - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. This request is intended to be very fast, and called as the user types.
|
|
* @summary Perform a search
|
|
* @param {SearchApiPerformSearchRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof SearchApi
|
|
*/
|
|
public performSearch(requestParameters: SearchApiPerformSearchRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return SearchApiFp(this.configuration).performSearch(requestParameters.query, requestParameters.sectionId, requestParameters.limit, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. Whenever possible, clients should limit the search to the appropriate type. Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality.
|
|
* @summary Perform a voice search
|
|
* @param {SearchApiPerformVoiceSearchRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof SearchApi
|
|
*/
|
|
public performVoiceSearch(requestParameters: SearchApiPerformVoiceSearchRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return SearchApiFp(this.configuration).performVoiceSearch(requestParameters.query, requestParameters.sectionId, requestParameters.limit, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* SecurityApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const SecurityApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. Note: requires Plex Media Server >= 1.15.4.
|
|
* @summary Get Source Connection Information
|
|
* @param {any} source The source identifier with an included prefix.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getSourceConnectionInformation: async (source: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'source' is not null or undefined
|
|
assertParamExists('getSourceConnectionInformation', 'source', source)
|
|
const localVarPath = `/security/resources`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (source !== undefined) {
|
|
localVarQueryParameter['source'] = source;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This endpoint provides the caller with a temporary token with the same access level as the caller\'s token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
|
|
* @summary Get a Transient Token.
|
|
* @param {any} type `delegation` - This is the only supported `type` parameter.
|
|
* @param {any} scope `all` - This is the only supported `scope` parameter.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getTransientToken: async (type: any, scope: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'type' is not null or undefined
|
|
assertParamExists('getTransientToken', 'type', type)
|
|
// verify required parameter 'scope' is not null or undefined
|
|
assertParamExists('getTransientToken', 'scope', scope)
|
|
const localVarPath = `/security/token`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (type !== undefined) {
|
|
localVarQueryParameter['type'] = type;
|
|
}
|
|
|
|
if (scope !== undefined) {
|
|
localVarQueryParameter['scope'] = scope;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* SecurityApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const SecurityApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = SecurityApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. Note: requires Plex Media Server >= 1.15.4.
|
|
* @summary Get Source Connection Information
|
|
* @param {any} source The source identifier with an included prefix.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getSourceConnectionInformation(source: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getSourceConnectionInformation(source, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This endpoint provides the caller with a temporary token with the same access level as the caller\'s token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
|
|
* @summary Get a Transient Token.
|
|
* @param {any} type `delegation` - This is the only supported `type` parameter.
|
|
* @param {any} scope `all` - This is the only supported `scope` parameter.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getTransientToken(type: any, scope: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getTransientToken(type, scope, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* SecurityApi - factory interface
|
|
* @export
|
|
*/
|
|
export const SecurityApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = SecurityApiFp(configuration)
|
|
return {
|
|
/**
|
|
* If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. Note: requires Plex Media Server >= 1.15.4.
|
|
* @summary Get Source Connection Information
|
|
* @param {any} source The source identifier with an included prefix.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getSourceConnectionInformation(source: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getSourceConnectionInformation(source, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This endpoint provides the caller with a temporary token with the same access level as the caller\'s token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
|
|
* @summary Get a Transient Token.
|
|
* @param {any} type `delegation` - This is the only supported `type` parameter.
|
|
* @param {any} scope `all` - This is the only supported `scope` parameter.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getTransientToken(type: any, scope: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getTransientToken(type, scope, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for getSourceConnectionInformation operation in SecurityApi.
|
|
* @export
|
|
* @interface SecurityApiGetSourceConnectionInformationRequest
|
|
*/
|
|
export interface SecurityApiGetSourceConnectionInformationRequest {
|
|
/**
|
|
* The source identifier with an included prefix.
|
|
* @type {any}
|
|
* @memberof SecurityApiGetSourceConnectionInformation
|
|
*/
|
|
readonly source: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof SecurityApiGetSourceConnectionInformation
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof SecurityApiGetSourceConnectionInformation
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof SecurityApiGetSourceConnectionInformation
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof SecurityApiGetSourceConnectionInformation
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof SecurityApiGetSourceConnectionInformation
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof SecurityApiGetSourceConnectionInformation
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof SecurityApiGetSourceConnectionInformation
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getTransientToken operation in SecurityApi.
|
|
* @export
|
|
* @interface SecurityApiGetTransientTokenRequest
|
|
*/
|
|
export interface SecurityApiGetTransientTokenRequest {
|
|
/**
|
|
* `delegation` - This is the only supported `type` parameter.
|
|
* @type {any}
|
|
* @memberof SecurityApiGetTransientToken
|
|
*/
|
|
readonly type: any
|
|
|
|
/**
|
|
* `all` - This is the only supported `scope` parameter.
|
|
* @type {any}
|
|
* @memberof SecurityApiGetTransientToken
|
|
*/
|
|
readonly scope: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof SecurityApiGetTransientToken
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof SecurityApiGetTransientToken
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof SecurityApiGetTransientToken
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof SecurityApiGetTransientToken
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof SecurityApiGetTransientToken
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof SecurityApiGetTransientToken
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof SecurityApiGetTransientToken
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* SecurityApi - object-oriented interface
|
|
* @export
|
|
* @class SecurityApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class SecurityApi extends BaseAPI {
|
|
/**
|
|
* If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. Note: requires Plex Media Server >= 1.15.4.
|
|
* @summary Get Source Connection Information
|
|
* @param {SecurityApiGetSourceConnectionInformationRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof SecurityApi
|
|
*/
|
|
public getSourceConnectionInformation(requestParameters: SecurityApiGetSourceConnectionInformationRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return SecurityApiFp(this.configuration).getSourceConnectionInformation(requestParameters.source, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This endpoint provides the caller with a temporary token with the same access level as the caller\'s token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
|
|
* @summary Get a Transient Token.
|
|
* @param {SecurityApiGetTransientTokenRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof SecurityApi
|
|
*/
|
|
public getTransientToken(requestParameters: SecurityApiGetTransientTokenRequest, axiosOptions?: AxiosRequestConfig) {
|
|
return SecurityApiFp(this.configuration).getTransientToken(requestParameters.type, requestParameters.scope, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* ServerApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const ServerApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* Server Capabilities
|
|
* @summary Server Capabilities
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getServerCapabilities: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Get Server Preferences
|
|
* @summary Get Server Preferences
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getServerPreferences: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/:/prefs`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* ServerApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const ServerApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = ServerApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* Server Capabilities
|
|
* @summary Server Capabilities
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getServerCapabilities(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetServerCapabilities200Response>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getServerCapabilities(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* Get Server Preferences
|
|
* @summary Get Server Preferences
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getServerPreferences(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getServerPreferences(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* ServerApi - factory interface
|
|
* @export
|
|
*/
|
|
export const ServerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = ServerApiFp(configuration)
|
|
return {
|
|
/**
|
|
* Server Capabilities
|
|
* @summary Server Capabilities
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getServerCapabilities(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<GetServerCapabilities200Response> {
|
|
return localVarFp.getServerCapabilities(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Get Server Preferences
|
|
* @summary Get Server Preferences
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getServerPreferences(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getServerPreferences(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for getServerCapabilities operation in ServerApi.
|
|
* @export
|
|
* @interface ServerApiGetServerCapabilitiesRequest
|
|
*/
|
|
export interface ServerApiGetServerCapabilitiesRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerCapabilities
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerCapabilities
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerCapabilities
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerCapabilities
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerCapabilities
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerCapabilities
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerCapabilities
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getServerPreferences operation in ServerApi.
|
|
* @export
|
|
* @interface ServerApiGetServerPreferencesRequest
|
|
*/
|
|
export interface ServerApiGetServerPreferencesRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerPreferences
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerPreferences
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerPreferences
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerPreferences
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerPreferences
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerPreferences
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof ServerApiGetServerPreferences
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* ServerApi - object-oriented interface
|
|
* @export
|
|
* @class ServerApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class ServerApi extends BaseAPI {
|
|
/**
|
|
* Server Capabilities
|
|
* @summary Server Capabilities
|
|
* @param {ServerApiGetServerCapabilitiesRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ServerApi
|
|
*/
|
|
public getServerCapabilities(requestParameters: ServerApiGetServerCapabilitiesRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return ServerApiFp(this.configuration).getServerCapabilities(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Get Server Preferences
|
|
* @summary Get Server Preferences
|
|
* @param {ServerApiGetServerPreferencesRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ServerApi
|
|
*/
|
|
public getServerPreferences(requestParameters: ServerApiGetServerPreferencesRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return ServerApiFp(this.configuration).getServerPreferences(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* SessionsApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const SessionsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* This will Retrieve a listing of all history views.
|
|
* @summary Get Session History
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getSessionHistory: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/status/sessions/history/all`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* This will retrieve the \"Now Playing\" Information of the PMS.
|
|
* @summary Get Active Sessions
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getSessions: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/status/sessions`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* SessionsApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const SessionsApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = SessionsApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* This will Retrieve a listing of all history views.
|
|
* @summary Get Session History
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getSessionHistory(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getSessionHistory(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* This will retrieve the \"Now Playing\" Information of the PMS.
|
|
* @summary Get Active Sessions
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getSessions(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getSessions(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* SessionsApi - factory interface
|
|
* @export
|
|
*/
|
|
export const SessionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = SessionsApiFp(configuration)
|
|
return {
|
|
/**
|
|
* This will Retrieve a listing of all history views.
|
|
* @summary Get Session History
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getSessionHistory(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getSessionHistory(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* This will retrieve the \"Now Playing\" Information of the PMS.
|
|
* @summary Get Active Sessions
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getSessions(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getSessions(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for getSessionHistory operation in SessionsApi.
|
|
* @export
|
|
* @interface SessionsApiGetSessionHistoryRequest
|
|
*/
|
|
export interface SessionsApiGetSessionHistoryRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessionHistory
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessionHistory
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessionHistory
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessionHistory
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessionHistory
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessionHistory
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessionHistory
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for getSessions operation in SessionsApi.
|
|
* @export
|
|
* @interface SessionsApiGetSessionsRequest
|
|
*/
|
|
export interface SessionsApiGetSessionsRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessions
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessions
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessions
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessions
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessions
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessions
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof SessionsApiGetSessions
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* SessionsApi - object-oriented interface
|
|
* @export
|
|
* @class SessionsApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class SessionsApi extends BaseAPI {
|
|
/**
|
|
* This will Retrieve a listing of all history views.
|
|
* @summary Get Session History
|
|
* @param {SessionsApiGetSessionHistoryRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof SessionsApi
|
|
*/
|
|
public getSessionHistory(requestParameters: SessionsApiGetSessionHistoryRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return SessionsApiFp(this.configuration).getSessionHistory(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* This will retrieve the \"Now Playing\" Information of the PMS.
|
|
* @summary Get Active Sessions
|
|
* @param {SessionsApiGetSessionsRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof SessionsApi
|
|
*/
|
|
public getSessions(requestParameters: SessionsApiGetSessionsRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return SessionsApiFp(this.configuration).getSessions(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* UpdaterApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const UpdaterApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
|
|
* @summary Apply Updates
|
|
* @param {any} [tonight] Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
|
|
* @param {any} [skip] Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
applyUpdates: async (tonight?: any, skip?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/updater/apply`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (tonight !== undefined) {
|
|
localVarQueryParameter['tonight'] = tonight;
|
|
}
|
|
|
|
if (skip !== undefined) {
|
|
localVarQueryParameter['skip'] = skip;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Checking for updates
|
|
* @summary Checking for updates
|
|
* @param {any} [download] Indicate that you want to start download any updates found.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
checkForUpdates: async (download?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/updater/check`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (download !== undefined) {
|
|
localVarQueryParameter['download'] = download;
|
|
}
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Querying status of updates
|
|
* @summary Querying status of updates
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
queryUpdateStatus: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/updater/status`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* UpdaterApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const UpdaterApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = UpdaterApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
|
|
* @summary Apply Updates
|
|
* @param {any} [tonight] Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
|
|
* @param {any} [skip] Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async applyUpdates(tonight?: any, skip?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.applyUpdates(tonight, skip, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* Checking for updates
|
|
* @summary Checking for updates
|
|
* @param {any} [download] Indicate that you want to start download any updates found.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async checkForUpdates(download?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.checkForUpdates(download, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
/**
|
|
* Querying status of updates
|
|
* @summary Querying status of updates
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async queryUpdateStatus(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.queryUpdateStatus(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* UpdaterApi - factory interface
|
|
* @export
|
|
*/
|
|
export const UpdaterApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = UpdaterApiFp(configuration)
|
|
return {
|
|
/**
|
|
* Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
|
|
* @summary Apply Updates
|
|
* @param {any} [tonight] Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
|
|
* @param {any} [skip] Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
applyUpdates(tonight?: any, skip?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.applyUpdates(tonight, skip, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Checking for updates
|
|
* @summary Checking for updates
|
|
* @param {any} [download] Indicate that you want to start download any updates found.
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
checkForUpdates(download?: any, xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.checkForUpdates(download, xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Querying status of updates
|
|
* @summary Querying status of updates
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
queryUpdateStatus(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.queryUpdateStatus(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for applyUpdates operation in UpdaterApi.
|
|
* @export
|
|
* @interface UpdaterApiApplyUpdatesRequest
|
|
*/
|
|
export interface UpdaterApiApplyUpdatesRequest {
|
|
/**
|
|
* Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
|
|
* @type {any}
|
|
* @memberof UpdaterApiApplyUpdates
|
|
*/
|
|
readonly tonight?: any
|
|
|
|
/**
|
|
* Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
|
|
* @type {any}
|
|
* @memberof UpdaterApiApplyUpdates
|
|
*/
|
|
readonly skip?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof UpdaterApiApplyUpdates
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof UpdaterApiApplyUpdates
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof UpdaterApiApplyUpdates
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof UpdaterApiApplyUpdates
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof UpdaterApiApplyUpdates
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof UpdaterApiApplyUpdates
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof UpdaterApiApplyUpdates
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for checkForUpdates operation in UpdaterApi.
|
|
* @export
|
|
* @interface UpdaterApiCheckForUpdatesRequest
|
|
*/
|
|
export interface UpdaterApiCheckForUpdatesRequest {
|
|
/**
|
|
* Indicate that you want to start download any updates found.
|
|
* @type {any}
|
|
* @memberof UpdaterApiCheckForUpdates
|
|
*/
|
|
readonly download?: any
|
|
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof UpdaterApiCheckForUpdates
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof UpdaterApiCheckForUpdates
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof UpdaterApiCheckForUpdates
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof UpdaterApiCheckForUpdates
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof UpdaterApiCheckForUpdates
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof UpdaterApiCheckForUpdates
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof UpdaterApiCheckForUpdates
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* Request parameters for queryUpdateStatus operation in UpdaterApi.
|
|
* @export
|
|
* @interface UpdaterApiQueryUpdateStatusRequest
|
|
*/
|
|
export interface UpdaterApiQueryUpdateStatusRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof UpdaterApiQueryUpdateStatus
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof UpdaterApiQueryUpdateStatus
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof UpdaterApiQueryUpdateStatus
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof UpdaterApiQueryUpdateStatus
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof UpdaterApiQueryUpdateStatus
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof UpdaterApiQueryUpdateStatus
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof UpdaterApiQueryUpdateStatus
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* UpdaterApi - object-oriented interface
|
|
* @export
|
|
* @class UpdaterApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class UpdaterApi extends BaseAPI {
|
|
/**
|
|
* Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
|
|
* @summary Apply Updates
|
|
* @param {UpdaterApiApplyUpdatesRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof UpdaterApi
|
|
*/
|
|
public applyUpdates(requestParameters: UpdaterApiApplyUpdatesRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return UpdaterApiFp(this.configuration).applyUpdates(requestParameters.tonight, requestParameters.skip, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Checking for updates
|
|
* @summary Checking for updates
|
|
* @param {UpdaterApiCheckForUpdatesRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof UpdaterApi
|
|
*/
|
|
public checkForUpdates(requestParameters: UpdaterApiCheckForUpdatesRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return UpdaterApiFp(this.configuration).checkForUpdates(requestParameters.download, requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Querying status of updates
|
|
* @summary Querying status of updates
|
|
* @param {UpdaterApiQueryUpdateStatusRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof UpdaterApi
|
|
*/
|
|
public queryUpdateStatus(requestParameters: UpdaterApiQueryUpdateStatusRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return UpdaterApiFp(this.configuration).queryUpdateStatus(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* UserApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const UserApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* Get Logged in User
|
|
* @summary Get Logged in User
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getUserDetails: async (xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/user`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication PlexClientIdentifier required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Client-Identifier", configuration)
|
|
|
|
// authentication PlexToken required
|
|
await setApiKeyToObject(localVarHeaderParameter, "X-Plex-Token", configuration)
|
|
|
|
if (xPlexDeviceName !== undefined && xPlexDeviceName !== null) {
|
|
localVarHeaderParameter['X-Plex-Device-Name'] = String(JSON.stringify(xPlexDeviceName));
|
|
}
|
|
|
|
if (xPlexDevice !== undefined && xPlexDevice !== null) {
|
|
localVarHeaderParameter['X-Plex-Device'] = String(JSON.stringify(xPlexDevice));
|
|
}
|
|
|
|
if (xPlexPlatformVersion !== undefined && xPlexPlatformVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform-Version'] = String(JSON.stringify(xPlexPlatformVersion));
|
|
}
|
|
|
|
if (xPlexPlatform !== undefined && xPlexPlatform !== null) {
|
|
localVarHeaderParameter['X-Plex-Platform'] = String(JSON.stringify(xPlexPlatform));
|
|
}
|
|
|
|
if (xPlexProduct !== undefined && xPlexProduct !== null) {
|
|
localVarHeaderParameter['X-Plex-Product'] = String(JSON.stringify(xPlexProduct));
|
|
}
|
|
|
|
if (xPlexProvides !== undefined && xPlexProvides !== null) {
|
|
localVarHeaderParameter['X-Plex-Provides'] = String(JSON.stringify(xPlexProvides));
|
|
}
|
|
|
|
if (xPlexVersion !== undefined && xPlexVersion !== null) {
|
|
localVarHeaderParameter['X-Plex-Version'] = String(JSON.stringify(xPlexVersion));
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
axiosOptions: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* UserApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const UserApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* Get Logged in User
|
|
* @summary Get Logged in User
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getUserDetails(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserDetails(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions);
|
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* UserApi - factory interface
|
|
* @export
|
|
*/
|
|
export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = UserApiFp(configuration)
|
|
return {
|
|
/**
|
|
* Get Logged in User
|
|
* @summary Get Logged in User
|
|
* @param {any} [xPlexDeviceName] Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @param {any} [xPlexDevice] The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @param {any} [xPlexPlatformVersion] Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @param {any} [xPlexPlatform] Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @param {any} [xPlexProduct] Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @param {any} [xPlexProvides] One or more of `[player, controller, server]`
|
|
* @param {any} [xPlexVersion] Your application version number
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getUserDetails(xPlexDeviceName?: any, xPlexDevice?: any, xPlexPlatformVersion?: any, xPlexPlatform?: any, xPlexProduct?: any, xPlexProvides?: any, xPlexVersion?: any, axiosOptions?: any): AxiosPromise<void> {
|
|
return localVarFp.getUserDetails(xPlexDeviceName, xPlexDevice, xPlexPlatformVersion, xPlexPlatform, xPlexProduct, xPlexProvides, xPlexVersion, axiosOptions).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for getUserDetails operation in UserApi.
|
|
* @export
|
|
* @interface UserApiGetUserDetailsRequest
|
|
*/
|
|
export interface UserApiGetUserDetailsRequest {
|
|
/**
|
|
* Primary name for the device eg. `Plex Web (Chrome)`
|
|
* @type {any}
|
|
* @memberof UserApiGetUserDetails
|
|
*/
|
|
readonly xPlexDeviceName?: any
|
|
|
|
/**
|
|
* The type of device your application is running on Device name and or model number, eg `iPhone3,2`, `Motorola XOOM™`, `LG5200TV`
|
|
* @type {any}
|
|
* @memberof UserApiGetUserDetails
|
|
*/
|
|
readonly xPlexDevice?: any
|
|
|
|
/**
|
|
* Operating system version, eg `4.3.1`, `10.6.7`, `3.2`
|
|
* @type {any}
|
|
* @memberof UserApiGetUserDetails
|
|
*/
|
|
readonly xPlexPlatformVersion?: any
|
|
|
|
/**
|
|
* Platform name, eg `Web`, `iOS`, `MacOSX`, `Android`, `LG`
|
|
* @type {any}
|
|
* @memberof UserApiGetUserDetails
|
|
*/
|
|
readonly xPlexPlatform?: any
|
|
|
|
/**
|
|
* Plex application name, eg `Laika`, `Plex Media Server`, `Media Link`
|
|
* @type {any}
|
|
* @memberof UserApiGetUserDetails
|
|
*/
|
|
readonly xPlexProduct?: any
|
|
|
|
/**
|
|
* One or more of `[player, controller, server]`
|
|
* @type {any}
|
|
* @memberof UserApiGetUserDetails
|
|
*/
|
|
readonly xPlexProvides?: any
|
|
|
|
/**
|
|
* Your application version number
|
|
* @type {any}
|
|
* @memberof UserApiGetUserDetails
|
|
*/
|
|
readonly xPlexVersion?: any
|
|
}
|
|
|
|
/**
|
|
* UserApi - object-oriented interface
|
|
* @export
|
|
* @class UserApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class UserApi extends BaseAPI {
|
|
/**
|
|
* Get Logged in User
|
|
* @summary Get Logged in User
|
|
* @param {UserApiGetUserDetailsRequest} requestParameters Request parameters.
|
|
* @param {*} [axiosOptions] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof UserApi
|
|
*/
|
|
public getUserDetails(requestParameters: UserApiGetUserDetailsRequest = {}, axiosOptions?: AxiosRequestConfig) {
|
|
return UserApiFp(this.configuration).getUserDetails(requestParameters.xPlexDeviceName, requestParameters.xPlexDevice, requestParameters.xPlexPlatformVersion, requestParameters.xPlexPlatform, requestParameters.xPlexProduct, requestParameters.xPlexProvides, requestParameters.xPlexVersion, axiosOptions).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|