mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 04:20:46 +00:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e418c55013 | ||
|
|
b593c2c54b | ||
|
|
a449d25ac4 | ||
|
|
6af375d524 | ||
|
|
fc838e8ebf | ||
|
|
162b3b3d13 | ||
|
|
3dff2b9225 | ||
|
|
d6d9c46f51 | ||
|
|
f79b24ee0e | ||
|
|
78c540ebf4 | ||
|
|
3fc9856c81 | ||
|
|
bc1fa68557 | ||
|
|
182d88f7f1 | ||
|
|
300cbb21cd |
@@ -1,27 +1,32 @@
|
||||
lockVersion: 2.0.0
|
||||
id: 16f22cbf-f23f-4419-8924-3a4b06381947
|
||||
management:
|
||||
docChecksum: 7a43cd3413d535205cfaee20a4b6a250
|
||||
docChecksum: 3ace1ac37c7117fbda261cad01e65943
|
||||
docVersion: 0.0.3
|
||||
speakeasyVersion: 1.277.0
|
||||
generationVersion: 2.317.0
|
||||
releaseVersion: 0.14.1
|
||||
configChecksum: 398598dba425aa0436966c866c6282c9
|
||||
speakeasyVersion: 1.285.1
|
||||
generationVersion: 2.326.3
|
||||
releaseVersion: 0.15.4
|
||||
configChecksum: e9e60c3ad9a0490906b386163e5ce5c6
|
||||
repoURL: https://github.com/LukeHagar/plexjs.git
|
||||
repoSubDirectory: .
|
||||
installationURL: https://github.com/LukeHagar/plexjs
|
||||
published: true
|
||||
features:
|
||||
typescript:
|
||||
additionalDependencies: 0.1.0
|
||||
constsAndDefaults: 0.1.5
|
||||
core: 3.9.2
|
||||
core: 3.9.3
|
||||
flattening: 2.81.1
|
||||
globalSecurity: 2.82.9
|
||||
globalSecurityCallbacks: 0.1.0
|
||||
globalSecurityFlattening: 0.1.0
|
||||
globalServerURLs: 2.82.4
|
||||
globals: 2.82.1
|
||||
methodServerURLs: 2.82.1
|
||||
nameOverrides: 2.81.2
|
||||
responseFormat: 0.2.3
|
||||
sdkHooks: 0.1.0
|
||||
unions: 2.85.4
|
||||
generatedFiles:
|
||||
- src/sdk/server.ts
|
||||
- src/sdk/media.ts
|
||||
@@ -92,7 +97,6 @@ generatedFiles:
|
||||
- src/models/operations/getlibraries.ts
|
||||
- src/models/operations/getlibrary.ts
|
||||
- src/models/operations/deletelibrary.ts
|
||||
- src/models/operations/getlibraryitems.ts
|
||||
- src/models/operations/refreshlibrary.ts
|
||||
- src/models/operations/searchlibrary.ts
|
||||
- src/models/operations/getmetadata.ts
|
||||
@@ -315,19 +319,6 @@ generatedFiles:
|
||||
- docs/models/operations/getlibraryresponse.md
|
||||
- docs/models/operations/deletelibraryrequest.md
|
||||
- docs/models/operations/deletelibraryresponse.md
|
||||
- docs/models/operations/tag.md
|
||||
- docs/models/operations/getlibraryitemsrequest.md
|
||||
- docs/models/operations/getlibraryitemspart.md
|
||||
- docs/models/operations/getlibraryitemsmedia.md
|
||||
- docs/models/operations/getlibraryitemsgenre.md
|
||||
- docs/models/operations/getlibraryitemscountry.md
|
||||
- docs/models/operations/getlibraryitemsdirector.md
|
||||
- docs/models/operations/getlibraryitemswriter.md
|
||||
- docs/models/operations/getlibraryitemsrole.md
|
||||
- docs/models/operations/getlibraryitemsmetadata.md
|
||||
- docs/models/operations/getlibraryitemsmediacontainer.md
|
||||
- docs/models/operations/getlibraryitemsresponsebody.md
|
||||
- docs/models/operations/getlibraryitemsresponse.md
|
||||
- docs/models/operations/refreshlibraryrequest.md
|
||||
- docs/models/operations/refreshlibraryresponse.md
|
||||
- docs/models/operations/type.md
|
||||
|
||||
@@ -12,7 +12,7 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: false
|
||||
typescript:
|
||||
version: 0.14.1
|
||||
version: 0.15.4
|
||||
additionalDependencies:
|
||||
dependencies: {}
|
||||
devDependencies: {}
|
||||
@@ -32,6 +32,7 @@ typescript:
|
||||
webhooks: models/webhooks
|
||||
inputModelSuffix: input
|
||||
maxMethodParams: 4
|
||||
methodArguments: require-security-and-request
|
||||
outputModelSuffix: output
|
||||
packageName: '@lukehagar/plexjs'
|
||||
responseFormat: envelope
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
speakeasyVersion: 1.277.0
|
||||
speakeasyVersion: 1.285.1
|
||||
sources:
|
||||
my-source: {}
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
sourceRevisionDigest: sha256:b3e11a2f45042ee176faddb281b8ec8c3be19971c0633b370b8c59c373ccdbfc
|
||||
sourceBlobDigest: sha256:275e3929dd5ea3825285d74ebd5c39faded4c996a0b84c09545615b31d1ca381
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
targets:
|
||||
plexjs:
|
||||
source: my-source
|
||||
sourceNamespace: my-source
|
||||
sourceRevisionDigest: sha256:b3e11a2f45042ee176faddb281b8ec8c3be19971c0633b370b8c59c373ccdbfc
|
||||
sourceBlobDigest: sha256:275e3929dd5ea3825285d74ebd5c39faded4c996a0b84c09545615b31d1ca381
|
||||
outLocation: /github/workspace/repo
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
@@ -12,6 +21,8 @@ workflow:
|
||||
my-source:
|
||||
inputs:
|
||||
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source
|
||||
targets:
|
||||
plexjs:
|
||||
target: typescript
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
sources:
|
||||
my-source:
|
||||
inputs:
|
||||
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
||||
my-source:
|
||||
inputs:
|
||||
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source
|
||||
targets:
|
||||
plexjs:
|
||||
target: typescript
|
||||
source: my-source
|
||||
codeSamples:
|
||||
output: codeSamples.yaml
|
||||
publish:
|
||||
npm:
|
||||
token: $NPM_TOKEN
|
||||
plexjs:
|
||||
target: typescript
|
||||
source: my-source
|
||||
publish:
|
||||
npm:
|
||||
token: $NPM_TOKEN
|
||||
codeSamples:
|
||||
output: codeSamples.yaml
|
||||
|
||||
13
README.md
13
README.md
@@ -104,7 +104,6 @@ run();
|
||||
* [getLibraries](docs/sdks/library/README.md#getlibraries) - Get All Libraries
|
||||
* [getLibrary](docs/sdks/library/README.md#getlibrary) - Get Library Details
|
||||
* [deleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section
|
||||
* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
|
||||
* [refreshLibrary](docs/sdks/library/README.md#refreshlibrary) - Refresh Library
|
||||
* [searchLibrary](docs/sdks/library/README.md#searchlibrary) - Search Library
|
||||
* [getMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata
|
||||
@@ -284,10 +283,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const strong = false;
|
||||
const xPlexClientIdentifier = "Postman";
|
||||
|
||||
const result = await plexAPI.plex.getPin(strong, xPlexClientIdentifier, {
|
||||
const result = await plexAPI.plex.getPin(false, "Postman", {
|
||||
serverURL: "https://plex.tv/api/v2",
|
||||
});
|
||||
|
||||
@@ -330,7 +326,7 @@ const httpClient = new HTTPClient({
|
||||
|
||||
httpClient.addHook("beforeRequest", (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");
|
||||
@@ -417,10 +413,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const strong = false;
|
||||
const xPlexClientIdentifier = "Postman";
|
||||
|
||||
const result = await plexAPI.plex.getPin(strong, xPlexClientIdentifier);
|
||||
const result = await plexAPI.plex.getPin(false, "Postman");
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
|
||||
142
RELEASES.md
142
RELEASES.md
@@ -428,4 +428,144 @@ Based on:
|
||||
### Generated
|
||||
- [typescript v0.14.1] .
|
||||
### Releases
|
||||
- [NPM v0.14.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.1 - .
|
||||
- [NPM v0.14.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.1 - .
|
||||
|
||||
## 2024-05-01 00:29:15
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.277.4 (2.318.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.14.1] .
|
||||
### Releases
|
||||
- [NPM v0.14.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.1 - .
|
||||
|
||||
## 2024-05-02 00:26:42
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.277.4 (2.318.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.14.1] .
|
||||
### Releases
|
||||
- [NPM v0.14.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.1 - .
|
||||
|
||||
## 2024-05-03 00:27:14
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.277.8 (2.319.10) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.14.2] .
|
||||
### Releases
|
||||
- [NPM v0.14.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.2 - .
|
||||
|
||||
## 2024-05-04 00:26:20
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.279.0 (2.322.5) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.14.2] .
|
||||
### Releases
|
||||
- [NPM v0.14.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.2 - .
|
||||
|
||||
## 2024-05-05 00:29:26
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.279.0 (2.322.5) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.14.2] .
|
||||
### Releases
|
||||
- [NPM v0.14.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.2 - .
|
||||
|
||||
## 2024-05-06 00:28:07
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.279.0 (2.322.5) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.14.2] .
|
||||
### Releases
|
||||
- [NPM v0.14.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.2 - .
|
||||
|
||||
## 2024-05-07 00:27:12
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.280.1 (2.322.5) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.14.2] .
|
||||
### Releases
|
||||
- [NPM v0.14.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.2 - .
|
||||
|
||||
## 2024-05-08 00:22:14
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.283.1 (2.324.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.14.2] .
|
||||
### Releases
|
||||
- [NPM v0.14.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.14.2 - .
|
||||
|
||||
## 2024-05-08 18:14:57
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.285.0 (2.326.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.15.0] .
|
||||
### Releases
|
||||
- [NPM v0.15.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.15.0 - .
|
||||
|
||||
## 2024-05-09 00:26:57
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.285.1 (2.326.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.15.0] .
|
||||
### Releases
|
||||
- [NPM v0.15.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.15.0 - .
|
||||
|
||||
## 2024-05-09 03:30:33
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.285.1 (2.326.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.15.1] .
|
||||
### Releases
|
||||
- [NPM v0.15.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.15.1 - .
|
||||
|
||||
## 2024-05-09 03:45:22
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.285.1 (2.326.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.15.2] .
|
||||
### Releases
|
||||
- [NPM v0.15.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.15.2 - .
|
||||
|
||||
## 2024-05-09 04:14:12
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.285.1 (2.326.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.15.3] .
|
||||
### Releases
|
||||
- [NPM v0.15.3] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.15.3 - .
|
||||
|
||||
## 2024-05-09 04:22:48
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.285.1 (2.326.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.15.4] .
|
||||
### Releases
|
||||
- [NPM v0.15.4] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.15.4 - .
|
||||
1242
codeSamples.yaml
1242
codeSamples.yaml
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `tonight` | [operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install |
|
||||
| `skip` | [operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `tonight` | [operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 |
|
||||
| `skip` | [operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. | 1 |
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
|
||||
| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e |
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `download` | [operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `download` | [operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 |
|
||||
@@ -1,8 +0,0 @@
|
||||
# GetLibraryItemsCountry
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ |
|
||||
| `tag` | *string* | :heavy_minus_sign: | N/A | United States of America |
|
||||
@@ -1,8 +0,0 @@
|
||||
# GetLibraryItemsDirector
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `tag` | *string* | :heavy_minus_sign: | N/A | James Cameron |
|
||||
@@ -1,8 +0,0 @@
|
||||
# GetLibraryItemsGenre
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `tag` | *string* | :heavy_minus_sign: | N/A | Adventure |
|
||||
@@ -1,21 +0,0 @@
|
||||
# GetLibraryItemsMedia
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *number* | :heavy_minus_sign: | N/A | 119534 |
|
||||
| `duration` | *number* | :heavy_minus_sign: | N/A | 11558112 |
|
||||
| `bitrate` | *number* | :heavy_minus_sign: | N/A | 25025 |
|
||||
| `width` | *number* | :heavy_minus_sign: | N/A | 3840 |
|
||||
| `height` | *number* | :heavy_minus_sign: | N/A | 2072 |
|
||||
| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 1.85 |
|
||||
| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 6 |
|
||||
| `audioCodec` | *string* | :heavy_minus_sign: | N/A | eac3 |
|
||||
| `videoCodec` | *string* | :heavy_minus_sign: | N/A | hevc |
|
||||
| `videoResolution` | *string* | :heavy_minus_sign: | N/A | 4k |
|
||||
| `container` | *string* | :heavy_minus_sign: | N/A | mkv |
|
||||
| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p |
|
||||
| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 |
|
||||
| `part` | [operations.GetLibraryItemsPart](../../models/operations/getlibraryitemspart.md)[] | :heavy_minus_sign: | N/A | [<br/>{<br/>"id": 119542,<br/>"key": "/library/parts/119542/1680457526/file.mkv",<br/>"duration": 11558112,<br/>"file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",<br/>"size": 36158371307,<br/>"container": "mkv",<br/>"videoProfile": "main 10"<br/>}<br/>] |
|
||||
File diff suppressed because one or more lines are too long
@@ -1,64 +0,0 @@
|
||||
# GetLibraryItemsMetadata
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 58683 |
|
||||
| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683 |
|
||||
| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d7768ba96b655001fdc0408 |
|
||||
| `studio` | *string* | :heavy_minus_sign: | N/A | 20th Century Studios |
|
||||
| `type` | *string* | :heavy_minus_sign: | N/A | movie |
|
||||
| `title` | *string* | :heavy_minus_sign: | N/A | Avatar: The Way of Water |
|
||||
| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 |
|
||||
| `summary` | *string* | :heavy_minus_sign: | N/A | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home. |
|
||||
| `rating` | *number* | :heavy_minus_sign: | N/A | 7.6 |
|
||||
| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 9.2 |
|
||||
| `year` | *number* | :heavy_minus_sign: | N/A | 2022 |
|
||||
| `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. |
|
||||
| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
|
||||
| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
|
||||
| `duration` | *number* | :heavy_minus_sign: | N/A | 11558112 |
|
||||
| `originallyAvailableAt` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC |
|
||||
| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1680457607 |
|
||||
| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1703239236 |
|
||||
| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright |
|
||||
| `chapterSource` | *string* | :heavy_minus_sign: | N/A | media |
|
||||
| `primaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58684 |
|
||||
| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe |
|
||||
| `grandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 66 |
|
||||
| `grandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 |
|
||||
| `grandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 |
|
||||
| `grandparentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica |
|
||||
| `grandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 |
|
||||
| `grandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 |
|
||||
| `grandparentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |
|
||||
| `media` | [operations.GetLibraryItemsMedia](../../models/operations/getlibraryitemsmedia.md)[] | :heavy_minus_sign: | N/A | [<br/>{<br/>"id": 119534,<br/>"duration": 11558112,<br/>"bitrate": 25025,<br/>"width": 3840,<br/>"height": 2072,<br/>"aspectRatio": 1.85,<br/>"audioChannels": 6,<br/>"audioCodec": "eac3",<br/>"videoCodec": "hevc",<br/>"videoResolution": "4k",<br/>"container": "mkv",<br/>"videoFrameRate": "24p",<br/>"videoProfile": "main 10",<br/>"Part": [<br/>{<br/>"id": 119542,<br/>"key": "/library/parts/119542/1680457526/file.mkv",<br/>"duration": 11558112,<br/>"file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",<br/>"size": 36158371307,<br/>"container": "mkv",<br/>"videoProfile": "main 10"<br/>}<br/>]<br/>}<br/>] |
|
||||
| `genre` | [operations.GetLibraryItemsGenre](../../models/operations/getlibraryitemsgenre.md)[] | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "Adventure"<br/>}<br/>] |
|
||||
| `country` | [operations.GetLibraryItemsCountry](../../models/operations/getlibraryitemscountry.md)[] | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "United States of America"<br/>}<br/>] |
|
||||
| `director` | [operations.GetLibraryItemsDirector](../../models/operations/getlibraryitemsdirector.md)[] | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "James Cameron"<br/>}<br/>] |
|
||||
| `writer` | [operations.GetLibraryItemsWriter](../../models/operations/getlibraryitemswriter.md)[] | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "James Cameron"<br/>}<br/>] |
|
||||
| `role` | [operations.GetLibraryItemsRole](../../models/operations/getlibraryitemsrole.md)[] | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "Sigourney Weaver"<br/>}<br/>] |
|
||||
| `titleSort` | *string* | :heavy_minus_sign: | N/A | Whale |
|
||||
| `viewCount` | *number* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1682752242 |
|
||||
| `originalTitle` | *string* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 |
|
||||
| `viewOffset` | *number* | :heavy_minus_sign: | N/A | 5222500 |
|
||||
| `skipCount` | *number* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `index` | *number* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `theme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 |
|
||||
| `leafCount` | *number* | :heavy_minus_sign: | N/A | 14 |
|
||||
| `viewedLeafCount` | *number* | :heavy_minus_sign: | N/A | 0 |
|
||||
| `childCount` | *number* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `hasPremiumExtras` | *string* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `hasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `parentRatingKey` | *string* | :heavy_minus_sign: | N/A | 66 |
|
||||
| `parentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 |
|
||||
| `parentStudio` | *string* | :heavy_minus_sign: | N/A | UCP |
|
||||
| `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 |
|
||||
| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica |
|
||||
| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2010 |
|
||||
| `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 |
|
||||
| `parentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |
|
||||
@@ -1,14 +0,0 @@
|
||||
# GetLibraryItemsPart
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *number* | :heavy_minus_sign: | N/A | 119542 |
|
||||
| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/119542/1680457526/file.mkv |
|
||||
| `duration` | *number* | :heavy_minus_sign: | N/A | 11558112 |
|
||||
| `file` | *string* | :heavy_minus_sign: | N/A | /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv |
|
||||
| `size` | *number* | :heavy_minus_sign: | N/A | 36158371307 |
|
||||
| `container` | *string* | :heavy_minus_sign: | N/A | mkv |
|
||||
| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 |
|
||||
@@ -1,9 +0,0 @@
|
||||
# GetLibraryItemsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query |
|
||||
| `tag` | [operations.Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. |
|
||||
@@ -1,11 +0,0 @@
|
||||
# GetLibraryItemsResponse
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
||||
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||
| `object` | [operations.GetLibraryItemsResponseBody](../../models/operations/getlibraryitemsresponsebody.md) | :heavy_minus_sign: | The contents of the library by section and tag |
|
||||
@@ -1,10 +0,0 @@
|
||||
# GetLibraryItemsResponseBody
|
||||
|
||||
The contents of the library by section and tag
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||
| `mediaContainer` | [operations.GetLibraryItemsMediaContainer](../../models/operations/getlibraryitemsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -1,8 +0,0 @@
|
||||
# GetLibraryItemsRole
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `tag` | *string* | :heavy_minus_sign: | N/A | Sigourney Weaver |
|
||||
@@ -1,8 +0,0 @@
|
||||
# GetLibraryItemsWriter
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `tag` | *string* | :heavy_minus_sign: | N/A | James Cameron |
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
|
||||
@@ -3,15 +3,15 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||
| `ratingKey` | *number* | :heavy_check_mark: | The rating key of the media item |
|
||||
| `key` | *string* | :heavy_check_mark: | The key of the media item to get the timeline for |
|
||||
| `state` | [operations.State](../../models/operations/state.md) | :heavy_check_mark: | The state of the media item |
|
||||
| `hasMDE` | *number* | :heavy_check_mark: | Whether the media item has MDE |
|
||||
| `time` | *number* | :heavy_check_mark: | The time of the media item |
|
||||
| `duration` | *number* | :heavy_check_mark: | The duration of the media item |
|
||||
| `context` | *string* | :heavy_check_mark: | The context of the media item |
|
||||
| `playQueueItemID` | *number* | :heavy_check_mark: | The play queue item ID of the media item |
|
||||
| `playBackTime` | *number* | :heavy_check_mark: | The playback time of the media item |
|
||||
| `row` | *number* | :heavy_check_mark: | The row of the media item |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||
| `ratingKey` | *number* | :heavy_check_mark: | The rating key of the media item | 23409 |
|
||||
| `key` | *string* | :heavy_check_mark: | The key of the media item to get the timeline for | /library/metadata/23409 |
|
||||
| `state` | [operations.State](../../models/operations/state.md) | :heavy_check_mark: | The state of the media item | playing |
|
||||
| `hasMDE` | *number* | :heavy_check_mark: | Whether the media item has MDE | 1 |
|
||||
| `time` | *number* | :heavy_check_mark: | The time of the media item | 2000 |
|
||||
| `duration` | *number* | :heavy_check_mark: | The duration of the media item | 10000 |
|
||||
| `context` | *string* | :heavy_check_mark: | The context of the media item | home:hub.continueWatching |
|
||||
| `playQueueItemID` | *number* | :heavy_check_mark: | The play queue item ID of the media item | 1 |
|
||||
| `playBackTime` | *number* | :heavy_check_mark: | The playback time of the media item | 2000 |
|
||||
| `row` | *number* | :heavy_check_mark: | The row of the media item | 1 |
|
||||
@@ -3,21 +3,21 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `hasMDE` | *number* | :heavy_check_mark: | Whether the media item has MDE |
|
||||
| `path` | *string* | :heavy_check_mark: | The path to the media item to transcode |
|
||||
| `mediaIndex` | *number* | :heavy_check_mark: | The index of the media item to transcode |
|
||||
| `partIndex` | *number* | :heavy_check_mark: | The index of the part to transcode |
|
||||
| `protocol` | *string* | :heavy_check_mark: | The protocol to use for the transcode session |
|
||||
| `fastSeek` | *number* | :heavy_minus_sign: | Whether to use fast seek or not |
|
||||
| `directPlay` | *number* | :heavy_minus_sign: | Whether to use direct play or not |
|
||||
| `directStream` | *number* | :heavy_minus_sign: | Whether to use direct stream or not |
|
||||
| `subtitleSize` | *number* | :heavy_minus_sign: | The size of the subtitles |
|
||||
| `subtites` | *string* | :heavy_minus_sign: | The subtitles |
|
||||
| `audioBoost` | *number* | :heavy_minus_sign: | The audio boost |
|
||||
| `location` | *string* | :heavy_minus_sign: | The location of the transcode session |
|
||||
| `mediaBufferSize` | *number* | :heavy_minus_sign: | The size of the media buffer |
|
||||
| `session` | *string* | :heavy_minus_sign: | The session ID |
|
||||
| `addDebugOverlay` | *number* | :heavy_minus_sign: | Whether to add a debug overlay or not |
|
||||
| `autoAdjustQuality` | *number* | :heavy_minus_sign: | Whether to auto adjust quality or not |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `hasMDE` | *number* | :heavy_check_mark: | Whether the media item has MDE | 1 |
|
||||
| `path` | *string* | :heavy_check_mark: | The path to the media item to transcode | /library/metadata/23409 |
|
||||
| `mediaIndex` | *number* | :heavy_check_mark: | The index of the media item to transcode | 0 |
|
||||
| `partIndex` | *number* | :heavy_check_mark: | The index of the part to transcode | 0 |
|
||||
| `protocol` | *string* | :heavy_check_mark: | The protocol to use for the transcode session | hls |
|
||||
| `fastSeek` | *number* | :heavy_minus_sign: | Whether to use fast seek or not | 0 |
|
||||
| `directPlay` | *number* | :heavy_minus_sign: | Whether to use direct play or not | 0 |
|
||||
| `directStream` | *number* | :heavy_minus_sign: | Whether to use direct stream or not | 0 |
|
||||
| `subtitleSize` | *number* | :heavy_minus_sign: | The size of the subtitles | 100 |
|
||||
| `subtites` | *string* | :heavy_minus_sign: | The subtitles | burn |
|
||||
| `audioBoost` | *number* | :heavy_minus_sign: | The audio boost | 100 |
|
||||
| `location` | *string* | :heavy_minus_sign: | The location of the transcode session | lan |
|
||||
| `mediaBufferSize` | *number* | :heavy_minus_sign: | The size of the media buffer | 102400 |
|
||||
| `session` | *string* | :heavy_minus_sign: | The session ID | zvcage8b7rkioqcm8f4uns4c |
|
||||
| `addDebugOverlay` | *number* | :heavy_minus_sign: | Whether to add a debug overlay or not | 0 |
|
||||
| `autoAdjustQuality` | *number* | :heavy_minus_sign: | Whether to auto adjust quality or not | 0 |
|
||||
@@ -1,28 +0,0 @@
|
||||
# Tag
|
||||
|
||||
A key representing a specific tag within the section.
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ---------------- | ---------------- |
|
||||
| `All` | all |
|
||||
| `Unwatched` | unwatched |
|
||||
| `Newest` | newest |
|
||||
| `RecentlyAdded` | recentlyAdded |
|
||||
| `RecentlyViewed` | recentlyViewed |
|
||||
| `OnDeck` | onDeck |
|
||||
| `Collection` | collection |
|
||||
| `Edition` | edition |
|
||||
| `Genre` | genre |
|
||||
| `Year` | year |
|
||||
| `Decade` | decade |
|
||||
| `Director` | director |
|
||||
| `Actor` | actor |
|
||||
| `Country` | country |
|
||||
| `ContentRating` | contentRating |
|
||||
| `Rating` | rating |
|
||||
| `Resolution` | resolution |
|
||||
| `FirstCharacter` | firstCharacter |
|
||||
| `Folder` | folder |
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `key` | *string* | :heavy_check_mark: | the media key |
|
||||
| `time` | *number* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. |
|
||||
| `state` | *string* | :heavy_check_mark: | The playback state of the media item. |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `key` | *string* | :heavy_check_mark: | the media key | |
|
||||
| `time` | *number* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 |
|
||||
| `state` | *string* | :heavy_check_mark: | The playback state of the media item. | played |
|
||||
@@ -74,9 +74,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const activityUUID = "<value>";
|
||||
|
||||
const result = await plexAPI.activities.cancelServerActivities(activityUUID);
|
||||
const result = await plexAPI.activities.cancelServerActivities("25b71ed5-0f9d-461c-baa7-d404e9e10d3e");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -87,11 +85,11 @@ run();
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | [object Object] |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
@@ -28,10 +28,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const type = GetTransientTokenQueryParamType.Delegation;
|
||||
const scope = Scope.All;
|
||||
|
||||
const result = await plexAPI.authentication.getTransientToken(type, scope);
|
||||
const result = await plexAPI.authentication.getTransientToken(GetTransientTokenQueryParamType.Delegation, Scope.All);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -77,9 +74,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const source = "server://client-identifier";
|
||||
|
||||
const result = await plexAPI.authentication.getSourceConnectionInformation(source);
|
||||
const result = await plexAPI.authentication.getSourceConnectionInformation("server://client-identifier");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
|
||||
@@ -167,9 +167,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const taskName = TaskName.CleanOldBundles;
|
||||
|
||||
const result = await plexAPI.butler.startTask(taskName);
|
||||
const result = await plexAPI.butler.startTask(TaskName.CleanOldBundles);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -214,9 +212,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const taskName = PathParamTaskName.BackupDatabase;
|
||||
|
||||
const result = await plexAPI.butler.stopTask(taskName);
|
||||
const result = await plexAPI.butler.stopTask(PathParamTaskName.BackupDatabase);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
|
||||
@@ -27,10 +27,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const count = 1262.49;
|
||||
const onlyTransient = OnlyTransient.One;
|
||||
|
||||
const result = await plexAPI.hubs.getGlobalHubs(count, onlyTransient);
|
||||
const result = await plexAPI.hubs.getGlobalHubs(1262.49, OnlyTransient.One);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -76,11 +73,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const sectionId = 6728.76;
|
||||
const count = 9010.22;
|
||||
const onlyTransient = QueryParamOnlyTransient.Zero;
|
||||
|
||||
const result = await plexAPI.hubs.getLibraryHubs(sectionId, count, onlyTransient);
|
||||
const result = await plexAPI.hubs.getLibraryHubs(6728.76, 9010.22, QueryParamOnlyTransient.Zero);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
|
||||
@@ -13,7 +13,6 @@ API Calls interacting with Plex Media Server Libraries
|
||||
* [getLibraries](#getlibraries) - Get All Libraries
|
||||
* [getLibrary](#getlibrary) - Get Library Details
|
||||
* [deleteLibrary](#deletelibrary) - Delete Library Section
|
||||
* [getLibraryItems](#getlibraryitems) - Get Library Items
|
||||
* [refreshLibrary](#refreshlibrary) - Refresh Library
|
||||
* [searchLibrary](#searchlibrary) - Search Library
|
||||
* [getMetadata](#getmetadata) - Get Items Metadata
|
||||
@@ -35,10 +34,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const url = "file://C:\Image.png&type=13";
|
||||
const type = 4462.17;
|
||||
|
||||
const result = await plexAPI.library.getFileHash(url, type);
|
||||
const result = await plexAPI.library.getFileHash("file://C:\Image.png&type=13", 4462.17);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -213,10 +209,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const sectionId = 1000;
|
||||
const includeDetails = IncludeDetails.Zero;
|
||||
|
||||
const result = await plexAPI.library.getLibrary(sectionId, includeDetails);
|
||||
const result = await plexAPI.library.getLibrary(1000, IncludeDetails.Zero);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -260,9 +253,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const sectionId = 1000;
|
||||
|
||||
const result = await plexAPI.library.deleteLibrary(sectionId);
|
||||
const result = await plexAPI.library.deleteLibrary(1000);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -290,73 +281,6 @@ run();
|
||||
| errors.DeleteLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## getLibraryItems
|
||||
|
||||
Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values:
|
||||
- `all`: All items in the section.
|
||||
- `unwatched`: Items that have not been played.
|
||||
- `newest`: Items that are recently released.
|
||||
- `recentlyAdded`: Items that are recently added to the library.
|
||||
- `recentlyViewed`: Items that were recently viewed.
|
||||
- `onDeck`: Items to continue watching.
|
||||
- `collection`: Items categorized by collection.
|
||||
- `edition`: Items categorized by edition.
|
||||
- `genre`: Items categorized by genre.
|
||||
- `year`: Items categorized by year of release.
|
||||
- `decade`: Items categorized by decade.
|
||||
- `director`: Items categorized by director.
|
||||
- `actor`: Items categorized by starring actor.
|
||||
- `country`: Items categorized by country of origin.
|
||||
- `contentRating`: Items categorized by content rating.
|
||||
- `rating`: Items categorized by rating.
|
||||
- `resolution`: Items categorized by resolution.
|
||||
- `firstCharacter`: Items categorized by the first letter.
|
||||
- `folder`: Items categorized by folder.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
import { Tag } from "@lukehagar/plexjs/models/operations";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
xPlexClientIdentifier: "Postman",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const sectionId = 451092;
|
||||
const tag = Tag.Unwatched;
|
||||
|
||||
const result = await plexAPI.library.getLibraryItems(sectionId, tag);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query |
|
||||
| `tag` | [operations.Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetLibraryItemsResponse](../../models/operations/getlibraryitemsresponse.md)>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## refreshLibrary
|
||||
|
||||
This endpoint Refreshes the library.
|
||||
@@ -373,9 +297,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const sectionId = 934.16;
|
||||
|
||||
const result = await plexAPI.library.refreshLibrary(sectionId);
|
||||
const result = await plexAPI.library.refreshLibrary(934.16);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -437,10 +359,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const sectionId = 933505;
|
||||
const type = Type.Four;
|
||||
|
||||
const result = await plexAPI.library.searchLibrary(sectionId, type);
|
||||
const result = await plexAPI.library.searchLibrary(933505, Type.Four);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -484,9 +403,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const ratingKey = 8382.31;
|
||||
|
||||
const result = await plexAPI.library.getMetadata(ratingKey);
|
||||
const result = await plexAPI.library.getMetadata(8382.31);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -530,9 +447,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const ratingKey = 1539.14;
|
||||
|
||||
const result = await plexAPI.library.getMetadataChildren(ratingKey);
|
||||
const result = await plexAPI.library.getMetadataChildren(1539.14);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
|
||||
@@ -29,11 +29,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const level = Level.Three;
|
||||
const message = "Test log message";
|
||||
const source = "Postman";
|
||||
|
||||
const result = await plexAPI.log.logLine(level, message, source);
|
||||
const result = await plexAPI.log.logLine(Level.Three, "Test log message", "Postman");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
|
||||
@@ -27,9 +27,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const key = 59398;
|
||||
|
||||
const result = await plexAPI.media.markPlayed(key);
|
||||
const result = await plexAPI.media.markPlayed(59398);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -72,9 +70,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const key = 59398;
|
||||
|
||||
const result = await plexAPI.media.markUnplayed(key);
|
||||
const result = await plexAPI.media.markUnplayed(59398);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -118,11 +114,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const key = "<value>";
|
||||
const time = 6900.91;
|
||||
const state = "<value>";
|
||||
|
||||
const result = await plexAPI.media.updatePlayProgress(key, time, state);
|
||||
const result = await plexAPI.media.updatePlayProgress("<value>", 90000, "played");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -133,13 +125,13 @@ run();
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `key` | *string* | :heavy_check_mark: | the media key |
|
||||
| `time` | *number* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. |
|
||||
| `state` | *string* | :heavy_check_mark: | The playback state of the media item. |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `key` | *string* | :heavy_check_mark: | the media key | |
|
||||
| `time` | *number* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | [object Object] |
|
||||
| `state` | *string* | :heavy_check_mark: | The playback state of the media item. | [object Object] |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
@@ -89,10 +89,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const playlistType = PlaylistType.Audio;
|
||||
const smart = QueryParamSmart.Zero;
|
||||
|
||||
const result = await plexAPI.playlists.getPlaylists(playlistType, smart);
|
||||
const result = await plexAPI.playlists.getPlaylists(PlaylistType.Audio, QueryParamSmart.Zero);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -138,9 +135,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const playlistID = 4109.48;
|
||||
|
||||
const result = await plexAPI.playlists.getPlaylist(playlistID);
|
||||
const result = await plexAPI.playlists.getPlaylist(4109.48);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -184,9 +179,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const playlistID = 216.22;
|
||||
|
||||
const result = await plexAPI.playlists.deletePlaylist(playlistID);
|
||||
const result = await plexAPI.playlists.deletePlaylist(216.22);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -230,11 +223,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const playlistID = 3915;
|
||||
const title = "<value>";
|
||||
const summary = "<value>";
|
||||
|
||||
const result = await plexAPI.playlists.updatePlaylist(playlistID, title, summary);
|
||||
const result = await plexAPI.playlists.updatePlaylist(3915, "<value>", "<value>");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -283,10 +272,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const playlistID = 5004.46;
|
||||
const type = 9403.59;
|
||||
|
||||
const result = await plexAPI.playlists.getPlaylistContents(playlistID, type);
|
||||
const result = await plexAPI.playlists.getPlaylistContents(5004.46, 9403.59);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -331,9 +317,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const playlistID = 1893.18;
|
||||
|
||||
const result = await plexAPI.playlists.clearPlaylistContents(playlistID);
|
||||
const result = await plexAPI.playlists.clearPlaylistContents(1893.18);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -378,11 +362,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const playlistID = 8502.01;
|
||||
const uri = "server://12345/com.plexapp.plugins.library/library/metadata/1";
|
||||
const playQueueID = 123;
|
||||
|
||||
const result = await plexAPI.playlists.addPlaylistContents(playlistID, uri, playQueueID);
|
||||
const result = await plexAPI.playlists.addPlaylistContents(8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -429,10 +409,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const path = "/home/barkley/playlist.m3u";
|
||||
const force = Force.Zero;
|
||||
|
||||
const result = await plexAPI.playlists.uploadPlaylist(path, force);
|
||||
const result = await plexAPI.playlists.uploadPlaylist("/home/barkley/playlist.m3u", Force.Zero);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
|
||||
@@ -25,10 +25,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const strong = false;
|
||||
const xPlexClientIdentifier = "Postman";
|
||||
|
||||
const result = await plexAPI.plex.getPin(strong, xPlexClientIdentifier);
|
||||
const result = await plexAPI.plex.getPin(false, "Postman");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -72,10 +69,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const pinID = "<value>";
|
||||
const xPlexClientIdentifier = "Postman";
|
||||
|
||||
const result = await plexAPI.plex.getToken(pinID, xPlexClientIdentifier);
|
||||
const result = await plexAPI.plex.getToken("<value>", "Postman");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
|
||||
@@ -39,11 +39,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const query = "dylan";
|
||||
const sectionId = 1516.53;
|
||||
const limit = 5;
|
||||
|
||||
const result = await plexAPI.search.performSearch(query, sectionId, limit);
|
||||
const result = await plexAPI.search.performSearch("dylan", 1516.53, 5);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -92,11 +88,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const query = "dead+poop";
|
||||
const sectionId = 4094.8;
|
||||
const limit = 5;
|
||||
|
||||
const result = await plexAPI.search.performVoiceSearch(query, sectionId, limit);
|
||||
const result = await plexAPI.search.performVoiceSearch("dead+poop", 4094.8, 5);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -141,9 +133,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const query = "110";
|
||||
|
||||
const result = await plexAPI.search.getSearchResults(query);
|
||||
const result = await plexAPI.search.getSearchResults("110");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
|
||||
@@ -154,9 +154,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const sessionKey = "zz7llzqlx8w9vnrsbnwhbmep";
|
||||
|
||||
const result = await plexAPI.sessions.stopTranscodeSession(sessionKey);
|
||||
const result = await plexAPI.sessions.stopTranscodeSession("zz7llzqlx8w9vnrsbnwhbmep");
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
|
||||
@@ -25,9 +25,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const timespan = 411769;
|
||||
|
||||
const result = await plexAPI.statistics.getStatistics(timespan);
|
||||
const result = await plexAPI.statistics.getStatistics(4);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -38,11 +36,11 @@ run();
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | [object Object] |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
@@ -71,9 +71,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const download = Download.One;
|
||||
|
||||
const result = await plexAPI.updater.checkForUpdates(download);
|
||||
const result = await plexAPI.updater.checkForUpdates(Download.One);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -84,11 +82,11 @@ run();
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `download` | [operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `download` | [operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | [object Object] |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
|
||||
|
||||
|
||||
### Response
|
||||
@@ -118,10 +116,7 @@ const plexAPI = new PlexAPI({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const tonight = Tonight.One;
|
||||
const skip = Skip.Zero;
|
||||
|
||||
const result = await plexAPI.updater.applyUpdates(tonight, skip);
|
||||
const result = await plexAPI.updater.applyUpdates(Tonight.One, Skip.One);
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
@@ -132,12 +127,12 @@ run();
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `tonight` | [operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install |
|
||||
| `skip` | [operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `tonight` | [operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | [object Object] |
|
||||
| `skip` | [operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. | [object Object] |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
@@ -28,16 +28,16 @@ const plexAPI = new PlexAPI({
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.video.getTimeline({
|
||||
ratingKey: 716.56,
|
||||
key: "<key>",
|
||||
state: State.Paused,
|
||||
hasMDE: 7574.33,
|
||||
time: 3327.51,
|
||||
duration: 7585.39,
|
||||
context: "<value>",
|
||||
playQueueItemID: 1406.21,
|
||||
playBackTime: 2699.34,
|
||||
row: 3536.42,
|
||||
ratingKey: 23409,
|
||||
key: "/library/metadata/23409",
|
||||
state: State.Playing,
|
||||
hasMDE: 1,
|
||||
time: 2000,
|
||||
duration: 10000,
|
||||
context: "home:hub.continueWatching",
|
||||
playQueueItemID: 1,
|
||||
playBackTime: 2000,
|
||||
row: 1,
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
@@ -82,11 +82,22 @@ const plexAPI = new PlexAPI({
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.video.startUniversalTranscode({
|
||||
hasMDE: 8924.99,
|
||||
path: "/etc/mail",
|
||||
mediaIndex: 9962.95,
|
||||
partIndex: 1232.82,
|
||||
protocol: "<value>",
|
||||
hasMDE: 1,
|
||||
path: "/library/metadata/23409",
|
||||
mediaIndex: 0,
|
||||
partIndex: 0,
|
||||
protocol: "hls",
|
||||
fastSeek: 0,
|
||||
directPlay: 0,
|
||||
directStream: 0,
|
||||
subtitleSize: 100,
|
||||
subtites: "burn",
|
||||
audioBoost: 100,
|
||||
location: "lan",
|
||||
mediaBufferSize: 102400,
|
||||
session: "zvcage8b7rkioqcm8f4uns4c",
|
||||
addDebugOverlay: 0,
|
||||
autoAdjustQuality: 0,
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
|
||||
2
jsr.json
2
jsr.json
@@ -2,7 +2,7 @@
|
||||
|
||||
{
|
||||
"name": "@lukehagar/plexjs",
|
||||
"version": "0.14.1",
|
||||
"version": "0.15.4",
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./models/errors": "./src/models/errors/index.ts",
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@lukehagar/plexjs",
|
||||
"version": "0.14.1",
|
||||
"version": "0.15.4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lukehagar/plexjs",
|
||||
"version": "0.14.1",
|
||||
"version": "0.15.4",
|
||||
"devDependencies": {
|
||||
"@types/jsonpath": "^0.2.4",
|
||||
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@lukehagar/plexjs",
|
||||
"version": "0.14.1",
|
||||
"version": "0.15.4",
|
||||
"author": "LukeHagar",
|
||||
"main": "./index.js",
|
||||
"sideEffects": false,
|
||||
|
||||
@@ -87,7 +87,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
||||
export const SDK_METADATA = {
|
||||
language: "typescript",
|
||||
openapiDocVersion: "0.0.3",
|
||||
sdkVersion: "0.14.1",
|
||||
genVersion: "2.317.0",
|
||||
userAgent: "speakeasy-sdk/typescript 0.14.1 2.317.0 0.0.3 @lukehagar/plexjs",
|
||||
sdkVersion: "0.15.4",
|
||||
genVersion: "2.326.3",
|
||||
userAgent: "speakeasy-sdk/typescript 0.15.4 2.326.3 0.0.3 @lukehagar/plexjs",
|
||||
} as const;
|
||||
|
||||
@@ -9,7 +9,17 @@ export type Fetcher = (
|
||||
|
||||
export type Awaitable<T> = T | Promise<T>;
|
||||
|
||||
const DEFAULT_FETCHER: Fetcher = (input, init) => fetch(input, init);
|
||||
const DEFAULT_FETCHER: Fetcher = (input, init) => {
|
||||
// If input is a Request and init is undefined, Bun will discard the method,
|
||||
// headers, body and other options that were set on the request object.
|
||||
// Node.js and browers would ignore an undefined init value. This check is
|
||||
// therefore needed for interop with Bun.
|
||||
if (init == null) {
|
||||
return fetch(input);
|
||||
} else {
|
||||
return fetch(input, init);
|
||||
}
|
||||
};
|
||||
|
||||
export type RequestInput = {
|
||||
/**
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,6 @@ export * from "./getglobalhubs";
|
||||
export * from "./getlibraries";
|
||||
export * from "./getlibrary";
|
||||
export * from "./getlibraryhubs";
|
||||
export * from "./getlibraryitems";
|
||||
export * from "./getmetadata";
|
||||
export * from "./getmetadatachildren";
|
||||
export * from "./getmyplexaccount";
|
||||
|
||||
@@ -71,7 +71,7 @@ export class Activities extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -83,12 +83,13 @@ export class Activities extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -177,7 +178,7 @@ export class Activities extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -190,12 +191,13 @@ export class Activities extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
|
||||
@@ -90,7 +90,7 @@ export class Authentication extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -103,12 +103,13 @@ export class Authentication extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -193,7 +194,7 @@ export class Authentication extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -206,12 +207,13 @@ export class Authentication extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
|
||||
@@ -69,7 +69,7 @@ export class Butler extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -81,12 +81,13 @@ export class Butler extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -161,7 +162,7 @@ export class Butler extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -173,12 +174,13 @@ export class Butler extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -244,7 +246,7 @@ export class Butler extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -256,12 +258,13 @@ export class Butler extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -350,7 +353,7 @@ export class Butler extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -363,12 +366,13 @@ export class Butler extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, [200, 202])) {
|
||||
@@ -453,7 +457,7 @@ export class Butler extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "404", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -466,12 +470,13 @@ export class Butler extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
|
||||
@@ -92,7 +92,7 @@ export class Hubs extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -105,12 +105,13 @@ export class Hubs extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -212,7 +213,7 @@ export class Hubs extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -225,12 +226,13 @@ export class Hubs extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
|
||||
@@ -89,7 +89,7 @@ export class Library extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -102,12 +102,13 @@ export class Library extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -173,7 +174,7 @@ export class Library extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -185,12 +186,13 @@ export class Library extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -266,7 +268,7 @@ export class Library extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -278,12 +280,13 @@ export class Library extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -420,7 +423,7 @@ export class Library extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -433,12 +436,13 @@ export class Library extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -527,7 +531,7 @@ export class Library extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -540,12 +544,13 @@ export class Library extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -579,126 +584,6 @@ export class Library extends ClientSDK {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Library Items
|
||||
*
|
||||
* @remarks
|
||||
* Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values:
|
||||
* - `all`: All items in the section.
|
||||
* - `unwatched`: Items that have not been played.
|
||||
* - `newest`: Items that are recently released.
|
||||
* - `recentlyAdded`: Items that are recently added to the library.
|
||||
* - `recentlyViewed`: Items that were recently viewed.
|
||||
* - `onDeck`: Items to continue watching.
|
||||
* - `collection`: Items categorized by collection.
|
||||
* - `edition`: Items categorized by edition.
|
||||
* - `genre`: Items categorized by genre.
|
||||
* - `year`: Items categorized by year of release.
|
||||
* - `decade`: Items categorized by decade.
|
||||
* - `director`: Items categorized by director.
|
||||
* - `actor`: Items categorized by starring actor.
|
||||
* - `country`: Items categorized by country of origin.
|
||||
* - `contentRating`: Items categorized by content rating.
|
||||
* - `rating`: Items categorized by rating.
|
||||
* - `resolution`: Items categorized by resolution.
|
||||
* - `firstCharacter`: Items categorized by the first letter.
|
||||
* - `folder`: Items categorized by folder.
|
||||
*
|
||||
*/
|
||||
async getLibraryItems(
|
||||
sectionId: number,
|
||||
tag: operations.Tag,
|
||||
options?: RequestOptions
|
||||
): Promise<operations.GetLibraryItemsResponse> {
|
||||
const input$: operations.GetLibraryItemsRequest = {
|
||||
sectionId: sectionId,
|
||||
tag: tag,
|
||||
};
|
||||
const headers$ = new Headers();
|
||||
headers$.set("user-agent", SDK_METADATA.userAgent);
|
||||
headers$.set("Accept", "application/json");
|
||||
|
||||
const payload$ = schemas$.parse(
|
||||
input$,
|
||||
(value$) => operations.GetLibraryItemsRequest$.outboundSchema.parse(value$),
|
||||
"Input validation failed"
|
||||
);
|
||||
const body$ = null;
|
||||
|
||||
const pathParams$ = {
|
||||
sectionId: enc$.encodeSimple("sectionId", payload$.sectionId, {
|
||||
explode: false,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
tag: enc$.encodeSimple("tag", payload$.tag, {
|
||||
explode: false,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
};
|
||||
const path$ = this.templateURLComponent("/library/sections/{sectionId}/{tag}")(pathParams$);
|
||||
|
||||
const query$ = "";
|
||||
|
||||
let security$;
|
||||
if (typeof this.options$.accessToken === "function") {
|
||||
security$ = { accessToken: await this.options$.accessToken() };
|
||||
} else if (this.options$.accessToken) {
|
||||
security$ = { accessToken: this.options$.accessToken };
|
||||
} else {
|
||||
security$ = {};
|
||||
}
|
||||
const context = {
|
||||
operationID: "getLibraryItems",
|
||||
oAuth2Scopes: [],
|
||||
securitySource: this.options$.accessToken,
|
||||
};
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
method: "GET",
|
||||
path: path$,
|
||||
headers: headers$,
|
||||
query: query$,
|
||||
body: body$,
|
||||
},
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
const responseBody = await response.json();
|
||||
const result = schemas$.parse(
|
||||
responseBody,
|
||||
(val$) => {
|
||||
return operations.GetLibraryItemsResponse$.inboundSchema.parse({
|
||||
...responseFields$,
|
||||
object: val$,
|
||||
});
|
||||
},
|
||||
"Response validation failed"
|
||||
);
|
||||
return result;
|
||||
} else {
|
||||
const responseBody = await response.text();
|
||||
throw new errors.SDKError(
|
||||
"Unexpected API response status or content-type",
|
||||
response,
|
||||
responseBody
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh Library
|
||||
*
|
||||
@@ -752,7 +637,7 @@ export class Library extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -765,12 +650,13 @@ export class Library extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -880,7 +766,7 @@ export class Library extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -893,12 +779,13 @@ export class Library extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -975,7 +862,7 @@ export class Library extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -988,12 +875,13 @@ export class Library extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -1085,7 +973,7 @@ export class Library extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -1098,12 +986,13 @@ export class Library extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -1174,7 +1063,7 @@ export class Library extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -1186,12 +1075,13 @@ export class Library extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
|
||||
@@ -97,7 +97,7 @@ export class Log extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -110,12 +110,13 @@ export class Log extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -177,16 +178,17 @@ export class Log extends ClientSDK {
|
||||
*
|
||||
*/
|
||||
async logMultiLine(
|
||||
input: string,
|
||||
request: string,
|
||||
options?: RequestOptions
|
||||
): Promise<operations.LogMultiLineResponse> {
|
||||
const input$ = request;
|
||||
const headers$ = new Headers();
|
||||
headers$.set("user-agent", SDK_METADATA.userAgent);
|
||||
headers$.set("Content-Type", "text/plain");
|
||||
headers$.set("Accept", "application/json");
|
||||
|
||||
const payload$ = schemas$.parse(
|
||||
input,
|
||||
input$,
|
||||
(value$) => z.string().parse(value$),
|
||||
"Input validation failed"
|
||||
);
|
||||
@@ -212,7 +214,7 @@ export class Log extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -225,12 +227,13 @@ export class Log extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -296,7 +299,7 @@ export class Log extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "403", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -308,12 +311,13 @@ export class Log extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
|
||||
@@ -86,7 +86,7 @@ export class Media extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -99,12 +99,13 @@ export class Media extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -186,7 +187,7 @@ export class Media extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -199,12 +200,13 @@ export class Media extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -293,7 +295,7 @@ export class Media extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -306,12 +308,13 @@ export class Media extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
|
||||
@@ -48,15 +48,16 @@ export class Playlists extends ClientSDK {
|
||||
*
|
||||
*/
|
||||
async createPlaylist(
|
||||
input: operations.CreatePlaylistRequest,
|
||||
request: operations.CreatePlaylistRequest,
|
||||
options?: RequestOptions
|
||||
): Promise<operations.CreatePlaylistResponse> {
|
||||
const input$ = request;
|
||||
const headers$ = new Headers();
|
||||
headers$.set("user-agent", SDK_METADATA.userAgent);
|
||||
headers$.set("Accept", "application/json");
|
||||
|
||||
const payload$ = schemas$.parse(
|
||||
input,
|
||||
input$,
|
||||
(value$) => operations.CreatePlaylistRequest$.outboundSchema.parse(value$),
|
||||
"Input validation failed"
|
||||
);
|
||||
@@ -93,7 +94,7 @@ export class Playlists extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -106,12 +107,13 @@ export class Playlists extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -204,7 +206,7 @@ export class Playlists extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -217,12 +219,13 @@ export class Playlists extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -313,7 +316,7 @@ export class Playlists extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -326,12 +329,13 @@ export class Playlists extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -421,7 +425,7 @@ export class Playlists extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -434,12 +438,13 @@ export class Playlists extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -536,7 +541,7 @@ export class Playlists extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -549,12 +554,13 @@ export class Playlists extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -648,7 +654,7 @@ export class Playlists extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -661,12 +667,13 @@ export class Playlists extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -756,7 +763,7 @@ export class Playlists extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -769,12 +776,13 @@ export class Playlists extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -872,7 +880,7 @@ export class Playlists extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -885,12 +893,13 @@ export class Playlists extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -981,7 +990,7 @@ export class Playlists extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -994,12 +1003,13 @@ export class Playlists extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
|
||||
@@ -88,7 +88,7 @@ export class Plex extends ClientSDK {
|
||||
const context = { operationID: "getPin", oAuth2Scopes: [], securitySource: null };
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
method: "POST",
|
||||
@@ -101,12 +101,13 @@ export class Plex extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -197,7 +198,7 @@ export class Plex extends ClientSDK {
|
||||
const context = { operationID: "getToken", oAuth2Scopes: [], securitySource: null };
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
method: "GET",
|
||||
@@ -210,12 +211,13 @@ export class Plex extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
|
||||
@@ -107,7 +107,7 @@ export class Search extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -120,12 +120,13 @@ export class Search extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -220,7 +221,7 @@ export class Search extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -233,12 +234,13 @@ export class Search extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -320,7 +322,7 @@ export class Search extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -333,12 +335,13 @@ export class Search extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
|
||||
@@ -71,7 +71,7 @@ export class Server extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -83,12 +83,13 @@ export class Server extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -160,7 +161,7 @@ export class Server extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -172,12 +173,13 @@ export class Server extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -249,7 +251,7 @@ export class Server extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -261,12 +263,13 @@ export class Server extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -336,7 +339,7 @@ export class Server extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -348,12 +351,13 @@ export class Server extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -425,7 +429,7 @@ export class Server extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -437,12 +441,13 @@ export class Server extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -512,7 +517,7 @@ export class Server extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -524,12 +529,13 @@ export class Server extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -576,15 +582,16 @@ export class Server extends ClientSDK {
|
||||
*
|
||||
*/
|
||||
async getResizedPhoto(
|
||||
input: operations.GetResizedPhotoRequest,
|
||||
request: operations.GetResizedPhotoRequest,
|
||||
options?: RequestOptions
|
||||
): Promise<operations.GetResizedPhotoResponse> {
|
||||
const input$ = request;
|
||||
const headers$ = new Headers();
|
||||
headers$.set("user-agent", SDK_METADATA.userAgent);
|
||||
headers$.set("Accept", "application/json");
|
||||
|
||||
const payload$ = schemas$.parse(
|
||||
input,
|
||||
input$,
|
||||
(value$) => operations.GetResizedPhotoRequest$.outboundSchema.parse(value$),
|
||||
"Input validation failed"
|
||||
);
|
||||
@@ -629,7 +636,7 @@ export class Server extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -642,12 +649,13 @@ export class Server extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -712,7 +720,7 @@ export class Server extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -724,12 +732,13 @@ export class Server extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
|
||||
@@ -69,7 +69,7 @@ export class Sessions extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -81,12 +81,13 @@ export class Sessions extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -158,7 +159,7 @@ export class Sessions extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -170,12 +171,13 @@ export class Sessions extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -247,7 +249,7 @@ export class Sessions extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -259,12 +261,13 @@ export class Sessions extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -353,7 +356,7 @@ export class Sessions extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -366,12 +369,13 @@ export class Sessions extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 204)) {
|
||||
|
||||
@@ -89,7 +89,7 @@ export class Statistics extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -102,12 +102,13 @@ export class Statistics extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
|
||||
@@ -69,7 +69,7 @@ export class Updater extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -81,12 +81,13 @@ export class Updater extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchResponse(response, 200, "application/json")) {
|
||||
@@ -176,7 +177,7 @@ export class Updater extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -189,12 +190,13 @@ export class Updater extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -283,7 +285,7 @@ export class Updater extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "500", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -296,12 +298,13 @@ export class Updater extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
|
||||
@@ -45,15 +45,16 @@ export class Video extends ClientSDK {
|
||||
* Get the timeline for a media item
|
||||
*/
|
||||
async getTimeline(
|
||||
input: operations.GetTimelineRequest,
|
||||
request: operations.GetTimelineRequest,
|
||||
options?: RequestOptions
|
||||
): Promise<operations.GetTimelineResponse> {
|
||||
const input$ = request;
|
||||
const headers$ = new Headers();
|
||||
headers$.set("user-agent", SDK_METADATA.userAgent);
|
||||
headers$.set("Accept", "application/json");
|
||||
|
||||
const payload$ = schemas$.parse(
|
||||
input,
|
||||
input$,
|
||||
(value$) => operations.GetTimelineRequest$.outboundSchema.parse(value$),
|
||||
"Input validation failed"
|
||||
);
|
||||
@@ -107,7 +108,7 @@ export class Video extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -120,12 +121,13 @@ export class Video extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
@@ -166,15 +168,16 @@ export class Video extends ClientSDK {
|
||||
* Begin a Universal Transcode Session
|
||||
*/
|
||||
async startUniversalTranscode(
|
||||
input: operations.StartUniversalTranscodeRequest,
|
||||
request: operations.StartUniversalTranscodeRequest,
|
||||
options?: RequestOptions
|
||||
): Promise<operations.StartUniversalTranscodeResponse> {
|
||||
const input$ = request;
|
||||
const headers$ = new Headers();
|
||||
headers$.set("user-agent", SDK_METADATA.userAgent);
|
||||
headers$.set("Accept", "application/json");
|
||||
|
||||
const payload$ = schemas$.parse(
|
||||
input,
|
||||
input$,
|
||||
(value$) => operations.StartUniversalTranscodeRequest$.outboundSchema.parse(value$),
|
||||
"Input validation failed"
|
||||
);
|
||||
@@ -261,7 +264,7 @@ export class Video extends ClientSDK {
|
||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||
|
||||
const doOptions = { context, errorCodes: ["400", "401", "4XX", "5XX"] };
|
||||
const request = this.createRequest$(
|
||||
const request$ = this.createRequest$(
|
||||
context,
|
||||
{
|
||||
security: securitySettings$,
|
||||
@@ -274,12 +277,13 @@ export class Video extends ClientSDK {
|
||||
options
|
||||
);
|
||||
|
||||
const response = await this.do$(request, doOptions);
|
||||
const response = await this.do$(request$, doOptions);
|
||||
|
||||
const responseFields$ = {
|
||||
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
if (this.matchStatusCode(response, 200)) {
|
||||
|
||||
Reference in New Issue
Block a user