mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 04:20:46 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2712820397 | ||
|
|
c895213ae8 | ||
|
|
c473c9d326 |
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: 16f22cbf-f23f-4419-8924-3a4b06381947
|
||||
management:
|
||||
docChecksum: 25cb9a6c3c7e2e859211c588b8281b5b
|
||||
docChecksum: 25fd5807db652903ccf5955fa06cf3ac
|
||||
docVersion: 0.0.3
|
||||
speakeasyVersion: 1.526.6
|
||||
generationVersion: 2.563.1
|
||||
releaseVersion: 0.35.3
|
||||
configChecksum: f15d14af6647243816d0d509bb1735e4
|
||||
speakeasyVersion: 1.528.1
|
||||
generationVersion: 2.565.1
|
||||
releaseVersion: 0.36.0
|
||||
configChecksum: 22f00b600e146350a70b9857438cc1be
|
||||
repoURL: https://github.com/LukeHagar/plexjs.git
|
||||
repoSubDirectory: .
|
||||
installationURL: https://github.com/LukeHagar/plexjs
|
||||
@@ -35,6 +35,7 @@ features:
|
||||
retries: 2.83.0
|
||||
sdkHooks: 0.2.0
|
||||
unions: 2.85.8
|
||||
uploadStreams: 0.1.0
|
||||
generatedFiles:
|
||||
- .gitattributes
|
||||
- .npmignore
|
||||
@@ -562,6 +563,11 @@ generatedFiles:
|
||||
- docs/sdk/models/operations/getlibraryitemstype.md
|
||||
- docs/sdk/models/operations/getlibraryitemsultrablurcolors.md
|
||||
- docs/sdk/models/operations/getlibraryitemswriter.md
|
||||
- docs/sdk/models/operations/getmediaartsmediacontainer.md
|
||||
- docs/sdk/models/operations/getmediaartsmetadata.md
|
||||
- docs/sdk/models/operations/getmediaartsrequest.md
|
||||
- docs/sdk/models/operations/getmediaartsresponse.md
|
||||
- docs/sdk/models/operations/getmediaartsresponsebody.md
|
||||
- docs/sdk/models/operations/getmediametadatacountry.md
|
||||
- docs/sdk/models/operations/getmediametadatadirector.md
|
||||
- docs/sdk/models/operations/getmediametadatagenre.md
|
||||
@@ -586,6 +592,11 @@ generatedFiles:
|
||||
- docs/sdk/models/operations/getmediametadatastream.md
|
||||
- docs/sdk/models/operations/getmediametadataultrablurcolors.md
|
||||
- docs/sdk/models/operations/getmediametadatawriter.md
|
||||
- docs/sdk/models/operations/getmediapostersmediacontainer.md
|
||||
- docs/sdk/models/operations/getmediapostersmetadata.md
|
||||
- docs/sdk/models/operations/getmediapostersrequest.md
|
||||
- docs/sdk/models/operations/getmediapostersresponse.md
|
||||
- docs/sdk/models/operations/getmediapostersresponsebody.md
|
||||
- docs/sdk/models/operations/getmediaprovidersdirectory.md
|
||||
- docs/sdk/models/operations/getmediaprovidersmediacontainer.md
|
||||
- docs/sdk/models/operations/getmediaprovidersrequest.md
|
||||
@@ -846,6 +857,10 @@ generatedFiles:
|
||||
- docs/sdk/models/operations/player.md
|
||||
- docs/sdk/models/operations/playlisttype.md
|
||||
- docs/sdk/models/operations/plexdevice.md
|
||||
- docs/sdk/models/operations/postmediaartsrequest.md
|
||||
- docs/sdk/models/operations/postmediaartsresponse.md
|
||||
- docs/sdk/models/operations/postmediaposterrequest.md
|
||||
- docs/sdk/models/operations/postmediaposterresponse.md
|
||||
- docs/sdk/models/operations/postuserssignindataauthenticationresponsestatus.md
|
||||
- docs/sdk/models/operations/postuserssignindataauthenticationstatus.md
|
||||
- docs/sdk/models/operations/postuserssignindataauthenticationsubscription.md
|
||||
@@ -979,13 +994,17 @@ generatedFiles:
|
||||
- src/funcs/libraryGetGenresLibrary.ts
|
||||
- src/funcs/libraryGetLibraryDetails.ts
|
||||
- src/funcs/libraryGetLibraryItems.ts
|
||||
- src/funcs/libraryGetMediaArts.ts
|
||||
- src/funcs/libraryGetMediaMetaData.ts
|
||||
- src/funcs/libraryGetMediaPosters.ts
|
||||
- src/funcs/libraryGetMetadataChildren.ts
|
||||
- src/funcs/libraryGetRecentlyAddedLibrary.ts
|
||||
- src/funcs/libraryGetRefreshLibraryMetadata.ts
|
||||
- src/funcs/libraryGetSearchAllLibraries.ts
|
||||
- src/funcs/libraryGetSearchLibrary.ts
|
||||
- src/funcs/libraryGetTopWatchedContent.ts
|
||||
- src/funcs/libraryPostMediaArts.ts
|
||||
- src/funcs/libraryPostMediaPoster.ts
|
||||
- src/funcs/logEnablePaperTrail.ts
|
||||
- src/funcs/logLogLine.ts
|
||||
- src/funcs/logLogMultiLine.ts
|
||||
@@ -1173,7 +1192,9 @@ generatedFiles:
|
||||
- src/sdk/models/operations/getlibrarydetails.ts
|
||||
- src/sdk/models/operations/getlibraryhubs.ts
|
||||
- src/sdk/models/operations/getlibraryitems.ts
|
||||
- src/sdk/models/operations/getmediaarts.ts
|
||||
- src/sdk/models/operations/getmediametadata.ts
|
||||
- src/sdk/models/operations/getmediaposters.ts
|
||||
- src/sdk/models/operations/getmediaproviders.ts
|
||||
- src/sdk/models/operations/getmetadatachildren.ts
|
||||
- src/sdk/models/operations/getmyplexaccount.ts
|
||||
@@ -1217,6 +1238,8 @@ generatedFiles:
|
||||
- src/sdk/models/operations/markunplayed.ts
|
||||
- src/sdk/models/operations/performsearch.ts
|
||||
- src/sdk/models/operations/performvoicesearch.ts
|
||||
- src/sdk/models/operations/postmediaarts.ts
|
||||
- src/sdk/models/operations/postmediaposter.ts
|
||||
- src/sdk/models/operations/postuserssignindata.ts
|
||||
- src/sdk/models/operations/startalltasks.ts
|
||||
- src/sdk/models/operations/starttask.ts
|
||||
@@ -2349,5 +2372,35 @@ examples:
|
||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||
"401":
|
||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||
get-media-arts:
|
||||
speakeasy-default-get-media-arts:
|
||||
parameters:
|
||||
path:
|
||||
ratingKey: 16099
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"MediaContainer": {"size": 50, "mediaTagVersion": 1734362201, "mediaTagPrefix": "/system/bundle/media/flags/", "identifier": "com.plexapp.plugins.library", "Metadata": [{"key": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg"}, {"key": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg"}, {"key": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg"}]}}
|
||||
post-media-arts:
|
||||
speakeasy-default-post-media-arts:
|
||||
parameters:
|
||||
path:
|
||||
ratingKey: 2268
|
||||
query:
|
||||
url: "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"
|
||||
get-media-posters:
|
||||
speakeasy-default-get-media-posters:
|
||||
parameters:
|
||||
path:
|
||||
ratingKey: 16099
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"MediaContainer": {"size": 50, "mediaTagVersion": 1734362201, "mediaTagPrefix": "/system/bundle/media/flags/", "identifier": "com.plexapp.plugins.library", "Metadata": [{"key": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg"}, {"key": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg"}]}}
|
||||
post-media-poster:
|
||||
speakeasy-default-post-media-poster:
|
||||
parameters:
|
||||
path:
|
||||
ratingKey: 2268
|
||||
query:
|
||||
url: "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"
|
||||
examplesVersion: 1.0.0
|
||||
generatedTests: {}
|
||||
|
||||
@@ -15,7 +15,7 @@ generation:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
oAuth2PasswordEnabled: false
|
||||
typescript:
|
||||
version: 0.35.3
|
||||
version: 0.36.0
|
||||
additionalDependencies:
|
||||
dependencies: {}
|
||||
devDependencies: {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
speakeasyVersion: 1.526.6
|
||||
speakeasyVersion: 1.528.1
|
||||
sources:
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
@@ -9,20 +9,20 @@ sources:
|
||||
- main
|
||||
plexapi:
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:277010613dd132c4b785bacddcba720038318ae87b0ce5e1eea3887cf8f22df4
|
||||
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
|
||||
sourceRevisionDigest: sha256:b5580df6ec4a386e12249ff13f35b916fe5559e101de4a816b53e47d6947f1a5
|
||||
sourceBlobDigest: sha256:6108b6c35fbe7e9163ffe0c804170f5e3a6edb63b8e745454ea8ee249bd790c3
|
||||
tags:
|
||||
- latest
|
||||
- speakeasy-sdk-regen-1743449645
|
||||
- speakeasy-sdk-regen-1743639051
|
||||
- 0.0.3
|
||||
targets:
|
||||
plexjs:
|
||||
source: plexapi
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:277010613dd132c4b785bacddcba720038318ae87b0ce5e1eea3887cf8f22df4
|
||||
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
|
||||
sourceRevisionDigest: sha256:b5580df6ec4a386e12249ff13f35b916fe5559e101de4a816b53e47d6947f1a5
|
||||
sourceBlobDigest: sha256:6108b6c35fbe7e9163ffe0c804170f5e3a6edb63b8e745454ea8ee249bd790c3
|
||||
codeSamplesNamespace: code-samples-typescript-plexjs
|
||||
codeSamplesRevisionDigest: sha256:f99618862675a8c5993740b2acb9b573110d9b506d2bc70e3180f0f7f393798f
|
||||
codeSamplesRevisionDigest: sha256:1d984798d2ba05ff7dfba1649556f6ece8cbfabbf9260f6a2678748f02977d47
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
@@ -43,6 +43,5 @@ workflow:
|
||||
output: codeSamples.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-typescript-plexjs
|
||||
langOverride: TypeScript
|
||||
labelOverride:
|
||||
fixedValue: PlexJS
|
||||
|
||||
@@ -17,6 +17,5 @@ targets:
|
||||
output: codeSamples.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-typescript-plexjs
|
||||
langOverride: TypeScript
|
||||
labelOverride:
|
||||
fixedValue: PlexJS
|
||||
|
||||
45
README.md
45
README.md
@@ -54,6 +54,7 @@ The following SDKs are generated from the OpenAPI Specification. They are automa
|
||||
* [Authentication](#authentication)
|
||||
* [Requirements](#requirements)
|
||||
* [Standalone functions](#standalone-functions)
|
||||
* [File uploads](#file-uploads)
|
||||
* [Retries](#retries)
|
||||
* [Debugging](#debugging)
|
||||
* [Development](#development)
|
||||
@@ -167,6 +168,10 @@ run();
|
||||
* [getActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media
|
||||
* [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
|
||||
* [getMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata
|
||||
* [getMediaArts](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork
|
||||
* [postMediaArts](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork
|
||||
* [getMediaPosters](docs/sdks/library/README.md#getmediaposters) - Get Media Posters
|
||||
* [postMediaPoster](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster
|
||||
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
||||
* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
||||
|
||||
@@ -543,13 +548,17 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
||||
- [`libraryGetGenresLibrary`](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media
|
||||
- [`libraryGetLibraryDetails`](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details
|
||||
- [`libraryGetLibraryItems`](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
|
||||
- [`libraryGetMediaArts`](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork
|
||||
- [`libraryGetMediaMetaData`](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata
|
||||
- [`libraryGetMediaPosters`](docs/sdks/library/README.md#getmediaposters) - Get Media Posters
|
||||
- [`libraryGetMetadataChildren`](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
||||
- [`libraryGetRecentlyAddedLibrary`](docs/sdks/library/README.md#getrecentlyaddedlibrary) - Get Recently Added
|
||||
- [`libraryGetRefreshLibraryMetadata`](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
|
||||
- [`libraryGetSearchAllLibraries`](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
|
||||
- [`libraryGetSearchLibrary`](docs/sdks/library/README.md#getsearchlibrary) - Search Library
|
||||
- [`libraryGetTopWatchedContent`](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
||||
- [`libraryPostMediaArts`](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork
|
||||
- [`libraryPostMediaPoster`](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster
|
||||
- [`logEnablePaperTrail`](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail
|
||||
- [`logLogLine`](docs/sdks/log/README.md#logline) - Logging a single line message.
|
||||
- [`logLogMultiLine`](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message
|
||||
@@ -604,6 +613,42 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
||||
</details>
|
||||
<!-- End Standalone functions [standalone-funcs] -->
|
||||
|
||||
<!-- Start File uploads [file-upload] -->
|
||||
## File uploads
|
||||
|
||||
Certain SDK methods accept files as part of a multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
|
||||
|
||||
> [!TIP]
|
||||
>
|
||||
> Depending on your JavaScript runtime, there are convenient utilities that return a handle to a file without reading the entire contents into memory:
|
||||
>
|
||||
> - **Node.js v20+:** Since v20, Node.js comes with a native `openAsBlob` function in [`node:fs`](https://nodejs.org/docs/latest-v20.x/api/fs.html#fsopenasblobpath-options).
|
||||
> - **Bun:** The native [`Bun.file`](https://bun.sh/docs/api/file-io#reading-files-bun-file) function produces a file handle that can be used for streaming file uploads.
|
||||
> - **Browsers:** All supported browsers return an instance to a [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) when reading the value from an `<input type="file">` element.
|
||||
> - **Node.js v18:** A file stream can be created using the `fileFrom` helper from [`fetch-blob/from.js`](https://www.npmjs.com/package/fetch-blob).
|
||||
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.library.postMediaArts(
|
||||
2268,
|
||||
"https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b",
|
||||
);
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
|
||||
```
|
||||
<!-- End File uploads [file-upload] -->
|
||||
|
||||
<!-- Start Retries [retries] -->
|
||||
## Retries
|
||||
|
||||
|
||||
22
RELEASES.md
22
RELEASES.md
@@ -1268,4 +1268,24 @@ Based on:
|
||||
### Generated
|
||||
- [typescript v0.35.3] .
|
||||
### Releases
|
||||
- [NPM v0.35.3] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.35.3 - .
|
||||
- [NPM v0.35.3] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.35.3 - .
|
||||
|
||||
## 2025-03-31 19:42:25
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.526.6 (2.563.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.35.4] .
|
||||
### Releases
|
||||
- [NPM v0.35.4] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.35.4 - .
|
||||
|
||||
## 2025-04-03 00:10:29
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.528.1 (2.565.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.36.0] .
|
||||
### Releases
|
||||
- [NPM v0.36.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.36.0 - .
|
||||
240
codeSamples.yaml
240
codeSamples.yaml
@@ -6,7 +6,7 @@ actions:
|
||||
- target: $["paths"]["/"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -26,7 +26,7 @@ actions:
|
||||
- target: $["paths"]["/:/prefs"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -46,7 +46,7 @@ actions:
|
||||
- target: $["paths"]["/:/progress"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -66,7 +66,7 @@ actions:
|
||||
- target: $["paths"]["/:/scrobble"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -86,7 +86,7 @@ actions:
|
||||
- target: $["paths"]["/:/timeline"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -118,7 +118,7 @@ actions:
|
||||
- target: $["paths"]["/:/unscrobble"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -138,7 +138,7 @@ actions:
|
||||
- target: $["paths"]["/activities"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -158,7 +158,7 @@ actions:
|
||||
- target: $["paths"]["/activities/{activityUUID}"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -178,7 +178,7 @@ actions:
|
||||
- target: $["paths"]["/butler"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -198,7 +198,7 @@ actions:
|
||||
- target: $["paths"]["/butler"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -218,7 +218,7 @@ actions:
|
||||
- target: $["paths"]["/butler"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -238,7 +238,7 @@ actions:
|
||||
- target: $["paths"]["/butler/{taskName}"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -259,7 +259,7 @@ actions:
|
||||
- target: $["paths"]["/butler/{taskName}"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -280,7 +280,7 @@ actions:
|
||||
- target: $["paths"]["/clients"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -300,7 +300,7 @@ actions:
|
||||
- target: $["paths"]["/companions"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -320,7 +320,7 @@ actions:
|
||||
- target: $["paths"]["/devices"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -340,7 +340,7 @@ actions:
|
||||
- target: $["paths"]["/friends"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -360,7 +360,7 @@ actions:
|
||||
- target: $["paths"]["/geoip"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -378,7 +378,7 @@ actions:
|
||||
- target: $["paths"]["/home"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -398,7 +398,7 @@ actions:
|
||||
- target: $["paths"]["/hubs"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -418,7 +418,7 @@ actions:
|
||||
- target: $["paths"]["/hubs/home/recentlyAdded"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -443,7 +443,7 @@ actions:
|
||||
- target: $["paths"]["/hubs/search"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -463,7 +463,7 @@ actions:
|
||||
- target: $["paths"]["/hubs/search/voice"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -483,7 +483,7 @@ actions:
|
||||
- target: $["paths"]["/hubs/sections/{sectionId}"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -503,7 +503,7 @@ actions:
|
||||
- target: $["paths"]["/identity"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -521,7 +521,7 @@ actions:
|
||||
- target: $["paths"]["/library/all/top"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -542,7 +542,7 @@ actions:
|
||||
- target: $["paths"]["/library/hashes"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -562,7 +562,7 @@ actions:
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -593,11 +593,51 @@ actions:
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/arts"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.library.getMediaArts(16099);
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/arts"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.library.postMediaArts(2268, "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b");
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -624,7 +664,7 @@ actions:
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -640,11 +680,51 @@ actions:
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/posters"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.library.getMediaPosters(16099);
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/posters"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.library.postMediaPoster(2268, "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b");
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -671,7 +751,7 @@ actions:
|
||||
- target: $["paths"]["/library/recentlyAdded"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -710,7 +790,7 @@ actions:
|
||||
- target: $["paths"]["/library/search"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -737,7 +817,7 @@ actions:
|
||||
- target: $["paths"]["/library/sections"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -757,7 +837,7 @@ actions:
|
||||
- target: $["paths"]["/library/sections/watchlist/{filter}"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -781,7 +861,7 @@ actions:
|
||||
- target: $["paths"]["/library/sections/{sectionKey}"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -801,7 +881,7 @@ actions:
|
||||
- target: $["paths"]["/library/sections/{sectionKey}"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -821,7 +901,7 @@ actions:
|
||||
- target: $["paths"]["/library/sections/{sectionKey}/actor"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -842,7 +922,7 @@ actions:
|
||||
- target: $["paths"]["/library/sections/{sectionKey}/all"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -866,7 +946,7 @@ actions:
|
||||
- target: $["paths"]["/library/sections/{sectionKey}/country"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -887,7 +967,7 @@ actions:
|
||||
- target: $["paths"]["/library/sections/{sectionKey}/genre"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -908,7 +988,7 @@ actions:
|
||||
- target: $["paths"]["/library/sections/{sectionKey}/refresh"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -929,7 +1009,7 @@ actions:
|
||||
- target: $["paths"]["/library/sections/{sectionKey}/search"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -950,7 +1030,7 @@ actions:
|
||||
- target: $["paths"]["/library/sections/{sectionKey}/{tag}"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -975,7 +1055,7 @@ actions:
|
||||
- target: $["paths"]["/log"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -996,7 +1076,7 @@ actions:
|
||||
- target: $["paths"]["/log"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1018,7 +1098,7 @@ actions:
|
||||
- target: $["paths"]["/log/networked"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1038,7 +1118,7 @@ actions:
|
||||
- target: $["paths"]["/media/providers"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1058,7 +1138,7 @@ actions:
|
||||
- target: $["paths"]["/myplex/account"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1078,7 +1158,7 @@ actions:
|
||||
- target: $["paths"]["/photo/:/transcode"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1107,7 +1187,7 @@ actions:
|
||||
- target: $["paths"]["/pins"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1131,7 +1211,7 @@ actions:
|
||||
- target: $["paths"]["/pins/{pinID}"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1156,7 +1236,7 @@ actions:
|
||||
- target: $["paths"]["/playlists"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1176,7 +1256,7 @@ actions:
|
||||
- target: $["paths"]["/playlists"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1202,7 +1282,7 @@ actions:
|
||||
- target: $["paths"]["/playlists/upload"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1223,7 +1303,7 @@ actions:
|
||||
- target: $["paths"]["/playlists/{playlistID}"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1243,7 +1323,7 @@ actions:
|
||||
- target: $["paths"]["/playlists/{playlistID}"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1263,7 +1343,7 @@ actions:
|
||||
- target: $["paths"]["/playlists/{playlistID}"]["put"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1283,7 +1363,7 @@ actions:
|
||||
- target: $["paths"]["/playlists/{playlistID}/items"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1303,7 +1383,7 @@ actions:
|
||||
- target: $["paths"]["/playlists/{playlistID}/items"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1324,7 +1404,7 @@ actions:
|
||||
- target: $["paths"]["/playlists/{playlistID}/items"]["put"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1344,7 +1424,7 @@ actions:
|
||||
- target: $["paths"]["/resources"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1364,7 +1444,7 @@ actions:
|
||||
- target: $["paths"]["/search"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1384,7 +1464,7 @@ actions:
|
||||
- target: $["paths"]["/security/resources"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1404,7 +1484,7 @@ actions:
|
||||
- target: $["paths"]["/security/token"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1425,7 +1505,7 @@ actions:
|
||||
- target: $["paths"]["/servers"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1445,7 +1525,7 @@ actions:
|
||||
- target: $["paths"]["/statistics/bandwidth"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1465,7 +1545,7 @@ actions:
|
||||
- target: $["paths"]["/statistics/media"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1485,7 +1565,7 @@ actions:
|
||||
- target: $["paths"]["/statistics/resources"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1505,7 +1585,7 @@ actions:
|
||||
- target: $["paths"]["/status/sessions"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1525,7 +1605,7 @@ actions:
|
||||
- target: $["paths"]["/status/sessions/history/all"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1545,7 +1625,7 @@ actions:
|
||||
- target: $["paths"]["/transcode/sessions"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1565,7 +1645,7 @@ actions:
|
||||
- target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1585,7 +1665,7 @@ actions:
|
||||
- target: $["paths"]["/updater/apply"]["put"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1606,7 +1686,7 @@ actions:
|
||||
- target: $["paths"]["/updater/check"]["put"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1627,7 +1707,7 @@ actions:
|
||||
- target: $["paths"]["/updater/status"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1647,7 +1727,7 @@ actions:
|
||||
- target: $["paths"]["/user"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1667,7 +1747,7 @@ actions:
|
||||
- target: $["paths"]["/users"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1699,7 +1779,7 @@ actions:
|
||||
- target: $["paths"]["/users/signin"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
@@ -1728,7 +1808,7 @@ actions:
|
||||
- target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: TypeScript
|
||||
- lang: typescript
|
||||
label: PlexJS
|
||||
source: |-
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { AddPlaylistContentsRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: AddPlaylistContentsRequest = {
|
||||
playlistID: 2776.28,
|
||||
playlistID: 5654.21,
|
||||
uri: "server://12345/com.plexapp.plugins.library/library/metadata/1",
|
||||
playQueueID: 123,
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ import { AddPlaylistContentsResponse } from "@lukehagar/plexjs/sdk/models/operat
|
||||
|
||||
let value: AddPlaylistContentsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 307,
|
||||
statusCode: 100,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { ApplyUpdatesResponse } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: ApplyUpdatesResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 208,
|
||||
statusCode: 305,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Billing } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: Billing = {
|
||||
internalPaymentMethod: {},
|
||||
paymentMethodId: 903720,
|
||||
paymentMethodId: 16429,
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { CheckForUpdatesResponse } from "@lukehagar/plexjs/sdk/models/operations
|
||||
|
||||
let value: CheckForUpdatesResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 428,
|
||||
statusCode: 505,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { ClearPlaylistContentsRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: ClearPlaylistContentsRequest = {
|
||||
playlistID: 4246.85,
|
||||
playlistID: 1320.68,
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { ClearPlaylistContentsResponse } from "@lukehagar/plexjs/sdk/models/oper
|
||||
|
||||
let value: ClearPlaylistContentsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 204,
|
||||
statusCode: 411,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ type of playlist to create
|
||||
```typescript
|
||||
import { CreatePlaylistQueryParamType } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: CreatePlaylistQueryParamType = CreatePlaylistQueryParamType.Photo;
|
||||
let value: CreatePlaylistQueryParamType = CreatePlaylistQueryParamType.Video;
|
||||
```
|
||||
|
||||
## Values
|
||||
|
||||
@@ -7,9 +7,9 @@ import { CreatePlaylistQueryParamType, CreatePlaylistRequest, Smart } from "@luk
|
||||
|
||||
let value: CreatePlaylistRequest = {
|
||||
title: "<value>",
|
||||
type: CreatePlaylistQueryParamType.Audio,
|
||||
type: CreatePlaylistQueryParamType.Photo,
|
||||
smart: Smart.One,
|
||||
uri: "https://ajar-reward.biz/",
|
||||
uri: "https://firsthand-section.biz",
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { CreatePlaylistResponse } from "@lukehagar/plexjs/sdk/models/operations"
|
||||
|
||||
let value: CreatePlaylistResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 205,
|
||||
statusCode: 507,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { DeletePlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: DeletePlaylistRequest = {
|
||||
playlistID: 6874.88,
|
||||
playlistID: 2074.7,
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { DeletePlaylistResponse } from "@lukehagar/plexjs/sdk/models/operations"
|
||||
|
||||
let value: DeletePlaylistResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 226,
|
||||
statusCode: 303,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { EnablePaperTrailResponse } from "@lukehagar/plexjs/sdk/models/operation
|
||||
|
||||
let value: EnablePaperTrailResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 304,
|
||||
statusCode: 409,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ Filter
|
||||
```typescript
|
||||
import { Filter } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: Filter = Filter.Released;
|
||||
let value: Filter = Filter.Available;
|
||||
```
|
||||
|
||||
## Values
|
||||
|
||||
@@ -7,7 +7,7 @@ import { GetBandwidthStatisticsResponse } from "@lukehagar/plexjs/sdk/models/ope
|
||||
|
||||
let value: GetBandwidthStatisticsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 205,
|
||||
statusCode: 226,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
36
docs/sdk/models/operations/getmediaartsmediacontainer.md
Normal file
36
docs/sdk/models/operations/getmediaartsmediacontainer.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# GetMediaArtsMediaContainer
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetMediaArtsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetMediaArtsMediaContainer = {
|
||||
size: 50,
|
||||
mediaTagVersion: 1734362201,
|
||||
mediaTagPrefix: "/system/bundle/media/flags/",
|
||||
identifier: "com.plexapp.plugins.library",
|
||||
metadata: [
|
||||
{
|
||||
key:
|
||||
"https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg",
|
||||
provider: "tmdb",
|
||||
ratingKey:
|
||||
"https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg",
|
||||
selected: true,
|
||||
thumb:
|
||||
"https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg",
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
||||
| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
|
||||
| `mediaTagVersion` | *number* | :heavy_check_mark: | The version number for media tags. | 1734362201 |
|
||||
| `mediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ |
|
||||
| `identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library |
|
||||
| `metadata` | [operations.GetMediaArtsMetadata](../../../sdk/models/operations/getmediaartsmetadata.md)[] | :heavy_check_mark: | N/A | |
|
||||
27
docs/sdk/models/operations/getmediaartsmetadata.md
Normal file
27
docs/sdk/models/operations/getmediaartsmetadata.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# GetMediaArtsMetadata
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetMediaArtsMetadata } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetMediaArtsMetadata = {
|
||||
key: "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg",
|
||||
provider: "tmdb",
|
||||
ratingKey:
|
||||
"https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg",
|
||||
selected: true,
|
||||
thumb:
|
||||
"https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `key` | *string* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg |
|
||||
| `provider` | *string* | :heavy_minus_sign: | The provider of the artwork. | tmdb |
|
||||
| `ratingKey` | *string* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg |
|
||||
| `selected` | *boolean* | :heavy_check_mark: | Whether this is the selected artwork. | true |
|
||||
| `thumb` | *string* | :heavy_check_mark: | The URL of the artwork thumbnail. | https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg |
|
||||
17
docs/sdk/models/operations/getmediaartsrequest.md
Normal file
17
docs/sdk/models/operations/getmediaartsrequest.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# GetMediaArtsRequest
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetMediaArtsRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetMediaArtsRequest = {
|
||||
ratingKey: 16099,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||
| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 |
|
||||
44
docs/sdk/models/operations/getmediaartsresponse.md
Normal file
44
docs/sdk/models/operations/getmediaartsresponse.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# GetMediaArtsResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetMediaArtsResponse } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetMediaArtsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 203,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
object: {
|
||||
mediaContainer: {
|
||||
size: 50,
|
||||
mediaTagVersion: 1734362201,
|
||||
mediaTagPrefix: "/system/bundle/media/flags/",
|
||||
identifier: "com.plexapp.plugins.library",
|
||||
metadata: [
|
||||
{
|
||||
key:
|
||||
"https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg",
|
||||
provider: "tmdb",
|
||||
ratingKey:
|
||||
"https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg",
|
||||
selected: true,
|
||||
thumb:
|
||||
"https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## 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.GetMediaArtsResponseBody](../../../sdk/models/operations/getmediaartsresponsebody.md) | :heavy_minus_sign: | The available background artwork for the library item. |
|
||||
36
docs/sdk/models/operations/getmediaartsresponsebody.md
Normal file
36
docs/sdk/models/operations/getmediaartsresponsebody.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# GetMediaArtsResponseBody
|
||||
|
||||
The available background artwork for the library item.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetMediaArtsResponseBody } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetMediaArtsResponseBody = {
|
||||
mediaContainer: {
|
||||
size: 50,
|
||||
mediaTagVersion: 1734362201,
|
||||
mediaTagPrefix: "/system/bundle/media/flags/",
|
||||
identifier: "com.plexapp.plugins.library",
|
||||
metadata: [
|
||||
{
|
||||
key:
|
||||
"https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg",
|
||||
provider: "tmdb",
|
||||
ratingKey:
|
||||
"https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg",
|
||||
selected: true,
|
||||
thumb:
|
||||
"https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| `mediaContainer` | [operations.GetMediaArtsMediaContainer](../../../sdk/models/operations/getmediaartsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
36
docs/sdk/models/operations/getmediapostersmediacontainer.md
Normal file
36
docs/sdk/models/operations/getmediapostersmediacontainer.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# GetMediaPostersMediaContainer
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetMediaPostersMediaContainer } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetMediaPostersMediaContainer = {
|
||||
size: 50,
|
||||
mediaTagVersion: 1734362201,
|
||||
mediaTagPrefix: "/system/bundle/media/flags/",
|
||||
identifier: "com.plexapp.plugins.library",
|
||||
metadata: [
|
||||
{
|
||||
key:
|
||||
"https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg",
|
||||
provider: "tmdb",
|
||||
ratingKey:
|
||||
"https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg",
|
||||
selected: true,
|
||||
thumb:
|
||||
"https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg",
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
|
||||
| `mediaTagVersion` | *number* | :heavy_check_mark: | The version number for media tags. | 1734362201 |
|
||||
| `mediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ |
|
||||
| `identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library |
|
||||
| `metadata` | [operations.GetMediaPostersMetadata](../../../sdk/models/operations/getmediapostersmetadata.md)[] | :heavy_check_mark: | N/A | |
|
||||
27
docs/sdk/models/operations/getmediapostersmetadata.md
Normal file
27
docs/sdk/models/operations/getmediapostersmetadata.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# GetMediaPostersMetadata
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetMediaPostersMetadata } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetMediaPostersMetadata = {
|
||||
key: "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg",
|
||||
provider: "tmdb",
|
||||
ratingKey:
|
||||
"https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg",
|
||||
selected: true,
|
||||
thumb:
|
||||
"https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `key` | *string* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg |
|
||||
| `provider` | *string* | :heavy_minus_sign: | The provider of the poster. | tmdb |
|
||||
| `ratingKey` | *string* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg |
|
||||
| `selected` | *boolean* | :heavy_check_mark: | Whether this is the selected poster. | true |
|
||||
| `thumb` | *string* | :heavy_check_mark: | The URL of the poster thumbnail. | https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg |
|
||||
17
docs/sdk/models/operations/getmediapostersrequest.md
Normal file
17
docs/sdk/models/operations/getmediapostersrequest.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# GetMediaPostersRequest
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetMediaPostersRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetMediaPostersRequest = {
|
||||
ratingKey: 16099,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||
| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 |
|
||||
44
docs/sdk/models/operations/getmediapostersresponse.md
Normal file
44
docs/sdk/models/operations/getmediapostersresponse.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# GetMediaPostersResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetMediaPostersResponse } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetMediaPostersResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 508,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
object: {
|
||||
mediaContainer: {
|
||||
size: 50,
|
||||
mediaTagVersion: 1734362201,
|
||||
mediaTagPrefix: "/system/bundle/media/flags/",
|
||||
identifier: "com.plexapp.plugins.library",
|
||||
metadata: [
|
||||
{
|
||||
key:
|
||||
"https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg",
|
||||
provider: "tmdb",
|
||||
ratingKey:
|
||||
"https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg",
|
||||
selected: true,
|
||||
thumb:
|
||||
"https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## 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.GetMediaPostersResponseBody](../../../sdk/models/operations/getmediapostersresponsebody.md) | :heavy_minus_sign: | The available posters for the library item. |
|
||||
36
docs/sdk/models/operations/getmediapostersresponsebody.md
Normal file
36
docs/sdk/models/operations/getmediapostersresponsebody.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# GetMediaPostersResponseBody
|
||||
|
||||
The available posters for the library item.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetMediaPostersResponseBody } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetMediaPostersResponseBody = {
|
||||
mediaContainer: {
|
||||
size: 50,
|
||||
mediaTagVersion: 1734362201,
|
||||
mediaTagPrefix: "/system/bundle/media/flags/",
|
||||
identifier: "com.plexapp.plugins.library",
|
||||
metadata: [
|
||||
{
|
||||
key:
|
||||
"https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg",
|
||||
provider: "tmdb",
|
||||
ratingKey:
|
||||
"https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg",
|
||||
selected: true,
|
||||
thumb:
|
||||
"https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `mediaContainer` | [operations.GetMediaPostersMediaContainer](../../../sdk/models/operations/getmediapostersmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -6,7 +6,7 @@
|
||||
import { GetMetadataChildrenRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetMetadataChildrenRequest = {
|
||||
ratingKey: 3119.45,
|
||||
ratingKey: 2543.56,
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { GetMetadataChildrenResponse } from "@lukehagar/plexjs/sdk/models/operat
|
||||
|
||||
let value: GetMetadataChildrenResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 202,
|
||||
statusCode: 101,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { GetPlaylistContentsQueryParamType, GetPlaylistContentsRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetPlaylistContentsRequest = {
|
||||
playlistID: 5182.01,
|
||||
playlistID: 8638.56,
|
||||
type: GetPlaylistContentsQueryParamType.TvShow,
|
||||
};
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@ import { RFCDate } from "@lukehagar/plexjs/sdk/types";
|
||||
|
||||
let value: GetPlaylistContentsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 100,
|
||||
statusCode: 102,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { GetPlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetPlaylistRequest = {
|
||||
playlistID: 7980.47,
|
||||
playlistID: 2133.12,
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { GetPlaylistResponse } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetPlaylistResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 103,
|
||||
statusCode: 300,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { GetPlaylistsResponse } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetPlaylistsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 503,
|
||||
statusCode: 407,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { GetResourcesStatisticsResponse } from "@lukehagar/plexjs/sdk/models/ope
|
||||
|
||||
let value: GetResourcesStatisticsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 424,
|
||||
statusCode: 226,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -8,7 +8,7 @@ import { RFCDate } from "@lukehagar/plexjs/sdk/types";
|
||||
|
||||
let value: GetSessionHistoryResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 510,
|
||||
statusCode: 428,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { GetSessionsResponse } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetSessionsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 101,
|
||||
statusCode: 508,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { GetSourceConnectionInformationResponse } from "@lukehagar/plexjs/sdk/mo
|
||||
|
||||
let value: GetSourceConnectionInformationResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 101,
|
||||
statusCode: 305,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { GetStatisticsResponse } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetStatisticsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 103,
|
||||
statusCode: 510,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
let value: GetTokenDetailsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 508,
|
||||
statusCode: 202,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
@@ -31,7 +31,7 @@ let value: GetTokenDetailsResponse = {
|
||||
homeSize: 1,
|
||||
id: 13692262,
|
||||
joinedAt: 1556281940,
|
||||
locale: "pl",
|
||||
locale: "fr",
|
||||
mailingListStatus: MailingListStatus.Active,
|
||||
maxHomeSize: 15,
|
||||
profile: {
|
||||
|
||||
@@ -27,7 +27,7 @@ let value: GetTokenDetailsUserPlexAccount = {
|
||||
homeSize: 1,
|
||||
id: 13692262,
|
||||
joinedAt: 1556281940,
|
||||
locale: "ja",
|
||||
locale: "el",
|
||||
mailingListStatus: MailingListStatus.Active,
|
||||
maxHomeSize: 15,
|
||||
profile: {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { RFCDate } from "@lukehagar/plexjs/sdk/types";
|
||||
|
||||
let value: GetTopWatchedContentResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 103,
|
||||
statusCode: 206,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { GetTranscodeSessionsResponse } from "@lukehagar/plexjs/sdk/models/opera
|
||||
|
||||
let value: GetTranscodeSessionsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 226,
|
||||
statusCode: 208,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { GetTransientTokenResponse } from "@lukehagar/plexjs/sdk/models/operatio
|
||||
|
||||
let value: GetTransientTokenResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 205,
|
||||
statusCode: 429,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { GetUpdateStatusResponse } from "@lukehagar/plexjs/sdk/models/operations
|
||||
|
||||
let value: GetUpdateStatusResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 508,
|
||||
statusCode: 201,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { GetUsersResponse } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetUsersResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 400,
|
||||
statusCode: 201,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { Filter, GetWatchListRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetWatchListRequest = {
|
||||
filter: Filter.All,
|
||||
filter: Filter.Released,
|
||||
xPlexToken: "CV5xoxjTpFKUzBTShsaf",
|
||||
};
|
||||
```
|
||||
|
||||
@@ -7,7 +7,7 @@ import { GetWatchListResponse } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: GetWatchListResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 302,
|
||||
statusCode: 304,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -13,7 +13,7 @@ An integer log level to write to the PMS log with.
|
||||
```typescript
|
||||
import { Level } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: Level = Level.Three;
|
||||
let value: Level = Level.Four;
|
||||
```
|
||||
|
||||
## Values
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { Level, LogLineRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: LogLineRequest = {
|
||||
level: Level.One,
|
||||
level: Level.Four,
|
||||
message: "Test log message",
|
||||
source: "Postman",
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ import { LogLineResponse } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: LogLineResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 100,
|
||||
statusCode: 206,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { LogMultiLineResponse } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: LogMultiLineResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 102,
|
||||
statusCode: 200,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -15,7 +15,7 @@ let value: PastSubscription = {
|
||||
state: PostUsersSignInDataState.Ended,
|
||||
billing: {
|
||||
internalPaymentMethod: {},
|
||||
paymentMethodId: 83422,
|
||||
paymentMethodId: 929530,
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
@@ -7,7 +7,7 @@ limit to a type of playlist.
|
||||
```typescript
|
||||
import { PlaylistType } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: PlaylistType = PlaylistType.Photo;
|
||||
let value: PlaylistType = PlaylistType.Audio;
|
||||
```
|
||||
|
||||
## Values
|
||||
|
||||
17
docs/sdk/models/operations/postmediaartsrequest.md
Normal file
17
docs/sdk/models/operations/postmediaartsrequest.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# PostMediaArtsRequest
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { PostMediaArtsRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||
| `url` | *string* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
|
||||
| `requestBody` | *ReadableStream<Uint8Array>* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||
23
docs/sdk/models/operations/postmediaartsresponse.md
Normal file
23
docs/sdk/models/operations/postmediaartsresponse.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# PostMediaArtsResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { PostMediaArtsResponse } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: PostMediaArtsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 201,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
};
|
||||
```
|
||||
|
||||
## 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 |
|
||||
17
docs/sdk/models/operations/postmediaposterrequest.md
Normal file
17
docs/sdk/models/operations/postmediaposterrequest.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# PostMediaPosterRequest
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { PostMediaPosterRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||
| `url` | *string* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
|
||||
| `requestBody` | *ReadableStream<Uint8Array>* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||
23
docs/sdk/models/operations/postmediaposterresponse.md
Normal file
23
docs/sdk/models/operations/postmediaposterresponse.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# PostMediaPosterResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { PostMediaPosterResponse } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: PostMediaPosterResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 302,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
};
|
||||
```
|
||||
|
||||
## 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 |
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
|
||||
let value: PostUsersSignInDataResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 503,
|
||||
statusCode: 205,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
@@ -32,7 +32,7 @@ let value: PostUsersSignInDataResponse = {
|
||||
homeSize: 1,
|
||||
id: 13692262,
|
||||
joinedAt: 1556281940,
|
||||
locale: "it",
|
||||
locale: "es",
|
||||
mailingListStatus: PostUsersSignInDataMailingListStatus.Active,
|
||||
maxHomeSize: 15,
|
||||
profile: {
|
||||
@@ -79,7 +79,7 @@ let value: PostUsersSignInDataResponse = {
|
||||
state: PostUsersSignInDataState.Ended,
|
||||
billing: {
|
||||
internalPaymentMethod: {},
|
||||
paymentMethodId: 100294,
|
||||
paymentMethodId: 485628,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -28,7 +28,7 @@ let value: PostUsersSignInDataUserPlexAccount = {
|
||||
homeSize: 1,
|
||||
id: 13692262,
|
||||
joinedAt: 1556281940,
|
||||
locale: "hi",
|
||||
locale: "sv",
|
||||
mailingListStatus: PostUsersSignInDataMailingListStatus.Active,
|
||||
maxHomeSize: 15,
|
||||
profile: {
|
||||
@@ -75,7 +75,7 @@ let value: PostUsersSignInDataUserPlexAccount = {
|
||||
state: PostUsersSignInDataState.Ended,
|
||||
billing: {
|
||||
internalPaymentMethod: {},
|
||||
paymentMethodId: 584476,
|
||||
paymentMethodId: 785153,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -7,7 +7,7 @@ import { StopTranscodeSessionResponse } from "@lukehagar/plexjs/sdk/models/opera
|
||||
|
||||
let value: StopTranscodeSessionResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 226,
|
||||
statusCode: 400,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { UpdatePlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations";
|
||||
|
||||
let value: UpdatePlaylistRequest = {
|
||||
playlistID: 7308.56,
|
||||
playlistID: 4635.75,
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { UpdatePlaylistResponse } from "@lukehagar/plexjs/sdk/models/operations"
|
||||
|
||||
let value: UpdatePlaylistResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 202,
|
||||
statusCode: 205,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ import { QueryParamForce, UploadPlaylistRequest } from "@lukehagar/plexjs/sdk/mo
|
||||
|
||||
let value: UploadPlaylistRequest = {
|
||||
path: "/home/barkley/playlist.m3u",
|
||||
force: QueryParamForce.One,
|
||||
force: QueryParamForce.Zero,
|
||||
sectionID: 1,
|
||||
};
|
||||
```
|
||||
|
||||
@@ -7,7 +7,7 @@ import { UploadPlaylistResponse } from "@lukehagar/plexjs/sdk/models/operations"
|
||||
|
||||
let value: UploadPlaylistResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 102,
|
||||
statusCode: 508,
|
||||
rawResponse: new Response("{\"message\": \"hello world\"}", {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
|
||||
@@ -22,6 +22,10 @@ API Calls interacting with Plex Media Server Libraries
|
||||
* [getActorsLibrary](#getactorslibrary) - Get Actors of library media
|
||||
* [getSearchAllLibraries](#getsearchalllibraries) - Search All Libraries
|
||||
* [getMediaMetaData](#getmediametadata) - Get Media Metadata
|
||||
* [getMediaArts](#getmediaarts) - Get Media Background Artwork
|
||||
* [postMediaArts](#postmediaarts) - Upload Media Background Artwork
|
||||
* [getMediaPosters](#getmediaposters) - Get Media Posters
|
||||
* [postMediaPoster](#postmediaposter) - Upload Media Poster
|
||||
* [getMetadataChildren](#getmetadatachildren) - Get Items Children
|
||||
* [getTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content
|
||||
|
||||
@@ -1269,6 +1273,298 @@ run();
|
||||
| errors.GetMediaMetaDataUnauthorized | 401 | application/json |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## getMediaArts
|
||||
|
||||
Returns the background artwork for a library item.
|
||||
|
||||
### Example Usage
|
||||
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.library.getMediaArts(16099);
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { libraryGetMediaArts } from "@lukehagar/plexjs/funcs/libraryGetMediaArts.js";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const res = await libraryGetMediaArts(plexAPI, 16099);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the artwork of. | [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. | |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
|
||||
|
||||
### Response
|
||||
|
||||
**Promise\<[operations.GetMediaArtsResponse](../../sdk/models/operations/getmediaartsresponse.md)\>**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## postMediaArts
|
||||
|
||||
Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
|
||||
|
||||
### Example Usage
|
||||
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.library.postMediaArts(2268, "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b");
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { libraryPostMediaArts } from "@lukehagar/plexjs/funcs/libraryPostMediaArts.js";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const res = await libraryPostMediaArts(plexAPI, 2268, "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the posters of. | [object Object] |
|
||||
| `url` | *string* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | [object Object] |
|
||||
| `requestBody` | *ReadableStream<Uint8Array>* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
|
||||
|
||||
### Response
|
||||
|
||||
**Promise\<[operations.PostMediaArtsResponse](../../sdk/models/operations/postmediaartsresponse.md)\>**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## getMediaPosters
|
||||
|
||||
Returns the available posters for a library item.
|
||||
|
||||
### Example Usage
|
||||
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.library.getMediaPosters(16099);
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { libraryGetMediaPosters } from "@lukehagar/plexjs/funcs/libraryGetMediaPosters.js";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const res = await libraryGetMediaPosters(plexAPI, 16099);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the posters of. | [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. | |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
|
||||
|
||||
### Response
|
||||
|
||||
**Promise\<[operations.GetMediaPostersResponse](../../sdk/models/operations/getmediapostersresponse.md)\>**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## postMediaPoster
|
||||
|
||||
Uploads a poster to a library item, either from a local file or a remote URL
|
||||
|
||||
### Example Usage
|
||||
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.library.postMediaPoster(2268, "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b");
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { libraryPostMediaPoster } from "@lukehagar/plexjs/funcs/libraryPostMediaPoster.js";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const res = await libraryPostMediaPoster(plexAPI, 2268, "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the posters of. | [object Object] |
|
||||
| `url` | *string* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | [object Object] |
|
||||
| `requestBody` | *ReadableStream<Uint8Array>* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
||||
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
|
||||
|
||||
### Response
|
||||
|
||||
**Promise\<[operations.PostMediaPosterResponse](../../sdk/models/operations/postmediaposterresponse.md)\>**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## getMetadataChildren
|
||||
|
||||
This endpoint will return the children of of a library item specified with the ratingKey.
|
||||
|
||||
2
jsr.json
2
jsr.json
@@ -2,7 +2,7 @@
|
||||
|
||||
{
|
||||
"name": "@lukehagar/plexjs",
|
||||
"version": "0.35.3",
|
||||
"version": "0.36.0",
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@lukehagar/plexjs",
|
||||
"version": "0.35.3",
|
||||
"version": "0.36.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lukehagar/plexjs",
|
||||
"version": "0.35.3",
|
||||
"version": "0.36.0",
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.19.0",
|
||||
"eslint": "^9.19.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@lukehagar/plexjs",
|
||||
"version": "0.35.3",
|
||||
"version": "0.36.0",
|
||||
"author": "LukeHagar",
|
||||
"main": "./index.js",
|
||||
"sideEffects": false,
|
||||
|
||||
174
src/funcs/libraryGetMediaArts.ts
Normal file
174
src/funcs/libraryGetMediaArts.ts
Normal file
@@ -0,0 +1,174 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
import { PlexAPICore } from "../core.js";
|
||||
import { encodeSimple } from "../lib/encodings.js";
|
||||
import * as M from "../lib/matchers.js";
|
||||
import { compactMap } from "../lib/primitives.js";
|
||||
import { safeParse } from "../lib/schemas.js";
|
||||
import { RequestOptions } from "../lib/sdks.js";
|
||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||
import { pathToFunc } from "../lib/url.js";
|
||||
import {
|
||||
ConnectionError,
|
||||
InvalidRequestError,
|
||||
RequestAbortedError,
|
||||
RequestTimeoutError,
|
||||
UnexpectedClientError,
|
||||
} from "../sdk/models/errors/httpclienterrors.js";
|
||||
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
||||
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
||||
import * as operations from "../sdk/models/operations/index.js";
|
||||
import { APICall, APIPromise } from "../sdk/types/async.js";
|
||||
import { Result } from "../sdk/types/fp.js";
|
||||
|
||||
/**
|
||||
* Get Media Background Artwork
|
||||
*
|
||||
* @remarks
|
||||
* Returns the background artwork for a library item.
|
||||
*/
|
||||
export function libraryGetMediaArts(
|
||||
client: PlexAPICore,
|
||||
ratingKey: number,
|
||||
options?: RequestOptions,
|
||||
): APIPromise<
|
||||
Result<
|
||||
operations.GetMediaArtsResponse,
|
||||
| SDKError
|
||||
| SDKValidationError
|
||||
| UnexpectedClientError
|
||||
| InvalidRequestError
|
||||
| RequestAbortedError
|
||||
| RequestTimeoutError
|
||||
| ConnectionError
|
||||
>
|
||||
> {
|
||||
return new APIPromise($do(
|
||||
client,
|
||||
ratingKey,
|
||||
options,
|
||||
));
|
||||
}
|
||||
|
||||
async function $do(
|
||||
client: PlexAPICore,
|
||||
ratingKey: number,
|
||||
options?: RequestOptions,
|
||||
): Promise<
|
||||
[
|
||||
Result<
|
||||
operations.GetMediaArtsResponse,
|
||||
| SDKError
|
||||
| SDKValidationError
|
||||
| UnexpectedClientError
|
||||
| InvalidRequestError
|
||||
| RequestAbortedError
|
||||
| RequestTimeoutError
|
||||
| ConnectionError
|
||||
>,
|
||||
APICall,
|
||||
]
|
||||
> {
|
||||
const input: operations.GetMediaArtsRequest = {
|
||||
ratingKey: ratingKey,
|
||||
};
|
||||
|
||||
const parsed = safeParse(
|
||||
input,
|
||||
(value) => operations.GetMediaArtsRequest$outboundSchema.parse(value),
|
||||
"Input validation failed",
|
||||
);
|
||||
if (!parsed.ok) {
|
||||
return [parsed, { status: "invalid" }];
|
||||
}
|
||||
const payload = parsed.value;
|
||||
const body = null;
|
||||
|
||||
const pathParams = {
|
||||
ratingKey: encodeSimple("ratingKey", payload.ratingKey, {
|
||||
explode: false,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
};
|
||||
|
||||
const path = pathToFunc("/library/metadata/{ratingKey}/arts")(pathParams);
|
||||
|
||||
const headers = new Headers(compactMap({
|
||||
Accept: "application/json",
|
||||
}));
|
||||
|
||||
const secConfig = await extractSecurity(client._options.accessToken);
|
||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||
const requestSecurity = resolveGlobalSecurity(securityInput);
|
||||
|
||||
const context = {
|
||||
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
||||
operationID: "get-media-arts",
|
||||
oAuth2Scopes: [],
|
||||
|
||||
resolvedSecurity: requestSecurity,
|
||||
|
||||
securitySource: client._options.accessToken,
|
||||
retryConfig: options?.retries
|
||||
|| client._options.retryConfig
|
||||
|| { strategy: "none" },
|
||||
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
||||
};
|
||||
|
||||
const requestRes = client._createRequest(context, {
|
||||
security: requestSecurity,
|
||||
method: "GET",
|
||||
baseURL: options?.serverURL,
|
||||
path: path,
|
||||
headers: headers,
|
||||
body: body,
|
||||
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
||||
}, options);
|
||||
if (!requestRes.ok) {
|
||||
return [requestRes, { status: "invalid" }];
|
||||
}
|
||||
const req = requestRes.value;
|
||||
|
||||
const doResult = await client._do(req, {
|
||||
context,
|
||||
errorCodes: ["404", "4XX", "5XX"],
|
||||
retryConfig: context.retryConfig,
|
||||
retryCodes: context.retryCodes,
|
||||
});
|
||||
if (!doResult.ok) {
|
||||
return [doResult, { status: "request-error", request: req }];
|
||||
}
|
||||
const response = doResult.value;
|
||||
|
||||
const responseFields = {
|
||||
ContentType: response.headers.get("content-type")
|
||||
?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
const [result] = await M.match<
|
||||
operations.GetMediaArtsResponse,
|
||||
| SDKError
|
||||
| SDKValidationError
|
||||
| UnexpectedClientError
|
||||
| InvalidRequestError
|
||||
| RequestAbortedError
|
||||
| RequestTimeoutError
|
||||
| ConnectionError
|
||||
>(
|
||||
M.json(200, operations.GetMediaArtsResponse$inboundSchema, {
|
||||
key: "object",
|
||||
}),
|
||||
M.fail([404, "4XX"]),
|
||||
M.fail("5XX"),
|
||||
)(response, { extraFields: responseFields });
|
||||
if (!result.ok) {
|
||||
return [result, { status: "complete", request: req, response }];
|
||||
}
|
||||
|
||||
return [result, { status: "complete", request: req, response }];
|
||||
}
|
||||
174
src/funcs/libraryGetMediaPosters.ts
Normal file
174
src/funcs/libraryGetMediaPosters.ts
Normal file
@@ -0,0 +1,174 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
import { PlexAPICore } from "../core.js";
|
||||
import { encodeSimple } from "../lib/encodings.js";
|
||||
import * as M from "../lib/matchers.js";
|
||||
import { compactMap } from "../lib/primitives.js";
|
||||
import { safeParse } from "../lib/schemas.js";
|
||||
import { RequestOptions } from "../lib/sdks.js";
|
||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||
import { pathToFunc } from "../lib/url.js";
|
||||
import {
|
||||
ConnectionError,
|
||||
InvalidRequestError,
|
||||
RequestAbortedError,
|
||||
RequestTimeoutError,
|
||||
UnexpectedClientError,
|
||||
} from "../sdk/models/errors/httpclienterrors.js";
|
||||
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
||||
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
||||
import * as operations from "../sdk/models/operations/index.js";
|
||||
import { APICall, APIPromise } from "../sdk/types/async.js";
|
||||
import { Result } from "../sdk/types/fp.js";
|
||||
|
||||
/**
|
||||
* Get Media Posters
|
||||
*
|
||||
* @remarks
|
||||
* Returns the available posters for a library item.
|
||||
*/
|
||||
export function libraryGetMediaPosters(
|
||||
client: PlexAPICore,
|
||||
ratingKey: number,
|
||||
options?: RequestOptions,
|
||||
): APIPromise<
|
||||
Result<
|
||||
operations.GetMediaPostersResponse,
|
||||
| SDKError
|
||||
| SDKValidationError
|
||||
| UnexpectedClientError
|
||||
| InvalidRequestError
|
||||
| RequestAbortedError
|
||||
| RequestTimeoutError
|
||||
| ConnectionError
|
||||
>
|
||||
> {
|
||||
return new APIPromise($do(
|
||||
client,
|
||||
ratingKey,
|
||||
options,
|
||||
));
|
||||
}
|
||||
|
||||
async function $do(
|
||||
client: PlexAPICore,
|
||||
ratingKey: number,
|
||||
options?: RequestOptions,
|
||||
): Promise<
|
||||
[
|
||||
Result<
|
||||
operations.GetMediaPostersResponse,
|
||||
| SDKError
|
||||
| SDKValidationError
|
||||
| UnexpectedClientError
|
||||
| InvalidRequestError
|
||||
| RequestAbortedError
|
||||
| RequestTimeoutError
|
||||
| ConnectionError
|
||||
>,
|
||||
APICall,
|
||||
]
|
||||
> {
|
||||
const input: operations.GetMediaPostersRequest = {
|
||||
ratingKey: ratingKey,
|
||||
};
|
||||
|
||||
const parsed = safeParse(
|
||||
input,
|
||||
(value) => operations.GetMediaPostersRequest$outboundSchema.parse(value),
|
||||
"Input validation failed",
|
||||
);
|
||||
if (!parsed.ok) {
|
||||
return [parsed, { status: "invalid" }];
|
||||
}
|
||||
const payload = parsed.value;
|
||||
const body = null;
|
||||
|
||||
const pathParams = {
|
||||
ratingKey: encodeSimple("ratingKey", payload.ratingKey, {
|
||||
explode: false,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
};
|
||||
|
||||
const path = pathToFunc("/library/metadata/{ratingKey}/posters")(pathParams);
|
||||
|
||||
const headers = new Headers(compactMap({
|
||||
Accept: "application/json",
|
||||
}));
|
||||
|
||||
const secConfig = await extractSecurity(client._options.accessToken);
|
||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||
const requestSecurity = resolveGlobalSecurity(securityInput);
|
||||
|
||||
const context = {
|
||||
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
||||
operationID: "get-media-posters",
|
||||
oAuth2Scopes: [],
|
||||
|
||||
resolvedSecurity: requestSecurity,
|
||||
|
||||
securitySource: client._options.accessToken,
|
||||
retryConfig: options?.retries
|
||||
|| client._options.retryConfig
|
||||
|| { strategy: "none" },
|
||||
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
||||
};
|
||||
|
||||
const requestRes = client._createRequest(context, {
|
||||
security: requestSecurity,
|
||||
method: "GET",
|
||||
baseURL: options?.serverURL,
|
||||
path: path,
|
||||
headers: headers,
|
||||
body: body,
|
||||
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
||||
}, options);
|
||||
if (!requestRes.ok) {
|
||||
return [requestRes, { status: "invalid" }];
|
||||
}
|
||||
const req = requestRes.value;
|
||||
|
||||
const doResult = await client._do(req, {
|
||||
context,
|
||||
errorCodes: ["404", "4XX", "5XX"],
|
||||
retryConfig: context.retryConfig,
|
||||
retryCodes: context.retryCodes,
|
||||
});
|
||||
if (!doResult.ok) {
|
||||
return [doResult, { status: "request-error", request: req }];
|
||||
}
|
||||
const response = doResult.value;
|
||||
|
||||
const responseFields = {
|
||||
ContentType: response.headers.get("content-type")
|
||||
?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
const [result] = await M.match<
|
||||
operations.GetMediaPostersResponse,
|
||||
| SDKError
|
||||
| SDKValidationError
|
||||
| UnexpectedClientError
|
||||
| InvalidRequestError
|
||||
| RequestAbortedError
|
||||
| RequestTimeoutError
|
||||
| ConnectionError
|
||||
>(
|
||||
M.json(200, operations.GetMediaPostersResponse$inboundSchema, {
|
||||
key: "object",
|
||||
}),
|
||||
M.fail([404, "4XX"]),
|
||||
M.fail("5XX"),
|
||||
)(response, { extraFields: responseFields });
|
||||
if (!result.ok) {
|
||||
return [result, { status: "complete", request: req, response }];
|
||||
}
|
||||
|
||||
return [result, { status: "complete", request: req, response }];
|
||||
}
|
||||
196
src/funcs/libraryPostMediaArts.ts
Normal file
196
src/funcs/libraryPostMediaArts.ts
Normal file
@@ -0,0 +1,196 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
import { PlexAPICore } from "../core.js";
|
||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||
import * as M from "../lib/matchers.js";
|
||||
import { compactMap } from "../lib/primitives.js";
|
||||
import { safeParse } from "../lib/schemas.js";
|
||||
import { RequestOptions } from "../lib/sdks.js";
|
||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||
import { pathToFunc } from "../lib/url.js";
|
||||
import {
|
||||
ConnectionError,
|
||||
InvalidRequestError,
|
||||
RequestAbortedError,
|
||||
RequestTimeoutError,
|
||||
UnexpectedClientError,
|
||||
} from "../sdk/models/errors/httpclienterrors.js";
|
||||
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
||||
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
||||
import * as operations from "../sdk/models/operations/index.js";
|
||||
import { APICall, APIPromise } from "../sdk/types/async.js";
|
||||
import { Result } from "../sdk/types/fp.js";
|
||||
|
||||
/**
|
||||
* Upload Media Background Artwork
|
||||
*
|
||||
* @remarks
|
||||
* Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
|
||||
*/
|
||||
export function libraryPostMediaArts(
|
||||
client: PlexAPICore,
|
||||
ratingKey: number,
|
||||
requestBody?:
|
||||
| ReadableStream<Uint8Array>
|
||||
| Blob
|
||||
| ArrayBuffer
|
||||
| Uint8Array
|
||||
| undefined,
|
||||
url?: string | undefined,
|
||||
options?: RequestOptions,
|
||||
): APIPromise<
|
||||
Result<
|
||||
operations.PostMediaArtsResponse,
|
||||
| SDKError
|
||||
| SDKValidationError
|
||||
| UnexpectedClientError
|
||||
| InvalidRequestError
|
||||
| RequestAbortedError
|
||||
| RequestTimeoutError
|
||||
| ConnectionError
|
||||
>
|
||||
> {
|
||||
return new APIPromise($do(
|
||||
client,
|
||||
ratingKey,
|
||||
requestBody,
|
||||
url,
|
||||
options,
|
||||
));
|
||||
}
|
||||
|
||||
async function $do(
|
||||
client: PlexAPICore,
|
||||
ratingKey: number,
|
||||
requestBody?:
|
||||
| ReadableStream<Uint8Array>
|
||||
| Blob
|
||||
| ArrayBuffer
|
||||
| Uint8Array
|
||||
| undefined,
|
||||
url?: string | undefined,
|
||||
options?: RequestOptions,
|
||||
): Promise<
|
||||
[
|
||||
Result<
|
||||
operations.PostMediaArtsResponse,
|
||||
| SDKError
|
||||
| SDKValidationError
|
||||
| UnexpectedClientError
|
||||
| InvalidRequestError
|
||||
| RequestAbortedError
|
||||
| RequestTimeoutError
|
||||
| ConnectionError
|
||||
>,
|
||||
APICall,
|
||||
]
|
||||
> {
|
||||
const input: operations.PostMediaArtsRequest = {
|
||||
ratingKey: ratingKey,
|
||||
requestBody: requestBody,
|
||||
url: url,
|
||||
};
|
||||
|
||||
const parsed = safeParse(
|
||||
input,
|
||||
(value) => operations.PostMediaArtsRequest$outboundSchema.parse(value),
|
||||
"Input validation failed",
|
||||
);
|
||||
if (!parsed.ok) {
|
||||
return [parsed, { status: "invalid" }];
|
||||
}
|
||||
const payload = parsed.value;
|
||||
const body = payload.RequestBody;
|
||||
|
||||
const pathParams = {
|
||||
ratingKey: encodeSimple("ratingKey", payload.ratingKey, {
|
||||
explode: false,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
};
|
||||
|
||||
const path = pathToFunc("/library/metadata/{ratingKey}/arts")(pathParams);
|
||||
|
||||
const query = encodeFormQuery({
|
||||
"url": payload.url,
|
||||
});
|
||||
|
||||
const headers = new Headers(compactMap({
|
||||
"Content-Type": "image/*",
|
||||
Accept: "*/*",
|
||||
}));
|
||||
|
||||
const secConfig = await extractSecurity(client._options.accessToken);
|
||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||
const requestSecurity = resolveGlobalSecurity(securityInput);
|
||||
|
||||
const context = {
|
||||
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
||||
operationID: "post-media-arts",
|
||||
oAuth2Scopes: [],
|
||||
|
||||
resolvedSecurity: requestSecurity,
|
||||
|
||||
securitySource: client._options.accessToken,
|
||||
retryConfig: options?.retries
|
||||
|| client._options.retryConfig
|
||||
|| { strategy: "none" },
|
||||
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
||||
};
|
||||
|
||||
const requestRes = client._createRequest(context, {
|
||||
security: requestSecurity,
|
||||
method: "POST",
|
||||
baseURL: options?.serverURL,
|
||||
path: path,
|
||||
headers: headers,
|
||||
query: query,
|
||||
body: body,
|
||||
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
||||
}, options);
|
||||
if (!requestRes.ok) {
|
||||
return [requestRes, { status: "invalid" }];
|
||||
}
|
||||
const req = requestRes.value;
|
||||
|
||||
const doResult = await client._do(req, {
|
||||
context,
|
||||
errorCodes: ["404", "4XX", "5XX"],
|
||||
retryConfig: context.retryConfig,
|
||||
retryCodes: context.retryCodes,
|
||||
});
|
||||
if (!doResult.ok) {
|
||||
return [doResult, { status: "request-error", request: req }];
|
||||
}
|
||||
const response = doResult.value;
|
||||
|
||||
const responseFields = {
|
||||
ContentType: response.headers.get("content-type")
|
||||
?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
const [result] = await M.match<
|
||||
operations.PostMediaArtsResponse,
|
||||
| SDKError
|
||||
| SDKValidationError
|
||||
| UnexpectedClientError
|
||||
| InvalidRequestError
|
||||
| RequestAbortedError
|
||||
| RequestTimeoutError
|
||||
| ConnectionError
|
||||
>(
|
||||
M.nil(200, operations.PostMediaArtsResponse$inboundSchema),
|
||||
M.fail([404, "4XX"]),
|
||||
M.fail("5XX"),
|
||||
)(response, { extraFields: responseFields });
|
||||
if (!result.ok) {
|
||||
return [result, { status: "complete", request: req, response }];
|
||||
}
|
||||
|
||||
return [result, { status: "complete", request: req, response }];
|
||||
}
|
||||
196
src/funcs/libraryPostMediaPoster.ts
Normal file
196
src/funcs/libraryPostMediaPoster.ts
Normal file
@@ -0,0 +1,196 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
import { PlexAPICore } from "../core.js";
|
||||
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
||||
import * as M from "../lib/matchers.js";
|
||||
import { compactMap } from "../lib/primitives.js";
|
||||
import { safeParse } from "../lib/schemas.js";
|
||||
import { RequestOptions } from "../lib/sdks.js";
|
||||
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
||||
import { pathToFunc } from "../lib/url.js";
|
||||
import {
|
||||
ConnectionError,
|
||||
InvalidRequestError,
|
||||
RequestAbortedError,
|
||||
RequestTimeoutError,
|
||||
UnexpectedClientError,
|
||||
} from "../sdk/models/errors/httpclienterrors.js";
|
||||
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
||||
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
||||
import * as operations from "../sdk/models/operations/index.js";
|
||||
import { APICall, APIPromise } from "../sdk/types/async.js";
|
||||
import { Result } from "../sdk/types/fp.js";
|
||||
|
||||
/**
|
||||
* Upload Media Poster
|
||||
*
|
||||
* @remarks
|
||||
* Uploads a poster to a library item, either from a local file or a remote URL
|
||||
*/
|
||||
export function libraryPostMediaPoster(
|
||||
client: PlexAPICore,
|
||||
ratingKey: number,
|
||||
requestBody?:
|
||||
| ReadableStream<Uint8Array>
|
||||
| Blob
|
||||
| ArrayBuffer
|
||||
| Uint8Array
|
||||
| undefined,
|
||||
url?: string | undefined,
|
||||
options?: RequestOptions,
|
||||
): APIPromise<
|
||||
Result<
|
||||
operations.PostMediaPosterResponse,
|
||||
| SDKError
|
||||
| SDKValidationError
|
||||
| UnexpectedClientError
|
||||
| InvalidRequestError
|
||||
| RequestAbortedError
|
||||
| RequestTimeoutError
|
||||
| ConnectionError
|
||||
>
|
||||
> {
|
||||
return new APIPromise($do(
|
||||
client,
|
||||
ratingKey,
|
||||
requestBody,
|
||||
url,
|
||||
options,
|
||||
));
|
||||
}
|
||||
|
||||
async function $do(
|
||||
client: PlexAPICore,
|
||||
ratingKey: number,
|
||||
requestBody?:
|
||||
| ReadableStream<Uint8Array>
|
||||
| Blob
|
||||
| ArrayBuffer
|
||||
| Uint8Array
|
||||
| undefined,
|
||||
url?: string | undefined,
|
||||
options?: RequestOptions,
|
||||
): Promise<
|
||||
[
|
||||
Result<
|
||||
operations.PostMediaPosterResponse,
|
||||
| SDKError
|
||||
| SDKValidationError
|
||||
| UnexpectedClientError
|
||||
| InvalidRequestError
|
||||
| RequestAbortedError
|
||||
| RequestTimeoutError
|
||||
| ConnectionError
|
||||
>,
|
||||
APICall,
|
||||
]
|
||||
> {
|
||||
const input: operations.PostMediaPosterRequest = {
|
||||
ratingKey: ratingKey,
|
||||
requestBody: requestBody,
|
||||
url: url,
|
||||
};
|
||||
|
||||
const parsed = safeParse(
|
||||
input,
|
||||
(value) => operations.PostMediaPosterRequest$outboundSchema.parse(value),
|
||||
"Input validation failed",
|
||||
);
|
||||
if (!parsed.ok) {
|
||||
return [parsed, { status: "invalid" }];
|
||||
}
|
||||
const payload = parsed.value;
|
||||
const body = payload.RequestBody;
|
||||
|
||||
const pathParams = {
|
||||
ratingKey: encodeSimple("ratingKey", payload.ratingKey, {
|
||||
explode: false,
|
||||
charEncoding: "percent",
|
||||
}),
|
||||
};
|
||||
|
||||
const path = pathToFunc("/library/metadata/{ratingKey}/posters")(pathParams);
|
||||
|
||||
const query = encodeFormQuery({
|
||||
"url": payload.url,
|
||||
});
|
||||
|
||||
const headers = new Headers(compactMap({
|
||||
"Content-Type": "image/*",
|
||||
Accept: "*/*",
|
||||
}));
|
||||
|
||||
const secConfig = await extractSecurity(client._options.accessToken);
|
||||
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
||||
const requestSecurity = resolveGlobalSecurity(securityInput);
|
||||
|
||||
const context = {
|
||||
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
||||
operationID: "post-media-poster",
|
||||
oAuth2Scopes: [],
|
||||
|
||||
resolvedSecurity: requestSecurity,
|
||||
|
||||
securitySource: client._options.accessToken,
|
||||
retryConfig: options?.retries
|
||||
|| client._options.retryConfig
|
||||
|| { strategy: "none" },
|
||||
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
||||
};
|
||||
|
||||
const requestRes = client._createRequest(context, {
|
||||
security: requestSecurity,
|
||||
method: "POST",
|
||||
baseURL: options?.serverURL,
|
||||
path: path,
|
||||
headers: headers,
|
||||
query: query,
|
||||
body: body,
|
||||
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
||||
}, options);
|
||||
if (!requestRes.ok) {
|
||||
return [requestRes, { status: "invalid" }];
|
||||
}
|
||||
const req = requestRes.value;
|
||||
|
||||
const doResult = await client._do(req, {
|
||||
context,
|
||||
errorCodes: ["404", "4XX", "5XX"],
|
||||
retryConfig: context.retryConfig,
|
||||
retryCodes: context.retryCodes,
|
||||
});
|
||||
if (!doResult.ok) {
|
||||
return [doResult, { status: "request-error", request: req }];
|
||||
}
|
||||
const response = doResult.value;
|
||||
|
||||
const responseFields = {
|
||||
ContentType: response.headers.get("content-type")
|
||||
?? "application/octet-stream",
|
||||
StatusCode: response.status,
|
||||
RawResponse: response,
|
||||
Headers: {},
|
||||
};
|
||||
|
||||
const [result] = await M.match<
|
||||
operations.PostMediaPosterResponse,
|
||||
| SDKError
|
||||
| SDKValidationError
|
||||
| UnexpectedClientError
|
||||
| InvalidRequestError
|
||||
| RequestAbortedError
|
||||
| RequestTimeoutError
|
||||
| ConnectionError
|
||||
>(
|
||||
M.nil(200, operations.PostMediaPosterResponse$inboundSchema),
|
||||
M.fail([404, "4XX"]),
|
||||
M.fail("5XX"),
|
||||
)(response, { extraFields: responseFields });
|
||||
if (!result.ok) {
|
||||
return [result, { status: "complete", request: req, response }];
|
||||
}
|
||||
|
||||
return [result, { status: "complete", request: req, response }];
|
||||
}
|
||||
@@ -90,7 +90,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
||||
export const SDK_METADATA = {
|
||||
language: "typescript",
|
||||
openapiDocVersion: "0.0.3",
|
||||
sdkVersion: "0.35.3",
|
||||
genVersion: "2.563.1",
|
||||
userAgent: "speakeasy-sdk/typescript 0.35.3 2.563.1 0.0.3 @lukehagar/plexjs",
|
||||
sdkVersion: "0.36.0",
|
||||
genVersion: "2.565.1",
|
||||
userAgent: "speakeasy-sdk/typescript 0.36.0 2.565.1 0.0.3 @lukehagar/plexjs",
|
||||
} as const;
|
||||
|
||||
@@ -11,13 +11,17 @@ import { libraryGetFileHash } from "../funcs/libraryGetFileHash.js";
|
||||
import { libraryGetGenresLibrary } from "../funcs/libraryGetGenresLibrary.js";
|
||||
import { libraryGetLibraryDetails } from "../funcs/libraryGetLibraryDetails.js";
|
||||
import { libraryGetLibraryItems } from "../funcs/libraryGetLibraryItems.js";
|
||||
import { libraryGetMediaArts } from "../funcs/libraryGetMediaArts.js";
|
||||
import { libraryGetMediaMetaData } from "../funcs/libraryGetMediaMetaData.js";
|
||||
import { libraryGetMediaPosters } from "../funcs/libraryGetMediaPosters.js";
|
||||
import { libraryGetMetadataChildren } from "../funcs/libraryGetMetadataChildren.js";
|
||||
import { libraryGetRecentlyAddedLibrary } from "../funcs/libraryGetRecentlyAddedLibrary.js";
|
||||
import { libraryGetRefreshLibraryMetadata } from "../funcs/libraryGetRefreshLibraryMetadata.js";
|
||||
import { libraryGetSearchAllLibraries } from "../funcs/libraryGetSearchAllLibraries.js";
|
||||
import { libraryGetSearchLibrary } from "../funcs/libraryGetSearchLibrary.js";
|
||||
import { libraryGetTopWatchedContent } from "../funcs/libraryGetTopWatchedContent.js";
|
||||
import { libraryPostMediaArts } from "../funcs/libraryPostMediaArts.js";
|
||||
import { libraryPostMediaPoster } from "../funcs/libraryPostMediaPoster.js";
|
||||
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
||||
import * as operations from "./models/operations/index.js";
|
||||
import { unwrapAsync } from "./types/fp.js";
|
||||
@@ -353,6 +357,92 @@ export class Library extends ClientSDK {
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Media Background Artwork
|
||||
*
|
||||
* @remarks
|
||||
* Returns the background artwork for a library item.
|
||||
*/
|
||||
async getMediaArts(
|
||||
ratingKey: number,
|
||||
options?: RequestOptions,
|
||||
): Promise<operations.GetMediaArtsResponse> {
|
||||
return unwrapAsync(libraryGetMediaArts(
|
||||
this,
|
||||
ratingKey,
|
||||
options,
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload Media Background Artwork
|
||||
*
|
||||
* @remarks
|
||||
* Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
|
||||
*/
|
||||
async postMediaArts(
|
||||
ratingKey: number,
|
||||
requestBody?:
|
||||
| ReadableStream<Uint8Array>
|
||||
| Blob
|
||||
| ArrayBuffer
|
||||
| Uint8Array
|
||||
| undefined,
|
||||
url?: string | undefined,
|
||||
options?: RequestOptions,
|
||||
): Promise<operations.PostMediaArtsResponse> {
|
||||
return unwrapAsync(libraryPostMediaArts(
|
||||
this,
|
||||
ratingKey,
|
||||
requestBody,
|
||||
url,
|
||||
options,
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Media Posters
|
||||
*
|
||||
* @remarks
|
||||
* Returns the available posters for a library item.
|
||||
*/
|
||||
async getMediaPosters(
|
||||
ratingKey: number,
|
||||
options?: RequestOptions,
|
||||
): Promise<operations.GetMediaPostersResponse> {
|
||||
return unwrapAsync(libraryGetMediaPosters(
|
||||
this,
|
||||
ratingKey,
|
||||
options,
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload Media Poster
|
||||
*
|
||||
* @remarks
|
||||
* Uploads a poster to a library item, either from a local file or a remote URL
|
||||
*/
|
||||
async postMediaPoster(
|
||||
ratingKey: number,
|
||||
requestBody?:
|
||||
| ReadableStream<Uint8Array>
|
||||
| Blob
|
||||
| ArrayBuffer
|
||||
| Uint8Array
|
||||
| undefined,
|
||||
url?: string | undefined,
|
||||
options?: RequestOptions,
|
||||
): Promise<operations.PostMediaPosterResponse> {
|
||||
return unwrapAsync(libraryPostMediaPoster(
|
||||
this,
|
||||
ratingKey,
|
||||
requestBody,
|
||||
url,
|
||||
options,
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Items Children
|
||||
*
|
||||
|
||||
420
src/sdk/models/operations/getmediaarts.ts
Normal file
420
src/sdk/models/operations/getmediaarts.ts
Normal file
@@ -0,0 +1,420 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
import * as z from "zod";
|
||||
import { remap as remap$ } from "../../../lib/primitives.js";
|
||||
import { safeParse } from "../../../lib/schemas.js";
|
||||
import { Result as SafeParseResult } from "../../types/fp.js";
|
||||
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
||||
|
||||
export type GetMediaArtsRequest = {
|
||||
/**
|
||||
* the id of the library item to return the artwork of.
|
||||
*/
|
||||
ratingKey: number;
|
||||
};
|
||||
|
||||
export type GetMediaArtsMetadata = {
|
||||
/**
|
||||
* The URL of the artwork.
|
||||
*/
|
||||
key: string;
|
||||
/**
|
||||
* The provider of the artwork.
|
||||
*/
|
||||
provider?: string | undefined;
|
||||
/**
|
||||
* The URL of the artwork.
|
||||
*/
|
||||
ratingKey: string;
|
||||
/**
|
||||
* Whether this is the selected artwork.
|
||||
*/
|
||||
selected: boolean;
|
||||
/**
|
||||
* The URL of the artwork thumbnail.
|
||||
*/
|
||||
thumb: string;
|
||||
};
|
||||
|
||||
export type GetMediaArtsMediaContainer = {
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*/
|
||||
size: number;
|
||||
/**
|
||||
* The version number for media tags.
|
||||
*/
|
||||
mediaTagVersion: number;
|
||||
/**
|
||||
* The prefix used for media tag resource paths.
|
||||
*/
|
||||
mediaTagPrefix: string;
|
||||
/**
|
||||
* An plugin identifier for the media container.
|
||||
*/
|
||||
identifier: string;
|
||||
metadata: Array<GetMediaArtsMetadata>;
|
||||
};
|
||||
|
||||
/**
|
||||
* The available background artwork for the library item.
|
||||
*/
|
||||
export type GetMediaArtsResponseBody = {
|
||||
mediaContainer?: GetMediaArtsMediaContainer | undefined;
|
||||
};
|
||||
|
||||
export type GetMediaArtsResponse = {
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
contentType: string;
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
statusCode: number;
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
rawResponse: Response;
|
||||
/**
|
||||
* The available background artwork for the library item.
|
||||
*/
|
||||
object?: GetMediaArtsResponseBody | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaArtsRequest$inboundSchema: z.ZodType<
|
||||
GetMediaArtsRequest,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
ratingKey: z.number().int(),
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type GetMediaArtsRequest$Outbound = {
|
||||
ratingKey: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaArtsRequest$outboundSchema: z.ZodType<
|
||||
GetMediaArtsRequest$Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetMediaArtsRequest
|
||||
> = z.object({
|
||||
ratingKey: z.number().int(),
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace GetMediaArtsRequest$ {
|
||||
/** @deprecated use `GetMediaArtsRequest$inboundSchema` instead. */
|
||||
export const inboundSchema = GetMediaArtsRequest$inboundSchema;
|
||||
/** @deprecated use `GetMediaArtsRequest$outboundSchema` instead. */
|
||||
export const outboundSchema = GetMediaArtsRequest$outboundSchema;
|
||||
/** @deprecated use `GetMediaArtsRequest$Outbound` instead. */
|
||||
export type Outbound = GetMediaArtsRequest$Outbound;
|
||||
}
|
||||
|
||||
export function getMediaArtsRequestToJSON(
|
||||
getMediaArtsRequest: GetMediaArtsRequest,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
GetMediaArtsRequest$outboundSchema.parse(getMediaArtsRequest),
|
||||
);
|
||||
}
|
||||
|
||||
export function getMediaArtsRequestFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<GetMediaArtsRequest, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => GetMediaArtsRequest$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'GetMediaArtsRequest' from JSON`,
|
||||
);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaArtsMetadata$inboundSchema: z.ZodType<
|
||||
GetMediaArtsMetadata,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
key: z.string(),
|
||||
provider: z.string().optional(),
|
||||
ratingKey: z.string(),
|
||||
selected: z.boolean(),
|
||||
thumb: z.string(),
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type GetMediaArtsMetadata$Outbound = {
|
||||
key: string;
|
||||
provider?: string | undefined;
|
||||
ratingKey: string;
|
||||
selected: boolean;
|
||||
thumb: string;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaArtsMetadata$outboundSchema: z.ZodType<
|
||||
GetMediaArtsMetadata$Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetMediaArtsMetadata
|
||||
> = z.object({
|
||||
key: z.string(),
|
||||
provider: z.string().optional(),
|
||||
ratingKey: z.string(),
|
||||
selected: z.boolean(),
|
||||
thumb: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace GetMediaArtsMetadata$ {
|
||||
/** @deprecated use `GetMediaArtsMetadata$inboundSchema` instead. */
|
||||
export const inboundSchema = GetMediaArtsMetadata$inboundSchema;
|
||||
/** @deprecated use `GetMediaArtsMetadata$outboundSchema` instead. */
|
||||
export const outboundSchema = GetMediaArtsMetadata$outboundSchema;
|
||||
/** @deprecated use `GetMediaArtsMetadata$Outbound` instead. */
|
||||
export type Outbound = GetMediaArtsMetadata$Outbound;
|
||||
}
|
||||
|
||||
export function getMediaArtsMetadataToJSON(
|
||||
getMediaArtsMetadata: GetMediaArtsMetadata,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
GetMediaArtsMetadata$outboundSchema.parse(getMediaArtsMetadata),
|
||||
);
|
||||
}
|
||||
|
||||
export function getMediaArtsMetadataFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<GetMediaArtsMetadata, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => GetMediaArtsMetadata$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'GetMediaArtsMetadata' from JSON`,
|
||||
);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaArtsMediaContainer$inboundSchema: z.ZodType<
|
||||
GetMediaArtsMediaContainer,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
size: z.number().int(),
|
||||
mediaTagVersion: z.number().int(),
|
||||
mediaTagPrefix: z.string(),
|
||||
identifier: z.string(),
|
||||
Metadata: z.array(z.lazy(() => GetMediaArtsMetadata$inboundSchema)),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
"Metadata": "metadata",
|
||||
});
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type GetMediaArtsMediaContainer$Outbound = {
|
||||
size: number;
|
||||
mediaTagVersion: number;
|
||||
mediaTagPrefix: string;
|
||||
identifier: string;
|
||||
Metadata: Array<GetMediaArtsMetadata$Outbound>;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaArtsMediaContainer$outboundSchema: z.ZodType<
|
||||
GetMediaArtsMediaContainer$Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetMediaArtsMediaContainer
|
||||
> = z.object({
|
||||
size: z.number().int(),
|
||||
mediaTagVersion: z.number().int(),
|
||||
mediaTagPrefix: z.string(),
|
||||
identifier: z.string(),
|
||||
metadata: z.array(z.lazy(() => GetMediaArtsMetadata$outboundSchema)),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
metadata: "Metadata",
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace GetMediaArtsMediaContainer$ {
|
||||
/** @deprecated use `GetMediaArtsMediaContainer$inboundSchema` instead. */
|
||||
export const inboundSchema = GetMediaArtsMediaContainer$inboundSchema;
|
||||
/** @deprecated use `GetMediaArtsMediaContainer$outboundSchema` instead. */
|
||||
export const outboundSchema = GetMediaArtsMediaContainer$outboundSchema;
|
||||
/** @deprecated use `GetMediaArtsMediaContainer$Outbound` instead. */
|
||||
export type Outbound = GetMediaArtsMediaContainer$Outbound;
|
||||
}
|
||||
|
||||
export function getMediaArtsMediaContainerToJSON(
|
||||
getMediaArtsMediaContainer: GetMediaArtsMediaContainer,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
GetMediaArtsMediaContainer$outboundSchema.parse(getMediaArtsMediaContainer),
|
||||
);
|
||||
}
|
||||
|
||||
export function getMediaArtsMediaContainerFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<GetMediaArtsMediaContainer, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => GetMediaArtsMediaContainer$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'GetMediaArtsMediaContainer' from JSON`,
|
||||
);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaArtsResponseBody$inboundSchema: z.ZodType<
|
||||
GetMediaArtsResponseBody,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
MediaContainer: z.lazy(() => GetMediaArtsMediaContainer$inboundSchema)
|
||||
.optional(),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
"MediaContainer": "mediaContainer",
|
||||
});
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type GetMediaArtsResponseBody$Outbound = {
|
||||
MediaContainer?: GetMediaArtsMediaContainer$Outbound | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaArtsResponseBody$outboundSchema: z.ZodType<
|
||||
GetMediaArtsResponseBody$Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetMediaArtsResponseBody
|
||||
> = z.object({
|
||||
mediaContainer: z.lazy(() => GetMediaArtsMediaContainer$outboundSchema)
|
||||
.optional(),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
mediaContainer: "MediaContainer",
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace GetMediaArtsResponseBody$ {
|
||||
/** @deprecated use `GetMediaArtsResponseBody$inboundSchema` instead. */
|
||||
export const inboundSchema = GetMediaArtsResponseBody$inboundSchema;
|
||||
/** @deprecated use `GetMediaArtsResponseBody$outboundSchema` instead. */
|
||||
export const outboundSchema = GetMediaArtsResponseBody$outboundSchema;
|
||||
/** @deprecated use `GetMediaArtsResponseBody$Outbound` instead. */
|
||||
export type Outbound = GetMediaArtsResponseBody$Outbound;
|
||||
}
|
||||
|
||||
export function getMediaArtsResponseBodyToJSON(
|
||||
getMediaArtsResponseBody: GetMediaArtsResponseBody,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
GetMediaArtsResponseBody$outboundSchema.parse(getMediaArtsResponseBody),
|
||||
);
|
||||
}
|
||||
|
||||
export function getMediaArtsResponseBodyFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<GetMediaArtsResponseBody, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => GetMediaArtsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'GetMediaArtsResponseBody' from JSON`,
|
||||
);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaArtsResponse$inboundSchema: z.ZodType<
|
||||
GetMediaArtsResponse,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
ContentType: z.string(),
|
||||
StatusCode: z.number().int(),
|
||||
RawResponse: z.instanceof(Response),
|
||||
object: z.lazy(() => GetMediaArtsResponseBody$inboundSchema).optional(),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
"ContentType": "contentType",
|
||||
"StatusCode": "statusCode",
|
||||
"RawResponse": "rawResponse",
|
||||
});
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type GetMediaArtsResponse$Outbound = {
|
||||
ContentType: string;
|
||||
StatusCode: number;
|
||||
RawResponse: never;
|
||||
object?: GetMediaArtsResponseBody$Outbound | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaArtsResponse$outboundSchema: z.ZodType<
|
||||
GetMediaArtsResponse$Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetMediaArtsResponse
|
||||
> = z.object({
|
||||
contentType: z.string(),
|
||||
statusCode: z.number().int(),
|
||||
rawResponse: z.instanceof(Response).transform(() => {
|
||||
throw new Error("Response cannot be serialized");
|
||||
}),
|
||||
object: z.lazy(() => GetMediaArtsResponseBody$outboundSchema).optional(),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
contentType: "ContentType",
|
||||
statusCode: "StatusCode",
|
||||
rawResponse: "RawResponse",
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace GetMediaArtsResponse$ {
|
||||
/** @deprecated use `GetMediaArtsResponse$inboundSchema` instead. */
|
||||
export const inboundSchema = GetMediaArtsResponse$inboundSchema;
|
||||
/** @deprecated use `GetMediaArtsResponse$outboundSchema` instead. */
|
||||
export const outboundSchema = GetMediaArtsResponse$outboundSchema;
|
||||
/** @deprecated use `GetMediaArtsResponse$Outbound` instead. */
|
||||
export type Outbound = GetMediaArtsResponse$Outbound;
|
||||
}
|
||||
|
||||
export function getMediaArtsResponseToJSON(
|
||||
getMediaArtsResponse: GetMediaArtsResponse,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
GetMediaArtsResponse$outboundSchema.parse(getMediaArtsResponse),
|
||||
);
|
||||
}
|
||||
|
||||
export function getMediaArtsResponseFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<GetMediaArtsResponse, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => GetMediaArtsResponse$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'GetMediaArtsResponse' from JSON`,
|
||||
);
|
||||
}
|
||||
424
src/sdk/models/operations/getmediaposters.ts
Normal file
424
src/sdk/models/operations/getmediaposters.ts
Normal file
@@ -0,0 +1,424 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
import * as z from "zod";
|
||||
import { remap as remap$ } from "../../../lib/primitives.js";
|
||||
import { safeParse } from "../../../lib/schemas.js";
|
||||
import { Result as SafeParseResult } from "../../types/fp.js";
|
||||
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
||||
|
||||
export type GetMediaPostersRequest = {
|
||||
/**
|
||||
* the id of the library item to return the posters of.
|
||||
*/
|
||||
ratingKey: number;
|
||||
};
|
||||
|
||||
export type GetMediaPostersMetadata = {
|
||||
/**
|
||||
* The URL of the poster.
|
||||
*/
|
||||
key: string;
|
||||
/**
|
||||
* The provider of the poster.
|
||||
*/
|
||||
provider?: string | undefined;
|
||||
/**
|
||||
* The URL of the poster.
|
||||
*/
|
||||
ratingKey: string;
|
||||
/**
|
||||
* Whether this is the selected poster.
|
||||
*/
|
||||
selected: boolean;
|
||||
/**
|
||||
* The URL of the poster thumbnail.
|
||||
*/
|
||||
thumb: string;
|
||||
};
|
||||
|
||||
export type GetMediaPostersMediaContainer = {
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*/
|
||||
size: number;
|
||||
/**
|
||||
* The version number for media tags.
|
||||
*/
|
||||
mediaTagVersion: number;
|
||||
/**
|
||||
* The prefix used for media tag resource paths.
|
||||
*/
|
||||
mediaTagPrefix: string;
|
||||
/**
|
||||
* An plugin identifier for the media container.
|
||||
*/
|
||||
identifier: string;
|
||||
metadata: Array<GetMediaPostersMetadata>;
|
||||
};
|
||||
|
||||
/**
|
||||
* The available posters for the library item.
|
||||
*/
|
||||
export type GetMediaPostersResponseBody = {
|
||||
mediaContainer?: GetMediaPostersMediaContainer | undefined;
|
||||
};
|
||||
|
||||
export type GetMediaPostersResponse = {
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
contentType: string;
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
statusCode: number;
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
rawResponse: Response;
|
||||
/**
|
||||
* The available posters for the library item.
|
||||
*/
|
||||
object?: GetMediaPostersResponseBody | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaPostersRequest$inboundSchema: z.ZodType<
|
||||
GetMediaPostersRequest,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
ratingKey: z.number().int(),
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type GetMediaPostersRequest$Outbound = {
|
||||
ratingKey: number;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaPostersRequest$outboundSchema: z.ZodType<
|
||||
GetMediaPostersRequest$Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetMediaPostersRequest
|
||||
> = z.object({
|
||||
ratingKey: z.number().int(),
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace GetMediaPostersRequest$ {
|
||||
/** @deprecated use `GetMediaPostersRequest$inboundSchema` instead. */
|
||||
export const inboundSchema = GetMediaPostersRequest$inboundSchema;
|
||||
/** @deprecated use `GetMediaPostersRequest$outboundSchema` instead. */
|
||||
export const outboundSchema = GetMediaPostersRequest$outboundSchema;
|
||||
/** @deprecated use `GetMediaPostersRequest$Outbound` instead. */
|
||||
export type Outbound = GetMediaPostersRequest$Outbound;
|
||||
}
|
||||
|
||||
export function getMediaPostersRequestToJSON(
|
||||
getMediaPostersRequest: GetMediaPostersRequest,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
GetMediaPostersRequest$outboundSchema.parse(getMediaPostersRequest),
|
||||
);
|
||||
}
|
||||
|
||||
export function getMediaPostersRequestFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<GetMediaPostersRequest, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => GetMediaPostersRequest$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'GetMediaPostersRequest' from JSON`,
|
||||
);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaPostersMetadata$inboundSchema: z.ZodType<
|
||||
GetMediaPostersMetadata,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
key: z.string(),
|
||||
provider: z.string().optional(),
|
||||
ratingKey: z.string(),
|
||||
selected: z.boolean(),
|
||||
thumb: z.string(),
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type GetMediaPostersMetadata$Outbound = {
|
||||
key: string;
|
||||
provider?: string | undefined;
|
||||
ratingKey: string;
|
||||
selected: boolean;
|
||||
thumb: string;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaPostersMetadata$outboundSchema: z.ZodType<
|
||||
GetMediaPostersMetadata$Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetMediaPostersMetadata
|
||||
> = z.object({
|
||||
key: z.string(),
|
||||
provider: z.string().optional(),
|
||||
ratingKey: z.string(),
|
||||
selected: z.boolean(),
|
||||
thumb: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace GetMediaPostersMetadata$ {
|
||||
/** @deprecated use `GetMediaPostersMetadata$inboundSchema` instead. */
|
||||
export const inboundSchema = GetMediaPostersMetadata$inboundSchema;
|
||||
/** @deprecated use `GetMediaPostersMetadata$outboundSchema` instead. */
|
||||
export const outboundSchema = GetMediaPostersMetadata$outboundSchema;
|
||||
/** @deprecated use `GetMediaPostersMetadata$Outbound` instead. */
|
||||
export type Outbound = GetMediaPostersMetadata$Outbound;
|
||||
}
|
||||
|
||||
export function getMediaPostersMetadataToJSON(
|
||||
getMediaPostersMetadata: GetMediaPostersMetadata,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
GetMediaPostersMetadata$outboundSchema.parse(getMediaPostersMetadata),
|
||||
);
|
||||
}
|
||||
|
||||
export function getMediaPostersMetadataFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<GetMediaPostersMetadata, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => GetMediaPostersMetadata$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'GetMediaPostersMetadata' from JSON`,
|
||||
);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaPostersMediaContainer$inboundSchema: z.ZodType<
|
||||
GetMediaPostersMediaContainer,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
size: z.number().int(),
|
||||
mediaTagVersion: z.number().int(),
|
||||
mediaTagPrefix: z.string(),
|
||||
identifier: z.string(),
|
||||
Metadata: z.array(z.lazy(() => GetMediaPostersMetadata$inboundSchema)),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
"Metadata": "metadata",
|
||||
});
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type GetMediaPostersMediaContainer$Outbound = {
|
||||
size: number;
|
||||
mediaTagVersion: number;
|
||||
mediaTagPrefix: string;
|
||||
identifier: string;
|
||||
Metadata: Array<GetMediaPostersMetadata$Outbound>;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaPostersMediaContainer$outboundSchema: z.ZodType<
|
||||
GetMediaPostersMediaContainer$Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetMediaPostersMediaContainer
|
||||
> = z.object({
|
||||
size: z.number().int(),
|
||||
mediaTagVersion: z.number().int(),
|
||||
mediaTagPrefix: z.string(),
|
||||
identifier: z.string(),
|
||||
metadata: z.array(z.lazy(() => GetMediaPostersMetadata$outboundSchema)),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
metadata: "Metadata",
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace GetMediaPostersMediaContainer$ {
|
||||
/** @deprecated use `GetMediaPostersMediaContainer$inboundSchema` instead. */
|
||||
export const inboundSchema = GetMediaPostersMediaContainer$inboundSchema;
|
||||
/** @deprecated use `GetMediaPostersMediaContainer$outboundSchema` instead. */
|
||||
export const outboundSchema = GetMediaPostersMediaContainer$outboundSchema;
|
||||
/** @deprecated use `GetMediaPostersMediaContainer$Outbound` instead. */
|
||||
export type Outbound = GetMediaPostersMediaContainer$Outbound;
|
||||
}
|
||||
|
||||
export function getMediaPostersMediaContainerToJSON(
|
||||
getMediaPostersMediaContainer: GetMediaPostersMediaContainer,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
GetMediaPostersMediaContainer$outboundSchema.parse(
|
||||
getMediaPostersMediaContainer,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function getMediaPostersMediaContainerFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<GetMediaPostersMediaContainer, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => GetMediaPostersMediaContainer$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'GetMediaPostersMediaContainer' from JSON`,
|
||||
);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaPostersResponseBody$inboundSchema: z.ZodType<
|
||||
GetMediaPostersResponseBody,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
MediaContainer: z.lazy(() => GetMediaPostersMediaContainer$inboundSchema)
|
||||
.optional(),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
"MediaContainer": "mediaContainer",
|
||||
});
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type GetMediaPostersResponseBody$Outbound = {
|
||||
MediaContainer?: GetMediaPostersMediaContainer$Outbound | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaPostersResponseBody$outboundSchema: z.ZodType<
|
||||
GetMediaPostersResponseBody$Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetMediaPostersResponseBody
|
||||
> = z.object({
|
||||
mediaContainer: z.lazy(() => GetMediaPostersMediaContainer$outboundSchema)
|
||||
.optional(),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
mediaContainer: "MediaContainer",
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace GetMediaPostersResponseBody$ {
|
||||
/** @deprecated use `GetMediaPostersResponseBody$inboundSchema` instead. */
|
||||
export const inboundSchema = GetMediaPostersResponseBody$inboundSchema;
|
||||
/** @deprecated use `GetMediaPostersResponseBody$outboundSchema` instead. */
|
||||
export const outboundSchema = GetMediaPostersResponseBody$outboundSchema;
|
||||
/** @deprecated use `GetMediaPostersResponseBody$Outbound` instead. */
|
||||
export type Outbound = GetMediaPostersResponseBody$Outbound;
|
||||
}
|
||||
|
||||
export function getMediaPostersResponseBodyToJSON(
|
||||
getMediaPostersResponseBody: GetMediaPostersResponseBody,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
GetMediaPostersResponseBody$outboundSchema.parse(
|
||||
getMediaPostersResponseBody,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function getMediaPostersResponseBodyFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<GetMediaPostersResponseBody, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => GetMediaPostersResponseBody$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'GetMediaPostersResponseBody' from JSON`,
|
||||
);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaPostersResponse$inboundSchema: z.ZodType<
|
||||
GetMediaPostersResponse,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
ContentType: z.string(),
|
||||
StatusCode: z.number().int(),
|
||||
RawResponse: z.instanceof(Response),
|
||||
object: z.lazy(() => GetMediaPostersResponseBody$inboundSchema).optional(),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
"ContentType": "contentType",
|
||||
"StatusCode": "statusCode",
|
||||
"RawResponse": "rawResponse",
|
||||
});
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type GetMediaPostersResponse$Outbound = {
|
||||
ContentType: string;
|
||||
StatusCode: number;
|
||||
RawResponse: never;
|
||||
object?: GetMediaPostersResponseBody$Outbound | undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const GetMediaPostersResponse$outboundSchema: z.ZodType<
|
||||
GetMediaPostersResponse$Outbound,
|
||||
z.ZodTypeDef,
|
||||
GetMediaPostersResponse
|
||||
> = z.object({
|
||||
contentType: z.string(),
|
||||
statusCode: z.number().int(),
|
||||
rawResponse: z.instanceof(Response).transform(() => {
|
||||
throw new Error("Response cannot be serialized");
|
||||
}),
|
||||
object: z.lazy(() => GetMediaPostersResponseBody$outboundSchema).optional(),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
contentType: "ContentType",
|
||||
statusCode: "StatusCode",
|
||||
rawResponse: "RawResponse",
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace GetMediaPostersResponse$ {
|
||||
/** @deprecated use `GetMediaPostersResponse$inboundSchema` instead. */
|
||||
export const inboundSchema = GetMediaPostersResponse$inboundSchema;
|
||||
/** @deprecated use `GetMediaPostersResponse$outboundSchema` instead. */
|
||||
export const outboundSchema = GetMediaPostersResponse$outboundSchema;
|
||||
/** @deprecated use `GetMediaPostersResponse$Outbound` instead. */
|
||||
export type Outbound = GetMediaPostersResponse$Outbound;
|
||||
}
|
||||
|
||||
export function getMediaPostersResponseToJSON(
|
||||
getMediaPostersResponse: GetMediaPostersResponse,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
GetMediaPostersResponse$outboundSchema.parse(getMediaPostersResponse),
|
||||
);
|
||||
}
|
||||
|
||||
export function getMediaPostersResponseFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<GetMediaPostersResponse, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => GetMediaPostersResponse$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'GetMediaPostersResponse' from JSON`,
|
||||
);
|
||||
}
|
||||
@@ -29,7 +29,9 @@ export * from "./gethomedata.js";
|
||||
export * from "./getlibrarydetails.js";
|
||||
export * from "./getlibraryhubs.js";
|
||||
export * from "./getlibraryitems.js";
|
||||
export * from "./getmediaarts.js";
|
||||
export * from "./getmediametadata.js";
|
||||
export * from "./getmediaposters.js";
|
||||
export * from "./getmediaproviders.js";
|
||||
export * from "./getmetadatachildren.js";
|
||||
export * from "./getmyplexaccount.js";
|
||||
@@ -72,6 +74,8 @@ export * from "./markplayed.js";
|
||||
export * from "./markunplayed.js";
|
||||
export * from "./performsearch.js";
|
||||
export * from "./performvoicesearch.js";
|
||||
export * from "./postmediaarts.js";
|
||||
export * from "./postmediaposter.js";
|
||||
export * from "./postuserssignindata.js";
|
||||
export * from "./startalltasks.js";
|
||||
export * from "./starttask.js";
|
||||
|
||||
201
src/sdk/models/operations/postmediaarts.ts
Normal file
201
src/sdk/models/operations/postmediaarts.ts
Normal file
@@ -0,0 +1,201 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
import * as z from "zod";
|
||||
import { remap as remap$ } from "../../../lib/primitives.js";
|
||||
import { safeParse } from "../../../lib/schemas.js";
|
||||
import { Result as SafeParseResult } from "../../types/fp.js";
|
||||
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
||||
|
||||
export type PostMediaArtsRequest = {
|
||||
/**
|
||||
* the id of the library item to return the posters of.
|
||||
*/
|
||||
ratingKey: number;
|
||||
/**
|
||||
* The URL of the image, if uploading a remote image
|
||||
*/
|
||||
url?: string | undefined;
|
||||
/**
|
||||
* The contents of the image, if uploading a local file
|
||||
*/
|
||||
requestBody?:
|
||||
| ReadableStream<Uint8Array>
|
||||
| Blob
|
||||
| ArrayBuffer
|
||||
| Uint8Array
|
||||
| undefined;
|
||||
};
|
||||
|
||||
export type PostMediaArtsResponse = {
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
contentType: string;
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
statusCode: number;
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
rawResponse: Response;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const PostMediaArtsRequest$inboundSchema: z.ZodType<
|
||||
PostMediaArtsRequest,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
ratingKey: z.number().int(),
|
||||
url: z.string().optional(),
|
||||
RequestBody: z.union([
|
||||
z.instanceof(ReadableStream<Uint8Array>),
|
||||
z.instanceof(Blob),
|
||||
z.instanceof(ArrayBuffer),
|
||||
z.instanceof(Uint8Array),
|
||||
]).optional(),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
"RequestBody": "requestBody",
|
||||
});
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type PostMediaArtsRequest$Outbound = {
|
||||
ratingKey: number;
|
||||
url?: string | undefined;
|
||||
RequestBody?:
|
||||
| ReadableStream<Uint8Array>
|
||||
| Blob
|
||||
| ArrayBuffer
|
||||
| Uint8Array
|
||||
| undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const PostMediaArtsRequest$outboundSchema: z.ZodType<
|
||||
PostMediaArtsRequest$Outbound,
|
||||
z.ZodTypeDef,
|
||||
PostMediaArtsRequest
|
||||
> = z.object({
|
||||
ratingKey: z.number().int(),
|
||||
url: z.string().optional(),
|
||||
requestBody: z.union([
|
||||
z.instanceof(ReadableStream<Uint8Array>),
|
||||
z.instanceof(Blob),
|
||||
z.instanceof(ArrayBuffer),
|
||||
z.instanceof(Uint8Array),
|
||||
]).optional(),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
requestBody: "RequestBody",
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace PostMediaArtsRequest$ {
|
||||
/** @deprecated use `PostMediaArtsRequest$inboundSchema` instead. */
|
||||
export const inboundSchema = PostMediaArtsRequest$inboundSchema;
|
||||
/** @deprecated use `PostMediaArtsRequest$outboundSchema` instead. */
|
||||
export const outboundSchema = PostMediaArtsRequest$outboundSchema;
|
||||
/** @deprecated use `PostMediaArtsRequest$Outbound` instead. */
|
||||
export type Outbound = PostMediaArtsRequest$Outbound;
|
||||
}
|
||||
|
||||
export function postMediaArtsRequestToJSON(
|
||||
postMediaArtsRequest: PostMediaArtsRequest,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
PostMediaArtsRequest$outboundSchema.parse(postMediaArtsRequest),
|
||||
);
|
||||
}
|
||||
|
||||
export function postMediaArtsRequestFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<PostMediaArtsRequest, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => PostMediaArtsRequest$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'PostMediaArtsRequest' from JSON`,
|
||||
);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export const PostMediaArtsResponse$inboundSchema: z.ZodType<
|
||||
PostMediaArtsResponse,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
ContentType: z.string(),
|
||||
StatusCode: z.number().int(),
|
||||
RawResponse: z.instanceof(Response),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
"ContentType": "contentType",
|
||||
"StatusCode": "statusCode",
|
||||
"RawResponse": "rawResponse",
|
||||
});
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type PostMediaArtsResponse$Outbound = {
|
||||
ContentType: string;
|
||||
StatusCode: number;
|
||||
RawResponse: never;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const PostMediaArtsResponse$outboundSchema: z.ZodType<
|
||||
PostMediaArtsResponse$Outbound,
|
||||
z.ZodTypeDef,
|
||||
PostMediaArtsResponse
|
||||
> = z.object({
|
||||
contentType: z.string(),
|
||||
statusCode: z.number().int(),
|
||||
rawResponse: z.instanceof(Response).transform(() => {
|
||||
throw new Error("Response cannot be serialized");
|
||||
}),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
contentType: "ContentType",
|
||||
statusCode: "StatusCode",
|
||||
rawResponse: "RawResponse",
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace PostMediaArtsResponse$ {
|
||||
/** @deprecated use `PostMediaArtsResponse$inboundSchema` instead. */
|
||||
export const inboundSchema = PostMediaArtsResponse$inboundSchema;
|
||||
/** @deprecated use `PostMediaArtsResponse$outboundSchema` instead. */
|
||||
export const outboundSchema = PostMediaArtsResponse$outboundSchema;
|
||||
/** @deprecated use `PostMediaArtsResponse$Outbound` instead. */
|
||||
export type Outbound = PostMediaArtsResponse$Outbound;
|
||||
}
|
||||
|
||||
export function postMediaArtsResponseToJSON(
|
||||
postMediaArtsResponse: PostMediaArtsResponse,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
PostMediaArtsResponse$outboundSchema.parse(postMediaArtsResponse),
|
||||
);
|
||||
}
|
||||
|
||||
export function postMediaArtsResponseFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<PostMediaArtsResponse, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => PostMediaArtsResponse$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'PostMediaArtsResponse' from JSON`,
|
||||
);
|
||||
}
|
||||
201
src/sdk/models/operations/postmediaposter.ts
Normal file
201
src/sdk/models/operations/postmediaposter.ts
Normal file
@@ -0,0 +1,201 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
import * as z from "zod";
|
||||
import { remap as remap$ } from "../../../lib/primitives.js";
|
||||
import { safeParse } from "../../../lib/schemas.js";
|
||||
import { Result as SafeParseResult } from "../../types/fp.js";
|
||||
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
||||
|
||||
export type PostMediaPosterRequest = {
|
||||
/**
|
||||
* the id of the library item to return the posters of.
|
||||
*/
|
||||
ratingKey: number;
|
||||
/**
|
||||
* The URL of the image, if uploading a remote image
|
||||
*/
|
||||
url?: string | undefined;
|
||||
/**
|
||||
* The contents of the image, if uploading a local file
|
||||
*/
|
||||
requestBody?:
|
||||
| ReadableStream<Uint8Array>
|
||||
| Blob
|
||||
| ArrayBuffer
|
||||
| Uint8Array
|
||||
| undefined;
|
||||
};
|
||||
|
||||
export type PostMediaPosterResponse = {
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*/
|
||||
contentType: string;
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*/
|
||||
statusCode: number;
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
rawResponse: Response;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const PostMediaPosterRequest$inboundSchema: z.ZodType<
|
||||
PostMediaPosterRequest,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
ratingKey: z.number().int(),
|
||||
url: z.string().optional(),
|
||||
RequestBody: z.union([
|
||||
z.instanceof(ReadableStream<Uint8Array>),
|
||||
z.instanceof(Blob),
|
||||
z.instanceof(ArrayBuffer),
|
||||
z.instanceof(Uint8Array),
|
||||
]).optional(),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
"RequestBody": "requestBody",
|
||||
});
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type PostMediaPosterRequest$Outbound = {
|
||||
ratingKey: number;
|
||||
url?: string | undefined;
|
||||
RequestBody?:
|
||||
| ReadableStream<Uint8Array>
|
||||
| Blob
|
||||
| ArrayBuffer
|
||||
| Uint8Array
|
||||
| undefined;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const PostMediaPosterRequest$outboundSchema: z.ZodType<
|
||||
PostMediaPosterRequest$Outbound,
|
||||
z.ZodTypeDef,
|
||||
PostMediaPosterRequest
|
||||
> = z.object({
|
||||
ratingKey: z.number().int(),
|
||||
url: z.string().optional(),
|
||||
requestBody: z.union([
|
||||
z.instanceof(ReadableStream<Uint8Array>),
|
||||
z.instanceof(Blob),
|
||||
z.instanceof(ArrayBuffer),
|
||||
z.instanceof(Uint8Array),
|
||||
]).optional(),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
requestBody: "RequestBody",
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace PostMediaPosterRequest$ {
|
||||
/** @deprecated use `PostMediaPosterRequest$inboundSchema` instead. */
|
||||
export const inboundSchema = PostMediaPosterRequest$inboundSchema;
|
||||
/** @deprecated use `PostMediaPosterRequest$outboundSchema` instead. */
|
||||
export const outboundSchema = PostMediaPosterRequest$outboundSchema;
|
||||
/** @deprecated use `PostMediaPosterRequest$Outbound` instead. */
|
||||
export type Outbound = PostMediaPosterRequest$Outbound;
|
||||
}
|
||||
|
||||
export function postMediaPosterRequestToJSON(
|
||||
postMediaPosterRequest: PostMediaPosterRequest,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
PostMediaPosterRequest$outboundSchema.parse(postMediaPosterRequest),
|
||||
);
|
||||
}
|
||||
|
||||
export function postMediaPosterRequestFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<PostMediaPosterRequest, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => PostMediaPosterRequest$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'PostMediaPosterRequest' from JSON`,
|
||||
);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export const PostMediaPosterResponse$inboundSchema: z.ZodType<
|
||||
PostMediaPosterResponse,
|
||||
z.ZodTypeDef,
|
||||
unknown
|
||||
> = z.object({
|
||||
ContentType: z.string(),
|
||||
StatusCode: z.number().int(),
|
||||
RawResponse: z.instanceof(Response),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
"ContentType": "contentType",
|
||||
"StatusCode": "statusCode",
|
||||
"RawResponse": "rawResponse",
|
||||
});
|
||||
});
|
||||
|
||||
/** @internal */
|
||||
export type PostMediaPosterResponse$Outbound = {
|
||||
ContentType: string;
|
||||
StatusCode: number;
|
||||
RawResponse: never;
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export const PostMediaPosterResponse$outboundSchema: z.ZodType<
|
||||
PostMediaPosterResponse$Outbound,
|
||||
z.ZodTypeDef,
|
||||
PostMediaPosterResponse
|
||||
> = z.object({
|
||||
contentType: z.string(),
|
||||
statusCode: z.number().int(),
|
||||
rawResponse: z.instanceof(Response).transform(() => {
|
||||
throw new Error("Response cannot be serialized");
|
||||
}),
|
||||
}).transform((v) => {
|
||||
return remap$(v, {
|
||||
contentType: "ContentType",
|
||||
statusCode: "StatusCode",
|
||||
rawResponse: "RawResponse",
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
||||
*/
|
||||
export namespace PostMediaPosterResponse$ {
|
||||
/** @deprecated use `PostMediaPosterResponse$inboundSchema` instead. */
|
||||
export const inboundSchema = PostMediaPosterResponse$inboundSchema;
|
||||
/** @deprecated use `PostMediaPosterResponse$outboundSchema` instead. */
|
||||
export const outboundSchema = PostMediaPosterResponse$outboundSchema;
|
||||
/** @deprecated use `PostMediaPosterResponse$Outbound` instead. */
|
||||
export type Outbound = PostMediaPosterResponse$Outbound;
|
||||
}
|
||||
|
||||
export function postMediaPosterResponseToJSON(
|
||||
postMediaPosterResponse: PostMediaPosterResponse,
|
||||
): string {
|
||||
return JSON.stringify(
|
||||
PostMediaPosterResponse$outboundSchema.parse(postMediaPosterResponse),
|
||||
);
|
||||
}
|
||||
|
||||
export function postMediaPosterResponseFromJSON(
|
||||
jsonString: string,
|
||||
): SafeParseResult<PostMediaPosterResponse, SDKValidationError> {
|
||||
return safeParse(
|
||||
jsonString,
|
||||
(x) => PostMediaPosterResponse$inboundSchema.parse(JSON.parse(x)),
|
||||
`Failed to parse 'PostMediaPosterResponse' from JSON`,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user