mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 20:47:46 +00:00
Compare commits
186 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 | ||
|
|
4d8ee6c199 | ||
|
|
4fe1356250 | ||
|
|
454b20d045 | ||
|
|
8c39ddc475 | ||
|
|
dca338d40f | ||
|
|
06e59965bd | ||
|
|
0be9307f80 | ||
|
|
25dcf36b37 | ||
|
|
63f13fd266 | ||
|
|
f21eae30b1 | ||
|
|
eb75f8d060 | ||
|
|
5e8618aa6f | ||
|
|
335ccf134f | ||
|
|
9bcd82719e | ||
|
|
58005d93e9 | ||
|
|
a366d87e75 | ||
|
|
d1f30a9f2c | ||
|
|
087db87584 | ||
|
|
7406efba26 | ||
|
|
b48aa356a7 | ||
|
|
f918b86b8c | ||
|
|
d241fca800 | ||
|
|
dafab7ed9d | ||
|
|
18817ccbc0 | ||
|
|
241fc555f6 | ||
|
|
60385aec49 | ||
|
|
502660742d | ||
|
|
796edd7174 | ||
|
|
738f7c347d | ||
|
|
5a3c016a7f | ||
|
|
bb1b355abf | ||
|
|
78522ed5bf | ||
|
|
8a524cf9e6 | ||
|
|
7e8aef026b | ||
|
|
886f24cade | ||
|
|
9c33aaa04f | ||
|
|
fc2f619cff | ||
|
|
2344b8fb5e | ||
|
|
2d0e878983 | ||
|
|
a96e359e00 | ||
|
|
d616464526 | ||
|
|
933b3708db | ||
|
|
ddc4f916f2 | ||
|
|
e418c55013 | ||
|
|
b593c2c54b | ||
|
|
a449d25ac4 | ||
|
|
6af375d524 | ||
|
|
fc838e8ebf | ||
|
|
162b3b3d13 | ||
|
|
3dff2b9225 | ||
|
|
d6d9c46f51 | ||
|
|
f79b24ee0e | ||
|
|
78c540ebf4 | ||
|
|
3fc9856c81 | ||
|
|
bc1fa68557 | ||
|
|
182d88f7f1 | ||
|
|
300cbb21cd | ||
|
|
53f3bfd615 | ||
|
|
92b22220f1 | ||
|
|
a42f887042 | ||
|
|
8b9c5c6e41 | ||
|
|
eab41f5f41 | ||
|
|
e038f1fdcf | ||
|
|
835f4244ec | ||
|
|
287c5cb9ad | ||
|
|
521174faf5 | ||
|
|
6fe948fa1e | ||
|
|
4abb238f51 | ||
|
|
c10b6af7de | ||
|
|
6bec4430ff | ||
|
|
3fe4aee2ea | ||
|
|
5b4a51bee7 | ||
|
|
b0cc884d46 | ||
|
|
a1dc07ae78 | ||
|
|
d100297e1d | ||
|
|
14f7d530ec | ||
|
|
622219b018 | ||
|
|
c4dd496e24 | ||
|
|
cdda7f840f | ||
|
|
2c04752d88 | ||
|
|
242d7d78f2 | ||
|
|
779aa2dc9e | ||
|
|
0d73a769fb | ||
|
|
eeadc8c329 | ||
|
|
dbe2e37bba | ||
|
|
6c314bea48 | ||
|
|
9e28d57f15 | ||
|
|
9da9389549 | ||
|
|
fd886229c2 | ||
|
|
8a8615f241 | ||
|
|
29b8ad88d9 | ||
|
|
fd13b3d892 | ||
|
|
fc0ebfe782 | ||
|
|
9503c9033d | ||
|
|
1c5fa25562 | ||
|
|
3020866795 | ||
|
|
b0f89ba7d4 | ||
|
|
d7d14f28e8 | ||
|
|
e3e80f1dd8 | ||
|
|
4819145e93 | ||
|
|
23c20be9e3 | ||
|
|
2c76c6640a | ||
|
|
4332937cdc | ||
|
|
17d56a96d6 | ||
|
|
1d4f25475d | ||
|
|
a1f6c6f515 | ||
|
|
022d345196 | ||
|
|
6cec42bef1 | ||
|
|
eaa84306f6 | ||
|
|
45ee7680a7 | ||
|
|
8668cc2ca6 | ||
|
|
9fb5c21c03 | ||
|
|
e9cfd11a9c | ||
|
|
7543285c95 | ||
|
|
fa999ea454 | ||
|
|
b562d2a68e | ||
|
|
09060624f9 | ||
|
|
a6620dfce9 | ||
|
|
100d1e093b | ||
|
|
ff9f3dc489 | ||
|
|
b9629abe33 | ||
|
|
f306faa1ff | ||
|
|
e5abca0f3c | ||
|
|
78acc1880a | ||
|
|
a31aae3cd8 | ||
|
|
bc64130459 | ||
|
|
b553c6204c | ||
|
|
9b02d27d5e | ||
|
|
f200bc563f | ||
|
|
5c4b98300b | ||
|
|
1e46343716 | ||
|
|
c34f35ba3d | ||
|
|
b77c4d818f | ||
|
|
ea6e427d7b | ||
|
|
4ed36cd1a2 | ||
|
|
1b0b5c218c | ||
|
|
e92eb2ba92 |
28
.eslintrc.js
28
.eslintrc.js
@@ -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",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
23
.github/workflows/codesee-arch-diagram.yml
vendored
23
.github/workflows/codesee-arch-diagram.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
# This workflow was added by CodeSee. Learn more at https://codesee.io/
|
|
||||||
# This is v2.0 of this workflow file
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request_target:
|
|
||||||
types: [opened, synchronize, reopened]
|
|
||||||
|
|
||||||
name: CodeSee
|
|
||||||
|
|
||||||
permissions: read-all
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
codesee:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
continue-on-error: true
|
|
||||||
name: Analyze the repo with CodeSee
|
|
||||||
steps:
|
|
||||||
- uses: Codesee-io/codesee-action@v2
|
|
||||||
with:
|
|
||||||
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
|
|
||||||
codesee-url: https://app.codesee.io
|
|
||||||
32
.github/workflows/publish-jsr.yaml
vendored
Normal file
32
.github/workflows/publish-jsr.yaml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: Publish to JSR
|
||||||
|
permissions:
|
||||||
|
checks: write
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
statuses: write
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
registry_package:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Publish package
|
||||||
|
run: npx jsr publish
|
||||||
@@ -11,19 +11,18 @@ permissions:
|
|||||||
description: Force generation of SDKs
|
description: Force generation of SDKs
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
set_version:
|
||||||
|
description: optionally set a specific SDK version
|
||||||
|
type: string
|
||||||
schedule:
|
schedule:
|
||||||
- cron: 0 0 * * *
|
- cron: 0 0 * * *
|
||||||
jobs:
|
jobs:
|
||||||
generate:
|
generate:
|
||||||
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-generation.yaml@v14
|
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
|
||||||
with:
|
with:
|
||||||
force: ${{ github.event.inputs.force }}
|
force: ${{ github.event.inputs.force }}
|
||||||
languages: |
|
|
||||||
- typescript
|
|
||||||
mode: direct
|
mode: direct
|
||||||
openapi_docs: |
|
set_version: ${{ github.event.inputs.set_version }}
|
||||||
- https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
|
||||||
publish_typescript: true
|
|
||||||
speakeasy_version: latest
|
speakeasy_version: latest
|
||||||
secrets:
|
secrets:
|
||||||
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
19
.gitignore
vendored
19
.gitignore
vendored
@@ -1,3 +1,22 @@
|
|||||||
|
.DS_Store
|
||||||
|
**/.speakeasy/temp/
|
||||||
|
**/.speakeasy/logs/
|
||||||
|
.DS_Store
|
||||||
|
/mcp-server
|
||||||
|
/bin
|
||||||
|
/.eslintcache
|
||||||
|
/.speakeasy/reports
|
||||||
|
/react-query
|
||||||
|
/sdk/models/errors
|
||||||
|
/sdk/types
|
||||||
|
/__tests__
|
||||||
|
/funcs
|
||||||
|
/core.*
|
||||||
|
/esm
|
||||||
|
/dist
|
||||||
|
/.tshy
|
||||||
|
/.tshy-*
|
||||||
|
/hooks
|
||||||
/models
|
/models
|
||||||
/models/errors
|
/models/errors
|
||||||
/types
|
/types
|
||||||
|
|||||||
13
.npmignore
13
.npmignore
@@ -1,8 +1,15 @@
|
|||||||
/*
|
**/*
|
||||||
/docs/**/*.md
|
!/FUNCTIONS.md
|
||||||
|
!/RUNTIMES.md
|
||||||
|
!/REACT_QUERY.md
|
||||||
!/**/*.ts
|
!/**/*.ts
|
||||||
!/**/*.js
|
!/**/*.js
|
||||||
|
!/**/*.mjs
|
||||||
|
!/**/*.json
|
||||||
!/**/*.map
|
!/**/*.map
|
||||||
|
|
||||||
/.eslintrc.js
|
/eslint.config.mjs
|
||||||
/cjs
|
/cjs
|
||||||
|
/.tshy
|
||||||
|
/.tshy-*
|
||||||
|
/__tests__
|
||||||
|
|||||||
2402
.speakeasy/gen.lock
Executable file
2402
.speakeasy/gen.lock
Executable file
File diff suppressed because one or more lines are too long
52
.speakeasy/gen.yaml
Executable file
52
.speakeasy/gen.yaml
Executable file
@@ -0,0 +1,52 @@
|
|||||||
|
configVersion: 2.0.0
|
||||||
|
generation:
|
||||||
|
sdkClassName: Plex-API
|
||||||
|
maintainOpenAPIOrder: true
|
||||||
|
usageSnippets:
|
||||||
|
optionalPropertyRendering: withExample
|
||||||
|
sdkInitStyle: constructor
|
||||||
|
useClassNamesForArrayFields: true
|
||||||
|
fixes:
|
||||||
|
nameResolutionDec2023: true
|
||||||
|
nameResolutionFeb2025: false
|
||||||
|
parameterOrderingFeb2024: true
|
||||||
|
requestResponseComponentNamesFeb2024: true
|
||||||
|
securityFeb2025: false
|
||||||
|
sharedErrorComponentsApr2025: false
|
||||||
|
auth:
|
||||||
|
oAuth2ClientCredentialsEnabled: true
|
||||||
|
oAuth2PasswordEnabled: false
|
||||||
|
typescript:
|
||||||
|
version: 0.38.0
|
||||||
|
additionalDependencies:
|
||||||
|
dependencies: {}
|
||||||
|
devDependencies: {}
|
||||||
|
peerDependencies: {}
|
||||||
|
additionalPackageJSON: {}
|
||||||
|
author: LukeHagar
|
||||||
|
clientServerStatusCodesAsErrors: true
|
||||||
|
defaultErrorName: SDKError
|
||||||
|
enableCustomCodeRegions: false
|
||||||
|
enableMCPServer: true
|
||||||
|
enableReactQuery: false
|
||||||
|
enumFormat: enum
|
||||||
|
flattenGlobalSecurity: true
|
||||||
|
flatteningOrder: body-first
|
||||||
|
imports:
|
||||||
|
option: openapi
|
||||||
|
paths:
|
||||||
|
callbacks: sdk/models/callbacks
|
||||||
|
errors: sdk/models/errors
|
||||||
|
operations: sdk/models/operations
|
||||||
|
shared: sdk/models/shared
|
||||||
|
webhooks: sdk/models/webhooks
|
||||||
|
inputModelSuffix: input
|
||||||
|
jsonpath: legacy
|
||||||
|
maxMethodParams: 4
|
||||||
|
methodArguments: require-security-and-request
|
||||||
|
moduleFormat: commonjs
|
||||||
|
outputModelSuffix: output
|
||||||
|
packageName: '@lukehagar/plexjs'
|
||||||
|
responseFormat: envelope
|
||||||
|
templateVersion: v2
|
||||||
|
useIndexModules: true
|
||||||
47
.speakeasy/workflow.lock
Normal file
47
.speakeasy/workflow.lock
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
speakeasyVersion: 1.555.2
|
||||||
|
sources:
|
||||||
|
my-source:
|
||||||
|
sourceNamespace: my-source
|
||||||
|
sourceRevisionDigest: sha256:1b8840d540c66b58d1009ec2581fb18464158ec9aa00464eac05ba737f31207e
|
||||||
|
sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9
|
||||||
|
tags:
|
||||||
|
- latest
|
||||||
|
- main
|
||||||
|
plexapi:
|
||||||
|
sourceNamespace: plexapi
|
||||||
|
sourceRevisionDigest: sha256:78d07ad78ff60d0e9918696208d8c68a562e170d4e9c431797c02995fb8816d0
|
||||||
|
sourceBlobDigest: sha256:d38dd2a36c1b2fd73409267f7b30c2d5d45d709616141803ea01db424ec68ae4
|
||||||
|
tags:
|
||||||
|
- latest
|
||||||
|
- speakeasy-sdk-regen-1748995899
|
||||||
|
- 0.0.3
|
||||||
|
targets:
|
||||||
|
plexjs:
|
||||||
|
source: plexapi
|
||||||
|
sourceNamespace: plexapi
|
||||||
|
sourceRevisionDigest: sha256:78d07ad78ff60d0e9918696208d8c68a562e170d4e9c431797c02995fb8816d0
|
||||||
|
sourceBlobDigest: sha256:d38dd2a36c1b2fd73409267f7b30c2d5d45d709616141803ea01db424ec68ae4
|
||||||
|
codeSamplesNamespace: code-samples-typescript-plexjs
|
||||||
|
codeSamplesRevisionDigest: sha256:132446d6299798fab8378bc875b16290ef126cdb50befe85a0a88bee8bf35799
|
||||||
|
workflow:
|
||||||
|
workflowVersion: 1.0.0
|
||||||
|
speakeasyVersion: latest
|
||||||
|
sources:
|
||||||
|
plexapi:
|
||||||
|
inputs:
|
||||||
|
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/refs/heads/main/output/plex-media-server-spec-dereferenced.yaml
|
||||||
|
registry:
|
||||||
|
location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi
|
||||||
|
targets:
|
||||||
|
plexjs:
|
||||||
|
target: typescript
|
||||||
|
source: plexapi
|
||||||
|
publish:
|
||||||
|
npm:
|
||||||
|
token: $npm_token
|
||||||
|
codeSamples:
|
||||||
|
output: codeSamples.yaml
|
||||||
|
registry:
|
||||||
|
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-typescript-plexjs
|
||||||
|
labelOverride:
|
||||||
|
fixedValue: PlexJS
|
||||||
21
.speakeasy/workflow.yaml
Normal file
21
.speakeasy/workflow.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
workflowVersion: 1.0.0
|
||||||
|
speakeasyVersion: latest
|
||||||
|
sources:
|
||||||
|
plexapi:
|
||||||
|
inputs:
|
||||||
|
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/refs/heads/main/output/plex-media-server-spec-dereferenced.yaml
|
||||||
|
registry:
|
||||||
|
location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi
|
||||||
|
targets:
|
||||||
|
plexjs:
|
||||||
|
target: typescript
|
||||||
|
source: plexapi
|
||||||
|
publish:
|
||||||
|
npm:
|
||||||
|
token: $npm_token
|
||||||
|
codeSamples:
|
||||||
|
output: codeSamples.yaml
|
||||||
|
registry:
|
||||||
|
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-typescript-plexjs
|
||||||
|
labelOverride:
|
||||||
|
fixedValue: PlexJS
|
||||||
26
CONTRIBUTING.md
Normal file
26
CONTRIBUTING.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Contributing to This Repository
|
||||||
|
|
||||||
|
Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements.
|
||||||
|
|
||||||
|
## How to Report Issues
|
||||||
|
|
||||||
|
If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes:
|
||||||
|
|
||||||
|
- A clear and descriptive title
|
||||||
|
- Steps to reproduce the issue
|
||||||
|
- Expected and actual behavior
|
||||||
|
- Any relevant logs, screenshots, or error messages
|
||||||
|
- Information about your environment (e.g., operating system, software versions)
|
||||||
|
- For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed
|
||||||
|
|
||||||
|
## Issue Triage and Upstream Fixes
|
||||||
|
|
||||||
|
We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code.
|
||||||
|
|
||||||
|
## Contact
|
||||||
|
|
||||||
|
If you have any questions or need further assistance, please feel free to reach out by opening an issue.
|
||||||
|
|
||||||
|
Thank you for your understanding and cooperation!
|
||||||
|
|
||||||
|
The Maintainers
|
||||||
87
FUNCTIONS.md
Normal file
87
FUNCTIONS.md
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
# Standalone Functions
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> This section is useful if you are using a bundler and targetting browsers and
|
||||||
|
> runtimes where the size of an application affects performance and load times.
|
||||||
|
|
||||||
|
Every method in this SDK is also available as a standalone function. This
|
||||||
|
alternative API is suitable when targetting the browser or serverless runtimes
|
||||||
|
and using a bundler to build your application since all unused functionality
|
||||||
|
will be tree-shaken away. This includes code for unused methods, Zod schemas,
|
||||||
|
encoding helpers and response handlers. The result is dramatically smaller
|
||||||
|
impact on the application's final bundle size which grows very slowly as you use
|
||||||
|
more and more functionality from this SDK.
|
||||||
|
|
||||||
|
Calling methods through the main SDK class remains a valid and generally more
|
||||||
|
more ergonomic option. Standalone functions represent an optimisation for a
|
||||||
|
specific category of applications.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||||
|
import { serverGetServerCapabilities } from "@lukehagar/plexjs/funcs/serverGetServerCapabilities.js";
|
||||||
|
|
||||||
|
// Use `PlexAPICore` for best tree-shaking performance.
|
||||||
|
// You can create one instance of it to use across an application.
|
||||||
|
const plexAPI = new PlexAPICore({
|
||||||
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
|
});
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const res = await serverGetServerCapabilities(plexAPI);
|
||||||
|
if (res.ok) {
|
||||||
|
const { value: result } = res;
|
||||||
|
console.log(result);
|
||||||
|
} else {
|
||||||
|
console.log("serverGetServerCapabilities failed:", res.error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
```
|
||||||
|
|
||||||
|
## Result types
|
||||||
|
|
||||||
|
Standalone functions differ from SDK methods in that they return a
|
||||||
|
`Result<Value, Error>` type to capture _known errors_ and document them using
|
||||||
|
the type system. By avoiding throwing errors, application code maintains clear
|
||||||
|
control flow and error-handling become part of the regular flow of application
|
||||||
|
code.
|
||||||
|
|
||||||
|
> We use the term "known errors" because standalone functions, and JavaScript
|
||||||
|
> code in general, can still throw unexpected errors such as `TypeError`s,
|
||||||
|
> `RangeError`s and `DOMException`s. Exhaustively catching all errors may be
|
||||||
|
> something this SDK addresses in the future. Nevertheless, there is still a lot
|
||||||
|
> of benefit from capturing most errors and turning them into values.
|
||||||
|
|
||||||
|
The second reason for this style of programming is because these functions will
|
||||||
|
typically be used in front-end applications where exception throwing is
|
||||||
|
sometimes discouraged or considered unidiomatic. React and similar ecosystems
|
||||||
|
and libraries tend to promote this style of programming so that components
|
||||||
|
render useful content under all states (loading, success, error and so on).
|
||||||
|
|
||||||
|
The general pattern when calling standalone functions looks like this:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { Core } from "<sdk-package-name>";
|
||||||
|
import { fetchSomething } from "<sdk-package-name>/funcs/fetchSomething.js";
|
||||||
|
|
||||||
|
const client = new Core();
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const result = await fetchSomething(client, { id: "123" });
|
||||||
|
if (!result.ok) {
|
||||||
|
// You can throw the error or handle it. It's your choice now.
|
||||||
|
throw result.error;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(result.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
```
|
||||||
|
|
||||||
|
Notably, `result.error` above will have an explicit type compared to a try-catch
|
||||||
|
variation where the error in the catch block can only be of type `unknown` (or
|
||||||
|
`any` depending on your TypeScript settings).
|
||||||
26
Makefile
26
Makefile
@@ -1,26 +0,0 @@
|
|||||||
.PHONY: *
|
|
||||||
|
|
||||||
all: speakeasy
|
|
||||||
|
|
||||||
|
|
||||||
speakeasy: check-speakeasy
|
|
||||||
speakeasy generate sdk --lang typescript -o . -s ./openapi.yaml
|
|
||||||
|
|
||||||
speakeasy-validate: check-speakeasy
|
|
||||||
speakeasy validate openapi -s ./openapi.yaml
|
|
||||||
|
|
||||||
openapi:
|
|
||||||
curl https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml > ./openapi.yaml
|
|
||||||
|
|
||||||
# This will replace the generation source in your workflow file with your local schema path
|
|
||||||
generate-from-local:
|
|
||||||
@if ! which sed >/dev/null; then \
|
|
||||||
echo "sed is not installed. Please install it using the following command:"; \
|
|
||||||
echo "For Ubuntu/Debian: apt-get install sed"; \
|
|
||||||
echo "For macOS: sed is pre-installed"; \
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
@sed -i '' '/openapi_docs: |/{n;s|-.*|- ./openapi.yaml|;}' ./.github/workflows/speakeasy_sdk_generation.yml
|
|
||||||
|
|
||||||
check-speakeasy:
|
|
||||||
@command -v speakeasy >/dev/null 2>&1 || { echo >&2 "speakeasy CLI is not installed. Please install before continuing."; exit 1; }
|
|
||||||
760
README.md
760
README.md
@@ -1,4 +1,4 @@
|
|||||||
# openapi
|
# @lukehagar/plexjs
|
||||||
|
|
||||||
<div align="left">
|
<div align="left">
|
||||||
<a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
|
<a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
|
||||||
@@ -7,28 +7,92 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Start Summary [summary] -->
|
||||||
|
## Summary
|
||||||
|
|
||||||
## 🏗 **Welcome to your new SDK!** 🏗
|
Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server
|
||||||
|
|
||||||
It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:
|
# Plex Media Server OpenAPI Specification
|
||||||
- [ ] 🛠 Make your SDK feel handcrafted by [customizing it](https://www.speakeasyapi.dev/docs/customize-sdks)
|
|
||||||
- [ ] ♻️ Refine your SDK quickly by iterating locally with the [Speakeasy CLI](https://github.com/speakeasy-api/speakeasy)
|
An Open Source OpenAPI Specification for Plex Media Server
|
||||||
- [ ] 🎁 Publish your SDK to package managers by [configuring automatic publishing](https://www.speakeasyapi.dev/docs/productionize-sdks/publish-sdks)
|
|
||||||
- [ ] ✨ When ready to productionize, delete this section from the README
|
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] -->
|
||||||
|
|
||||||
|
<!-- Start Table of Contents [toc] -->
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
<!-- End Table of Contents [toc] -->
|
||||||
|
|
||||||
<!-- Start SDK Installation [installation] -->
|
<!-- Start SDK Installation [installation] -->
|
||||||
## SDK Installation
|
## SDK Installation
|
||||||
|
|
||||||
|
The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.
|
||||||
|
|
||||||
### NPM
|
### NPM
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm add openapi
|
npm add @lukehagar/plexjs
|
||||||
|
```
|
||||||
|
|
||||||
|
### PNPM
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm add @lukehagar/plexjs
|
||||||
|
```
|
||||||
|
|
||||||
|
### Bun
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bun add @lukehagar/plexjs
|
||||||
```
|
```
|
||||||
|
|
||||||
### Yarn
|
### Yarn
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn add openapi
|
yarn add @lukehagar/plexjs zod
|
||||||
|
|
||||||
|
# Note that Yarn does not install peer dependencies automatically. You will need
|
||||||
|
# to install zod as shown above.
|
||||||
```
|
```
|
||||||
<!-- End SDK Installation [installation] -->
|
<!-- End SDK Installation [installation] -->
|
||||||
|
|
||||||
@@ -38,20 +102,16 @@ yarn add openapi
|
|||||||
### Example
|
### Example
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
const plexAPI = new PlexAPI({
|
||||||
const sdk = new SDK({
|
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getServerCapabilities();
|
async function run() {
|
||||||
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
console.log(result);
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -62,28 +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) - 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
|
|
||||||
* [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
|
|
||||||
|
|
||||||
### [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
|
||||||
@@ -95,28 +148,31 @@ run();
|
|||||||
### [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
|
||||||
* [getLibraries](docs/sdks/library/README.md#getlibraries) - Get All Libraries
|
* [getAllLibraries](docs/sdks/library/README.md#getalllibraries) - Get All Libraries
|
||||||
* [getLibrary](docs/sdks/library/README.md#getlibrary) - 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
|
||||||
* [refreshLibrary](docs/sdks/library/README.md#refreshlibrary) - Refresh Library
|
* [getLibrarySectionsAll](docs/sdks/library/README.md#getlibrarysectionsall) - Get Library section media by tag ALL
|
||||||
* [getLatestLibraryItems](docs/sdks/library/README.md#getlatestlibraryitems) - Get Latest Library Items
|
* [getRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
|
||||||
* [getCommonLibraryItems](docs/sdks/library/README.md#getcommonlibraryitems) - Get Common Library Items
|
* [getSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library
|
||||||
* [getMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata
|
* [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
|
||||||
* [getOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck
|
* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
||||||
|
|
||||||
### [log](docs/sdks/log/README.md)
|
### [log](docs/sdks/log/README.md)
|
||||||
|
|
||||||
@@ -124,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
|
||||||
@@ -136,10 +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
|
||||||
|
|
||||||
### [security](docs/sdks/security/README.md)
|
### [plex](docs/sdks/plex/README.md)
|
||||||
|
|
||||||
* [getTransientToken](docs/sdks/security/README.md#gettransienttoken) - Get a Transient Token.
|
* [getCompanionsData](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data
|
||||||
* [getSourceConnectionInformation](docs/sdks/security/README.md#getsourceconnectioninformation) - Get Source Connection Information
|
* [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
|
||||||
|
|
||||||
|
|
||||||
|
### [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
|
||||||
|
|
||||||
|
### [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)
|
||||||
|
|
||||||
@@ -148,84 +236,336 @@ 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)
|
### [video](docs/sdks/video/README.md)
|
||||||
|
|
||||||
* [startUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode
|
|
||||||
* [getTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item
|
* [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 |
|
| Property | Type | Description |
|
||||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
| ------------------- | ---------- | --------------------------------------------------------------------------------------- |
|
||||||
| errors.GetServerCapabilitiesResponseBody | 401 | application/json |
|
| `error.name` | `string` | Error class name eg `SDKError` |
|
||||||
| errors.SDKError | 4xx-5xx | */* |
|
| `error.message` | `string` | Error message |
|
||||||
|
| `error.statusCode` | `number` | HTTP status code eg `404` |
|
||||||
Example
|
| `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 { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import * as errors from "openapi/models/errors";
|
import * as errors from "@lukehagar/plexjs/sdk/models/errors";
|
||||||
|
|
||||||
async function run() {
|
const plexAPI = new PlexAPI({
|
||||||
const sdk = new SDK({
|
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getServerCapabilities().catch((err) => {
|
async function run() {
|
||||||
if (err instanceof errors.GetServerCapabilitiesResponseBody) {
|
try {
|
||||||
console.error(err); // handle exception
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
return null;
|
|
||||||
} else {
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
console.log(result);
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
} catch (error) {
|
||||||
|
// Depending on the method different errors may be thrown
|
||||||
|
if (error instanceof errors.GetServerCapabilitiesBadRequest) {
|
||||||
|
console.log(error.message);
|
||||||
|
console.log(error.data$.errors); // Errors[]
|
||||||
|
console.log(error.data$.rawResponse); // Response
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle response
|
// 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: number` 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 | `http://10.10.10.47:32400` | None |
|
| `protocol` | `protocol: models.ServerProtocol` | - `"http"`<br/>- `"https"` | `"https"` | The protocol to use for the server connection |
|
||||||
| 1 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) |
|
| `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
|
||||||
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
#### Variables
|
const plexAPI = new PlexAPI({
|
||||||
|
protocol: "https",
|
||||||
|
ip: "4982:bc2a:b4f8:efb5:2394:5bc3:ab4f:0e6d",
|
||||||
|
port: "44765",
|
||||||
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
|
});
|
||||||
|
|
||||||
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:
|
async function run() {
|
||||||
* `protocol: models.ServerProtocol`
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
* `ip: string`
|
|
||||||
* `port: string`
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
### 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: str` 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
|
||||||
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
|
const plexAPI = new PlexAPI({
|
||||||
|
serverURL: "https://10.10.10.47:32400",
|
||||||
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
|
});
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
|
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### 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:
|
||||||
|
```typescript
|
||||||
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
|
const plexAPI = new PlexAPI({
|
||||||
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
|
});
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const result = await plexAPI.plex.getCompanionsData({
|
||||||
|
serverURL: "https://plex.tv/api/v2",
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
|
||||||
|
```
|
||||||
<!-- End Server Selection [server] -->
|
<!-- End Server Selection [server] -->
|
||||||
|
|
||||||
<!-- Start Custom HTTP Client [http-client] -->
|
<!-- Start Custom HTTP Client [http-client] -->
|
||||||
@@ -246,8 +586,8 @@ custom header and a timeout to requests and how to use the `"requestError"` hook
|
|||||||
to log errors:
|
to log errors:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { HTTPClient } from "openapi/lib/http";
|
import { HTTPClient } from "@lukehagar/plexjs/lib/http";
|
||||||
|
|
||||||
const httpClient = new HTTPClient({
|
const httpClient = new HTTPClient({
|
||||||
// fetcher takes a function that has the same signature as native `fetch`.
|
// fetcher takes a function that has the same signature as native `fetch`.
|
||||||
@@ -258,7 +598,7 @@ const httpClient = new HTTPClient({
|
|||||||
|
|
||||||
httpClient.addHook("beforeRequest", (request) => {
|
httpClient.addHook("beforeRequest", (request) => {
|
||||||
const nextRequest = new Request(request, {
|
const nextRequest = new Request(request, {
|
||||||
signal: request.signal || AbortSignal.timeout(5000);
|
signal: request.signal || AbortSignal.timeout(5000)
|
||||||
});
|
});
|
||||||
|
|
||||||
nextRequest.headers.set("x-custom-header", "custom value");
|
nextRequest.headers.set("x-custom-header", "custom value");
|
||||||
@@ -273,7 +613,7 @@ httpClient.addHook("requestError", (error, request) => {
|
|||||||
console.groupEnd();
|
console.groupEnd();
|
||||||
});
|
});
|
||||||
|
|
||||||
const sdk = new SDK({ httpClient });
|
const sdk = new PlexAPI({ httpClient });
|
||||||
```
|
```
|
||||||
<!-- End Custom HTTP Client [http-client] -->
|
<!-- End Custom HTTP Client [http-client] -->
|
||||||
|
|
||||||
@@ -285,25 +625,21 @@ const sdk = new SDK({ 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 { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
const plexAPI = new PlexAPI({
|
||||||
const sdk = new SDK({
|
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getServerCapabilities();
|
async function run() {
|
||||||
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
console.log(result);
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -311,6 +647,230 @@ run();
|
|||||||
```
|
```
|
||||||
<!-- End Authentication [security] -->
|
<!-- End Authentication [security] -->
|
||||||
|
|
||||||
|
<!-- Start Requirements [requirements] -->
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
|
||||||
|
<!-- End Requirements [requirements] -->
|
||||||
|
|
||||||
|
<!-- Start Standalone functions [standalone-funcs] -->
|
||||||
|
## Standalone functions
|
||||||
|
|
||||||
|
All the methods listed above are available as standalone functions. These
|
||||||
|
functions are ideal for use in applications running in the browser, serverless
|
||||||
|
runtimes or other environments where application bundle size is a primary
|
||||||
|
concern. When using a bundler to build your application, all unused
|
||||||
|
functionality will be either excluded from the final bundle or tree-shaken away.
|
||||||
|
|
||||||
|
To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
||||||
|
|
||||||
|
<details>
|
||||||
|
|
||||||
|
<summary>Available standalone functions</summary>
|
||||||
|
|
||||||
|
- [`activitiesCancelServerActivities`](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities
|
||||||
|
- [`activitiesGetServerActivities`](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities
|
||||||
|
- [`authenticationGetSourceConnectionInformation`](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information
|
||||||
|
- [`authenticationGetTokenDetails`](docs/sdks/authentication/README.md#gettokendetails) - Get Token Details
|
||||||
|
- [`authenticationGetTransientToken`](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token
|
||||||
|
- [`authenticationPostUsersSignInData`](docs/sdks/authentication/README.md#postuserssignindata) - Get User Sign In Data
|
||||||
|
- [`butlerGetButlerTasks`](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks
|
||||||
|
- [`butlerStartAllTasks`](docs/sdks/butler/README.md#startalltasks) - Start all Butler tasks
|
||||||
|
- [`butlerStartTask`](docs/sdks/butler/README.md#starttask) - Start a single Butler task
|
||||||
|
- [`butlerStopAllTasks`](docs/sdks/butler/README.md#stopalltasks) - Stop all Butler tasks
|
||||||
|
- [`butlerStopTask`](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task
|
||||||
|
- [`hubsGetGlobalHubs`](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs
|
||||||
|
- [`hubsGetLibraryHubs`](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs
|
||||||
|
- [`hubsGetRecentlyAdded`](docs/sdks/hubs/README.md#getrecentlyadded) - Get Recently Added
|
||||||
|
- [`libraryDeleteLibrary`](docs/sdks/library/README.md#deletelibrary) - Delete Library Section
|
||||||
|
- [`libraryGetActorsLibrary`](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media
|
||||||
|
- [`libraryGetAllLibraries`](docs/sdks/library/README.md#getalllibraries) - Get All Libraries
|
||||||
|
- [`libraryGetCountriesLibrary`](docs/sdks/library/README.md#getcountrieslibrary) - Get Countries of library media
|
||||||
|
- [`libraryGetFileHash`](docs/sdks/library/README.md#getfilehash) - Get Hash Value
|
||||||
|
- [`libraryGetGenresLibrary`](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media
|
||||||
|
- [`libraryGetLibraryDetails`](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details
|
||||||
|
- [`libraryGetLibraryItems`](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
|
||||||
|
- [`libraryGetLibrarySectionsAll`](docs/sdks/library/README.md#getlibrarysectionsall) - Get Library section media by tag ALL
|
||||||
|
- [`libraryGetMediaArts`](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork
|
||||||
|
- [`libraryGetMediaMetaData`](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata
|
||||||
|
- [`libraryGetMediaPosters`](docs/sdks/library/README.md#getmediaposters) - Get Media Posters
|
||||||
|
- [`libraryGetMetadataChildren`](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
||||||
|
- [`libraryGetRecentlyAddedLibrary`](docs/sdks/library/README.md#getrecentlyaddedlibrary) - Get Recently Added
|
||||||
|
- [`libraryGetRefreshLibraryMetadata`](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
|
||||||
|
- [`libraryGetSearchAllLibraries`](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
|
||||||
|
- [`libraryGetSearchLibrary`](docs/sdks/library/README.md#getsearchlibrary) - Search Library
|
||||||
|
- [`libraryGetTopWatchedContent`](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
||||||
|
- [`libraryPostMediaArts`](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork
|
||||||
|
- [`libraryPostMediaPoster`](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster
|
||||||
|
- [`logEnablePaperTrail`](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail
|
||||||
|
- [`logLogLine`](docs/sdks/log/README.md#logline) - Logging a single line message.
|
||||||
|
- [`logLogMultiLine`](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message
|
||||||
|
- [`mediaGetBannerImage`](docs/sdks/media/README.md#getbannerimage) - Get Banner Image
|
||||||
|
- [`mediaGetThumbImage`](docs/sdks/media/README.md#getthumbimage) - Get Thumb Image
|
||||||
|
- [`mediaMarkPlayed`](docs/sdks/media/README.md#markplayed) - Mark Media Played
|
||||||
|
- [`mediaMarkUnplayed`](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed
|
||||||
|
- [`mediaUpdatePlayProgress`](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress
|
||||||
|
- [`playlistsAddPlaylistContents`](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist
|
||||||
|
- [`playlistsClearPlaylistContents`](docs/sdks/playlists/README.md#clearplaylistcontents) - Delete Playlist Contents
|
||||||
|
- [`playlistsCreatePlaylist`](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist
|
||||||
|
- [`playlistsDeletePlaylist`](docs/sdks/playlists/README.md#deleteplaylist) - Deletes a Playlist
|
||||||
|
- [`playlistsGetPlaylist`](docs/sdks/playlists/README.md#getplaylist) - Retrieve Playlist
|
||||||
|
- [`playlistsGetPlaylistContents`](docs/sdks/playlists/README.md#getplaylistcontents) - Retrieve Playlist Contents
|
||||||
|
- [`playlistsGetPlaylists`](docs/sdks/playlists/README.md#getplaylists) - Get All Playlists
|
||||||
|
- [`playlistsUpdatePlaylist`](docs/sdks/playlists/README.md#updateplaylist) - Update a Playlist
|
||||||
|
- [`playlistsUploadPlaylist`](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist
|
||||||
|
- [`plexGetCompanionsData`](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data
|
||||||
|
- [`plexGetGeoData`](docs/sdks/plex/README.md#getgeodata) - Get Geo Data
|
||||||
|
- [`plexGetHomeData`](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data
|
||||||
|
- [`plexGetPin`](docs/sdks/plex/README.md#getpin) - Get a Pin
|
||||||
|
- [`plexGetServerResources`](docs/sdks/plex/README.md#getserverresources) - Get Server Resources
|
||||||
|
- [`plexGetTokenByPinId`](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId
|
||||||
|
- [`plexGetUserFriends`](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in
|
||||||
|
- [`searchGetSearchResults`](docs/sdks/search/README.md#getsearchresults) - Get Search Results
|
||||||
|
- [`searchPerformSearch`](docs/sdks/search/README.md#performsearch) - Perform a search
|
||||||
|
- [`searchPerformVoiceSearch`](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search
|
||||||
|
- [`serverGetAvailableClients`](docs/sdks/server/README.md#getavailableclients) - Get Available Clients
|
||||||
|
- [`serverGetDevices`](docs/sdks/server/README.md#getdevices) - Get Devices
|
||||||
|
- [`serverGetMediaProviders`](docs/sdks/server/README.md#getmediaproviders) - Get Media Providers
|
||||||
|
- [`serverGetMyPlexAccount`](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account
|
||||||
|
- [`serverGetResizedPhoto`](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo
|
||||||
|
- [`serverGetServerCapabilities`](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities
|
||||||
|
- [`serverGetServerIdentity`](docs/sdks/server/README.md#getserveridentity) - Get Server Identity
|
||||||
|
- [`serverGetServerList`](docs/sdks/server/README.md#getserverlist) - Get Server List
|
||||||
|
- [`serverGetServerPreferences`](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences
|
||||||
|
- [`sessionsGetSessionHistory`](docs/sdks/sessions/README.md#getsessionhistory) - Get Session History
|
||||||
|
- [`sessionsGetSessions`](docs/sdks/sessions/README.md#getsessions) - Get Active Sessions
|
||||||
|
- [`sessionsGetTranscodeSessions`](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions
|
||||||
|
- [`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>
|
||||||
|
<!-- End Standalone functions [standalone-funcs] -->
|
||||||
|
|
||||||
|
<!-- Start File uploads [file-upload] -->
|
||||||
|
## File uploads
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
>
|
||||||
|
> Depending on your JavaScript runtime, there are convenient utilities that return a handle to a file without reading the entire contents into memory:
|
||||||
|
>
|
||||||
|
> - **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).
|
||||||
|
> - **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.
|
||||||
|
> - **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).
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
|
const plexAPI = new PlexAPI({
|
||||||
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
|
});
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const result = await plexAPI.library.postMediaArts(
|
||||||
|
2268,
|
||||||
|
"https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b",
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
|
||||||
|
```
|
||||||
|
<!-- End File uploads [file-upload] -->
|
||||||
|
|
||||||
|
<!-- Start Retries [retries] -->
|
||||||
|
## Retries
|
||||||
|
|
||||||
|
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
|
||||||
|
|
||||||
|
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
|
||||||
|
```typescript
|
||||||
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
|
const plexAPI = new PlexAPI({
|
||||||
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
|
});
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const result = await plexAPI.server.getServerCapabilities({
|
||||||
|
retries: {
|
||||||
|
strategy: "backoff",
|
||||||
|
backoff: {
|
||||||
|
initialInterval: 1,
|
||||||
|
maxInterval: 50,
|
||||||
|
exponent: 1.1,
|
||||||
|
maxElapsedTime: 100,
|
||||||
|
},
|
||||||
|
retryConnectionErrors: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
|
||||||
|
```typescript
|
||||||
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
|
const plexAPI = new PlexAPI({
|
||||||
|
retryConfig: {
|
||||||
|
strategy: "backoff",
|
||||||
|
backoff: {
|
||||||
|
initialInterval: 1,
|
||||||
|
maxInterval: 50,
|
||||||
|
exponent: 1.1,
|
||||||
|
maxElapsedTime: 100,
|
||||||
|
},
|
||||||
|
retryConnectionErrors: false,
|
||||||
|
},
|
||||||
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
|
});
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
|
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
|
||||||
|
```
|
||||||
|
<!-- End Retries [retries] -->
|
||||||
|
|
||||||
|
<!-- Start Debugging [debug] -->
|
||||||
|
## Debugging
|
||||||
|
|
||||||
|
You can setup your SDK to emit debug logs for SDK requests and responses.
|
||||||
|
|
||||||
|
You can pass a logger that matches `console`'s interface as an SDK option.
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
|
const sdk = new PlexAPI({ debugLogger: console });
|
||||||
|
```
|
||||||
|
<!-- End Debugging [debug] -->
|
||||||
|
|
||||||
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
|
|||||||
1340
RELEASES.md
1340
RELEASES.md
File diff suppressed because it is too large
Load Diff
48
RUNTIMES.md
Normal file
48
RUNTIMES.md
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
# Supported JavaScript runtimes
|
||||||
|
|
||||||
|
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 Streams API][web-streams] and in particular `ReadableStream`
|
||||||
|
* [Async iterables][async-iter] using `Symbol.asyncIterator`
|
||||||
|
|
||||||
|
[web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
|
||||||
|
[web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
|
||||||
|
[async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
|
||||||
|
|
||||||
|
Runtime environments that are explicitly supported are:
|
||||||
|
|
||||||
|
- Evergreen browsers which include: Chrome, Safari, Edge, Firefox
|
||||||
|
- Node.js active and maintenance LTS releases
|
||||||
|
- Currently, this is v18 and v20
|
||||||
|
- Bun v1 and above
|
||||||
|
- Deno v1.39
|
||||||
|
- 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
|
||||||
|
|
||||||
|
## 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.
|
||||||
14
USAGE.md
14
USAGE.md
@@ -1,19 +1,15 @@
|
|||||||
<!-- Start SDK Example Usage [usage] -->
|
<!-- Start SDK Example Usage [usage] -->
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
const plexAPI = new PlexAPI({
|
||||||
const sdk = new SDK({
|
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getServerCapabilities();
|
async function run() {
|
||||||
|
const result = await plexAPI.server.getServerCapabilities();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
console.log(result);
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
1786
codeSamples.yaml
Normal file
1786
codeSamples.yaml
Normal file
File diff suppressed because it is too large
Load Diff
24
docs/lib/utils/retryconfig.md
Normal file
24
docs/lib/utils/retryconfig.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# RetryConfig
|
||||||
|
|
||||||
|
Allows customizing the default retry configuration. It is only permitted in methods that accept retry policies.
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Name | Type | Description | Example |
|
||||||
|
| ------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------ | ----------- |
|
||||||
|
| `strategy` | `"backoff" | "none"` | The retry strategy to use. | `"backoff"` |
|
||||||
|
| `backoff` | [BackoffStrategy](#backoffstrategy) | When strategy is "backoff", this configurates for the backoff parameters. | |
|
||||||
|
| `retryConnectionErrors` | `*boolean*` | When strategy is "backoff", this determines whether or not to retry on connection errors. | `true` |
|
||||||
|
|
||||||
|
## BackoffStrategy
|
||||||
|
|
||||||
|
The backoff strategy allows retrying a request with an exponential backoff between each retry.
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
| Name | Type | Description | Example |
|
||||||
|
| ------------------ | ------------ | ----------------------------------------- | -------- |
|
||||||
|
| `initialInterval` | `*number*` | The initial interval in milliseconds. | `500` |
|
||||||
|
| `maxInterval` | `*number*` | The maximum interval in milliseconds. | `60000` |
|
||||||
|
| `exponent` | `*number*` | The exponent to use for the backoff. | `1.5` |
|
||||||
|
| `maxElapsedTime` | `*number*` | The maximum elapsed time in milliseconds. | `300000` |
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# AddPlaylistContentsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.AddPlaylistContentsErrors](../../models/errors/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,11 +0,0 @@
|
|||||||
# ApplyUpdatesResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [errors.ApplyUpdatesErrors](../../models/errors/applyupdateserrors.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,11 +0,0 @@
|
|||||||
# CancelServerActivitiesResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.CancelServerActivitiesErrors](../../models/errors/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,11 +0,0 @@
|
|||||||
# CheckForUpdatesResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [errors.CheckForUpdatesErrors](../../models/errors/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,10 +0,0 @@
|
|||||||
# ClearPlaylistContentsErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# ClearPlaylistContentsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [errors.ClearPlaylistContentsErrors](../../models/errors/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,10 +0,0 @@
|
|||||||
# CreatePlaylistErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# CreatePlaylistResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.CreatePlaylistErrors](../../models/errors/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,10 +0,0 @@
|
|||||||
# DeleteLibraryErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# DeleteLibraryResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.DeleteLibraryErrors](../../models/errors/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,10 +0,0 @@
|
|||||||
# DeletePlaylistErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# DeletePlaylistResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.DeletePlaylistErrors](../../models/errors/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,10 +0,0 @@
|
|||||||
# EnablePaperTrailErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# EnablePaperTrailResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.EnablePaperTrailErrors](../../models/errors/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,10 +0,0 @@
|
|||||||
# Errors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,10 +0,0 @@
|
|||||||
# GetAvailableClientsErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetAvailableClientsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetAvailableClientsErrors](../../models/errors/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,10 +0,0 @@
|
|||||||
# GetButlerTasksErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetButlerTasksResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetButlerTasksErrors](../../models/errors/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,10 +0,0 @@
|
|||||||
# GetCommonLibraryItemsErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetCommonLibraryItemsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [errors.GetCommonLibraryItemsErrors](../../models/errors/getcommonlibraryitemserrors.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,10 +0,0 @@
|
|||||||
# GetDevicesErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,10 +0,0 @@
|
|||||||
# GetFileHashErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetFileHashResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetFileHashErrors](../../models/errors/getfilehasherrors.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,10 +0,0 @@
|
|||||||
# GetGlobalHubsErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetGlobalHubsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetGlobalHubsErrors](../../models/errors/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,10 +0,0 @@
|
|||||||
# GetLatestLibraryItemsErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetLatestLibraryItemsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [errors.GetLatestLibraryItemsErrors](../../models/errors/getlatestlibraryitemserrors.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,10 +0,0 @@
|
|||||||
# GetLibrariesErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetLibrariesResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [errors.GetLibrariesErrors](../../models/errors/getlibrarieserrors.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,10 +0,0 @@
|
|||||||
# GetLibraryErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,10 +0,0 @@
|
|||||||
# GetLibraryHubsErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetLibraryHubsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetLibraryHubsErrors](../../models/errors/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,10 +0,0 @@
|
|||||||
# GetLibraryItemsErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetLibraryItemsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [errors.GetLibraryItemsErrors](../../models/errors/getlibraryitemserrors.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,10 +0,0 @@
|
|||||||
# GetMetadataChildrenErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetMetadataChildrenResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetMetadataChildrenErrors](../../models/errors/getmetadatachildrenerrors.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,10 +0,0 @@
|
|||||||
# GetMetadataErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetMetadataResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetMetadataErrors](../../models/errors/getmetadataerrors.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,10 +0,0 @@
|
|||||||
# GetMyPlexAccountErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetMyPlexAccountResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetMyPlexAccountErrors](../../models/errors/getmyplexaccounterrors.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,10 +0,0 @@
|
|||||||
# GetOnDeckErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,10 +0,0 @@
|
|||||||
# GetPlaylistContentsErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetPlaylistContentsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetPlaylistContentsErrors](../../models/errors/getplaylistcontentserrors.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,10 +0,0 @@
|
|||||||
# GetPlaylistErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetPlaylistResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetPlaylistErrors](../../models/errors/getplaylisterrors.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,10 +0,0 @@
|
|||||||
# GetPlaylistsErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetPlaylistsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [errors.GetPlaylistsErrors](../../models/errors/getplaylistserrors.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,10 +0,0 @@
|
|||||||
# GetRecentlyAddedErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetRecentlyAddedResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetRecentlyAddedErrors](../../models/errors/getrecentlyaddederrors.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,10 +0,0 @@
|
|||||||
# GetResizedPhotoErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetResizedPhotoResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [errors.GetResizedPhotoErrors](../../models/errors/getresizedphotoerrors.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,10 +0,0 @@
|
|||||||
# GetSearchResultsErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetSearchResultsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetSearchResultsErrors](../../models/errors/getsearchresultserrors.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,10 +0,0 @@
|
|||||||
# GetServerActivitiesErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetServerActivitiesResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetServerActivitiesErrors](../../models/errors/getserveractivitieserrors.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,11 +0,0 @@
|
|||||||
# GetServerCapabilitiesResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.Errors](../../models/errors/errors.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,10 +0,0 @@
|
|||||||
# GetServerIdentityErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetServerIdentityResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetServerIdentityErrors](../../models/errors/getserveridentityerrors.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,10 +0,0 @@
|
|||||||
# GetServerListErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetServerListResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetServerListErrors](../../models/errors/getserverlisterrors.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,10 +0,0 @@
|
|||||||
# GetServerPreferencesErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetServerPreferencesResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetServerPreferencesErrors](../../models/errors/getserverpreferenceserrors.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,10 +0,0 @@
|
|||||||
# GetSessionHistoryErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetSessionHistoryResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetSessionHistoryErrors](../../models/errors/getsessionhistoryerrors.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,10 +0,0 @@
|
|||||||
# GetSessionsErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetSessionsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetSessionsErrors](../../models/errors/getsessionserrors.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,10 +0,0 @@
|
|||||||
# GetSourceConnectionInformationErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetSourceConnectionInformationResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [errors.GetSourceConnectionInformationErrors](../../models/errors/getsourceconnectioninformationerrors.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,10 +0,0 @@
|
|||||||
# GetTimelineErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetTimelineResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetTimelineErrors](../../models/errors/gettimelineerrors.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,10 +0,0 @@
|
|||||||
# GetTranscodeSessionsErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetTranscodeSessionsResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetTranscodeSessionsErrors](../../models/errors/gettranscodesessionserrors.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,10 +0,0 @@
|
|||||||
# GetTransientTokenErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetTransientTokenResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.GetTransientTokenErrors](../../models/errors/gettransienttokenerrors.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,10 +0,0 @@
|
|||||||
# GetUpdateStatusErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# GetUpdateStatusResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [errors.GetUpdateStatusErrors](../../models/errors/getupdatestatuserrors.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,10 +0,0 @@
|
|||||||
# LogLineErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# LogLineResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
||||||
| `errors` | [errors.LogLineErrors](../../models/errors/loglineerrors.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,10 +0,0 @@
|
|||||||
# LogMultiLineErrors
|
|
||||||
|
|
||||||
|
|
||||||
## 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,11 +0,0 @@
|
|||||||
# LogMultiLineResponseBody
|
|
||||||
|
|
||||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
||||||
| `errors` | [errors.LogMultiLineErrors](../../models/errors/logmultilineerrors.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 |
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user