mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 12:37:46 +00:00
Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b38478255 | ||
|
|
6bd12d8759 | ||
|
|
891a7d39a1 | ||
|
|
763aa8e800 | ||
|
|
7a950ea773 | ||
|
|
379a408d74 | ||
|
|
2712820397 | ||
|
|
c895213ae8 | ||
|
|
c473c9d326 | ||
|
|
3c13bba9de | ||
|
|
650c5043ef | ||
|
|
0234804578 | ||
|
|
60d913c8f9 | ||
|
|
8d9f4bbaf1 | ||
|
|
5d57cd7c34 | ||
|
|
1a8e227874 | ||
|
|
8360d057ab | ||
|
|
18b64727c3 | ||
|
|
3152372037 | ||
|
|
13cd8a7fe5 | ||
|
|
cdcdc0ca8e | ||
|
|
b03cc6a609 | ||
|
|
4e989e0de3 | ||
|
|
c10e011a68 | ||
|
|
7e3dca8466 | ||
|
|
8a2d3e04ab | ||
|
|
6c8a73ae84 | ||
|
|
c839d9f6c7 | ||
|
|
77b0ef9507 | ||
|
|
1cfbd17f28 | ||
|
|
2492807c65 | ||
|
|
ead0a8773c | ||
|
|
e254f82e06 | ||
|
|
a4369c999a | ||
|
|
c50b85f29a | ||
|
|
496ebda695 | ||
|
|
d436fc3452 | ||
|
|
99cdf6effe | ||
|
|
fa2ba82f62 | ||
|
|
fd8095a8df | ||
|
|
9911164ab0 | ||
|
|
ffedf47cad | ||
|
|
39d3a40524 | ||
|
|
8dc802ca50 | ||
|
|
5465f1e74c | ||
|
|
2d100b8e75 | ||
|
|
0533836427 | ||
|
|
f0b08b9bd9 | ||
|
|
244adab882 |
@@ -1,28 +0,0 @@
|
|||||||
/* eslint-env node */
|
|
||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
extends: [
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"plugin:import/recommended",
|
|
||||||
"plugin:import/typescript",
|
|
||||||
],
|
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
plugins: ["@typescript-eslint"],
|
|
||||||
settings: {
|
|
||||||
"import/resolver": {
|
|
||||||
typescript: true,
|
|
||||||
node: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
// Handled by typescript compiler
|
|
||||||
"@typescript-eslint/no-unused-vars": "off",
|
|
||||||
"@typescript-eslint/ban-types": "off",
|
|
||||||
"@typescript-eslint/no-namespace": "off",
|
|
||||||
"@typescript-eslint/no-explicit-any": "off",
|
|
||||||
"import/no-named-as-default-member": "off",
|
|
||||||
|
|
||||||
"import/no-default-export": "error",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
5
.github/workflows/publish-jsr.yaml
vendored
5
.github/workflows/publish-jsr.yaml
vendored
@@ -7,9 +7,8 @@ permissions:
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
registry_package:
|
||||||
branches:
|
types: [published]
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
|
|||||||
30
.github/workflows/sdk_generation.yaml
vendored
Normal file
30
.github/workflows/sdk_generation.yaml
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
name: Generate
|
||||||
|
permissions:
|
||||||
|
checks: write
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
statuses: write
|
||||||
|
"on":
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
force:
|
||||||
|
description: Force generation of SDKs
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
set_version:
|
||||||
|
description: optionally set a specific SDK version
|
||||||
|
type: string
|
||||||
|
schedule:
|
||||||
|
- cron: 0 0 * * *
|
||||||
|
jobs:
|
||||||
|
generate:
|
||||||
|
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
|
||||||
|
with:
|
||||||
|
force: ${{ github.event.inputs.force }}
|
||||||
|
mode: direct
|
||||||
|
set_version: ${{ github.event.inputs.set_version }}
|
||||||
|
speakeasy_version: latest
|
||||||
|
secrets:
|
||||||
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
npm_token: ${{ secrets.NPM_TOKEN }}
|
||||||
|
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
|
||||||
31
.github/workflows/speakeasy_sdk_generation.yml
vendored
31
.github/workflows/speakeasy_sdk_generation.yml
vendored
@@ -1,31 +0,0 @@
|
|||||||
name: Generate
|
|
||||||
permissions:
|
|
||||||
checks: write
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
statuses: write
|
|
||||||
"on":
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
force:
|
|
||||||
description: Force generation of SDKs
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
push_code_samples_only:
|
|
||||||
description: Force push only code samples from SDK generation
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
schedule:
|
|
||||||
- cron: 0 0 * * *
|
|
||||||
jobs:
|
|
||||||
generate:
|
|
||||||
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
|
|
||||||
with:
|
|
||||||
force: ${{ github.event.inputs.force }}
|
|
||||||
mode: direct
|
|
||||||
push_code_samples_only: ${{ fromJSON(github.event.inputs.push_code_samples_only != '' && github.event.inputs.push_code_samples_only || 'false') }}
|
|
||||||
speakeasy_version: latest
|
|
||||||
secrets:
|
|
||||||
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
npm_token: ${{ secrets.NPM_TOKEN }}
|
|
||||||
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
|
|
||||||
20
.github/workflows/tagging.yaml
vendored
20
.github/workflows/tagging.yaml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Speakeasy Tagging
|
|
||||||
permissions:
|
|
||||||
checks: write
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
statuses: write
|
|
||||||
"on":
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths: []
|
|
||||||
workflow_dispatch: {}
|
|
||||||
jobs:
|
|
||||||
tag:
|
|
||||||
uses: speakeasy-api/sdk-generation-action/.github/workflows/tag.yaml@v15
|
|
||||||
with:
|
|
||||||
registry_tags: main
|
|
||||||
secrets:
|
|
||||||
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
|
|
||||||
12
.gitignore
vendored
12
.gitignore
vendored
@@ -1,3 +1,15 @@
|
|||||||
|
.DS_Store
|
||||||
|
**/.speakeasy/temp/
|
||||||
|
**/.speakeasy/logs/
|
||||||
|
.DS_Store
|
||||||
|
/mcp-server
|
||||||
|
/bin
|
||||||
|
/.eslintcache
|
||||||
|
/.speakeasy/reports
|
||||||
|
/react-query
|
||||||
|
/sdk/models/errors
|
||||||
|
/sdk/types
|
||||||
|
/__tests__
|
||||||
/funcs
|
/funcs
|
||||||
/core.*
|
/core.*
|
||||||
/esm
|
/esm
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
**/*
|
**/*
|
||||||
|
!/FUNCTIONS.md
|
||||||
|
!/RUNTIMES.md
|
||||||
|
!/REACT_QUERY.md
|
||||||
!/**/*.ts
|
!/**/*.ts
|
||||||
!/**/*.js
|
!/**/*.js
|
||||||
|
!/**/*.mjs
|
||||||
|
!/**/*.json
|
||||||
!/**/*.map
|
!/**/*.map
|
||||||
|
|
||||||
/.eslintrc.js
|
/eslint.config.mjs
|
||||||
/cjs
|
/cjs
|
||||||
/.tshy
|
/.tshy
|
||||||
/.tshy-*
|
/.tshy-*
|
||||||
|
/__tests__
|
||||||
|
|||||||
3124
.speakeasy/gen.lock
3124
.speakeasy/gen.lock
File diff suppressed because one or more lines are too long
@@ -4,15 +4,20 @@ generation:
|
|||||||
maintainOpenAPIOrder: true
|
maintainOpenAPIOrder: true
|
||||||
usageSnippets:
|
usageSnippets:
|
||||||
optionalPropertyRendering: withExample
|
optionalPropertyRendering: withExample
|
||||||
|
sdkInitStyle: constructor
|
||||||
useClassNamesForArrayFields: true
|
useClassNamesForArrayFields: true
|
||||||
fixes:
|
fixes:
|
||||||
nameResolutionDec2023: true
|
nameResolutionDec2023: true
|
||||||
|
nameResolutionFeb2025: false
|
||||||
parameterOrderingFeb2024: true
|
parameterOrderingFeb2024: true
|
||||||
requestResponseComponentNamesFeb2024: true
|
requestResponseComponentNamesFeb2024: true
|
||||||
|
securityFeb2025: false
|
||||||
|
sharedErrorComponentsApr2025: false
|
||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: true
|
oAuth2ClientCredentialsEnabled: true
|
||||||
|
oAuth2PasswordEnabled: false
|
||||||
typescript:
|
typescript:
|
||||||
version: 0.20.0
|
version: 0.38.0
|
||||||
additionalDependencies:
|
additionalDependencies:
|
||||||
dependencies: {}
|
dependencies: {}
|
||||||
devDependencies: {}
|
devDependencies: {}
|
||||||
@@ -20,17 +25,23 @@ typescript:
|
|||||||
additionalPackageJSON: {}
|
additionalPackageJSON: {}
|
||||||
author: LukeHagar
|
author: LukeHagar
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
|
defaultErrorName: SDKError
|
||||||
|
enableCustomCodeRegions: false
|
||||||
|
enableMCPServer: true
|
||||||
|
enableReactQuery: false
|
||||||
enumFormat: enum
|
enumFormat: enum
|
||||||
flattenGlobalSecurity: true
|
flattenGlobalSecurity: true
|
||||||
|
flatteningOrder: body-first
|
||||||
imports:
|
imports:
|
||||||
option: openapi
|
option: openapi
|
||||||
paths:
|
paths:
|
||||||
callbacks: ""
|
callbacks: sdk/models/callbacks
|
||||||
errors: ""
|
errors: sdk/models/errors
|
||||||
operations: ""
|
operations: sdk/models/operations
|
||||||
shared: ""
|
shared: sdk/models/shared
|
||||||
webhooks: ""
|
webhooks: sdk/models/webhooks
|
||||||
inputModelSuffix: input
|
inputModelSuffix: input
|
||||||
|
jsonpath: legacy
|
||||||
maxMethodParams: 4
|
maxMethodParams: 4
|
||||||
methodArguments: require-security-and-request
|
methodArguments: require-security-and-request
|
||||||
moduleFormat: commonjs
|
moduleFormat: commonjs
|
||||||
|
|||||||
@@ -1,38 +1,47 @@
|
|||||||
speakeasyVersion: 1.390.7
|
speakeasyVersion: 1.555.2
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
my-source:
|
||||||
sourceNamespace: my-source
|
sourceNamespace: my-source
|
||||||
sourceRevisionDigest: sha256:fff67c8d70fdb1711caf3e9c61cdc91a4c88ac98b3419c1d287db6ca95c7278b
|
sourceRevisionDigest: sha256:1b8840d540c66b58d1009ec2581fb18464158ec9aa00464eac05ba737f31207e
|
||||||
sourceBlobDigest: sha256:235067aeeeba40f6a4b062d9b9e6816a6e1282023f9664b46cbc1af6495b4c53
|
sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- main
|
- main
|
||||||
|
plexapi:
|
||||||
|
sourceNamespace: plexapi
|
||||||
|
sourceRevisionDigest: sha256:78d07ad78ff60d0e9918696208d8c68a562e170d4e9c431797c02995fb8816d0
|
||||||
|
sourceBlobDigest: sha256:d38dd2a36c1b2fd73409267f7b30c2d5d45d709616141803ea01db424ec68ae4
|
||||||
|
tags:
|
||||||
|
- latest
|
||||||
|
- speakeasy-sdk-regen-1748995899
|
||||||
|
- 0.0.3
|
||||||
targets:
|
targets:
|
||||||
plexjs:
|
plexjs:
|
||||||
source: my-source
|
source: plexapi
|
||||||
sourceNamespace: my-source
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:fff67c8d70fdb1711caf3e9c61cdc91a4c88ac98b3419c1d287db6ca95c7278b
|
sourceRevisionDigest: sha256:78d07ad78ff60d0e9918696208d8c68a562e170d4e9c431797c02995fb8816d0
|
||||||
sourceBlobDigest: sha256:235067aeeeba40f6a4b062d9b9e6816a6e1282023f9664b46cbc1af6495b4c53
|
sourceBlobDigest: sha256:d38dd2a36c1b2fd73409267f7b30c2d5d45d709616141803ea01db424ec68ae4
|
||||||
codeSamplesNamespace: code-samples-typescript-plexjs
|
codeSamplesNamespace: code-samples-typescript-plexjs
|
||||||
codeSamplesRevisionDigest: sha256:18919b4d52e4482e8771f2e3657d74cae7f332e481471d177e5b248a9ffc99bd
|
codeSamplesRevisionDigest: sha256:132446d6299798fab8378bc875b16290ef126cdb50befe85a0a88bee8bf35799
|
||||||
outLocation: /github/workspace/repo
|
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: latest
|
speakeasyVersion: latest
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
plexapi:
|
||||||
inputs:
|
inputs:
|
||||||
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/refs/heads/main/output/plex-media-server-spec-dereferenced.yaml
|
||||||
registry:
|
registry:
|
||||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source
|
location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi
|
||||||
targets:
|
targets:
|
||||||
plexjs:
|
plexjs:
|
||||||
target: typescript
|
target: typescript
|
||||||
source: my-source
|
source: plexapi
|
||||||
publish:
|
publish:
|
||||||
npm:
|
npm:
|
||||||
token: $NPM_TOKEN
|
token: $npm_token
|
||||||
codeSamples:
|
codeSamples:
|
||||||
output: codeSamples.yaml
|
output: codeSamples.yaml
|
||||||
registry:
|
registry:
|
||||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/code-samples-typescript-plexjs
|
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-typescript-plexjs
|
||||||
|
labelOverride:
|
||||||
|
fixedValue: PlexJS
|
||||||
|
|||||||
@@ -1,19 +1,21 @@
|
|||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: latest
|
speakeasyVersion: latest
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
plexapi:
|
||||||
inputs:
|
inputs:
|
||||||
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/refs/heads/main/output/plex-media-server-spec-dereferenced.yaml
|
||||||
registry:
|
registry:
|
||||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source
|
location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi
|
||||||
targets:
|
targets:
|
||||||
plexjs:
|
plexjs:
|
||||||
target: typescript
|
target: typescript
|
||||||
source: my-source
|
source: plexapi
|
||||||
publish:
|
publish:
|
||||||
npm:
|
npm:
|
||||||
token: $NPM_TOKEN
|
token: $npm_token
|
||||||
codeSamples:
|
codeSamples:
|
||||||
output: codeSamples.yaml
|
output: codeSamples.yaml
|
||||||
registry:
|
registry:
|
||||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/code-samples-typescript-plexjs
|
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-typescript-plexjs
|
||||||
|
labelOverride:
|
||||||
|
fixedValue: PlexJS
|
||||||
|
|||||||
28
FUNCTIONS.md
28
FUNCTIONS.md
@@ -21,39 +21,21 @@ specific category of applications.
|
|||||||
```typescript
|
```typescript
|
||||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||||
import { serverGetServerCapabilities } from "@lukehagar/plexjs/funcs/serverGetServerCapabilities.js";
|
import { serverGetServerCapabilities } from "@lukehagar/plexjs/funcs/serverGetServerCapabilities.js";
|
||||||
import { SDKValidationError } from "@lukehagar/plexjs/models/sdkvalidationerror.js";
|
|
||||||
|
|
||||||
// Use `PlexAPICore` for best tree-shaking performance.
|
// Use `PlexAPICore` for best tree-shaking performance.
|
||||||
// You can create one instance of it to use across an application.
|
// You can create one instance of it to use across an application.
|
||||||
const plexAPI = new PlexAPICore({
|
const plexAPI = new PlexAPICore({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const res = await serverGetServerCapabilities(plexAPI);
|
const res = await serverGetServerCapabilities(plexAPI);
|
||||||
|
if (res.ok) {
|
||||||
switch (true) {
|
const { value: result } = res;
|
||||||
case res.ok:
|
console.log(result);
|
||||||
// The success case will be handled outside of the switch block
|
} else {
|
||||||
break;
|
console.log("serverGetServerCapabilities failed:", res.error);
|
||||||
case res.error instanceof SDKValidationError:
|
|
||||||
// Pretty-print validation errors.
|
|
||||||
return console.log(res.error.pretty());
|
|
||||||
case res.error instanceof Error:
|
|
||||||
return console.log(res.error);
|
|
||||||
default:
|
|
||||||
// TypeScript's type checking will fail on the following line if the above
|
|
||||||
// cases were not exhaustive.
|
|
||||||
res.error satisfies never;
|
|
||||||
throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const { value: result } = res;
|
|
||||||
|
|
||||||
// Handle the result
|
|
||||||
console.log(result)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
775
README.md
775
README.md
@@ -11,23 +11,56 @@
|
|||||||
## Summary
|
## Summary
|
||||||
|
|
||||||
Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server
|
Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server
|
||||||
|
|
||||||
|
# Plex Media Server OpenAPI Specification
|
||||||
|
|
||||||
|
An Open Source OpenAPI Specification for Plex Media Server
|
||||||
|
|
||||||
|
Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/)
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
[API Documentation](https://plexapi.dev)
|
||||||
|
|
||||||
|
## SDKs
|
||||||
|
|
||||||
|
The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec).
|
||||||
|
|
||||||
|
| Language | Repository | Releases | Other |
|
||||||
|
| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||||
|
| Python | [GitHub](https://github.com/LukeHagar/plexpy) | [PyPI](https://pypi.org/project/plex-api-client/) | - |
|
||||||
|
| JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs) | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \ [JSR](https://jsr.io/@lukehagar/plexjs) | - |
|
||||||
|
| Go | [GitHub](https://github.com/LukeHagar/plexgo) | [Releases](https://github.com/LukeHagar/plexgo/releases) | [GoDoc](https://pkg.go.dev/github.com/LukeHagar/plexgo) |
|
||||||
|
| Ruby | [GitHub](https://github.com/LukeHagar/plexruby) | [Releases](https://github.com/LukeHagar/plexruby/releases) | - |
|
||||||
|
| Swift | [GitHub](https://github.com/LukeHagar/plexswift) | [Releases](https://github.com/LukeHagar/plexswift/releases) | - |
|
||||||
|
| PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - |
|
||||||
|
| Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - |
|
||||||
|
| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | -
|
||||||
<!-- End Summary [summary] -->
|
<!-- End Summary [summary] -->
|
||||||
|
|
||||||
<!-- Start Table of Contents [toc] -->
|
<!-- Start Table of Contents [toc] -->
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
<!-- $toc-max-depth=2 -->
|
||||||
|
* [@lukehagar/plexjs](#lukehagarplexjs)
|
||||||
|
* [Plex Media Server OpenAPI Specification](#plex-media-server-openapi-specification)
|
||||||
|
* [Documentation](#documentation)
|
||||||
|
* [SDKs](#sdks)
|
||||||
|
* [SDK Installation](#sdk-installation)
|
||||||
|
* [SDK Example Usage](#sdk-example-usage)
|
||||||
|
* [Available Resources and Operations](#available-resources-and-operations)
|
||||||
|
* [Error Handling](#error-handling)
|
||||||
|
* [Server Selection](#server-selection)
|
||||||
|
* [Custom HTTP Client](#custom-http-client)
|
||||||
|
* [Authentication](#authentication)
|
||||||
|
* [Requirements](#requirements)
|
||||||
|
* [Standalone functions](#standalone-functions)
|
||||||
|
* [File uploads](#file-uploads)
|
||||||
|
* [Retries](#retries)
|
||||||
|
* [Debugging](#debugging)
|
||||||
|
* [Development](#development)
|
||||||
|
* [Maturity](#maturity)
|
||||||
|
* [Contributions](#contributions)
|
||||||
|
|
||||||
* [SDK Installation](#sdk-installation)
|
|
||||||
* [Requirements](#requirements)
|
|
||||||
* [SDK Example Usage](#sdk-example-usage)
|
|
||||||
* [Available Resources and Operations](#available-resources-and-operations)
|
|
||||||
* [Standalone functions](#standalone-functions)
|
|
||||||
* [Global Parameters](#global-parameters)
|
|
||||||
* [Retries](#retries)
|
|
||||||
* [Error Handling](#error-handling)
|
|
||||||
* [Server Selection](#server-selection)
|
|
||||||
* [Custom HTTP Client](#custom-http-client)
|
|
||||||
* [Authentication](#authentication)
|
|
||||||
* [Debugging](#debugging)
|
|
||||||
<!-- End Table of Contents [toc] -->
|
<!-- End Table of Contents [toc] -->
|
||||||
|
|
||||||
<!-- Start SDK Installation [installation] -->
|
<!-- Start SDK Installation [installation] -->
|
||||||
@@ -72,15 +105,13 @@ yarn add @lukehagar/plexjs zod
|
|||||||
import { PlexAPI } from "@lukehagar/plexjs";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
const plexAPI = new PlexAPI({
|
const plexAPI = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.server.getServerCapabilities();
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
|
|
||||||
// Handle the result
|
console.log(result);
|
||||||
console.log(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -91,36 +122,21 @@ run();
|
|||||||
<!-- Start Available Resources and Operations [operations] -->
|
<!-- Start Available Resources and Operations [operations] -->
|
||||||
## Available Resources and Operations
|
## Available Resources and Operations
|
||||||
|
|
||||||
### [server](docs/sdks/server/README.md)
|
<details open>
|
||||||
|
<summary>Available methods</summary>
|
||||||
* [getServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities
|
|
||||||
* [getServerPreferences](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences
|
|
||||||
* [getAvailableClients](docs/sdks/server/README.md#getavailableclients) - Get Available Clients
|
|
||||||
* [getDevices](docs/sdks/server/README.md#getdevices) - Get Devices
|
|
||||||
* [getServerIdentity](docs/sdks/server/README.md#getserveridentity) - Get Server Identity
|
|
||||||
* [getMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account
|
|
||||||
* [getResizedPhoto](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo
|
|
||||||
* [getMediaProviders](docs/sdks/server/README.md#getmediaproviders) - Get Media Providers
|
|
||||||
* [getServerList](docs/sdks/server/README.md#getserverlist) - Get Server List
|
|
||||||
|
|
||||||
### [media](docs/sdks/media/README.md)
|
|
||||||
|
|
||||||
* [markPlayed](docs/sdks/media/README.md#markplayed) - Mark Media Played
|
|
||||||
* [markUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed
|
|
||||||
* [updatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress
|
|
||||||
* [getBannerImage](docs/sdks/media/README.md#getbannerimage) - Get Banner Image
|
|
||||||
* [getThumbImage](docs/sdks/media/README.md#getthumbimage) - Get Thumb Image
|
|
||||||
|
|
||||||
### [video](docs/sdks/video/README.md)
|
|
||||||
|
|
||||||
* [getTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item
|
|
||||||
* [startUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode
|
|
||||||
|
|
||||||
### [activities](docs/sdks/activities/README.md)
|
### [activities](docs/sdks/activities/README.md)
|
||||||
|
|
||||||
* [getServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities
|
* [getServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities
|
||||||
* [cancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities
|
* [cancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities
|
||||||
|
|
||||||
|
### [authentication](docs/sdks/authentication/README.md)
|
||||||
|
|
||||||
|
* [getTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token
|
||||||
|
* [getSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information
|
||||||
|
* [getTokenDetails](docs/sdks/authentication/README.md#gettokendetails) - Get Token Details
|
||||||
|
* [postUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata) - Get User Sign In Data
|
||||||
|
|
||||||
### [butler](docs/sdks/butler/README.md)
|
### [butler](docs/sdks/butler/README.md)
|
||||||
|
|
||||||
* [getButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks
|
* [getButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks
|
||||||
@@ -129,45 +145,34 @@ run();
|
|||||||
* [startTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task
|
* [startTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task
|
||||||
* [stopTask](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task
|
* [stopTask](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task
|
||||||
|
|
||||||
### [plex](docs/sdks/plex/README.md)
|
|
||||||
|
|
||||||
* [getCompanionsData](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data
|
|
||||||
* [getUserFriends](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in
|
|
||||||
* [getGeoData](docs/sdks/plex/README.md#getgeodata) - Get Geo Data
|
|
||||||
* [getHomeData](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data
|
|
||||||
* [getServerResources](docs/sdks/plex/README.md#getserverresources) - Get Server Resources
|
|
||||||
* [getPin](docs/sdks/plex/README.md#getpin) - Get a Pin
|
|
||||||
* [getTokenByPinId](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId
|
|
||||||
|
|
||||||
### [hubs](docs/sdks/hubs/README.md)
|
### [hubs](docs/sdks/hubs/README.md)
|
||||||
|
|
||||||
* [getGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs
|
* [getGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs
|
||||||
|
* [getRecentlyAdded](docs/sdks/hubs/README.md#getrecentlyadded) - Get Recently Added
|
||||||
* [getLibraryHubs](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs
|
* [getLibraryHubs](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs
|
||||||
|
|
||||||
### [search](docs/sdks/search/README.md)
|
|
||||||
|
|
||||||
* [performSearch](docs/sdks/search/README.md#performsearch) - Perform a search
|
|
||||||
* [performVoiceSearch](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search
|
|
||||||
* [getSearchResults](docs/sdks/search/README.md#getsearchresults) - Get Search Results
|
|
||||||
|
|
||||||
### [library](docs/sdks/library/README.md)
|
### [library](docs/sdks/library/README.md)
|
||||||
|
|
||||||
* [getFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value
|
* [getFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value
|
||||||
* [getRecentlyAdded](docs/sdks/library/README.md#getrecentlyadded) - Get Recently Added
|
* [getRecentlyAddedLibrary](docs/sdks/library/README.md#getrecentlyaddedlibrary) - Get Recently Added
|
||||||
* [getAllLibraries](docs/sdks/library/README.md#getalllibraries) - Get All Libraries
|
* [getAllLibraries](docs/sdks/library/README.md#getalllibraries) - Get All Libraries
|
||||||
* [getLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details
|
* [getLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details
|
||||||
* [deleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section
|
* [deleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section
|
||||||
* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
|
* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
|
||||||
|
* [getLibrarySectionsAll](docs/sdks/library/README.md#getlibrarysectionsall) - Get Library section media by tag ALL
|
||||||
* [getRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
|
* [getRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
|
||||||
* [getSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library
|
* [getSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library
|
||||||
* [getMetaDataByRatingKey](docs/sdks/library/README.md#getmetadatabyratingkey) - Get Metadata by RatingKey
|
* [getGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media
|
||||||
|
* [getCountriesLibrary](docs/sdks/library/README.md#getcountrieslibrary) - Get Countries of library media
|
||||||
|
* [getActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media
|
||||||
|
* [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
|
||||||
|
* [getMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata
|
||||||
|
* [getMediaArts](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork
|
||||||
|
* [postMediaArts](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork
|
||||||
|
* [getMediaPosters](docs/sdks/library/README.md#getmediaposters) - Get Media Posters
|
||||||
|
* [postMediaPoster](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster
|
||||||
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
||||||
* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
||||||
* [getOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck
|
|
||||||
|
|
||||||
### [watchlist](docs/sdks/watchlist/README.md)
|
|
||||||
|
|
||||||
* [getWatchList](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist
|
|
||||||
|
|
||||||
### [log](docs/sdks/log/README.md)
|
### [log](docs/sdks/log/README.md)
|
||||||
|
|
||||||
@@ -175,6 +180,14 @@ run();
|
|||||||
* [logMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message
|
* [logMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message
|
||||||
* [enablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail
|
* [enablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail
|
||||||
|
|
||||||
|
### [media](docs/sdks/media/README.md)
|
||||||
|
|
||||||
|
* [markPlayed](docs/sdks/media/README.md#markplayed) - Mark Media Played
|
||||||
|
* [markUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed
|
||||||
|
* [updatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress
|
||||||
|
* [getBannerImage](docs/sdks/media/README.md#getbannerimage) - Get Banner Image
|
||||||
|
* [getThumbImage](docs/sdks/media/README.md#getthumbimage) - Get Thumb Image
|
||||||
|
|
||||||
### [playlists](docs/sdks/playlists/README.md)
|
### [playlists](docs/sdks/playlists/README.md)
|
||||||
|
|
||||||
* [createPlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist
|
* [createPlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist
|
||||||
@@ -187,18 +200,34 @@ run();
|
|||||||
* [addPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist
|
* [addPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist
|
||||||
* [uploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist
|
* [uploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist
|
||||||
|
|
||||||
### [authentication](docs/sdks/authentication/README.md)
|
### [plex](docs/sdks/plex/README.md)
|
||||||
|
|
||||||
* [getTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token.
|
* [getCompanionsData](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data
|
||||||
* [getSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information
|
* [getUserFriends](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in
|
||||||
* [getUserDetails](docs/sdks/authentication/README.md#getuserdetails) - Get User Data By Token
|
* [getGeoData](docs/sdks/plex/README.md#getgeodata) - Get Geo Data
|
||||||
* [postUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata) - Get User SignIn Data
|
* [getHomeData](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data
|
||||||
|
* [getServerResources](docs/sdks/plex/README.md#getserverresources) - Get Server Resources
|
||||||
|
* [getPin](docs/sdks/plex/README.md#getpin) - Get a Pin
|
||||||
|
* [getTokenByPinId](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId
|
||||||
|
|
||||||
### [statistics](docs/sdks/statistics/README.md)
|
|
||||||
|
|
||||||
* [getStatistics](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics
|
### [search](docs/sdks/search/README.md)
|
||||||
* [getResourcesStatistics](docs/sdks/statistics/README.md#getresourcesstatistics) - Get Resources Statistics
|
|
||||||
* [getBandwidthStatistics](docs/sdks/statistics/README.md#getbandwidthstatistics) - Get Bandwidth Statistics
|
* [performSearch](docs/sdks/search/README.md#performsearch) - Perform a search
|
||||||
|
* [performVoiceSearch](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search
|
||||||
|
* [getSearchResults](docs/sdks/search/README.md#getsearchresults) - Get Search Results
|
||||||
|
|
||||||
|
### [server](docs/sdks/server/README.md)
|
||||||
|
|
||||||
|
* [getServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities
|
||||||
|
* [getServerPreferences](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences
|
||||||
|
* [getAvailableClients](docs/sdks/server/README.md#getavailableclients) - Get Available Clients
|
||||||
|
* [getDevices](docs/sdks/server/README.md#getdevices) - Get Devices
|
||||||
|
* [getServerIdentity](docs/sdks/server/README.md#getserveridentity) - Get Server Identity
|
||||||
|
* [getMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account
|
||||||
|
* [getResizedPhoto](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo
|
||||||
|
* [getMediaProviders](docs/sdks/server/README.md#getmediaproviders) - Get Media Providers
|
||||||
|
* [getServerList](docs/sdks/server/README.md#getserverlist) - Get Server List
|
||||||
|
|
||||||
### [sessions](docs/sdks/sessions/README.md)
|
### [sessions](docs/sdks/sessions/README.md)
|
||||||
|
|
||||||
@@ -207,148 +236,331 @@ run();
|
|||||||
* [getTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions
|
* [getTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions
|
||||||
* [stopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session
|
* [stopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session
|
||||||
|
|
||||||
|
### [statistics](docs/sdks/statistics/README.md)
|
||||||
|
|
||||||
|
* [getStatistics](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics
|
||||||
|
* [getResourcesStatistics](docs/sdks/statistics/README.md#getresourcesstatistics) - Get Resources Statistics
|
||||||
|
* [getBandwidthStatistics](docs/sdks/statistics/README.md#getbandwidthstatistics) - Get Bandwidth Statistics
|
||||||
|
|
||||||
### [updater](docs/sdks/updater/README.md)
|
### [updater](docs/sdks/updater/README.md)
|
||||||
|
|
||||||
* [getUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates
|
* [getUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates
|
||||||
* [checkForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates
|
* [checkForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates
|
||||||
* [applyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates
|
* [applyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates
|
||||||
|
|
||||||
|
### [users](docs/sdks/users/README.md)
|
||||||
|
|
||||||
|
* [getUsers](docs/sdks/users/README.md#getusers) - Get list of all connected users
|
||||||
|
|
||||||
|
### [video](docs/sdks/video/README.md)
|
||||||
|
|
||||||
|
* [getTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item
|
||||||
|
* [startUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode
|
||||||
|
|
||||||
|
### [watchlist](docs/sdks/watchlist/README.md)
|
||||||
|
|
||||||
|
* [getWatchList](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist
|
||||||
|
|
||||||
|
</details>
|
||||||
<!-- End Available Resources and Operations [operations] -->
|
<!-- End Available Resources and Operations [operations] -->
|
||||||
|
|
||||||
<!-- Start Error Handling [errors] -->
|
<!-- Start Error Handling [errors] -->
|
||||||
## Error Handling
|
## Error Handling
|
||||||
|
|
||||||
All SDK methods return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type.
|
This table shows properties which are common on error classes. For full details see [error classes](#error-classes).
|
||||||
|
|
||||||
| Error Object | Status Code | Content Type |
|
|
||||||
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
|
|
||||||
| models.GetServerCapabilitiesServerResponseBody | 401 | application/json |
|
|
||||||
| models.SDKError | 4xx-5xx | */* |
|
|
||||||
|
|
||||||
Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging.
|
|
||||||
|
|
||||||
|
| Property | Type | Description |
|
||||||
|
| ------------------- | ---------- | --------------------------------------------------------------------------------------- |
|
||||||
|
| `error.name` | `string` | Error class name eg `SDKError` |
|
||||||
|
| `error.message` | `string` | Error message |
|
||||||
|
| `error.statusCode` | `number` | HTTP status code eg `404` |
|
||||||
|
| `error.contentType` | `string` | HTTP content type eg `application/json` |
|
||||||
|
| `error.body` | `string` | HTTP body. Can be empty string if no body is returned. |
|
||||||
|
| `error.rawResponse` | `Response` | Raw HTTP response. Access to headers and more. |
|
||||||
|
| `error.data$` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
|
||||||
|
|
||||||
|
### Example
|
||||||
```typescript
|
```typescript
|
||||||
import { GetServerCapabilitiesServerResponseBody, PlexAPI } from "@lukehagar/plexjs";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { SDKValidationError } from "@lukehagar/plexjs/models";
|
import * as errors from "@lukehagar/plexjs/sdk/models/errors";
|
||||||
|
|
||||||
const plexAPI = new PlexAPI({
|
const plexAPI = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
let result;
|
try {
|
||||||
try {
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
result = await plexAPI.server.getServerCapabilities();
|
|
||||||
|
|
||||||
// Handle the result
|
console.log(result);
|
||||||
console.log(result);
|
} catch (error) {
|
||||||
} catch (err) {
|
// Depending on the method different errors may be thrown
|
||||||
switch (true) {
|
if (error instanceof errors.GetServerCapabilitiesBadRequest) {
|
||||||
case err instanceof SDKValidationError: {
|
console.log(error.message);
|
||||||
// Validation errors can be pretty-printed
|
console.log(error.data$.errors); // Errors[]
|
||||||
console.error(err.pretty());
|
console.log(error.data$.rawResponse); // Response
|
||||||
// Raw value may also be inspected
|
|
||||||
console.error(err.rawValue);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
case err instanceof GetServerCapabilitiesServerResponseBody: {
|
|
||||||
// Handle err.data$: GetServerCapabilitiesServerResponseBodyData
|
|
||||||
console.error(err);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fallback error class, if no other more specific error class is matched
|
||||||
|
if (error instanceof errors.SDKError) {
|
||||||
|
console.log(error.message);
|
||||||
|
console.log(error.statusCode);
|
||||||
|
console.log(error.body);
|
||||||
|
console.log(error.rawResponse.headers);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Error Classes
|
||||||
|
* `SDKError`: The fallback error class, if no other more specific error class is matched.
|
||||||
|
* `SDKValidationError`: Type mismatch between the data returned from the server and the structure expected by the SDK. This can also be thrown for invalid method arguments. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
|
||||||
|
* Network errors:
|
||||||
|
* `ConnectionError`: HTTP client was unable to make a request to a server.
|
||||||
|
* `RequestTimeoutError`: HTTP request timed out due to an AbortSignal signal.
|
||||||
|
* `RequestAbortedError`: HTTP request was aborted by the client.
|
||||||
|
* `InvalidRequestError`: Any input used to create a request is invalid.
|
||||||
|
* `UnexpectedClientError`: Unrecognised or unexpected error.
|
||||||
|
|
||||||
|
<details><summary>Less common errors, applicable to a subset of methods (156)</summary>
|
||||||
|
|
||||||
|
* [`GetServerCapabilitiesBadRequest`](docs/sdk/models/errors/getservercapabilitiesbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetServerPreferencesBadRequest`](docs/sdk/models/errors/getserverpreferencesbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetAvailableClientsBadRequest`](docs/sdk/models/errors/getavailableclientsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetDevicesBadRequest`](docs/sdk/models/errors/getdevicesbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetMyPlexAccountBadRequest`](docs/sdk/models/errors/getmyplexaccountbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetResizedPhotoBadRequest`](docs/sdk/models/errors/getresizedphotobadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetMediaProvidersBadRequest`](docs/sdk/models/errors/getmediaprovidersbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetServerListBadRequest`](docs/sdk/models/errors/getserverlistbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`MarkPlayedBadRequest`](docs/sdk/models/errors/markplayedbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`MarkUnplayedBadRequest`](docs/sdk/models/errors/markunplayedbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`UpdatePlayProgressBadRequest`](docs/sdk/models/errors/updateplayprogressbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetBannerImageBadRequest`](docs/sdk/models/errors/getbannerimagebadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetThumbImageBadRequest`](docs/sdk/models/errors/getthumbimagebadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetTimelineBadRequest`](docs/sdk/models/errors/gettimelinebadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`StartUniversalTranscodeBadRequest`](docs/sdk/models/errors/startuniversaltranscodebadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetServerActivitiesBadRequest`](docs/sdk/models/errors/getserveractivitiesbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`CancelServerActivitiesBadRequest`](docs/sdk/models/errors/cancelserveractivitiesbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetButlerTasksBadRequest`](docs/sdk/models/errors/getbutlertasksbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`StartAllTasksBadRequest`](docs/sdk/models/errors/startalltasksbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`StopAllTasksBadRequest`](docs/sdk/models/errors/stopalltasksbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`StartTaskBadRequest`](docs/sdk/models/errors/starttaskbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`StopTaskBadRequest`](docs/sdk/models/errors/stoptaskbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetCompanionsDataBadRequest`](docs/sdk/models/errors/getcompanionsdatabadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetUserFriendsBadRequest`](docs/sdk/models/errors/getuserfriendsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetGeoDataBadRequest`](docs/sdk/models/errors/getgeodatabadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetHomeDataBadRequest`](docs/sdk/models/errors/gethomedatabadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetServerResourcesBadRequest`](docs/sdk/models/errors/getserverresourcesbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetPinBadRequest`](docs/sdk/models/errors/getpinbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetTokenByPinIdBadRequest`](docs/sdk/models/errors/gettokenbypinidbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetGlobalHubsBadRequest`](docs/sdk/models/errors/getglobalhubsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetLibraryHubsBadRequest`](docs/sdk/models/errors/getlibraryhubsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`PerformSearchBadRequest`](docs/sdk/models/errors/performsearchbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`PerformVoiceSearchBadRequest`](docs/sdk/models/errors/performvoicesearchbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetSearchResultsBadRequest`](docs/sdk/models/errors/getsearchresultsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetFileHashBadRequest`](docs/sdk/models/errors/getfilehashbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetRecentlyAddedLibraryBadRequest`](docs/sdk/models/errors/getrecentlyaddedlibrarybadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetAllLibrariesBadRequest`](docs/sdk/models/errors/getalllibrariesbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetLibraryDetailsBadRequest`](docs/sdk/models/errors/getlibrarydetailsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`DeleteLibraryBadRequest`](docs/sdk/models/errors/deletelibrarybadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetLibraryItemsBadRequest`](docs/sdk/models/errors/getlibraryitemsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetLibrarySectionsAllBadRequest`](docs/sdk/models/errors/getlibrarysectionsallbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetRefreshLibraryMetadataBadRequest`](docs/sdk/models/errors/getrefreshlibrarymetadatabadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetSearchLibraryBadRequest`](docs/sdk/models/errors/getsearchlibrarybadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetGenresLibraryBadRequest`](docs/sdk/models/errors/getgenreslibrarybadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetCountriesLibraryBadRequest`](docs/sdk/models/errors/getcountrieslibrarybadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetActorsLibraryBadRequest`](docs/sdk/models/errors/getactorslibrarybadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetSearchAllLibrariesBadRequest`](docs/sdk/models/errors/getsearchalllibrariesbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetMediaMetaDataBadRequest`](docs/sdk/models/errors/getmediametadatabadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetMetadataChildrenBadRequest`](docs/sdk/models/errors/getmetadatachildrenbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetTopWatchedContentBadRequest`](docs/sdk/models/errors/gettopwatchedcontentbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetWatchListBadRequest`](docs/sdk/models/errors/getwatchlistbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`LogLineBadRequest`](docs/sdk/models/errors/loglinebadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`LogMultiLineBadRequest`](docs/sdk/models/errors/logmultilinebadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`EnablePaperTrailBadRequest`](docs/sdk/models/errors/enablepapertrailbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`CreatePlaylistBadRequest`](docs/sdk/models/errors/createplaylistbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetPlaylistsBadRequest`](docs/sdk/models/errors/getplaylistsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetPlaylistBadRequest`](docs/sdk/models/errors/getplaylistbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`DeletePlaylistBadRequest`](docs/sdk/models/errors/deleteplaylistbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`UpdatePlaylistBadRequest`](docs/sdk/models/errors/updateplaylistbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetPlaylistContentsBadRequest`](docs/sdk/models/errors/getplaylistcontentsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`ClearPlaylistContentsBadRequest`](docs/sdk/models/errors/clearplaylistcontentsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`AddPlaylistContentsBadRequest`](docs/sdk/models/errors/addplaylistcontentsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`UploadPlaylistBadRequest`](docs/sdk/models/errors/uploadplaylistbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetTransientTokenBadRequest`](docs/sdk/models/errors/gettransienttokenbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetSourceConnectionInformationBadRequest`](docs/sdk/models/errors/getsourceconnectioninformationbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetTokenDetailsBadRequest`](docs/sdk/models/errors/gettokendetailsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`PostUsersSignInDataBadRequest`](docs/sdk/models/errors/postuserssignindatabadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetStatisticsBadRequest`](docs/sdk/models/errors/getstatisticsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetResourcesStatisticsBadRequest`](docs/sdk/models/errors/getresourcesstatisticsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetBandwidthStatisticsBadRequest`](docs/sdk/models/errors/getbandwidthstatisticsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetSessionsBadRequest`](docs/sdk/models/errors/getsessionsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetSessionHistoryBadRequest`](docs/sdk/models/errors/getsessionhistorybadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetTranscodeSessionsBadRequest`](docs/sdk/models/errors/gettranscodesessionsbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`StopTranscodeSessionBadRequest`](docs/sdk/models/errors/stoptranscodesessionbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetUpdateStatusBadRequest`](docs/sdk/models/errors/getupdatestatusbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`CheckForUpdatesBadRequest`](docs/sdk/models/errors/checkforupdatesbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`ApplyUpdatesBadRequest`](docs/sdk/models/errors/applyupdatesbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetUsersBadRequest`](docs/sdk/models/errors/getusersbadrequest.md): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetServerCapabilitiesUnauthorized`](docs/sdk/models/errors/getservercapabilitiesunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetServerPreferencesUnauthorized`](docs/sdk/models/errors/getserverpreferencesunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetAvailableClientsUnauthorized`](docs/sdk/models/errors/getavailableclientsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetDevicesUnauthorized`](docs/sdk/models/errors/getdevicesunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetMyPlexAccountUnauthorized`](docs/sdk/models/errors/getmyplexaccountunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetResizedPhotoUnauthorized`](docs/sdk/models/errors/getresizedphotounauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetMediaProvidersUnauthorized`](docs/sdk/models/errors/getmediaprovidersunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetServerListUnauthorized`](docs/sdk/models/errors/getserverlistunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`MarkPlayedUnauthorized`](docs/sdk/models/errors/markplayedunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`MarkUnplayedUnauthorized`](docs/sdk/models/errors/markunplayedunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`UpdatePlayProgressUnauthorized`](docs/sdk/models/errors/updateplayprogressunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetBannerImageUnauthorized`](docs/sdk/models/errors/getbannerimageunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetThumbImageUnauthorized`](docs/sdk/models/errors/getthumbimageunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetTimelineUnauthorized`](docs/sdk/models/errors/gettimelineunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`StartUniversalTranscodeUnauthorized`](docs/sdk/models/errors/startuniversaltranscodeunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetServerActivitiesUnauthorized`](docs/sdk/models/errors/getserveractivitiesunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`CancelServerActivitiesUnauthorized`](docs/sdk/models/errors/cancelserveractivitiesunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetButlerTasksUnauthorized`](docs/sdk/models/errors/getbutlertasksunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`StartAllTasksUnauthorized`](docs/sdk/models/errors/startalltasksunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`StopAllTasksUnauthorized`](docs/sdk/models/errors/stopalltasksunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`StartTaskUnauthorized`](docs/sdk/models/errors/starttaskunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`StopTaskUnauthorized`](docs/sdk/models/errors/stoptaskunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetCompanionsDataUnauthorized`](docs/sdk/models/errors/getcompanionsdataunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetUserFriendsUnauthorized`](docs/sdk/models/errors/getuserfriendsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetGeoDataUnauthorized`](docs/sdk/models/errors/getgeodataunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetHomeDataUnauthorized`](docs/sdk/models/errors/gethomedataunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetServerResourcesUnauthorized`](docs/sdk/models/errors/getserverresourcesunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetGlobalHubsUnauthorized`](docs/sdk/models/errors/getglobalhubsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetLibraryHubsUnauthorized`](docs/sdk/models/errors/getlibraryhubsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`PerformSearchUnauthorized`](docs/sdk/models/errors/performsearchunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`PerformVoiceSearchUnauthorized`](docs/sdk/models/errors/performvoicesearchunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetSearchResultsUnauthorized`](docs/sdk/models/errors/getsearchresultsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetFileHashUnauthorized`](docs/sdk/models/errors/getfilehashunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetRecentlyAddedLibraryUnauthorized`](docs/sdk/models/errors/getrecentlyaddedlibraryunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetAllLibrariesUnauthorized`](docs/sdk/models/errors/getalllibrariesunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetLibraryDetailsUnauthorized`](docs/sdk/models/errors/getlibrarydetailsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`DeleteLibraryUnauthorized`](docs/sdk/models/errors/deletelibraryunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetLibraryItemsUnauthorized`](docs/sdk/models/errors/getlibraryitemsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetLibrarySectionsAllUnauthorized`](docs/sdk/models/errors/getlibrarysectionsallunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetRefreshLibraryMetadataUnauthorized`](docs/sdk/models/errors/getrefreshlibrarymetadataunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetSearchLibraryUnauthorized`](docs/sdk/models/errors/getsearchlibraryunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetGenresLibraryUnauthorized`](docs/sdk/models/errors/getgenreslibraryunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetCountriesLibraryUnauthorized`](docs/sdk/models/errors/getcountrieslibraryunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetActorsLibraryUnauthorized`](docs/sdk/models/errors/getactorslibraryunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetSearchAllLibrariesUnauthorized`](docs/sdk/models/errors/getsearchalllibrariesunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetMediaMetaDataUnauthorized`](docs/sdk/models/errors/getmediametadataunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetMetadataChildrenUnauthorized`](docs/sdk/models/errors/getmetadatachildrenunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetTopWatchedContentUnauthorized`](docs/sdk/models/errors/gettopwatchedcontentunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetWatchListUnauthorized`](docs/sdk/models/errors/getwatchlistunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`LogLineUnauthorized`](docs/sdk/models/errors/loglineunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`LogMultiLineUnauthorized`](docs/sdk/models/errors/logmultilineunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`EnablePaperTrailUnauthorized`](docs/sdk/models/errors/enablepapertrailunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`CreatePlaylistUnauthorized`](docs/sdk/models/errors/createplaylistunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetPlaylistsUnauthorized`](docs/sdk/models/errors/getplaylistsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetPlaylistUnauthorized`](docs/sdk/models/errors/getplaylistunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`DeletePlaylistUnauthorized`](docs/sdk/models/errors/deleteplaylistunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`UpdatePlaylistUnauthorized`](docs/sdk/models/errors/updateplaylistunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetPlaylistContentsUnauthorized`](docs/sdk/models/errors/getplaylistcontentsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`ClearPlaylistContentsUnauthorized`](docs/sdk/models/errors/clearplaylistcontentsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`AddPlaylistContentsUnauthorized`](docs/sdk/models/errors/addplaylistcontentsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`UploadPlaylistUnauthorized`](docs/sdk/models/errors/uploadplaylistunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetTransientTokenUnauthorized`](docs/sdk/models/errors/gettransienttokenunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetSourceConnectionInformationUnauthorized`](docs/sdk/models/errors/getsourceconnectioninformationunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetTokenDetailsUnauthorized`](docs/sdk/models/errors/gettokendetailsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`PostUsersSignInDataUnauthorized`](docs/sdk/models/errors/postuserssignindataunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetStatisticsUnauthorized`](docs/sdk/models/errors/getstatisticsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetResourcesStatisticsUnauthorized`](docs/sdk/models/errors/getresourcesstatisticsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetBandwidthStatisticsUnauthorized`](docs/sdk/models/errors/getbandwidthstatisticsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetSessionsUnauthorized`](docs/sdk/models/errors/getsessionsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetSessionHistoryUnauthorized`](docs/sdk/models/errors/getsessionhistoryunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetTranscodeSessionsUnauthorized`](docs/sdk/models/errors/gettranscodesessionsunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`StopTranscodeSessionUnauthorized`](docs/sdk/models/errors/stoptranscodesessionunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetUpdateStatusUnauthorized`](docs/sdk/models/errors/getupdatestatusunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`CheckForUpdatesUnauthorized`](docs/sdk/models/errors/checkforupdatesunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`ApplyUpdatesUnauthorized`](docs/sdk/models/errors/applyupdatesunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetUsersUnauthorized`](docs/sdk/models/errors/getusersunauthorized.md): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetTokenByPinIdResponseBody`](docs/sdk/models/errors/gettokenbypinidresponsebody.md): Not Found or Expired. Status code `404`. Applicable to 1 of 84 methods.*
|
||||||
|
* [`GetServerIdentityRequestTimeout`](docs/sdk/models/errors/getserveridentityrequesttimeout.md): Request Timeout. Status code `408`. Applicable to 1 of 84 methods.*
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
|
||||||
<!-- End Error Handling [errors] -->
|
<!-- End Error Handling [errors] -->
|
||||||
|
|
||||||
<!-- Start Server Selection [server] -->
|
<!-- Start Server Selection [server] -->
|
||||||
## Server Selection
|
## Server Selection
|
||||||
|
|
||||||
### Select Server by Index
|
### Server Variables
|
||||||
|
|
||||||
You can override the default server globally by passing a server index to the `serverIdx` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
|
The default server `{protocol}://{ip}:{port}` contains variables and is set to `https://10.10.10.47:32400` by default. To override default values, the following parameters are available when initializing the SDK client instance:
|
||||||
|
|
||||||
| # | Server | Variables |
|
| Variable | Parameter | Supported Values | Default | Description |
|
||||||
| - | ------ | --------- |
|
| ---------- | --------------------------------- | -------------------------- | --------------- | ---------------------------------------------- |
|
||||||
| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `https`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) |
|
| `protocol` | `protocol: models.ServerProtocol` | - `"http"`<br/>- `"https"` | `"https"` | The protocol to use for the server connection |
|
||||||
|
| `ip` | `ip: string` | string | `"10.10.10.47"` | The IP address or hostname of your Plex Server |
|
||||||
|
| `port` | `port: string` | string | `"32400"` | The port of your Plex Server |
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { PlexAPI } from "@lukehagar/plexjs";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
const plexAPI = new PlexAPI({
|
const plexAPI = new PlexAPI({
|
||||||
serverIdx: 0,
|
protocol: "https",
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
ip: "4982:bc2a:b4f8:efb5:2394:5bc3:ab4f:0e6d",
|
||||||
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40",
|
port: "44765",
|
||||||
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.server.getServerCapabilities();
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
|
|
||||||
// Handle the result
|
console.log(result);
|
||||||
console.log(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Variables
|
|
||||||
|
|
||||||
Some of the server options above contain variables. If you want to set the values of those variables, the following optional parameters are available when initializing the SDK client instance:
|
|
||||||
* `protocol: models.ServerProtocol`
|
|
||||||
* `ip: string`
|
|
||||||
* `port: string`
|
|
||||||
|
|
||||||
### Override Server URL Per-Client
|
### Override Server URL Per-Client
|
||||||
|
|
||||||
The default server can also be overridden globally by passing a URL to the `serverURL` optional parameter when initializing the SDK client instance. For example:
|
The default server can be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { PlexAPI } from "@lukehagar/plexjs";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
const plexAPI = new PlexAPI({
|
const plexAPI = new PlexAPI({
|
||||||
serverURL: "{protocol}://{ip}:{port}",
|
serverURL: "https://10.10.10.47:32400",
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.server.getServerCapabilities();
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
|
|
||||||
// Handle the result
|
console.log(result);
|
||||||
console.log(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Override Server URL Per-Operation
|
### Override Server URL Per-Operation
|
||||||
|
|
||||||
The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:
|
The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { PlexAPI } from "@lukehagar/plexjs";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
const plexAPI = new PlexAPI({
|
const plexAPI = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.plex.getCompanionsData({
|
const result = await plexAPI.plex.getCompanionsData({
|
||||||
serverURL: "https://plex.tv/api/v2",
|
serverURL: "https://plex.tv/api/v2",
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle the result
|
console.log(result);
|
||||||
console.log(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -412,24 +624,22 @@ const sdk = new PlexAPI({ httpClient });
|
|||||||
|
|
||||||
This SDK supports the following security scheme globally:
|
This SDK supports the following security scheme globally:
|
||||||
|
|
||||||
| Name | Type | Scheme |
|
| Name | Type | Scheme |
|
||||||
| ------------- | ------------- | ------------- |
|
| ------------- | ------ | ------- |
|
||||||
| `accessToken` | apiKey | API key |
|
| `accessToken` | apiKey | API key |
|
||||||
|
|
||||||
To authenticate with the API the `accessToken` parameter must be set when initializing the SDK client instance. For example:
|
To authenticate with the API the `accessToken` parameter must be set when initializing the SDK client instance. For example:
|
||||||
```typescript
|
```typescript
|
||||||
import { PlexAPI } from "@lukehagar/plexjs";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
const plexAPI = new PlexAPI({
|
const plexAPI = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.server.getServerCapabilities();
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
|
|
||||||
// Handle the result
|
console.log(result);
|
||||||
console.log(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -458,131 +668,128 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|||||||
|
|
||||||
<summary>Available standalone functions</summary>
|
<summary>Available standalone functions</summary>
|
||||||
|
|
||||||
- [activitiesCancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities)
|
- [`activitiesCancelServerActivities`](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities
|
||||||
- [activitiesGetServerActivities](docs/sdks/activities/README.md#getserveractivities)
|
- [`activitiesGetServerActivities`](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities
|
||||||
- [authenticationGetSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation)
|
- [`authenticationGetSourceConnectionInformation`](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information
|
||||||
- [authenticationGetTransientToken](docs/sdks/authentication/README.md#gettransienttoken)
|
- [`authenticationGetTokenDetails`](docs/sdks/authentication/README.md#gettokendetails) - Get Token Details
|
||||||
- [authenticationGetUserDetails](docs/sdks/authentication/README.md#getuserdetails)
|
- [`authenticationGetTransientToken`](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token
|
||||||
- [authenticationPostUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata)
|
- [`authenticationPostUsersSignInData`](docs/sdks/authentication/README.md#postuserssignindata) - Get User Sign In Data
|
||||||
- [butlerGetButlerTasks](docs/sdks/butler/README.md#getbutlertasks)
|
- [`butlerGetButlerTasks`](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks
|
||||||
- [butlerStartAllTasks](docs/sdks/butler/README.md#startalltasks)
|
- [`butlerStartAllTasks`](docs/sdks/butler/README.md#startalltasks) - Start all Butler tasks
|
||||||
- [butlerStartTask](docs/sdks/butler/README.md#starttask)
|
- [`butlerStartTask`](docs/sdks/butler/README.md#starttask) - Start a single Butler task
|
||||||
- [butlerStopAllTasks](docs/sdks/butler/README.md#stopalltasks)
|
- [`butlerStopAllTasks`](docs/sdks/butler/README.md#stopalltasks) - Stop all Butler tasks
|
||||||
- [butlerStopTask](docs/sdks/butler/README.md#stoptask)
|
- [`butlerStopTask`](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task
|
||||||
- [hubsGetGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs)
|
- [`hubsGetGlobalHubs`](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs
|
||||||
- [hubsGetLibraryHubs](docs/sdks/hubs/README.md#getlibraryhubs)
|
- [`hubsGetLibraryHubs`](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs
|
||||||
- [libraryDeleteLibrary](docs/sdks/library/README.md#deletelibrary)
|
- [`hubsGetRecentlyAdded`](docs/sdks/hubs/README.md#getrecentlyadded) - Get Recently Added
|
||||||
- [libraryGetAllLibraries](docs/sdks/library/README.md#getalllibraries)
|
- [`libraryDeleteLibrary`](docs/sdks/library/README.md#deletelibrary) - Delete Library Section
|
||||||
- [libraryGetFileHash](docs/sdks/library/README.md#getfilehash)
|
- [`libraryGetActorsLibrary`](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media
|
||||||
- [libraryGetLibraryDetails](docs/sdks/library/README.md#getlibrarydetails)
|
- [`libraryGetAllLibraries`](docs/sdks/library/README.md#getalllibraries) - Get All Libraries
|
||||||
- [libraryGetLibraryItems](docs/sdks/library/README.md#getlibraryitems)
|
- [`libraryGetCountriesLibrary`](docs/sdks/library/README.md#getcountrieslibrary) - Get Countries of library media
|
||||||
- [libraryGetMetaDataByRatingKey](docs/sdks/library/README.md#getmetadatabyratingkey)
|
- [`libraryGetFileHash`](docs/sdks/library/README.md#getfilehash) - Get Hash Value
|
||||||
- [libraryGetMetadataChildren](docs/sdks/library/README.md#getmetadatachildren)
|
- [`libraryGetGenresLibrary`](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media
|
||||||
- [libraryGetOnDeck](docs/sdks/library/README.md#getondeck)
|
- [`libraryGetLibraryDetails`](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details
|
||||||
- [libraryGetRecentlyAdded](docs/sdks/library/README.md#getrecentlyadded)
|
- [`libraryGetLibraryItems`](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
|
||||||
- [libraryGetRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata)
|
- [`libraryGetLibrarySectionsAll`](docs/sdks/library/README.md#getlibrarysectionsall) - Get Library section media by tag ALL
|
||||||
- [libraryGetSearchLibrary](docs/sdks/library/README.md#getsearchlibrary)
|
- [`libraryGetMediaArts`](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork
|
||||||
- [libraryGetTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent)
|
- [`libraryGetMediaMetaData`](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata
|
||||||
- [logEnablePaperTrail](docs/sdks/log/README.md#enablepapertrail)
|
- [`libraryGetMediaPosters`](docs/sdks/library/README.md#getmediaposters) - Get Media Posters
|
||||||
- [logLogLine](docs/sdks/log/README.md#logline)
|
- [`libraryGetMetadataChildren`](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
||||||
- [logLogMultiLine](docs/sdks/log/README.md#logmultiline)
|
- [`libraryGetRecentlyAddedLibrary`](docs/sdks/library/README.md#getrecentlyaddedlibrary) - Get Recently Added
|
||||||
- [mediaGetBannerImage](docs/sdks/media/README.md#getbannerimage)
|
- [`libraryGetRefreshLibraryMetadata`](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
|
||||||
- [mediaGetThumbImage](docs/sdks/media/README.md#getthumbimage)
|
- [`libraryGetSearchAllLibraries`](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
|
||||||
- [mediaMarkPlayed](docs/sdks/media/README.md#markplayed)
|
- [`libraryGetSearchLibrary`](docs/sdks/library/README.md#getsearchlibrary) - Search Library
|
||||||
- [mediaMarkUnplayed](docs/sdks/media/README.md#markunplayed)
|
- [`libraryGetTopWatchedContent`](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
||||||
- [mediaUpdatePlayProgress](docs/sdks/media/README.md#updateplayprogress)
|
- [`libraryPostMediaArts`](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork
|
||||||
- [playlistsAddPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents)
|
- [`libraryPostMediaPoster`](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster
|
||||||
- [playlistsClearPlaylistContents](docs/sdks/playlists/README.md#clearplaylistcontents)
|
- [`logEnablePaperTrail`](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail
|
||||||
- [playlistsCreatePlaylist](docs/sdks/playlists/README.md#createplaylist)
|
- [`logLogLine`](docs/sdks/log/README.md#logline) - Logging a single line message.
|
||||||
- [playlistsDeletePlaylist](docs/sdks/playlists/README.md#deleteplaylist)
|
- [`logLogMultiLine`](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message
|
||||||
- [playlistsGetPlaylistContents](docs/sdks/playlists/README.md#getplaylistcontents)
|
- [`mediaGetBannerImage`](docs/sdks/media/README.md#getbannerimage) - Get Banner Image
|
||||||
- [playlistsGetPlaylist](docs/sdks/playlists/README.md#getplaylist)
|
- [`mediaGetThumbImage`](docs/sdks/media/README.md#getthumbimage) - Get Thumb Image
|
||||||
- [playlistsGetPlaylists](docs/sdks/playlists/README.md#getplaylists)
|
- [`mediaMarkPlayed`](docs/sdks/media/README.md#markplayed) - Mark Media Played
|
||||||
- [playlistsUpdatePlaylist](docs/sdks/playlists/README.md#updateplaylist)
|
- [`mediaMarkUnplayed`](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed
|
||||||
- [playlistsUploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist)
|
- [`mediaUpdatePlayProgress`](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress
|
||||||
- [plexGetCompanionsData](docs/sdks/plex/README.md#getcompanionsdata)
|
- [`playlistsAddPlaylistContents`](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist
|
||||||
- [plexGetGeoData](docs/sdks/plex/README.md#getgeodata)
|
- [`playlistsClearPlaylistContents`](docs/sdks/playlists/README.md#clearplaylistcontents) - Delete Playlist Contents
|
||||||
- [plexGetHomeData](docs/sdks/plex/README.md#gethomedata)
|
- [`playlistsCreatePlaylist`](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist
|
||||||
- [plexGetPin](docs/sdks/plex/README.md#getpin)
|
- [`playlistsDeletePlaylist`](docs/sdks/playlists/README.md#deleteplaylist) - Deletes a Playlist
|
||||||
- [plexGetServerResources](docs/sdks/plex/README.md#getserverresources)
|
- [`playlistsGetPlaylist`](docs/sdks/playlists/README.md#getplaylist) - Retrieve Playlist
|
||||||
- [plexGetTokenByPinId](docs/sdks/plex/README.md#gettokenbypinid)
|
- [`playlistsGetPlaylistContents`](docs/sdks/playlists/README.md#getplaylistcontents) - Retrieve Playlist Contents
|
||||||
- [plexGetUserFriends](docs/sdks/plex/README.md#getuserfriends)
|
- [`playlistsGetPlaylists`](docs/sdks/playlists/README.md#getplaylists) - Get All Playlists
|
||||||
- [searchGetSearchResults](docs/sdks/search/README.md#getsearchresults)
|
- [`playlistsUpdatePlaylist`](docs/sdks/playlists/README.md#updateplaylist) - Update a Playlist
|
||||||
- [searchPerformSearch](docs/sdks/search/README.md#performsearch)
|
- [`playlistsUploadPlaylist`](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist
|
||||||
- [searchPerformVoiceSearch](docs/sdks/search/README.md#performvoicesearch)
|
- [`plexGetCompanionsData`](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data
|
||||||
- [serverGetAvailableClients](docs/sdks/server/README.md#getavailableclients)
|
- [`plexGetGeoData`](docs/sdks/plex/README.md#getgeodata) - Get Geo Data
|
||||||
- [serverGetDevices](docs/sdks/server/README.md#getdevices)
|
- [`plexGetHomeData`](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data
|
||||||
- [serverGetMediaProviders](docs/sdks/server/README.md#getmediaproviders)
|
- [`plexGetPin`](docs/sdks/plex/README.md#getpin) - Get a Pin
|
||||||
- [serverGetMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount)
|
- [`plexGetServerResources`](docs/sdks/plex/README.md#getserverresources) - Get Server Resources
|
||||||
- [serverGetResizedPhoto](docs/sdks/server/README.md#getresizedphoto)
|
- [`plexGetTokenByPinId`](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId
|
||||||
- [serverGetServerCapabilities](docs/sdks/server/README.md#getservercapabilities)
|
- [`plexGetUserFriends`](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in
|
||||||
- [serverGetServerIdentity](docs/sdks/server/README.md#getserveridentity)
|
- [`searchGetSearchResults`](docs/sdks/search/README.md#getsearchresults) - Get Search Results
|
||||||
- [serverGetServerList](docs/sdks/server/README.md#getserverlist)
|
- [`searchPerformSearch`](docs/sdks/search/README.md#performsearch) - Perform a search
|
||||||
- [serverGetServerPreferences](docs/sdks/server/README.md#getserverpreferences)
|
- [`searchPerformVoiceSearch`](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search
|
||||||
- [sessionsGetSessionHistory](docs/sdks/sessions/README.md#getsessionhistory)
|
- [`serverGetAvailableClients`](docs/sdks/server/README.md#getavailableclients) - Get Available Clients
|
||||||
- [sessionsGetSessions](docs/sdks/sessions/README.md#getsessions)
|
- [`serverGetDevices`](docs/sdks/server/README.md#getdevices) - Get Devices
|
||||||
- [sessionsGetTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions)
|
- [`serverGetMediaProviders`](docs/sdks/server/README.md#getmediaproviders) - Get Media Providers
|
||||||
- [sessionsStopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession)
|
- [`serverGetMyPlexAccount`](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account
|
||||||
- [statisticsGetBandwidthStatistics](docs/sdks/statistics/README.md#getbandwidthstatistics)
|
- [`serverGetResizedPhoto`](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo
|
||||||
- [statisticsGetResourcesStatistics](docs/sdks/statistics/README.md#getresourcesstatistics)
|
- [`serverGetServerCapabilities`](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities
|
||||||
- [statisticsGetStatistics](docs/sdks/statistics/README.md#getstatistics)
|
- [`serverGetServerIdentity`](docs/sdks/server/README.md#getserveridentity) - Get Server Identity
|
||||||
- [updaterApplyUpdates](docs/sdks/updater/README.md#applyupdates)
|
- [`serverGetServerList`](docs/sdks/server/README.md#getserverlist) - Get Server List
|
||||||
- [updaterCheckForUpdates](docs/sdks/updater/README.md#checkforupdates)
|
- [`serverGetServerPreferences`](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences
|
||||||
- [updaterGetUpdateStatus](docs/sdks/updater/README.md#getupdatestatus)
|
- [`sessionsGetSessionHistory`](docs/sdks/sessions/README.md#getsessionhistory) - Get Session History
|
||||||
- [videoGetTimeline](docs/sdks/video/README.md#gettimeline)
|
- [`sessionsGetSessions`](docs/sdks/sessions/README.md#getsessions) - Get Active Sessions
|
||||||
- [videoStartUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode)
|
- [`sessionsGetTranscodeSessions`](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions
|
||||||
- [watchlistGetWatchList](docs/sdks/watchlist/README.md#getwatchlist)
|
- [`sessionsStopTranscodeSession`](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session
|
||||||
|
- [`statisticsGetBandwidthStatistics`](docs/sdks/statistics/README.md#getbandwidthstatistics) - Get Bandwidth Statistics
|
||||||
|
- [`statisticsGetResourcesStatistics`](docs/sdks/statistics/README.md#getresourcesstatistics) - Get Resources Statistics
|
||||||
|
- [`statisticsGetStatistics`](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics
|
||||||
|
- [`updaterApplyUpdates`](docs/sdks/updater/README.md#applyupdates) - Apply Updates
|
||||||
|
- [`updaterCheckForUpdates`](docs/sdks/updater/README.md#checkforupdates) - Checking for updates
|
||||||
|
- [`updaterGetUpdateStatus`](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates
|
||||||
|
- [`usersGetUsers`](docs/sdks/users/README.md#getusers) - Get list of all connected users
|
||||||
|
- [`videoGetTimeline`](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item
|
||||||
|
- [`videoStartUniversalTranscode`](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode
|
||||||
|
- [`watchlistGetWatchList`](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
<!-- End Standalone functions [standalone-funcs] -->
|
<!-- End Standalone functions [standalone-funcs] -->
|
||||||
|
|
||||||
<!-- Start Global Parameters [global-parameters] -->
|
<!-- Start File uploads [file-upload] -->
|
||||||
## Global Parameters
|
## File uploads
|
||||||
|
|
||||||
A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
|
Certain SDK methods accept files as part of a multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
|
||||||
|
|
||||||
For example, you can set `X-Plex-Client-Identifier` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getServerResources`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
|
> [!TIP]
|
||||||
|
>
|
||||||
|
> Depending on your JavaScript runtime, there are convenient utilities that return a handle to a file without reading the entire contents into memory:
|
||||||
### Available Globals
|
>
|
||||||
|
> - **Node.js v20+:** Since v20, Node.js comes with a native `openAsBlob` function in [`node:fs`](https://nodejs.org/docs/latest-v20.x/api/fs.html#fsopenasblobpath-options).
|
||||||
The following global parameter is available.
|
> - **Bun:** The native [`Bun.file`](https://bun.sh/docs/api/file-io#reading-files-bun-file) function produces a file handle that can be used for streaming file uploads.
|
||||||
|
> - **Browsers:** All supported browsers return an instance to a [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) when reading the value from an `<input type="file">` element.
|
||||||
| Name | Type | Required | Description |
|
> - **Node.js v18:** A file stream can be created using the `fileFrom` helper from [`fetch-blob/from.js`](https://www.npmjs.com/package/fetch-blob).
|
||||||
| ---- | ---- |:--------:| ----------- |
|
|
||||||
| xPlexClientIdentifier | string | | The unique identifier for the client application
|
|
||||||
This is used to track the client application and its usage
|
|
||||||
(UUID, serial number, or other number unique per device)
|
|
||||||
|
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { IncludeHttps, IncludeIPv6, IncludeRelay, PlexAPI } from "@lukehagar/plexjs";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
const plexAPI = new PlexAPI({
|
const plexAPI = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.plex.getServerResources({
|
const result = await plexAPI.library.postMediaArts(
|
||||||
xPlexToken: "CV5xoxjTpFKUzBTShsaf",
|
2268,
|
||||||
includeHttps: IncludeHttps.One,
|
"https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b",
|
||||||
includeRelay: IncludeRelay.One,
|
);
|
||||||
includeIPv6: IncludeIPv6.One,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Handle the result
|
console.log(result);
|
||||||
console.log(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|
||||||
```
|
```
|
||||||
<!-- End Global Parameters [global-parameters] -->
|
<!-- End File uploads [file-upload] -->
|
||||||
|
|
||||||
<!-- Start Retries [retries] -->
|
<!-- Start Retries [retries] -->
|
||||||
## Retries
|
## Retries
|
||||||
@@ -594,26 +801,24 @@ To change the default retry strategy for a single API call, simply provide a ret
|
|||||||
import { PlexAPI } from "@lukehagar/plexjs";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
const plexAPI = new PlexAPI({
|
const plexAPI = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.server.getServerCapabilities({
|
const result = await plexAPI.server.getServerCapabilities({
|
||||||
retries: {
|
retries: {
|
||||||
strategy: "backoff",
|
strategy: "backoff",
|
||||||
backoff: {
|
backoff: {
|
||||||
initialInterval: 1,
|
initialInterval: 1,
|
||||||
maxInterval: 50,
|
maxInterval: 50,
|
||||||
exponent: 1.1,
|
exponent: 1.1,
|
||||||
maxElapsedTime: 100,
|
maxElapsedTime: 100,
|
||||||
},
|
},
|
||||||
retryConnectionErrors: false,
|
retryConnectionErrors: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle the result
|
console.log(result);
|
||||||
console.log(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -625,25 +830,23 @@ If you'd like to override the default retry strategy for all operations that sup
|
|||||||
import { PlexAPI } from "@lukehagar/plexjs";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
const plexAPI = new PlexAPI({
|
const plexAPI = new PlexAPI({
|
||||||
retryConfig: {
|
retryConfig: {
|
||||||
strategy: "backoff",
|
strategy: "backoff",
|
||||||
backoff: {
|
backoff: {
|
||||||
initialInterval: 1,
|
initialInterval: 1,
|
||||||
maxInterval: 50,
|
maxInterval: 50,
|
||||||
exponent: 1.1,
|
exponent: 1.1,
|
||||||
maxElapsedTime: 100,
|
maxElapsedTime: 100,
|
||||||
},
|
|
||||||
retryConnectionErrors: false,
|
|
||||||
},
|
},
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
retryConnectionErrors: false,
|
||||||
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40",
|
},
|
||||||
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.server.getServerCapabilities();
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
|
|
||||||
// Handle the result
|
console.log(result);
|
||||||
console.log(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
400
RELEASES.md
400
RELEASES.md
@@ -949,3 +949,403 @@ Based on:
|
|||||||
- [typescript v0.20.0] .
|
- [typescript v0.20.0] .
|
||||||
### Releases
|
### Releases
|
||||||
- [NPM v0.20.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.20.0 - .
|
- [NPM v0.20.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.20.0 - .
|
||||||
|
|
||||||
|
## 2024-09-08 03:21:12
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.392.1 (2.411.9) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.20.2] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.20.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.20.2 - .
|
||||||
|
|
||||||
|
## 2024-09-08 17:37:50
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.392.1 (2.411.9) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.21.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.21.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.21.0 - .
|
||||||
|
|
||||||
|
## 2024-09-09 00:09:42
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.392.1 (2.411.9) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.21.1] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.21.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.21.1 - .
|
||||||
|
|
||||||
|
## 2024-09-10 00:09:01
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.394.0 (2.413.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.22.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.22.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.22.0 - .
|
||||||
|
|
||||||
|
## 2024-09-11 00:09:01
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.395.1 (2.415.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.22.1] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.22.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.22.1 - .
|
||||||
|
|
||||||
|
## 2024-09-12 00:09:10
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.396.2 (2.415.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.22.2] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.22.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.22.2 - .
|
||||||
|
|
||||||
|
## 2024-09-13 00:09:09
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.396.6 (2.415.6) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.23.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.23.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.23.0 - .
|
||||||
|
|
||||||
|
## 2024-09-14 00:08:56
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.396.9 (2.415.7) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.23.1] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.23.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.23.1 - .
|
||||||
|
|
||||||
|
## 2024-09-15 00:10:25
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.396.9 (2.415.7) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.23.2] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.23.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.23.2 - .
|
||||||
|
|
||||||
|
## 2024-09-16 00:09:42
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.396.9 (2.415.7) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.23.3] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.23.3] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.23.3 - .
|
||||||
|
|
||||||
|
## 2024-09-16 17:59:12
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.397.2 (2.415.8) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.23.4] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.23.4] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.23.4 - .
|
||||||
|
|
||||||
|
## 2024-09-17 00:08:25
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.398.0 (2.415.8) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.23.5] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.23.5] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.23.5 - .
|
||||||
|
|
||||||
|
## 2024-10-01 00:10:47
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.24.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.24.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.24.0 - .
|
||||||
|
|
||||||
|
## 2024-10-01 15:35:33
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.24.1] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.24.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.24.1 - .
|
||||||
|
|
||||||
|
## 2024-10-02 02:28:25
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.24.2] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.24.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.24.2 - .
|
||||||
|
|
||||||
|
## 2024-10-03 00:09:30
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.406.0 (2.429.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.25.1] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.25.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.25.1 - .
|
||||||
|
|
||||||
|
## 2024-10-03 12:26:50
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.406.0 (2.429.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.26.1] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.26.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.26.1 - .
|
||||||
|
|
||||||
|
## 2024-11-11 20:28:21
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.28.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.28.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.28.0 - .
|
||||||
|
|
||||||
|
## 2024-11-14 00:09:39
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.30.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.30.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.30.0 - .
|
||||||
|
|
||||||
|
## 2024-12-16 22:17:52
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.31.1] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.31.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.31.1 - .
|
||||||
|
|
||||||
|
## 2024-12-20 16:01:16
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.456.1 (2.481.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.32.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.32.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.32.0 - .
|
||||||
|
|
||||||
|
## 2024-12-22 00:10:48
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.459.2 (2.483.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.32.1] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.32.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.32.1 - .
|
||||||
|
|
||||||
|
## 2025-01-24 00:09:35
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.474.0 (2.495.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.32.2] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.32.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.32.2 - .
|
||||||
|
|
||||||
|
## 2025-01-27 00:09:48
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.476.1 (2.495.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.32.3] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.32.3] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.32.3 - .
|
||||||
|
|
||||||
|
## 2025-02-05 00:09:58
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.484.1 (2.503.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.32.4] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.32.4] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.32.4 - .
|
||||||
|
|
||||||
|
## 2025-02-06 00:09:46
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.484.1 (2.503.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.32.5] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.32.5] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.32.5 - .
|
||||||
|
|
||||||
|
## 2025-02-07 00:09:41
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.487.0 (2.506.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.33.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.33.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.33.0 - .
|
||||||
|
|
||||||
|
## 2025-02-10 00:10:04
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.487.1 (2.506.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.34.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.34.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.34.0 - .
|
||||||
|
|
||||||
|
## 2025-03-07 00:09:55
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.513.2 (2.545.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.35.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.35.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.35.0 - .
|
||||||
|
|
||||||
|
## 2025-03-09 00:09:12
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.513.4 (2.545.4) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.35.1] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.35.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.35.1 - .
|
||||||
|
|
||||||
|
## 2025-03-31 16:31:46
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.526.6 (2.563.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.35.2] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.35.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.35.2 - .
|
||||||
|
|
||||||
|
## 2025-03-31 19:33:46
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.526.6 (2.563.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.35.3] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.35.3] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.35.3 - .
|
||||||
|
|
||||||
|
## 2025-03-31 19:42:25
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.526.6 (2.563.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.35.4] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.35.4] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.35.4 - .
|
||||||
|
|
||||||
|
## 2025-04-03 00:10:29
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.528.1 (2.565.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.36.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.36.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.36.0 - .
|
||||||
|
|
||||||
|
## 2025-04-06 00:11:19
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.529.1 (2.566.5) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.36.1] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.36.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.36.1 - .
|
||||||
|
|
||||||
|
## 2025-04-14 00:11:23
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.531.4 (2.570.4) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.36.2] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.36.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.36.2 - .
|
||||||
|
|
||||||
|
## 2025-04-19 00:10:19
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.535.1 (2.585.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.37.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.37.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.37.0 - .
|
||||||
|
|
||||||
|
## 2025-05-01 00:12:16
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.541.2 (2.595.4) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.37.1] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.37.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.37.1 - .
|
||||||
|
|
||||||
|
## 2025-05-05 00:11:37
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.542.1 (2.597.9) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.37.2] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.37.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.37.2 - .
|
||||||
|
|
||||||
|
## 2025-06-04 00:11:21
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.555.2 (2.620.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.38.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.38.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.38.0 - .
|
||||||
28
RUNTIMES.md
28
RUNTIMES.md
@@ -1,6 +1,6 @@
|
|||||||
# Supported JavaScript runtimes
|
# Supported JavaScript runtimes
|
||||||
|
|
||||||
This SDK is intended to be used in JavaScript runtimes that support the following features:
|
This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:
|
||||||
|
|
||||||
* [Web Fetch API][web-fetch]
|
* [Web Fetch API][web-fetch]
|
||||||
* [Web Streams API][web-streams] and in particular `ReadableStream`
|
* [Web Streams API][web-streams] and in particular `ReadableStream`
|
||||||
@@ -20,3 +20,29 @@ Runtime environments that are explicitly supported are:
|
|||||||
- Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
|
- Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
|
||||||
|
|
||||||
[deno-file-streaming]: https://github.com/denoland/deno/issues/11018
|
[deno-file-streaming]: https://github.com/denoland/deno/issues/11018
|
||||||
|
|
||||||
|
## Recommended TypeScript compiler options
|
||||||
|
|
||||||
|
The following `tsconfig.json` options are recommended for projects using this
|
||||||
|
SDK in order to get static type support for features like async iterables,
|
||||||
|
streams and `fetch`-related APIs ([`for await...of`][for-await-of],
|
||||||
|
[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
|
||||||
|
so on):
|
||||||
|
|
||||||
|
[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
|
||||||
|
[abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
||||||
|
[request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
|
||||||
|
[response]: https://developer.mozilla.org/en-US/docs/Web/API/Response
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es2020", // or higher
|
||||||
|
"lib": ["es2020", "dom", "dom.iterable"],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
While `target` can be set to older ECMAScript versions, it may result in extra,
|
||||||
|
unnecessary compatibility code being generated if you are not targeting old
|
||||||
|
runtimes.
|
||||||
8
USAGE.md
8
USAGE.md
@@ -3,15 +3,13 @@
|
|||||||
import { PlexAPI } from "@lukehagar/plexjs";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
const plexAPI = new PlexAPI({
|
const plexAPI = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const result = await plexAPI.server.getServerCapabilities();
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
|
|
||||||
// Handle the result
|
console.log(result);
|
||||||
console.log(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
2163
codeSamples.yaml
2163
codeSamples.yaml
File diff suppressed because it is too large
Load Diff
@@ -1,22 +0,0 @@
|
|||||||
# Activity
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { Activity } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: Activity = {};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
||||||
| `uuid` | *string* | :heavy_minus_sign: | N/A |
|
|
||||||
| `type` | *string* | :heavy_minus_sign: | N/A |
|
|
||||||
| `cancellable` | *boolean* | :heavy_minus_sign: | N/A |
|
|
||||||
| `userID` | *number* | :heavy_minus_sign: | N/A |
|
|
||||||
| `title` | *string* | :heavy_minus_sign: | N/A |
|
|
||||||
| `subtitle` | *string* | :heavy_minus_sign: | N/A |
|
|
||||||
| `progress` | *number* | :heavy_minus_sign: | N/A |
|
|
||||||
| `context` | [models.Context](../models/context.md) | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
# AddPlaylistContentsMediaContainer
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { AddPlaylistContentsMediaContainer } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: AddPlaylistContentsMediaContainer = {
|
|
||||||
size: 1,
|
|
||||||
leafCountAdded: 1,
|
|
||||||
leafCountRequested: 1,
|
|
||||||
metadata: [
|
|
||||||
{
|
|
||||||
ratingKey: "94",
|
|
||||||
key: "/playlists/94/items",
|
|
||||||
guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2",
|
|
||||||
type: "playlist",
|
|
||||||
title: "A great playlist",
|
|
||||||
summary: "One of my great playlists",
|
|
||||||
smart: false,
|
|
||||||
playlistType: "video",
|
|
||||||
composite: "/playlists/94/composite/1705800070",
|
|
||||||
duration: 423000,
|
|
||||||
leafCount: 3,
|
|
||||||
addedAt: 1705716458,
|
|
||||||
updatedAt: 1705800070,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
||||||
| `size` | *number* | :heavy_minus_sign: | N/A | 1 |
|
|
||||||
| `leafCountAdded` | *number* | :heavy_minus_sign: | N/A | 1 |
|
|
||||||
| `leafCountRequested` | *number* | :heavy_minus_sign: | N/A | 1 |
|
|
||||||
| `metadata` | [models.AddPlaylistContentsMetadata](../models/addplaylistcontentsmetadata.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# AddPlaylistContentsPlaylistsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { AddPlaylistContentsPlaylistsResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.AddPlaylistContentsErrors](../models/addplaylistcontentserrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
# AddPlaylistContentsResponse
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { AddPlaylistContentsResponse } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: AddPlaylistContentsResponse = {
|
|
||||||
contentType: "<value>",
|
|
||||||
statusCode: 820994,
|
|
||||||
rawResponse: new Response('{"message": "hello world"}', {
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
}),
|
|
||||||
object: {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 1,
|
|
||||||
leafCountAdded: 1,
|
|
||||||
leafCountRequested: 1,
|
|
||||||
metadata: [
|
|
||||||
{
|
|
||||||
ratingKey: "94",
|
|
||||||
key: "/playlists/94/items",
|
|
||||||
guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2",
|
|
||||||
type: "playlist",
|
|
||||||
title: "A great playlist",
|
|
||||||
summary: "One of my great playlists",
|
|
||||||
smart: false,
|
|
||||||
playlistType: "video",
|
|
||||||
composite: "/playlists/94/composite/1705800070",
|
|
||||||
duration: 423000,
|
|
||||||
leafCount: 3,
|
|
||||||
addedAt: 1705716458,
|
|
||||||
updatedAt: 1705800070,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
||||||
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
||||||
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
| `object` | [models.AddPlaylistContentsResponseBody](../models/addplaylistcontentsresponsebody.md) | :heavy_minus_sign: | Playlist Updated |
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
# AddPlaylistContentsResponseBody
|
|
||||||
|
|
||||||
Playlist Updated
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { AddPlaylistContentsResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: AddPlaylistContentsResponseBody = {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 1,
|
|
||||||
leafCountAdded: 1,
|
|
||||||
leafCountRequested: 1,
|
|
||||||
metadata: [
|
|
||||||
{
|
|
||||||
ratingKey: "94",
|
|
||||||
key: "/playlists/94/items",
|
|
||||||
guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2",
|
|
||||||
type: "playlist",
|
|
||||||
title: "A great playlist",
|
|
||||||
summary: "One of my great playlists",
|
|
||||||
smart: false,
|
|
||||||
playlistType: "video",
|
|
||||||
composite: "/playlists/94/composite/1705800070",
|
|
||||||
duration: 423000,
|
|
||||||
leafCount: 3,
|
|
||||||
addedAt: 1705716458,
|
|
||||||
updatedAt: 1705800070,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
|
||||||
| `mediaContainer` | [models.AddPlaylistContentsMediaContainer](../models/addplaylistcontentsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# AutoSelectSubtitle
|
|
||||||
|
|
||||||
The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { AutoSelectSubtitle } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: AutoSelectSubtitle = AutoSelectSubtitle.One;
|
|
||||||
```
|
|
||||||
|
|
||||||
## Values
|
|
||||||
|
|
||||||
| Name | Value |
|
|
||||||
| ------ | ------ |
|
|
||||||
| `Zero` | 0 |
|
|
||||||
| `One` | 1 |
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# Billing
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { Billing } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: Billing = {
|
|
||||||
internalPaymentMethod: {},
|
|
||||||
paymentMethodId: 317983,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
|
||||||
| `internalPaymentMethod` | [models.InternalPaymentMethod](../models/internalpaymentmethod.md) | :heavy_check_mark: | N/A |
|
|
||||||
| `paymentMethodId` | *number* | :heavy_check_mark: | N/A |
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# ButlerTasks
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { ButlerTasks } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: ButlerTasks = {
|
|
||||||
butlerTask: [
|
|
||||||
{
|
|
||||||
name: "BackupDatabase",
|
|
||||||
interval: 3,
|
|
||||||
title: "Backup Database",
|
|
||||||
description:
|
|
||||||
"Create a backup copy of the server's database in the configured backup directory",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
|
|
||||||
| `butlerTask` | [models.ButlerTask](../models/butlertask.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# CancelServerActivitiesResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { CancelServerActivitiesResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.CancelServerActivitiesErrors](../models/cancelserveractivitieserrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# CheckForUpdatesResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { CheckForUpdatesResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.CheckForUpdatesErrors](../models/checkforupdateserrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# ClearPlaylistContentsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { ClearPlaylistContentsResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.ClearPlaylistContentsErrors](../models/clearplaylistcontentserrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
# Connections
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { Connections } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: Connections = {
|
|
||||||
protocol: "<value>",
|
|
||||||
address: "971 Strosin Wall",
|
|
||||||
port: 4736.08,
|
|
||||||
uri: "https://starry-initialise.name",
|
|
||||||
local: false,
|
|
||||||
relay: false,
|
|
||||||
iPv6: false,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
|
||||||
| `protocol` | *string* | :heavy_check_mark: | N/A |
|
|
||||||
| `address` | *string* | :heavy_check_mark: | N/A |
|
|
||||||
| `port` | *number* | :heavy_check_mark: | N/A |
|
|
||||||
| `uri` | *string* | :heavy_check_mark: | N/A |
|
|
||||||
| `local` | *boolean* | :heavy_check_mark: | N/A |
|
|
||||||
| `relay` | *boolean* | :heavy_check_mark: | N/A |
|
|
||||||
| `iPv6` | *boolean* | :heavy_check_mark: | N/A |
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
# CreatePlaylistMediaContainer
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { CreatePlaylistMediaContainer } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: CreatePlaylistMediaContainer = {
|
|
||||||
size: 7,
|
|
||||||
metadata: [
|
|
||||||
{
|
|
||||||
ratingKey: "96",
|
|
||||||
key: "/playlists/96/items",
|
|
||||||
guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55",
|
|
||||||
type: "playlist",
|
|
||||||
title: "A Great Playlist",
|
|
||||||
summary: "What a great playlist",
|
|
||||||
smart: false,
|
|
||||||
playlistType: "video",
|
|
||||||
icon: "playlist://image.smart",
|
|
||||||
viewCount: 1,
|
|
||||||
lastViewedAt: 1705719589,
|
|
||||||
leafCount: 1,
|
|
||||||
addedAt: 1705719589,
|
|
||||||
updatedAt: 1705724593,
|
|
||||||
composite: "/playlists/96/composite/1705724593",
|
|
||||||
duration: 141000,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
||||||
| `size` | *number* | :heavy_minus_sign: | N/A | 7 |
|
|
||||||
| `metadata` | [models.CreatePlaylistMetadata](../models/createplaylistmetadata.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# CreatePlaylistPlaylistsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { CreatePlaylistPlaylistsResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.CreatePlaylistErrors](../models/createplaylisterrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# CreatePlaylistQueryParamType
|
|
||||||
|
|
||||||
type of playlist to create
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { CreatePlaylistQueryParamType } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: CreatePlaylistQueryParamType = CreatePlaylistQueryParamType.Video;
|
|
||||||
```
|
|
||||||
|
|
||||||
## Values
|
|
||||||
|
|
||||||
| Name | Value |
|
|
||||||
| ------- | ------- |
|
|
||||||
| `Audio` | audio |
|
|
||||||
| `Video` | video |
|
|
||||||
| `Photo` | photo |
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# CreatePlaylistRequest
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { CreatePlaylistQueryParamType, CreatePlaylistRequest, Smart } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: CreatePlaylistRequest = {
|
|
||||||
title: "<value>",
|
|
||||||
type: CreatePlaylistQueryParamType.Photo,
|
|
||||||
smart: Smart.One,
|
|
||||||
uri: "https://exotic-harm.info",
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
||||||
| `title` | *string* | :heavy_check_mark: | name of the playlist |
|
|
||||||
| `type` | [models.CreatePlaylistQueryParamType](../models/createplaylistqueryparamtype.md) | :heavy_check_mark: | type of playlist to create |
|
|
||||||
| `smart` | [models.Smart](../models/smart.md) | :heavy_check_mark: | whether the playlist is smart or not |
|
|
||||||
| `uri` | *string* | :heavy_check_mark: | the content URI for the playlist |
|
|
||||||
| `playQueueID` | *number* | :heavy_minus_sign: | the play queue to copy to a playlist |
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
# CreatePlaylistResponse
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { CreatePlaylistResponse } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: CreatePlaylistResponse = {
|
|
||||||
contentType: "<value>",
|
|
||||||
statusCode: 474697,
|
|
||||||
rawResponse: new Response('{"message": "hello world"}', {
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
}),
|
|
||||||
object: {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 7,
|
|
||||||
metadata: [
|
|
||||||
{
|
|
||||||
ratingKey: "96",
|
|
||||||
key: "/playlists/96/items",
|
|
||||||
guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55",
|
|
||||||
type: "playlist",
|
|
||||||
title: "A Great Playlist",
|
|
||||||
summary: "What a great playlist",
|
|
||||||
smart: false,
|
|
||||||
playlistType: "video",
|
|
||||||
icon: "playlist://image.smart",
|
|
||||||
viewCount: 1,
|
|
||||||
lastViewedAt: 1705719589,
|
|
||||||
leafCount: 1,
|
|
||||||
addedAt: 1705719589,
|
|
||||||
updatedAt: 1705724593,
|
|
||||||
composite: "/playlists/96/composite/1705724593",
|
|
||||||
duration: 141000,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
||||||
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
||||||
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
| `object` | [models.CreatePlaylistResponseBody](../models/createplaylistresponsebody.md) | :heavy_minus_sign: | returns all playlists |
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
# CreatePlaylistResponseBody
|
|
||||||
|
|
||||||
returns all playlists
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { CreatePlaylistResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: CreatePlaylistResponseBody = {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 7,
|
|
||||||
metadata: [
|
|
||||||
{
|
|
||||||
ratingKey: "96",
|
|
||||||
key: "/playlists/96/items",
|
|
||||||
guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55",
|
|
||||||
type: "playlist",
|
|
||||||
title: "A Great Playlist",
|
|
||||||
summary: "What a great playlist",
|
|
||||||
smart: false,
|
|
||||||
playlistType: "video",
|
|
||||||
icon: "playlist://image.smart",
|
|
||||||
viewCount: 1,
|
|
||||||
lastViewedAt: 1705719589,
|
|
||||||
leafCount: 1,
|
|
||||||
addedAt: 1705719589,
|
|
||||||
updatedAt: 1705724593,
|
|
||||||
composite: "/playlists/96/composite/1705724593",
|
|
||||||
duration: 141000,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
||||||
| `mediaContainer` | [models.CreatePlaylistMediaContainer](../models/createplaylistmediacontainer.md) | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# DefaultSubtitleForced
|
|
||||||
|
|
||||||
The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { DefaultSubtitleForced } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: DefaultSubtitleForced = DefaultSubtitleForced.One;
|
|
||||||
```
|
|
||||||
|
|
||||||
## Values
|
|
||||||
|
|
||||||
| Name | Value |
|
|
||||||
| ------ | ------ |
|
|
||||||
| `Zero` | 0 |
|
|
||||||
| `One` | 1 |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# DeleteLibraryResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { DeleteLibraryResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.DeleteLibraryErrors](../models/deletelibraryerrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# DeletePlaylistErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { DeletePlaylistErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: DeletePlaylistErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# DeletePlaylistResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { DeletePlaylistResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.DeletePlaylistErrors](../models/deleteplaylisterrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# EnablePaperTrailErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { EnablePaperTrailErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: EnablePaperTrailErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# EnablePaperTrailResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { EnablePaperTrailResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.EnablePaperTrailErrors](../models/enablepapertrailerrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# Feature
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { Feature } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: Feature = {};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
|
||||||
| `key` | *string* | :heavy_minus_sign: | N/A |
|
|
||||||
| `type` | *string* | :heavy_minus_sign: | N/A |
|
|
||||||
| `directory` | [models.GetMediaProvidersDirectory](../models/getmediaprovidersdirectory.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
# Features
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { Features } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: Features = Features.WatchTogetherInvite;
|
|
||||||
```
|
|
||||||
|
|
||||||
## Values
|
|
||||||
|
|
||||||
| Name | Value |
|
|
||||||
| --------------------------------------- | --------------------------------------- |
|
|
||||||
| `AndroidDolbyVision` | Android - Dolby Vision |
|
|
||||||
| `AndroidPiP` | Android - PiP |
|
|
||||||
| `CUSunset` | CU Sunset |
|
|
||||||
| `HRKEnableEUR` | HRK_enable_EUR |
|
|
||||||
| `TREBLEShowFeatures` | TREBLE-show-features |
|
|
||||||
| `AdCountdownTimer` | ad-countdown-timer |
|
|
||||||
| `AdaptiveBitrate` | adaptive_bitrate |
|
|
||||||
| `AmazonLoopDebug` | amazon-loop-debug |
|
|
||||||
| `AvodAdAnalysis` | avod-ad-analysis |
|
|
||||||
| `AvodNewMedia` | avod-new-media |
|
|
||||||
| `BlacklistGetSignin` | blacklist_get_signin |
|
|
||||||
| `ClientRadioStations` | client-radio-stations |
|
|
||||||
| `CloudflareTurnstileRequired` | cloudflare-turnstile-required |
|
|
||||||
| `Collections` | collections |
|
|
||||||
| `CommentsAndRepliesPushNotifications` | comments_and_replies_push_notifications |
|
|
||||||
| `CommunityAccessPlexTv` | community_access_plex_tv |
|
|
||||||
| `CompanionsSonos` | companions_sonos |
|
|
||||||
| `CustomHomeRemoval` | custom-home-removal |
|
|
||||||
| `DisableHomeUserFriendships` | disable_home_user_friendships |
|
|
||||||
| `DisableSharingFriendships` | disable_sharing_friendships |
|
|
||||||
| `DrmSupport` | drm_support |
|
|
||||||
| `ExcludeRestrictions` | exclude restrictions |
|
|
||||||
| `FederatedAuth` | federated-auth |
|
|
||||||
| `FriendRequestPushNotifications` | friend_request_push_notifications |
|
|
||||||
| `GuidedUpgrade` | guided-upgrade |
|
|
||||||
| `Home` | home |
|
|
||||||
| `IncreasePasswordComplexity` | increase-password-complexity |
|
|
||||||
| `Ios14PrivacyBanner` | ios14-privacy-banner |
|
|
||||||
| `IterableNotificationTokens` | iterable-notification-tokens |
|
|
||||||
| `KeepPaymentMethod` | keep-payment-method |
|
|
||||||
| `KevinBacon` | kevin-bacon |
|
|
||||||
| `KoreaConsent` | korea-consent |
|
|
||||||
| `LeIsrgRootX1` | le_isrg_root_x1 |
|
|
||||||
| `LetsEncrypt` | lets_encrypt |
|
|
||||||
| `LightningDvrPivot` | lightning-dvr-pivot |
|
|
||||||
| `LiveTvSupportIncompleteSegments` | live-tv-support-incomplete-segments |
|
|
||||||
| `Livetv` | livetv |
|
|
||||||
| `MetadataSearch` | metadata_search |
|
|
||||||
| `NewPlexPassPrices` | new_plex_pass_prices |
|
|
||||||
| `NewsProviderSunsetModal` | news-provider-sunset-modal |
|
|
||||||
| `PhotosFavorites` | photos-favorites |
|
|
||||||
| `PhotosMetadataEdition` | photos-metadata-edition |
|
|
||||||
| `PmsHealth` | pms_health |
|
|
||||||
| `Radio` | radio |
|
|
||||||
| `RateLimitClientToken` | rate-limit-client-token |
|
|
||||||
| `ScrobblingServicePlexTv` | scrobbling-service-plex-tv |
|
|
||||||
| `SharedServerNotification` | shared_server_notification |
|
|
||||||
| `SharedSourceNotification` | shared_source_notification |
|
|
||||||
| `SigninWithApple` | signin_with_apple |
|
|
||||||
| `SpringServeAdProvider` | spring_serve_ad_provider |
|
|
||||||
| `TranscoderCache` | transcoder_cache |
|
|
||||||
| `TunerSharing` | tuner-sharing |
|
|
||||||
| `TwoFactorAuthentication` | two-factor-authentication |
|
|
||||||
| `Unsupportedtuners` | unsupportedtuners |
|
|
||||||
| `Upgrade3ds2` | upgrade-3ds2 |
|
|
||||||
| `VodSchema` | vod-schema |
|
|
||||||
| `VodCloudflare` | vod_cloudflare |
|
|
||||||
| `WatchTogetherInvite` | watch-together-invite |
|
|
||||||
| `WebServerDashboard` | web_server_dashboard |
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# FieldType
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { FieldType } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: FieldType = {
|
|
||||||
type: "resolution",
|
|
||||||
operator: [
|
|
||||||
{
|
|
||||||
key: "=",
|
|
||||||
title: "is",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
|
|
||||||
| `type` | *string* | :heavy_minus_sign: | N/A | resolution |
|
|
||||||
| `operator` | [models.Operator](../models/operator.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# Filter
|
|
||||||
|
|
||||||
Filter
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { Filter } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: Filter = Filter.Available;
|
|
||||||
```
|
|
||||||
|
|
||||||
## Values
|
|
||||||
|
|
||||||
| Name | Value |
|
|
||||||
| ----------- | ----------- |
|
|
||||||
| `All` | all |
|
|
||||||
| `Available` | available |
|
|
||||||
| `Released` | released |
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
# Friend
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { Friend, Status } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: Friend = {
|
|
||||||
email: "username@email.com",
|
|
||||||
friendlyName: "exampleUser",
|
|
||||||
home: true,
|
|
||||||
id: 0,
|
|
||||||
restricted: false,
|
|
||||||
sharedServers: [{}],
|
|
||||||
sharedSources: [{}],
|
|
||||||
status: Status.Accepted,
|
|
||||||
thumb: "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578",
|
|
||||||
title: "username123",
|
|
||||||
username: "username123",
|
|
||||||
uuid: "7d1916e0d8f6e76b",
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
|
||||||
| `email` | *string* | :heavy_check_mark: | The account email address | username@email.com |
|
|
||||||
| `friendlyName` | *string* | :heavy_check_mark: | The account full name | exampleUser |
|
|
||||||
| `home` | *boolean* | :heavy_check_mark: | If the account is a Plex Home user | |
|
|
||||||
| `id` | *number* | :heavy_check_mark: | The Plex account ID | |
|
|
||||||
| `restricted` | *boolean* | :heavy_minus_sign: | If the account is a Plex Home managed user | |
|
|
||||||
| `sharedServers` | [models.SharedServers](../models/sharedservers.md)[] | :heavy_check_mark: | N/A | |
|
|
||||||
| `sharedSources` | [models.SharedSources](../models/sharedsources.md)[] | :heavy_check_mark: | N/A | |
|
|
||||||
| `status` | [models.Status](../models/status.md) | :heavy_check_mark: | Current friend request status | accepted |
|
|
||||||
| `thumb` | *string* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578 |
|
|
||||||
| `title` | *string* | :heavy_check_mark: | The title of the account (username or friendly name) | username123 |
|
|
||||||
| `username` | *string* | :heavy_check_mark: | The account username | username123 |
|
|
||||||
| `uuid` | *string* | :heavy_check_mark: | The account Universally Unique Identifier (UUID) | 7d1916e0d8f6e76b |
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
# GetAllLibrariesDirectory
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetAllLibrariesDirectory } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetAllLibrariesDirectory = {
|
|
||||||
allowSync: true,
|
|
||||||
art: "/:/resources/movie-fanart.jpg",
|
|
||||||
composite: "/library/sections/1/composite/1705615584",
|
|
||||||
filters: true,
|
|
||||||
refreshing: false,
|
|
||||||
thumb: "/:/resources/movie.png",
|
|
||||||
key: "1",
|
|
||||||
type: "movie",
|
|
||||||
title: "Movies",
|
|
||||||
agent: "tv.plex.agents.movie",
|
|
||||||
scanner: "Plex Movie",
|
|
||||||
language: "en-US",
|
|
||||||
uuid: "322a231a-b7f7-49f5-920f-14c61199cd30",
|
|
||||||
updatedAt: 1556281940,
|
|
||||||
createdAt: 1556281940,
|
|
||||||
scannedAt: 1556281940,
|
|
||||||
content: true,
|
|
||||||
directory: true,
|
|
||||||
contentChangedAt: 3192854,
|
|
||||||
hidden: 0,
|
|
||||||
location: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
path: "/movies",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
|
|
||||||
| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true |
|
|
||||||
| `art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
|
||||||
| `composite` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 |
|
|
||||||
| `filters` | *boolean* | :heavy_minus_sign: | N/A | true |
|
|
||||||
| `refreshing` | *boolean* | :heavy_minus_sign: | N/A | false |
|
|
||||||
| `thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
|
|
||||||
| `key` | *string* | :heavy_minus_sign: | N/A | 1 |
|
|
||||||
| `type` | *string* | :heavy_minus_sign: | N/A | movie |
|
|
||||||
| `title` | *string* | :heavy_minus_sign: | N/A | Movies |
|
|
||||||
| `agent` | *string* | :heavy_minus_sign: | N/A | tv.plex.agents.movie |
|
|
||||||
| `scanner` | *string* | :heavy_minus_sign: | N/A | Plex Movie |
|
|
||||||
| `language` | *string* | :heavy_minus_sign: | N/A | en-US |
|
|
||||||
| `uuid` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
|
||||||
| `updatedAt` | *number* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 |
|
|
||||||
| `createdAt` | *number* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 |
|
|
||||||
| `scannedAt` | *number* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 |
|
|
||||||
| `content` | *boolean* | :heavy_minus_sign: | N/A | true |
|
|
||||||
| `directory` | *boolean* | :heavy_minus_sign: | N/A | true |
|
|
||||||
| `contentChangedAt` | *number* | :heavy_minus_sign: | N/A | 3192854 |
|
|
||||||
| `hidden` | *number* | :heavy_minus_sign: | N/A | 0 |
|
|
||||||
| `location` | [models.Location](../models/location.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetAllLibrariesErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetAllLibrariesErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetAllLibrariesErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# GetAllLibrariesLibraryResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetAllLibrariesLibraryResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.GetAllLibrariesErrors](../models/getalllibrarieserrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
# GetAllLibrariesMediaContainer
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetAllLibrariesMediaContainer } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetAllLibrariesMediaContainer = {
|
|
||||||
size: 5,
|
|
||||||
allowSync: false,
|
|
||||||
title1: "Plex Library",
|
|
||||||
directory: [
|
|
||||||
{
|
|
||||||
allowSync: true,
|
|
||||||
art: "/:/resources/movie-fanart.jpg",
|
|
||||||
composite: "/library/sections/1/composite/1705615584",
|
|
||||||
filters: true,
|
|
||||||
refreshing: false,
|
|
||||||
thumb: "/:/resources/movie.png",
|
|
||||||
key: "1",
|
|
||||||
type: "movie",
|
|
||||||
title: "Movies",
|
|
||||||
agent: "tv.plex.agents.movie",
|
|
||||||
scanner: "Plex Movie",
|
|
||||||
language: "en-US",
|
|
||||||
uuid: "322a231a-b7f7-49f5-920f-14c61199cd30",
|
|
||||||
updatedAt: 1556281940,
|
|
||||||
createdAt: 1556281940,
|
|
||||||
scannedAt: 1556281940,
|
|
||||||
content: true,
|
|
||||||
directory: true,
|
|
||||||
contentChangedAt: 3192854,
|
|
||||||
hidden: 0,
|
|
||||||
location: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
path: "/movies",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
||||||
| `size` | *number* | :heavy_check_mark: | N/A | 5 |
|
|
||||||
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | false |
|
|
||||||
| `title1` | *string* | :heavy_check_mark: | N/A | Plex Library |
|
|
||||||
| `directory` | [models.GetAllLibrariesDirectory](../models/getalllibrariesdirectory.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
# GetAllLibrariesResponse
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetAllLibrariesResponse } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetAllLibrariesResponse = {
|
|
||||||
contentType: "<value>",
|
|
||||||
statusCode: 613064,
|
|
||||||
rawResponse: new Response('{"message": "hello world"}', {
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
}),
|
|
||||||
object: {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 5,
|
|
||||||
allowSync: false,
|
|
||||||
title1: "Plex Library",
|
|
||||||
directory: [
|
|
||||||
{
|
|
||||||
allowSync: true,
|
|
||||||
art: "/:/resources/movie-fanart.jpg",
|
|
||||||
composite: "/library/sections/1/composite/1705615584",
|
|
||||||
filters: true,
|
|
||||||
refreshing: false,
|
|
||||||
thumb: "/:/resources/movie.png",
|
|
||||||
key: "1",
|
|
||||||
type: "movie",
|
|
||||||
title: "Movies",
|
|
||||||
agent: "tv.plex.agents.movie",
|
|
||||||
scanner: "Plex Movie",
|
|
||||||
language: "en-US",
|
|
||||||
uuid: "322a231a-b7f7-49f5-920f-14c61199cd30",
|
|
||||||
updatedAt: 1556281940,
|
|
||||||
createdAt: 1556281940,
|
|
||||||
scannedAt: 1556281940,
|
|
||||||
content: true,
|
|
||||||
directory: true,
|
|
||||||
contentChangedAt: 3192854,
|
|
||||||
hidden: 0,
|
|
||||||
location: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
path: "/movies",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
|
||||||
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
||||||
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
| `object` | [models.GetAllLibrariesResponseBody](../models/getalllibrariesresponsebody.md) | :heavy_minus_sign: | The libraries available on the Server |
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
# GetAllLibrariesResponseBody
|
|
||||||
|
|
||||||
The libraries available on the Server
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetAllLibrariesResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetAllLibrariesResponseBody = {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 5,
|
|
||||||
allowSync: false,
|
|
||||||
title1: "Plex Library",
|
|
||||||
directory: [
|
|
||||||
{
|
|
||||||
allowSync: true,
|
|
||||||
art: "/:/resources/movie-fanart.jpg",
|
|
||||||
composite: "/library/sections/1/composite/1705615584",
|
|
||||||
filters: true,
|
|
||||||
refreshing: false,
|
|
||||||
thumb: "/:/resources/movie.png",
|
|
||||||
key: "1",
|
|
||||||
type: "movie",
|
|
||||||
title: "Movies",
|
|
||||||
agent: "tv.plex.agents.movie",
|
|
||||||
scanner: "Plex Movie",
|
|
||||||
language: "en-US",
|
|
||||||
uuid: "322a231a-b7f7-49f5-920f-14c61199cd30",
|
|
||||||
updatedAt: 1556281940,
|
|
||||||
createdAt: 1556281940,
|
|
||||||
scannedAt: 1556281940,
|
|
||||||
content: true,
|
|
||||||
directory: true,
|
|
||||||
contentChangedAt: 3192854,
|
|
||||||
hidden: 0,
|
|
||||||
location: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
path: "/movies",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
||||||
| `mediaContainer` | [models.GetAllLibrariesMediaContainer](../models/getalllibrariesmediacontainer.md) | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetAvailableClientsErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetAvailableClientsErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetAvailableClientsErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
# GetAvailableClientsMediaContainer
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetAvailableClientsMediaContainer } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetAvailableClientsMediaContainer = {
|
|
||||||
size: 1,
|
|
||||||
server: [
|
|
||||||
{
|
|
||||||
name: "iPad",
|
|
||||||
host: "10.10.10.102",
|
|
||||||
address: "10.10.10.102",
|
|
||||||
port: 32500,
|
|
||||||
machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05",
|
|
||||||
version: "8.17",
|
|
||||||
protocol: "plex",
|
|
||||||
product: "Plex for iOS",
|
|
||||||
deviceClass: "tablet",
|
|
||||||
protocolVersion: 2,
|
|
||||||
protocolCapabilities: "playback,playqueues,timeline,provider-playback",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
||||||
| `size` | *number* | :heavy_minus_sign: | N/A | 1 |
|
|
||||||
| `server` | [models.GetAvailableClientsServer](../models/getavailableclientsserver.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
# GetAvailableClientsResponse
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetAvailableClientsResponse } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetAvailableClientsResponse = {
|
|
||||||
contentType: "<value>",
|
|
||||||
statusCode: 715190,
|
|
||||||
rawResponse: new Response('{"message": "hello world"}', {
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
}),
|
|
||||||
object: {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 1,
|
|
||||||
server: [
|
|
||||||
{
|
|
||||||
name: "iPad",
|
|
||||||
host: "10.10.10.102",
|
|
||||||
address: "10.10.10.102",
|
|
||||||
port: 32500,
|
|
||||||
machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05",
|
|
||||||
version: "8.17",
|
|
||||||
protocol: "plex",
|
|
||||||
product: "Plex for iOS",
|
|
||||||
deviceClass: "tablet",
|
|
||||||
protocolVersion: 2,
|
|
||||||
protocolCapabilities: "playback,playqueues,timeline,provider-playback",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
||||||
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
||||||
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
| `object` | [models.GetAvailableClientsResponseBody](../models/getavailableclientsresponsebody.md) | :heavy_minus_sign: | Available Clients |
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
# GetAvailableClientsResponseBody
|
|
||||||
|
|
||||||
Available Clients
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetAvailableClientsResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetAvailableClientsResponseBody = {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 1,
|
|
||||||
server: [
|
|
||||||
{
|
|
||||||
name: "iPad",
|
|
||||||
host: "10.10.10.102",
|
|
||||||
address: "10.10.10.102",
|
|
||||||
port: 32500,
|
|
||||||
machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05",
|
|
||||||
version: "8.17",
|
|
||||||
protocol: "plex",
|
|
||||||
product: "Plex for iOS",
|
|
||||||
deviceClass: "tablet",
|
|
||||||
protocolVersion: 2,
|
|
||||||
protocolCapabilities: "playback,playqueues,timeline,provider-playback",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
|
||||||
| `mediaContainer` | [models.GetAvailableClientsMediaContainer](../models/getavailableclientsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# GetAvailableClientsServerResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetAvailableClientsServerResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.GetAvailableClientsErrors](../models/getavailableclientserrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetBandwidthStatisticsErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetBandwidthStatisticsErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetBandwidthStatisticsErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
# GetBandwidthStatisticsMediaContainer
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetBandwidthStatisticsMediaContainer } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetBandwidthStatisticsMediaContainer = {
|
|
||||||
size: 5497,
|
|
||||||
device: [
|
|
||||||
{
|
|
||||||
id: 208,
|
|
||||||
name: "Roku Express",
|
|
||||||
platform: "Roku",
|
|
||||||
clientIdentifier: "793095d235660625108ef785cc7646e9",
|
|
||||||
createdAt: 1706470556,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
account: [
|
|
||||||
{
|
|
||||||
id: 238960586,
|
|
||||||
key: "/accounts/238960586",
|
|
||||||
name: "Diane",
|
|
||||||
defaultAudioLanguage: "en",
|
|
||||||
autoSelectAudio: true,
|
|
||||||
defaultSubtitleLanguage: "en",
|
|
||||||
subtitleMode: 1,
|
|
||||||
thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
statisticsBandwidth: [
|
|
||||||
{
|
|
||||||
accountID: 238960586,
|
|
||||||
deviceID: 208,
|
|
||||||
timespan: 6,
|
|
||||||
at: 1718387650,
|
|
||||||
lan: true,
|
|
||||||
bytes: 22,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
|
||||||
| `size` | *number* | :heavy_minus_sign: | N/A | 5497 |
|
|
||||||
| `device` | [models.GetBandwidthStatisticsDevice](../models/getbandwidthstatisticsdevice.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
| `account` | [models.GetBandwidthStatisticsAccount](../models/getbandwidthstatisticsaccount.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
| `statisticsBandwidth` | [models.StatisticsBandwidth](../models/statisticsbandwidth.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
# GetBandwidthStatisticsResponse
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetBandwidthStatisticsResponse } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetBandwidthStatisticsResponse = {
|
|
||||||
contentType: "<value>",
|
|
||||||
statusCode: 916723,
|
|
||||||
rawResponse: new Response('{"message": "hello world"}', {
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
}),
|
|
||||||
object: {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 5497,
|
|
||||||
device: [
|
|
||||||
{
|
|
||||||
id: 208,
|
|
||||||
name: "Roku Express",
|
|
||||||
platform: "Roku",
|
|
||||||
clientIdentifier: "793095d235660625108ef785cc7646e9",
|
|
||||||
createdAt: 1706470556,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
account: [
|
|
||||||
{
|
|
||||||
id: 238960586,
|
|
||||||
key: "/accounts/238960586",
|
|
||||||
name: "Diane",
|
|
||||||
defaultAudioLanguage: "en",
|
|
||||||
autoSelectAudio: true,
|
|
||||||
defaultSubtitleLanguage: "en",
|
|
||||||
subtitleMode: 1,
|
|
||||||
thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
statisticsBandwidth: [
|
|
||||||
{
|
|
||||||
accountID: 238960586,
|
|
||||||
deviceID: 208,
|
|
||||||
timespan: 6,
|
|
||||||
at: 1718387650,
|
|
||||||
lan: true,
|
|
||||||
bytes: 22,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
||||||
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
||||||
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
| `object` | [models.GetBandwidthStatisticsResponseBody](../models/getbandwidthstatisticsresponsebody.md) | :heavy_minus_sign: | Bandwidth Statistics |
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
# GetBandwidthStatisticsResponseBody
|
|
||||||
|
|
||||||
Bandwidth Statistics
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetBandwidthStatisticsResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetBandwidthStatisticsResponseBody = {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 5497,
|
|
||||||
device: [
|
|
||||||
{
|
|
||||||
id: 208,
|
|
||||||
name: "Roku Express",
|
|
||||||
platform: "Roku",
|
|
||||||
clientIdentifier: "793095d235660625108ef785cc7646e9",
|
|
||||||
createdAt: 1706470556,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
account: [
|
|
||||||
{
|
|
||||||
id: 238960586,
|
|
||||||
key: "/accounts/238960586",
|
|
||||||
name: "Diane",
|
|
||||||
defaultAudioLanguage: "en",
|
|
||||||
autoSelectAudio: true,
|
|
||||||
defaultSubtitleLanguage: "en",
|
|
||||||
subtitleMode: 1,
|
|
||||||
thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
statisticsBandwidth: [
|
|
||||||
{
|
|
||||||
accountID: 238960586,
|
|
||||||
deviceID: 208,
|
|
||||||
timespan: 6,
|
|
||||||
at: 1718387650,
|
|
||||||
lan: true,
|
|
||||||
bytes: 22,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
|
||||||
| `mediaContainer` | [models.GetBandwidthStatisticsMediaContainer](../models/getbandwidthstatisticsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# GetBandwidthStatisticsStatisticsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetBandwidthStatisticsStatisticsResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.GetBandwidthStatisticsErrors](../models/getbandwidthstatisticserrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetBannerImageErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetBannerImageErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetBannerImageErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# GetBannerImageResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetBannerImageResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.GetBannerImageErrors](../models/getbannerimageerrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# GetButlerTasksButlerResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetButlerTasksButlerResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.GetButlerTasksErrors](../models/getbutlertaskserrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetButlerTasksErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetButlerTasksErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetButlerTasksErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
# GetButlerTasksResponse
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetButlerTasksResponse } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetButlerTasksResponse = {
|
|
||||||
contentType: "<value>",
|
|
||||||
statusCode: 812169,
|
|
||||||
rawResponse: new Response('{"message": "hello world"}', {
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
}),
|
|
||||||
object: {
|
|
||||||
butlerTasks: {
|
|
||||||
butlerTask: [
|
|
||||||
{
|
|
||||||
name: "BackupDatabase",
|
|
||||||
interval: 3,
|
|
||||||
title: "Backup Database",
|
|
||||||
description:
|
|
||||||
"Create a backup copy of the server's database in the configured backup directory",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
||||||
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
||||||
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
| `object` | [models.GetButlerTasksResponseBody](../models/getbutlertasksresponsebody.md) | :heavy_minus_sign: | All butler tasks |
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
# GetButlerTasksResponseBody
|
|
||||||
|
|
||||||
All butler tasks
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetButlerTasksResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetButlerTasksResponseBody = {
|
|
||||||
butlerTasks: {
|
|
||||||
butlerTask: [
|
|
||||||
{
|
|
||||||
name: "BackupDatabase",
|
|
||||||
interval: 3,
|
|
||||||
title: "Backup Database",
|
|
||||||
description:
|
|
||||||
"Create a backup copy of the server's database in the configured backup directory",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
|
|
||||||
| `butlerTasks` | [models.ButlerTasks](../models/butlertasks.md) | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetCompanionsDataErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetCompanionsDataErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetCompanionsDataErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# GetCompanionsDataResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetCompanionsDataResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [models.GetCompanionsDataErrors](../models/getcompanionsdataerrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetDevicesErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetDevicesErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetDevicesErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# GetDevicesMediaContainer
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetDevicesMediaContainer } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetDevicesMediaContainer = {
|
|
||||||
size: 151,
|
|
||||||
identifier: "com.plexapp.system.devices",
|
|
||||||
device: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
name: "iPhone",
|
|
||||||
platform: "iOS",
|
|
||||||
createdAt: 1654131230,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
||||||
| `size` | *number* | :heavy_minus_sign: | N/A | 151 |
|
|
||||||
| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.system.devices |
|
|
||||||
| `device` | [models.Device](../models/device.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# GetDevicesResponseBody
|
|
||||||
|
|
||||||
Devices
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetDevicesResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetDevicesResponseBody = {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 151,
|
|
||||||
identifier: "com.plexapp.system.devices",
|
|
||||||
device: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
name: "iPhone",
|
|
||||||
platform: "iOS",
|
|
||||||
createdAt: 1654131230,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
||||||
| `mediaContainer` | [models.GetDevicesMediaContainer](../models/getdevicesmediacontainer.md) | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# GetDevicesServerResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetDevicesServerResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.GetDevicesErrors](../models/getdeviceserrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetFileHashErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetFileHashErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetFileHashErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetGeoDataErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetGeoDataErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetGeoDataErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# GetGeoDataResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetGeoDataResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.GetGeoDataErrors](../models/getgeodataerrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetGlobalHubsErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetGlobalHubsErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetGlobalHubsErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# GetGlobalHubsHubsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetGlobalHubsHubsResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.GetGlobalHubsErrors](../models/getglobalhubserrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
# GetGlobalHubsMediaContainer
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetGlobalHubsMediaContainer } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetGlobalHubsMediaContainer = {
|
|
||||||
size: 8,
|
|
||||||
allowSync: true,
|
|
||||||
identifier: "com.plexapp.plugins.library",
|
|
||||||
hub: [
|
|
||||||
{
|
|
||||||
hubKey: "/library/metadata/50768,65523,58188,57341,57302,57070",
|
|
||||||
key: "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio",
|
|
||||||
title: "Recent Playlists",
|
|
||||||
type: "playlist",
|
|
||||||
hubIdentifier: "home.playlists",
|
|
||||||
context: "hub.home.playlists",
|
|
||||||
size: 6,
|
|
||||||
more: true,
|
|
||||||
style: "shelf",
|
|
||||||
promoted: true,
|
|
||||||
metadata: [
|
|
||||||
{
|
|
||||||
ratingKey: "57070",
|
|
||||||
key: "/playlists/57070/items",
|
|
||||||
guid: "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c",
|
|
||||||
type: "playlist",
|
|
||||||
title: "November Movie Day",
|
|
||||||
titleSort: "Tracks",
|
|
||||||
summary: "",
|
|
||||||
smart: false,
|
|
||||||
playlistType: "video",
|
|
||||||
composite: "/playlists/57070/composite/1668787730",
|
|
||||||
icon: "playlist://image.smart",
|
|
||||||
viewCount: 2,
|
|
||||||
lastViewedAt: 1668787732,
|
|
||||||
duration: 16873000,
|
|
||||||
leafCount: 3,
|
|
||||||
addedAt: 1668779618,
|
|
||||||
updatedAt: 1668787730,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
|
|
||||||
| `size` | *number* | :heavy_minus_sign: | N/A | 8 |
|
|
||||||
| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true |
|
|
||||||
| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
|
|
||||||
| `hub` | [models.Hub](../models/hub.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
# GetGlobalHubsResponse
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetGlobalHubsResponse } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetGlobalHubsResponse = {
|
|
||||||
contentType: "<value>",
|
|
||||||
statusCode: 149675,
|
|
||||||
rawResponse: new Response('{"message": "hello world"}', {
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
}),
|
|
||||||
object: {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 8,
|
|
||||||
allowSync: true,
|
|
||||||
identifier: "com.plexapp.plugins.library",
|
|
||||||
hub: [
|
|
||||||
{
|
|
||||||
hubKey: "/library/metadata/50768,65523,58188,57341,57302,57070",
|
|
||||||
key: "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio",
|
|
||||||
title: "Recent Playlists",
|
|
||||||
type: "playlist",
|
|
||||||
hubIdentifier: "home.playlists",
|
|
||||||
context: "hub.home.playlists",
|
|
||||||
size: 6,
|
|
||||||
more: true,
|
|
||||||
style: "shelf",
|
|
||||||
promoted: true,
|
|
||||||
metadata: [
|
|
||||||
{
|
|
||||||
ratingKey: "57070",
|
|
||||||
key: "/playlists/57070/items",
|
|
||||||
guid: "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c",
|
|
||||||
type: "playlist",
|
|
||||||
title: "November Movie Day",
|
|
||||||
titleSort: "Tracks",
|
|
||||||
summary: "",
|
|
||||||
smart: false,
|
|
||||||
playlistType: "video",
|
|
||||||
composite: "/playlists/57070/composite/1668787730",
|
|
||||||
icon: "playlist://image.smart",
|
|
||||||
viewCount: 2,
|
|
||||||
lastViewedAt: 1668787732,
|
|
||||||
duration: 16873000,
|
|
||||||
leafCount: 3,
|
|
||||||
addedAt: 1668779618,
|
|
||||||
updatedAt: 1668787730,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
||||||
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
||||||
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
| `object` | [models.GetGlobalHubsResponseBody](../models/getglobalhubsresponsebody.md) | :heavy_minus_sign: | returns global hubs |
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
# GetGlobalHubsResponseBody
|
|
||||||
|
|
||||||
returns global hubs
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetGlobalHubsResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetGlobalHubsResponseBody = {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 8,
|
|
||||||
allowSync: true,
|
|
||||||
identifier: "com.plexapp.plugins.library",
|
|
||||||
hub: [
|
|
||||||
{
|
|
||||||
hubKey: "/library/metadata/50768,65523,58188,57341,57302,57070",
|
|
||||||
key: "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio",
|
|
||||||
title: "Recent Playlists",
|
|
||||||
type: "playlist",
|
|
||||||
hubIdentifier: "home.playlists",
|
|
||||||
context: "hub.home.playlists",
|
|
||||||
size: 6,
|
|
||||||
more: true,
|
|
||||||
style: "shelf",
|
|
||||||
promoted: true,
|
|
||||||
metadata: [
|
|
||||||
{
|
|
||||||
ratingKey: "57070",
|
|
||||||
key: "/playlists/57070/items",
|
|
||||||
guid: "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c",
|
|
||||||
type: "playlist",
|
|
||||||
title: "November Movie Day",
|
|
||||||
titleSort: "Tracks",
|
|
||||||
summary: "",
|
|
||||||
smart: false,
|
|
||||||
playlistType: "video",
|
|
||||||
composite: "/playlists/57070/composite/1668787730",
|
|
||||||
icon: "playlist://image.smart",
|
|
||||||
viewCount: 2,
|
|
||||||
lastViewedAt: 1668787732,
|
|
||||||
duration: 16873000,
|
|
||||||
leafCount: 3,
|
|
||||||
addedAt: 1668779618,
|
|
||||||
updatedAt: 1668787730,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
|
||||||
| `mediaContainer` | [models.GetGlobalHubsMediaContainer](../models/getglobalhubsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetHomeDataErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetHomeDataErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetHomeDataErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# GetHomeDataPlexResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetHomeDataPlexResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.GetHomeDataErrors](../models/gethomedataerrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# GetHomeDataResponse
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetHomeDataResponse } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetHomeDataResponse = {
|
|
||||||
contentType: "<value>",
|
|
||||||
statusCode: 368241,
|
|
||||||
rawResponse: new Response('{"message": "hello world"}', {
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
}),
|
|
||||||
object: {
|
|
||||||
id: 1841489,
|
|
||||||
name: "Blindkitty38's home",
|
|
||||||
guestUserID: 58815432,
|
|
||||||
guestUserUUID: "f3df4e01bfca0787",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
||||||
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
||||||
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
| `object` | [models.GetHomeDataResponseBody](../models/gethomedataresponsebody.md) | :heavy_minus_sign: | Home Data |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetLibraryDetailsErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryDetailsErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetLibraryDetailsErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# GetLibraryDetailsLibraryResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryDetailsLibraryResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [models.GetLibraryDetailsErrors](../models/getlibrarydetailserrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
# GetLibraryDetailsMediaContainer
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryDetailsMediaContainer } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetLibraryDetailsMediaContainer = {
|
|
||||||
size: 29,
|
|
||||||
allowSync: false,
|
|
||||||
art: "/:/resources/movie-fanart.jpg",
|
|
||||||
content: "secondary",
|
|
||||||
identifier: "com.plexapp.plugins.library",
|
|
||||||
librarySectionID: 1,
|
|
||||||
mediaTagPrefix: "/system/bundle/media/flags/",
|
|
||||||
mediaTagVersion: 1701731894,
|
|
||||||
thumb: "/:/resources/movie.png",
|
|
||||||
title1: "Movies",
|
|
||||||
viewGroup: "secondary",
|
|
||||||
viewMode: 65592,
|
|
||||||
directory: [
|
|
||||||
{
|
|
||||||
key: "search?type=1",
|
|
||||||
title: "Search...",
|
|
||||||
secondary: true,
|
|
||||||
prompt: "Search Movies",
|
|
||||||
search: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
type: [
|
|
||||||
{
|
|
||||||
key: "/library/sections/1/all?type=1",
|
|
||||||
type: "movie",
|
|
||||||
title: "Movies",
|
|
||||||
active: false,
|
|
||||||
filter: [
|
|
||||||
{
|
|
||||||
filter: "label",
|
|
||||||
filterType: "string",
|
|
||||||
key: "/library/sections/1/label",
|
|
||||||
title: "Labels",
|
|
||||||
type: "filter",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
sort: [
|
|
||||||
{
|
|
||||||
default: "asc",
|
|
||||||
defaultDirection: "desc",
|
|
||||||
descKey: "random:desc",
|
|
||||||
firstCharacterKey: "/library/sections/1/firstCharacter",
|
|
||||||
key: "random",
|
|
||||||
title: "Randomly",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
field: [
|
|
||||||
{
|
|
||||||
key: "label",
|
|
||||||
title: "Label",
|
|
||||||
type: "tag",
|
|
||||||
subType: "bitrate",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
fieldType: [
|
|
||||||
{
|
|
||||||
type: "resolution",
|
|
||||||
operator: [
|
|
||||||
{
|
|
||||||
key: "=",
|
|
||||||
title: "is",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
|
||||||
| `size` | *number* | :heavy_minus_sign: | N/A | 29 |
|
|
||||||
| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | false |
|
|
||||||
| `art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
|
||||||
| `content` | *string* | :heavy_minus_sign: | N/A | secondary |
|
|
||||||
| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
|
|
||||||
| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 |
|
|
||||||
| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ |
|
|
||||||
| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1701731894 |
|
|
||||||
| `thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
|
|
||||||
| `title1` | *string* | :heavy_minus_sign: | N/A | Movies |
|
|
||||||
| `viewGroup` | *string* | :heavy_minus_sign: | N/A | secondary |
|
|
||||||
| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65592 |
|
|
||||||
| `directory` | [models.GetLibraryDetailsDirectory](../models/getlibrarydetailsdirectory.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
| `type` | [models.GetLibraryDetailsType](../models/getlibrarydetailstype.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
| `fieldType` | [models.FieldType](../models/fieldtype.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# GetLibraryDetailsRequest
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryDetailsRequest } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetLibraryDetailsRequest = {
|
|
||||||
sectionKey: 9518,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
||||||
| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
|
|
||||||
| `includeDetails` | [models.IncludeDetails](../models/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
# GetLibraryDetailsResponse
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryDetailsResponse } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetLibraryDetailsResponse = {
|
|
||||||
contentType: "<value>",
|
|
||||||
statusCode: 902349,
|
|
||||||
rawResponse: new Response('{"message": "hello world"}', {
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
}),
|
|
||||||
object: {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 29,
|
|
||||||
allowSync: false,
|
|
||||||
art: "/:/resources/movie-fanart.jpg",
|
|
||||||
content: "secondary",
|
|
||||||
identifier: "com.plexapp.plugins.library",
|
|
||||||
librarySectionID: 1,
|
|
||||||
mediaTagPrefix: "/system/bundle/media/flags/",
|
|
||||||
mediaTagVersion: 1701731894,
|
|
||||||
thumb: "/:/resources/movie.png",
|
|
||||||
title1: "Movies",
|
|
||||||
viewGroup: "secondary",
|
|
||||||
viewMode: 65592,
|
|
||||||
directory: [
|
|
||||||
{
|
|
||||||
key: "search?type=1",
|
|
||||||
title: "Search...",
|
|
||||||
secondary: true,
|
|
||||||
prompt: "Search Movies",
|
|
||||||
search: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
type: [
|
|
||||||
{
|
|
||||||
key: "/library/sections/1/all?type=1",
|
|
||||||
type: "movie",
|
|
||||||
title: "Movies",
|
|
||||||
active: false,
|
|
||||||
filter: [
|
|
||||||
{
|
|
||||||
filter: "label",
|
|
||||||
filterType: "string",
|
|
||||||
key: "/library/sections/1/label",
|
|
||||||
title: "Labels",
|
|
||||||
type: "filter",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
sort: [
|
|
||||||
{
|
|
||||||
default: "asc",
|
|
||||||
defaultDirection: "desc",
|
|
||||||
descKey: "random:desc",
|
|
||||||
firstCharacterKey: "/library/sections/1/firstCharacter",
|
|
||||||
key: "random",
|
|
||||||
title: "Randomly",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
field: [
|
|
||||||
{
|
|
||||||
key: "label",
|
|
||||||
title: "Label",
|
|
||||||
type: "tag",
|
|
||||||
subType: "bitrate",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
fieldType: [
|
|
||||||
{
|
|
||||||
type: "resolution",
|
|
||||||
operator: [
|
|
||||||
{
|
|
||||||
key: "=",
|
|
||||||
title: "is",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
||||||
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
||||||
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
| `object` | [models.GetLibraryDetailsResponseBody](../models/getlibrarydetailsresponsebody.md) | :heavy_minus_sign: | The details of the library |
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
# GetLibraryDetailsResponseBody
|
|
||||||
|
|
||||||
The details of the library
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryDetailsResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetLibraryDetailsResponseBody = {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 29,
|
|
||||||
allowSync: false,
|
|
||||||
art: "/:/resources/movie-fanart.jpg",
|
|
||||||
content: "secondary",
|
|
||||||
identifier: "com.plexapp.plugins.library",
|
|
||||||
librarySectionID: 1,
|
|
||||||
mediaTagPrefix: "/system/bundle/media/flags/",
|
|
||||||
mediaTagVersion: 1701731894,
|
|
||||||
thumb: "/:/resources/movie.png",
|
|
||||||
title1: "Movies",
|
|
||||||
viewGroup: "secondary",
|
|
||||||
viewMode: 65592,
|
|
||||||
directory: [
|
|
||||||
{
|
|
||||||
key: "search?type=1",
|
|
||||||
title: "Search...",
|
|
||||||
secondary: true,
|
|
||||||
prompt: "Search Movies",
|
|
||||||
search: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
type: [
|
|
||||||
{
|
|
||||||
key: "/library/sections/1/all?type=1",
|
|
||||||
type: "movie",
|
|
||||||
title: "Movies",
|
|
||||||
active: false,
|
|
||||||
filter: [
|
|
||||||
{
|
|
||||||
filter: "label",
|
|
||||||
filterType: "string",
|
|
||||||
key: "/library/sections/1/label",
|
|
||||||
title: "Labels",
|
|
||||||
type: "filter",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
sort: [
|
|
||||||
{
|
|
||||||
default: "asc",
|
|
||||||
defaultDirection: "desc",
|
|
||||||
descKey: "random:desc",
|
|
||||||
firstCharacterKey: "/library/sections/1/firstCharacter",
|
|
||||||
key: "random",
|
|
||||||
title: "Randomly",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
field: [
|
|
||||||
{
|
|
||||||
key: "label",
|
|
||||||
title: "Label",
|
|
||||||
type: "tag",
|
|
||||||
subType: "bitrate",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
fieldType: [
|
|
||||||
{
|
|
||||||
type: "resolution",
|
|
||||||
operator: [
|
|
||||||
{
|
|
||||||
key: "=",
|
|
||||||
title: "is",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
||||||
| `mediaContainer` | [models.GetLibraryDetailsMediaContainer](../models/getlibrarydetailsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
# GetLibraryDetailsType
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryDetailsType } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetLibraryDetailsType = {
|
|
||||||
key: "/library/sections/1/all?type=1",
|
|
||||||
type: "movie",
|
|
||||||
title: "Movies",
|
|
||||||
active: false,
|
|
||||||
filter: [
|
|
||||||
{
|
|
||||||
filter: "label",
|
|
||||||
filterType: "string",
|
|
||||||
key: "/library/sections/1/label",
|
|
||||||
title: "Labels",
|
|
||||||
type: "filter",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
sort: [
|
|
||||||
{
|
|
||||||
default: "asc",
|
|
||||||
defaultDirection: "desc",
|
|
||||||
descKey: "random:desc",
|
|
||||||
firstCharacterKey: "/library/sections/1/firstCharacter",
|
|
||||||
key: "random",
|
|
||||||
title: "Randomly",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
field: [
|
|
||||||
{
|
|
||||||
key: "label",
|
|
||||||
title: "Label",
|
|
||||||
type: "tag",
|
|
||||||
subType: "bitrate",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
||||||
| `key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 |
|
|
||||||
| `type` | *string* | :heavy_minus_sign: | N/A | movie |
|
|
||||||
| `title` | *string* | :heavy_minus_sign: | N/A | Movies |
|
|
||||||
| `active` | *boolean* | :heavy_minus_sign: | N/A | false |
|
|
||||||
| `filter` | [models.GetLibraryDetailsFilter](../models/getlibrarydetailsfilter.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
| `sort` | [models.Sort](../models/sort.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
| `field` | [models.Field](../models/field.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetLibraryHubsErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryHubsErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetLibraryHubsErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
# GetLibraryHubsHub
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryHubsHub } from "@lukehagar/plexjs";
|
|
||||||
import { RFCDate } from "@lukehagar/plexjs/types";
|
|
||||||
|
|
||||||
let value: GetLibraryHubsHub = {
|
|
||||||
key: "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0",
|
|
||||||
title: "Recently Played Movies",
|
|
||||||
type: "movie",
|
|
||||||
hubIdentifier: "movie.recentlyviewed.1",
|
|
||||||
context: "hub.movie.recentlyviewed",
|
|
||||||
size: 6,
|
|
||||||
more: true,
|
|
||||||
style: "shelf",
|
|
||||||
hubKey: "/library/metadata/66485,66098,57249,11449,5858,14944",
|
|
||||||
metadata: [
|
|
||||||
{
|
|
||||||
ratingKey: "14944",
|
|
||||||
key: "/library/metadata/14944",
|
|
||||||
guid: "plex://movie/5d77686eeb5d26001f1eb339",
|
|
||||||
studio: "Walt Disney Animation Studios",
|
|
||||||
type: "movie",
|
|
||||||
title: "Tangled",
|
|
||||||
librarySectionTitle: "Movies",
|
|
||||||
librarySectionID: 1,
|
|
||||||
librarySectionKey: "/library/sections/1",
|
|
||||||
contentRating: "PG",
|
|
||||||
summary:
|
|
||||||
"The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.",
|
|
||||||
rating: 8.9,
|
|
||||||
audienceRating: 8.7,
|
|
||||||
viewCount: 1,
|
|
||||||
lastViewedAt: 1704936047,
|
|
||||||
year: 2010,
|
|
||||||
tagline: "They're taking adventure to new lengths.",
|
|
||||||
thumb: "/library/metadata/14944/thumb/1705739847",
|
|
||||||
art: "/library/metadata/14944/art/1705739847",
|
|
||||||
duration: 6017237,
|
|
||||||
originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"),
|
|
||||||
addedAt: 1589412494,
|
|
||||||
updatedAt: 1705739847,
|
|
||||||
audienceRatingImage: "rottentomatoes://image.rating.upright",
|
|
||||||
primaryExtraKey: "/library/metadata/14952",
|
|
||||||
ratingImage: "rottentomatoes://image.rating.ripe",
|
|
||||||
media: [
|
|
||||||
{
|
|
||||||
id: 38247,
|
|
||||||
duration: 6017237,
|
|
||||||
bitrate: 2051,
|
|
||||||
width: 1920,
|
|
||||||
height: 1080,
|
|
||||||
aspectRatio: 1.78,
|
|
||||||
audioChannels: 2,
|
|
||||||
audioCodec: "aac",
|
|
||||||
videoCodec: "h264",
|
|
||||||
videoResolution: "1080",
|
|
||||||
container: "mp4",
|
|
||||||
videoFrameRate: "24p",
|
|
||||||
optimizedForStreaming: 1,
|
|
||||||
audioProfile: "lc",
|
|
||||||
has64bitOffsets: false,
|
|
||||||
videoProfile: "high",
|
|
||||||
part: [
|
|
||||||
{
|
|
||||||
id: 38247,
|
|
||||||
key: "/library/parts/38247/1589412494/file.mp4",
|
|
||||||
duration: 6017237,
|
|
||||||
file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
|
|
||||||
size: 1545647447,
|
|
||||||
audioProfile: "lc",
|
|
||||||
container: "mp4",
|
|
||||||
has64bitOffsets: false,
|
|
||||||
optimizedForStreaming: true,
|
|
||||||
videoProfile: "high",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
genre: [
|
|
||||||
{
|
|
||||||
tag: "Animation",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
country: [
|
|
||||||
{
|
|
||||||
tag: "United States of America",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
director: [
|
|
||||||
{
|
|
||||||
tag: "Nathan Greno",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
role: [
|
|
||||||
{
|
|
||||||
tag: "Donna Murphy",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
writer: [
|
|
||||||
{
|
|
||||||
tag: "Wilhelm Grimm",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
skipCount: 1,
|
|
||||||
chapterSource: "media",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
promoted: true,
|
|
||||||
random: true,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
||||||
| `key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0 |
|
|
||||||
| `title` | *string* | :heavy_minus_sign: | N/A | Recently Played Movies |
|
|
||||||
| `type` | *string* | :heavy_minus_sign: | N/A | movie |
|
|
||||||
| `hubIdentifier` | *string* | :heavy_minus_sign: | N/A | movie.recentlyviewed.1 |
|
|
||||||
| `context` | *string* | :heavy_minus_sign: | N/A | hub.movie.recentlyviewed |
|
|
||||||
| `size` | *number* | :heavy_minus_sign: | N/A | 6 |
|
|
||||||
| `more` | *boolean* | :heavy_minus_sign: | N/A | true |
|
|
||||||
| `style` | *string* | :heavy_minus_sign: | N/A | shelf |
|
|
||||||
| `hubKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66485,66098,57249,11449,5858,14944 |
|
|
||||||
| `metadata` | [models.GetLibraryHubsMetadata](../models/getlibraryhubsmetadata.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
| `promoted` | *boolean* | :heavy_minus_sign: | N/A | true |
|
|
||||||
| `random` | *boolean* | :heavy_minus_sign: | N/A | true |
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# GetLibraryHubsHubsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryHubsHubsResponseBody } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
// No examples available for this model
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [models.GetLibraryHubsErrors](../models/getlibraryhubserrors.md)[] | :heavy_minus_sign: | N/A |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
# GetLibraryHubsMedia
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryHubsMedia } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetLibraryHubsMedia = {
|
|
||||||
id: 38247,
|
|
||||||
duration: 6017237,
|
|
||||||
bitrate: 2051,
|
|
||||||
width: 1920,
|
|
||||||
height: 1080,
|
|
||||||
aspectRatio: 1.78,
|
|
||||||
audioChannels: 2,
|
|
||||||
audioCodec: "aac",
|
|
||||||
videoCodec: "h264",
|
|
||||||
videoResolution: "1080",
|
|
||||||
container: "mp4",
|
|
||||||
videoFrameRate: "24p",
|
|
||||||
optimizedForStreaming: 1,
|
|
||||||
audioProfile: "lc",
|
|
||||||
has64bitOffsets: false,
|
|
||||||
videoProfile: "high",
|
|
||||||
part: [
|
|
||||||
{
|
|
||||||
id: 38247,
|
|
||||||
key: "/library/parts/38247/1589412494/file.mp4",
|
|
||||||
duration: 6017237,
|
|
||||||
file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
|
|
||||||
size: 1545647447,
|
|
||||||
audioProfile: "lc",
|
|
||||||
container: "mp4",
|
|
||||||
has64bitOffsets: false,
|
|
||||||
optimizedForStreaming: true,
|
|
||||||
videoProfile: "high",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
||||||
| `id` | *number* | :heavy_minus_sign: | N/A | 38247 |
|
|
||||||
| `duration` | *number* | :heavy_minus_sign: | N/A | 6017237 |
|
|
||||||
| `bitrate` | *number* | :heavy_minus_sign: | N/A | 2051 |
|
|
||||||
| `width` | *number* | :heavy_minus_sign: | N/A | 1920 |
|
|
||||||
| `height` | *number* | :heavy_minus_sign: | N/A | 1080 |
|
|
||||||
| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 1.78 |
|
|
||||||
| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 |
|
|
||||||
| `audioCodec` | *string* | :heavy_minus_sign: | N/A | aac |
|
|
||||||
| `videoCodec` | *string* | :heavy_minus_sign: | N/A | h264 |
|
|
||||||
| `videoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 |
|
|
||||||
| `container` | *string* | :heavy_minus_sign: | N/A | mp4 |
|
|
||||||
| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p |
|
|
||||||
| `optimizedForStreaming` | *number* | :heavy_minus_sign: | N/A | 1 |
|
|
||||||
| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc |
|
|
||||||
| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false |
|
|
||||||
| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high |
|
|
||||||
| `part` | [models.GetLibraryHubsPart](../models/getlibraryhubspart.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
@@ -1,136 +0,0 @@
|
|||||||
# GetLibraryHubsMediaContainer
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryHubsMediaContainer } from "@lukehagar/plexjs";
|
|
||||||
import { RFCDate } from "@lukehagar/plexjs/types";
|
|
||||||
|
|
||||||
let value: GetLibraryHubsMediaContainer = {
|
|
||||||
size: 7,
|
|
||||||
allowSync: true,
|
|
||||||
identifier: "com.plexapp.plugins.library",
|
|
||||||
librarySectionID: 1,
|
|
||||||
librarySectionTitle: "Movies",
|
|
||||||
librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30",
|
|
||||||
hub: [
|
|
||||||
{
|
|
||||||
key: "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0",
|
|
||||||
title: "Recently Played Movies",
|
|
||||||
type: "movie",
|
|
||||||
hubIdentifier: "movie.recentlyviewed.1",
|
|
||||||
context: "hub.movie.recentlyviewed",
|
|
||||||
size: 6,
|
|
||||||
more: true,
|
|
||||||
style: "shelf",
|
|
||||||
hubKey: "/library/metadata/66485,66098,57249,11449,5858,14944",
|
|
||||||
metadata: [
|
|
||||||
{
|
|
||||||
ratingKey: "14944",
|
|
||||||
key: "/library/metadata/14944",
|
|
||||||
guid: "plex://movie/5d77686eeb5d26001f1eb339",
|
|
||||||
studio: "Walt Disney Animation Studios",
|
|
||||||
type: "movie",
|
|
||||||
title: "Tangled",
|
|
||||||
librarySectionTitle: "Movies",
|
|
||||||
librarySectionID: 1,
|
|
||||||
librarySectionKey: "/library/sections/1",
|
|
||||||
contentRating: "PG",
|
|
||||||
summary:
|
|
||||||
"The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.",
|
|
||||||
rating: 8.9,
|
|
||||||
audienceRating: 8.7,
|
|
||||||
viewCount: 1,
|
|
||||||
lastViewedAt: 1704936047,
|
|
||||||
year: 2010,
|
|
||||||
tagline: "They're taking adventure to new lengths.",
|
|
||||||
thumb: "/library/metadata/14944/thumb/1705739847",
|
|
||||||
art: "/library/metadata/14944/art/1705739847",
|
|
||||||
duration: 6017237,
|
|
||||||
originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"),
|
|
||||||
addedAt: 1589412494,
|
|
||||||
updatedAt: 1705739847,
|
|
||||||
audienceRatingImage: "rottentomatoes://image.rating.upright",
|
|
||||||
primaryExtraKey: "/library/metadata/14952",
|
|
||||||
ratingImage: "rottentomatoes://image.rating.ripe",
|
|
||||||
media: [
|
|
||||||
{
|
|
||||||
id: 38247,
|
|
||||||
duration: 6017237,
|
|
||||||
bitrate: 2051,
|
|
||||||
width: 1920,
|
|
||||||
height: 1080,
|
|
||||||
aspectRatio: 1.78,
|
|
||||||
audioChannels: 2,
|
|
||||||
audioCodec: "aac",
|
|
||||||
videoCodec: "h264",
|
|
||||||
videoResolution: "1080",
|
|
||||||
container: "mp4",
|
|
||||||
videoFrameRate: "24p",
|
|
||||||
optimizedForStreaming: 1,
|
|
||||||
audioProfile: "lc",
|
|
||||||
has64bitOffsets: false,
|
|
||||||
videoProfile: "high",
|
|
||||||
part: [
|
|
||||||
{
|
|
||||||
id: 38247,
|
|
||||||
key: "/library/parts/38247/1589412494/file.mp4",
|
|
||||||
duration: 6017237,
|
|
||||||
file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
|
|
||||||
size: 1545647447,
|
|
||||||
audioProfile: "lc",
|
|
||||||
container: "mp4",
|
|
||||||
has64bitOffsets: false,
|
|
||||||
optimizedForStreaming: true,
|
|
||||||
videoProfile: "high",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
genre: [
|
|
||||||
{
|
|
||||||
tag: "Animation",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
country: [
|
|
||||||
{
|
|
||||||
tag: "United States of America",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
director: [
|
|
||||||
{
|
|
||||||
tag: "Nathan Greno",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
role: [
|
|
||||||
{
|
|
||||||
tag: "Donna Murphy",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
writer: [
|
|
||||||
{
|
|
||||||
tag: "Wilhelm Grimm",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
skipCount: 1,
|
|
||||||
chapterSource: "media",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
promoted: true,
|
|
||||||
random: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
|
||||||
| `size` | *number* | :heavy_minus_sign: | N/A | 7 |
|
|
||||||
| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true |
|
|
||||||
| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
|
|
||||||
| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 |
|
|
||||||
| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies |
|
|
||||||
| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
|
||||||
| `hub` | [models.GetLibraryHubsHub](../models/getlibraryhubshub.md)[] | :heavy_minus_sign: | N/A | |
|
|
||||||
@@ -1,142 +0,0 @@
|
|||||||
# GetLibraryHubsResponse
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryHubsResponse } from "@lukehagar/plexjs";
|
|
||||||
import { RFCDate } from "@lukehagar/plexjs/types";
|
|
||||||
|
|
||||||
let value: GetLibraryHubsResponse = {
|
|
||||||
contentType: "<value>",
|
|
||||||
statusCode: 616934,
|
|
||||||
rawResponse: new Response('{"message": "hello world"}', {
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
}),
|
|
||||||
object: {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 7,
|
|
||||||
allowSync: true,
|
|
||||||
identifier: "com.plexapp.plugins.library",
|
|
||||||
librarySectionID: 1,
|
|
||||||
librarySectionTitle: "Movies",
|
|
||||||
librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30",
|
|
||||||
hub: [
|
|
||||||
{
|
|
||||||
key: "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0",
|
|
||||||
title: "Recently Played Movies",
|
|
||||||
type: "movie",
|
|
||||||
hubIdentifier: "movie.recentlyviewed.1",
|
|
||||||
context: "hub.movie.recentlyviewed",
|
|
||||||
size: 6,
|
|
||||||
more: true,
|
|
||||||
style: "shelf",
|
|
||||||
hubKey: "/library/metadata/66485,66098,57249,11449,5858,14944",
|
|
||||||
metadata: [
|
|
||||||
{
|
|
||||||
ratingKey: "14944",
|
|
||||||
key: "/library/metadata/14944",
|
|
||||||
guid: "plex://movie/5d77686eeb5d26001f1eb339",
|
|
||||||
studio: "Walt Disney Animation Studios",
|
|
||||||
type: "movie",
|
|
||||||
title: "Tangled",
|
|
||||||
librarySectionTitle: "Movies",
|
|
||||||
librarySectionID: 1,
|
|
||||||
librarySectionKey: "/library/sections/1",
|
|
||||||
contentRating: "PG",
|
|
||||||
summary:
|
|
||||||
"The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.",
|
|
||||||
rating: 8.9,
|
|
||||||
audienceRating: 8.7,
|
|
||||||
viewCount: 1,
|
|
||||||
lastViewedAt: 1704936047,
|
|
||||||
year: 2010,
|
|
||||||
tagline: "They're taking adventure to new lengths.",
|
|
||||||
thumb: "/library/metadata/14944/thumb/1705739847",
|
|
||||||
art: "/library/metadata/14944/art/1705739847",
|
|
||||||
duration: 6017237,
|
|
||||||
originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"),
|
|
||||||
addedAt: 1589412494,
|
|
||||||
updatedAt: 1705739847,
|
|
||||||
audienceRatingImage: "rottentomatoes://image.rating.upright",
|
|
||||||
primaryExtraKey: "/library/metadata/14952",
|
|
||||||
ratingImage: "rottentomatoes://image.rating.ripe",
|
|
||||||
media: [
|
|
||||||
{
|
|
||||||
id: 38247,
|
|
||||||
duration: 6017237,
|
|
||||||
bitrate: 2051,
|
|
||||||
width: 1920,
|
|
||||||
height: 1080,
|
|
||||||
aspectRatio: 1.78,
|
|
||||||
audioChannels: 2,
|
|
||||||
audioCodec: "aac",
|
|
||||||
videoCodec: "h264",
|
|
||||||
videoResolution: "1080",
|
|
||||||
container: "mp4",
|
|
||||||
videoFrameRate: "24p",
|
|
||||||
optimizedForStreaming: 1,
|
|
||||||
audioProfile: "lc",
|
|
||||||
has64bitOffsets: false,
|
|
||||||
videoProfile: "high",
|
|
||||||
part: [
|
|
||||||
{
|
|
||||||
id: 38247,
|
|
||||||
key: "/library/parts/38247/1589412494/file.mp4",
|
|
||||||
duration: 6017237,
|
|
||||||
file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
|
|
||||||
size: 1545647447,
|
|
||||||
audioProfile: "lc",
|
|
||||||
container: "mp4",
|
|
||||||
has64bitOffsets: false,
|
|
||||||
optimizedForStreaming: true,
|
|
||||||
videoProfile: "high",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
genre: [
|
|
||||||
{
|
|
||||||
tag: "Animation",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
country: [
|
|
||||||
{
|
|
||||||
tag: "United States of America",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
director: [
|
|
||||||
{
|
|
||||||
tag: "Nathan Greno",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
role: [
|
|
||||||
{
|
|
||||||
tag: "Donna Murphy",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
writer: [
|
|
||||||
{
|
|
||||||
tag: "Wilhelm Grimm",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
skipCount: 1,
|
|
||||||
chapterSource: "media",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
promoted: true,
|
|
||||||
random: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
||||||
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
||||||
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
||||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
||||||
| `object` | [models.GetLibraryHubsResponseBody](../models/getlibraryhubsresponsebody.md) | :heavy_minus_sign: | The hubs specific to the library |
|
|
||||||
@@ -1,134 +0,0 @@
|
|||||||
# GetLibraryHubsResponseBody
|
|
||||||
|
|
||||||
The hubs specific to the library
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryHubsResponseBody } from "@lukehagar/plexjs";
|
|
||||||
import { RFCDate } from "@lukehagar/plexjs/types";
|
|
||||||
|
|
||||||
let value: GetLibraryHubsResponseBody = {
|
|
||||||
mediaContainer: {
|
|
||||||
size: 7,
|
|
||||||
allowSync: true,
|
|
||||||
identifier: "com.plexapp.plugins.library",
|
|
||||||
librarySectionID: 1,
|
|
||||||
librarySectionTitle: "Movies",
|
|
||||||
librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30",
|
|
||||||
hub: [
|
|
||||||
{
|
|
||||||
key: "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0",
|
|
||||||
title: "Recently Played Movies",
|
|
||||||
type: "movie",
|
|
||||||
hubIdentifier: "movie.recentlyviewed.1",
|
|
||||||
context: "hub.movie.recentlyviewed",
|
|
||||||
size: 6,
|
|
||||||
more: true,
|
|
||||||
style: "shelf",
|
|
||||||
hubKey: "/library/metadata/66485,66098,57249,11449,5858,14944",
|
|
||||||
metadata: [
|
|
||||||
{
|
|
||||||
ratingKey: "14944",
|
|
||||||
key: "/library/metadata/14944",
|
|
||||||
guid: "plex://movie/5d77686eeb5d26001f1eb339",
|
|
||||||
studio: "Walt Disney Animation Studios",
|
|
||||||
type: "movie",
|
|
||||||
title: "Tangled",
|
|
||||||
librarySectionTitle: "Movies",
|
|
||||||
librarySectionID: 1,
|
|
||||||
librarySectionKey: "/library/sections/1",
|
|
||||||
contentRating: "PG",
|
|
||||||
summary:
|
|
||||||
"The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.",
|
|
||||||
rating: 8.9,
|
|
||||||
audienceRating: 8.7,
|
|
||||||
viewCount: 1,
|
|
||||||
lastViewedAt: 1704936047,
|
|
||||||
year: 2010,
|
|
||||||
tagline: "They're taking adventure to new lengths.",
|
|
||||||
thumb: "/library/metadata/14944/thumb/1705739847",
|
|
||||||
art: "/library/metadata/14944/art/1705739847",
|
|
||||||
duration: 6017237,
|
|
||||||
originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"),
|
|
||||||
addedAt: 1589412494,
|
|
||||||
updatedAt: 1705739847,
|
|
||||||
audienceRatingImage: "rottentomatoes://image.rating.upright",
|
|
||||||
primaryExtraKey: "/library/metadata/14952",
|
|
||||||
ratingImage: "rottentomatoes://image.rating.ripe",
|
|
||||||
media: [
|
|
||||||
{
|
|
||||||
id: 38247,
|
|
||||||
duration: 6017237,
|
|
||||||
bitrate: 2051,
|
|
||||||
width: 1920,
|
|
||||||
height: 1080,
|
|
||||||
aspectRatio: 1.78,
|
|
||||||
audioChannels: 2,
|
|
||||||
audioCodec: "aac",
|
|
||||||
videoCodec: "h264",
|
|
||||||
videoResolution: "1080",
|
|
||||||
container: "mp4",
|
|
||||||
videoFrameRate: "24p",
|
|
||||||
optimizedForStreaming: 1,
|
|
||||||
audioProfile: "lc",
|
|
||||||
has64bitOffsets: false,
|
|
||||||
videoProfile: "high",
|
|
||||||
part: [
|
|
||||||
{
|
|
||||||
id: 38247,
|
|
||||||
key: "/library/parts/38247/1589412494/file.mp4",
|
|
||||||
duration: 6017237,
|
|
||||||
file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
|
|
||||||
size: 1545647447,
|
|
||||||
audioProfile: "lc",
|
|
||||||
container: "mp4",
|
|
||||||
has64bitOffsets: false,
|
|
||||||
optimizedForStreaming: true,
|
|
||||||
videoProfile: "high",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
genre: [
|
|
||||||
{
|
|
||||||
tag: "Animation",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
country: [
|
|
||||||
{
|
|
||||||
tag: "United States of America",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
director: [
|
|
||||||
{
|
|
||||||
tag: "Nathan Greno",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
role: [
|
|
||||||
{
|
|
||||||
tag: "Donna Murphy",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
writer: [
|
|
||||||
{
|
|
||||||
tag: "Wilhelm Grimm",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
skipCount: 1,
|
|
||||||
chapterSource: "media",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
promoted: true,
|
|
||||||
random: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
||||||
| `mediaContainer` | [models.GetLibraryHubsMediaContainer](../models/getlibraryhubsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GetLibraryItemsErrors
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GetLibraryItemsErrors } from "@lukehagar/plexjs";
|
|
||||||
|
|
||||||
let value: GetLibraryItemsErrors = {
|
|
||||||
code: 1001,
|
|
||||||
message: "User could not be authenticated",
|
|
||||||
status: 401,
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
|
||||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
|
||||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
|
||||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user