Compare commits

...

8 Commits

Author SHA1 Message Date
speakeasybot
cdcdc0ca8e ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.474.0 2025-01-24 00:11:07 +00:00
speakeasybot
b03cc6a609 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.459.2 2024-12-22 00:12:06 +00:00
speakeasybot
4e989e0de3 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.456.1 2024-12-20 16:02:41 +00:00
Luke Hagar
c10e011a68 adjusted workflow 2024-12-20 09:59:40 -06:00
speakeasybot
7e3dca8466 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.6 2024-12-16 22:20:26 +00:00
speakeasybot
8a2d3e04ab ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.6 2024-11-14 00:11:57 +00:00
speakeasybot
6c8a73ae84 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.6 2024-11-11 20:30:45 +00:00
speakeasybot
c839d9f6c7 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.406.0 2024-10-03 12:29:09 +00:00
331 changed files with 14259 additions and 4717 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
/.speakeasy/reports
/react-query
/sdk/models/errors
/sdk/types
/__tests__

View File

@@ -1,6 +1,10 @@
**/*
!/FUNCTIONS.md
!/RUNTIMES.md
!/REACT_QUERY.md
!/**/*.ts
!/**/*.js
!/**/*.json
!/**/*.map
/.eslintrc.js

File diff suppressed because one or more lines are too long

View File

@@ -11,8 +11,9 @@ generation:
requestResponseComponentNamesFeb2024: true
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
typescript:
version: 0.25.1
version: 0.32.2
additionalDependencies:
dependencies: {}
devDependencies: {}
@@ -20,6 +21,9 @@ typescript:
additionalPackageJSON: {}
author: LukeHagar
clientServerStatusCodesAsErrors: true
defaultErrorName: SDKError
enableCustomCodeRegions: false
enableReactQuery: false
enumFormat: enum
flattenGlobalSecurity: true
flatteningOrder: body-first

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.405.6
speakeasyVersion: 1.474.0
sources:
my-source:
sourceNamespace: my-source
@@ -9,26 +9,29 @@ sources:
- main
plexapi:
sourceNamespace: plexapi
sourceRevisionDigest: sha256:c6ab8f13847c7cdc4ab3752f517164d7da08266726255aa0d614b1eaea66fb0e
sourceBlobDigest: sha256:64c7694915a0828aeb256d10d2fa0ea477681785b818916b6681be8cc5ffb93b
sourceRevisionDigest: sha256:b146684d2d813daa8ba29e432a12334838753d0b20183beca8178a74ec4d895a
sourceBlobDigest: sha256:58f51c4319fcda931d63950fd926e8650e20a2e1375e356bf3a930111e246a58
tags:
- latest
- main
- speakeasy-sdk-regen-1737677393
- 0.0.3
targets:
plexjs:
source: plexapi
sourceNamespace: plexapi
sourceRevisionDigest: sha256:c6ab8f13847c7cdc4ab3752f517164d7da08266726255aa0d614b1eaea66fb0e
sourceBlobDigest: sha256:64c7694915a0828aeb256d10d2fa0ea477681785b818916b6681be8cc5ffb93b
sourceRevisionDigest: sha256:b146684d2d813daa8ba29e432a12334838753d0b20183beca8178a74ec4d895a
sourceBlobDigest: sha256:58f51c4319fcda931d63950fd926e8650e20a2e1375e356bf3a930111e246a58
codeSamplesNamespace: code-samples-typescript-plexjs
codeSamplesRevisionDigest: sha256:9667534090efff73eeec1ce4a99b4aebdd251a5eac0cfa5c78ddc0def4d4624e
codeSamplesRevisionDigest: sha256:96ce210c9c8c0b5ae45ce5fe2e62d64d6914bb1b1b6c18eaee6e1e379fb40e13
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
plexapi:
inputs:
- location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/refs/heads/main/output/plex-media-server-spec-dereferenced.yaml
registry:
location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi
targets:
plexjs:
target: typescript

View File

@@ -3,7 +3,9 @@ speakeasyVersion: latest
sources:
plexapi:
inputs:
- location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/refs/heads/main/output/plex-media-server-spec-dereferenced.yaml
registry:
location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi
targets:
plexjs:
target: typescript

View File

@@ -27,11 +27,6 @@ import { SDKValidationError } from "@lukehagar/plexjs/sdk/models/errors/sdkvalid
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

307
README.md
View File

@@ -40,18 +40,26 @@ The following SDKs are generated from the OpenAPI Specification. They are automa
<!-- Start Table of Contents [toc] -->
## Table of Contents
<!-- $toc-max-depth=2 -->
* [@lukehagar/plexjs](#lukehagarplexjs)
* [Plex Media Server OpenAPI Specification](#plex-media-server-openapi-specification)
* [Documentation](#documentation)
* [SDKs](#sdks)
* [SDK Installation](#sdk-installation)
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Custom HTTP Client](#custom-http-client)
* [Authentication](#authentication)
* [Requirements](#requirements)
* [Standalone functions](#standalone-functions)
* [Retries](#retries)
* [Debugging](#debugging)
* [Development](#development)
* [Maturity](#maturity)
* [Contributions](#contributions)
* [SDK Installation](#sdk-installation)
* [Requirements](#requirements)
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [Standalone functions](#standalone-functions)
* [Retries](#retries)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Custom HTTP Client](#custom-http-client)
* [Authentication](#authentication)
* [Debugging](#debugging)
<!-- End Table of Contents [toc] -->
<!-- Start SDK Installation [installation] -->
@@ -97,11 +105,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -253,25 +256,15 @@ run();
<!-- Start Error Handling [errors] -->
## Error Handling
All SDK methods return a response object or throw an error. By default, an API error will throw a `errors.SDKError`.
Some methods specify known errors which can be thrown. All the known errors are enumerated in the `sdk/models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `getServerCapabilities` method may throw the following errors:
If a HTTP request fails, an operation my also throw an error from the `sdk/models/errors/httpclienterrors.ts` module:
| Error Type | Status Code | Content Type |
| ---------------------------------------- | ----------- | ---------------- |
| errors.GetServerCapabilitiesBadRequest | 400 | application/json |
| errors.GetServerCapabilitiesUnauthorized | 401 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |
| HTTP Client Error | Description |
| ---------------------------------------------------- | ---------------------------------------------------- |
| RequestAbortedError | HTTP request was aborted by the client |
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
| ConnectionError | HTTP client was unable to make a request to a server |
| InvalidRequestError | Any input used to create a request is invalid |
| UnexpectedClientError | Unrecognised or unexpected error |
In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `getServerCapabilities` method may throw the following errors:
| Error Type | Status Code | Content Type |
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
| errors.GetServerCapabilitiesBadRequest | 400 | application/json |
| errors.GetServerCapabilitiesUnauthorized | 401 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |
If the method throws an error and it is not captured by the known errors, it will default to throwing a `SDKError`.
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
@@ -283,11 +276,6 @@ import {
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -299,8 +287,9 @@ async function run() {
console.log(result);
} catch (err) {
switch (true) {
// The server response does not match the expected SDK schema
case (err instanceof SDKValidationError): {
// Validation errors can be pretty-printed
// Pretty-print will provide a human-readable multi-line error message
console.error(err.pretty());
// Raw value may also be inspected
console.error(err.rawValue);
@@ -317,6 +306,7 @@ async function run() {
return;
}
default: {
// Other errors such as network errors, see HTTPClientErrors for more details
throw err;
}
}
@@ -327,66 +317,38 @@ run();
```
Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging.
Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging.
In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `sdk/models/errors/httpclienterrors.ts` module:
| HTTP Client Error | Description |
| ---------------------------------------------------- | ---------------------------------------------------- |
| RequestAbortedError | HTTP request was aborted by the client |
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
| ConnectionError | HTTP client was unable to make a request to a server |
| InvalidRequestError | Any input used to create a request is invalid |
| UnexpectedClientError | Unrecognised or unexpected error |
<!-- End Error Handling [errors] -->
<!-- Start Server Selection [server] -->
## Server Selection
### Select Server by Index
### Server Variables
You can override the default server globally by passing a server index to the `serverIdx` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
| # | Server | Variables |
| - | ------ | --------- |
| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `https`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) |
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
serverIdx: 0,
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
const result = await plexAPI.server.getServerCapabilities();
// Handle the result
console.log(result);
}
run();
```
#### Variables
Some of the server options above contain variables. If you want to set the values of those variables, the following optional parameters are available when initializing the SDK client instance:
The default server `{protocol}://{ip}:{port}` contains variables and is set to `https://10.10.10.47:32400` by default. To override default values, the following parameters are available when initializing the SDK client instance:
* `protocol: models.ServerProtocol`
* `ip: string`
* `port: string`
### Override Server URL Per-Client
The default server can also be overridden globally by passing a URL to the `serverURL` optional parameter when initializing the SDK client instance. For example:
The default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
serverURL: "{protocol}://{ip}:{port}",
serverURL: "https://10.10.10.47:32400",
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -399,20 +361,15 @@ async function run() {
run();
```
### Override Server URL Per-Operation
The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -485,9 +442,9 @@ const sdk = new PlexAPI({ httpClient });
This SDK supports the following security scheme globally:
| Name | Type | Scheme |
| ------------- | ------------- | ------------- |
| `accessToken` | apiKey | API key |
| Name | Type | Scheme |
| ------------- | ------ | ------- |
| `accessToken` | apiKey | API key |
To authenticate with the API the `accessToken` parameter must be set when initializing the SDK client instance. For example:
```typescript
@@ -495,11 +452,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -535,83 +487,82 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
<summary>Available standalone functions</summary>
- [activitiesCancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities)
- [activitiesGetServerActivities](docs/sdks/activities/README.md#getserveractivities)
- [authenticationGetSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation)
- [authenticationGetTokenDetails](docs/sdks/authentication/README.md#gettokendetails)
- [authenticationGetTransientToken](docs/sdks/authentication/README.md#gettransienttoken)
- [authenticationPostUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata)
- [butlerGetButlerTasks](docs/sdks/butler/README.md#getbutlertasks)
- [butlerStartAllTasks](docs/sdks/butler/README.md#startalltasks)
- [butlerStartTask](docs/sdks/butler/README.md#starttask)
- [butlerStopAllTasks](docs/sdks/butler/README.md#stopalltasks)
- [butlerStopTask](docs/sdks/butler/README.md#stoptask)
- [hubsGetGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs)
- [hubsGetLibraryHubs](docs/sdks/hubs/README.md#getlibraryhubs)
- [hubsGetRecentlyAdded](docs/sdks/hubs/README.md#getrecentlyadded)
- [libraryDeleteLibrary](docs/sdks/library/README.md#deletelibrary)
- [libraryGetAllLibraries](docs/sdks/library/README.md#getalllibraries)
- [libraryGetFileHash](docs/sdks/library/README.md#getfilehash)
- [libraryGetLibraryDetails](docs/sdks/library/README.md#getlibrarydetails)
- [libraryGetLibraryItems](docs/sdks/library/README.md#getlibraryitems)
- [libraryGetMetaDataByRatingKey](docs/sdks/library/README.md#getmetadatabyratingkey)
- [libraryGetMetadataChildren](docs/sdks/library/README.md#getmetadatachildren)
- [libraryGetOnDeck](docs/sdks/library/README.md#getondeck)
- [libraryGetRecentlyAddedLibrary](docs/sdks/library/README.md#getrecentlyaddedlibrary)
- [libraryGetRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata)
- [libraryGetSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries)
- [libraryGetSearchLibrary](docs/sdks/library/README.md#getsearchlibrary)
- [libraryGetTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent)
- [logEnablePaperTrail](docs/sdks/log/README.md#enablepapertrail)
- [logLogLine](docs/sdks/log/README.md#logline)
- [logLogMultiLine](docs/sdks/log/README.md#logmultiline)
- [mediaGetBannerImage](docs/sdks/media/README.md#getbannerimage)
- [mediaGetThumbImage](docs/sdks/media/README.md#getthumbimage)
- [mediaMarkPlayed](docs/sdks/media/README.md#markplayed)
- [mediaMarkUnplayed](docs/sdks/media/README.md#markunplayed)
- [mediaUpdatePlayProgress](docs/sdks/media/README.md#updateplayprogress)
- [playlistsAddPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents)
- [playlistsClearPlaylistContents](docs/sdks/playlists/README.md#clearplaylistcontents)
- [playlistsCreatePlaylist](docs/sdks/playlists/README.md#createplaylist)
- [playlistsDeletePlaylist](docs/sdks/playlists/README.md#deleteplaylist)
- [playlistsGetPlaylistContents](docs/sdks/playlists/README.md#getplaylistcontents)
- [playlistsGetPlaylist](docs/sdks/playlists/README.md#getplaylist)
- [playlistsGetPlaylists](docs/sdks/playlists/README.md#getplaylists)
- [playlistsUpdatePlaylist](docs/sdks/playlists/README.md#updateplaylist)
- [playlistsUploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist)
- [plexGetCompanionsData](docs/sdks/plex/README.md#getcompanionsdata)
- [plexGetGeoData](docs/sdks/plex/README.md#getgeodata)
- [plexGetHomeData](docs/sdks/plex/README.md#gethomedata)
- [plexGetPin](docs/sdks/plex/README.md#getpin)
- [plexGetServerResources](docs/sdks/plex/README.md#getserverresources)
- [plexGetTokenByPinId](docs/sdks/plex/README.md#gettokenbypinid)
- [plexGetUserFriends](docs/sdks/plex/README.md#getuserfriends)
- [searchGetSearchResults](docs/sdks/search/README.md#getsearchresults)
- [searchPerformSearch](docs/sdks/search/README.md#performsearch)
- [searchPerformVoiceSearch](docs/sdks/search/README.md#performvoicesearch)
- [serverGetAvailableClients](docs/sdks/server/README.md#getavailableclients)
- [serverGetDevices](docs/sdks/server/README.md#getdevices)
- [serverGetMediaProviders](docs/sdks/server/README.md#getmediaproviders)
- [serverGetMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount)
- [serverGetResizedPhoto](docs/sdks/server/README.md#getresizedphoto)
- [serverGetServerCapabilities](docs/sdks/server/README.md#getservercapabilities)
- [serverGetServerIdentity](docs/sdks/server/README.md#getserveridentity)
- [serverGetServerList](docs/sdks/server/README.md#getserverlist)
- [serverGetServerPreferences](docs/sdks/server/README.md#getserverpreferences)
- [sessionsGetSessionHistory](docs/sdks/sessions/README.md#getsessionhistory)
- [sessionsGetSessions](docs/sdks/sessions/README.md#getsessions)
- [sessionsGetTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions)
- [sessionsStopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession)
- [statisticsGetBandwidthStatistics](docs/sdks/statistics/README.md#getbandwidthstatistics)
- [statisticsGetResourcesStatistics](docs/sdks/statistics/README.md#getresourcesstatistics)
- [statisticsGetStatistics](docs/sdks/statistics/README.md#getstatistics)
- [updaterApplyUpdates](docs/sdks/updater/README.md#applyupdates)
- [updaterCheckForUpdates](docs/sdks/updater/README.md#checkforupdates)
- [updaterGetUpdateStatus](docs/sdks/updater/README.md#getupdatestatus)
- [videoGetTimeline](docs/sdks/video/README.md#gettimeline)
- [videoStartUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode)
- [watchlistGetWatchList](docs/sdks/watchlist/README.md#getwatchlist)
- [`activitiesCancelServerActivities`](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities
- [`activitiesGetServerActivities`](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities
- [`authenticationGetSourceConnectionInformation`](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information
- [`authenticationGetTokenDetails`](docs/sdks/authentication/README.md#gettokendetails) - Get Token Details
- [`authenticationGetTransientToken`](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token
- [`authenticationPostUsersSignInData`](docs/sdks/authentication/README.md#postuserssignindata) - Get User Sign In Data
- [`butlerGetButlerTasks`](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks
- [`butlerStartAllTasks`](docs/sdks/butler/README.md#startalltasks) - Start all Butler tasks
- [`butlerStartTask`](docs/sdks/butler/README.md#starttask) - Start a single Butler task
- [`butlerStopAllTasks`](docs/sdks/butler/README.md#stopalltasks) - Stop all Butler tasks
- [`butlerStopTask`](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task
- [`hubsGetGlobalHubs`](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs
- [`hubsGetLibraryHubs`](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs
- [`hubsGetRecentlyAdded`](docs/sdks/hubs/README.md#getrecentlyadded) - Get Recently Added
- [`libraryDeleteLibrary`](docs/sdks/library/README.md#deletelibrary) - Delete Library Section
- [`libraryGetAllLibraries`](docs/sdks/library/README.md#getalllibraries) - Get All Libraries
- [`libraryGetFileHash`](docs/sdks/library/README.md#getfilehash) - Get Hash Value
- [`libraryGetLibraryDetails`](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details
- [`libraryGetLibraryItems`](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
- [`libraryGetMetaDataByRatingKey`](docs/sdks/library/README.md#getmetadatabyratingkey) - Get Metadata by RatingKey
- [`libraryGetMetadataChildren`](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
- [`libraryGetOnDeck`](docs/sdks/library/README.md#getondeck) - Get On Deck
- [`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
- [`logEnablePaperTrail`](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail
- [`logLogLine`](docs/sdks/log/README.md#logline) - Logging a single line message.
- [`logLogMultiLine`](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message
- [`mediaGetBannerImage`](docs/sdks/media/README.md#getbannerimage) - Get Banner Image
- [`mediaGetThumbImage`](docs/sdks/media/README.md#getthumbimage) - Get Thumb Image
- [`mediaMarkPlayed`](docs/sdks/media/README.md#markplayed) - Mark Media Played
- [`mediaMarkUnplayed`](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed
- [`mediaUpdatePlayProgress`](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress
- [`playlistsAddPlaylistContents`](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist
- [`playlistsClearPlaylistContents`](docs/sdks/playlists/README.md#clearplaylistcontents) - Delete Playlist Contents
- [`playlistsCreatePlaylist`](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist
- [`playlistsDeletePlaylist`](docs/sdks/playlists/README.md#deleteplaylist) - Deletes a Playlist
- [`playlistsGetPlaylist`](docs/sdks/playlists/README.md#getplaylist) - Retrieve Playlist
- [`playlistsGetPlaylistContents`](docs/sdks/playlists/README.md#getplaylistcontents) - Retrieve Playlist Contents
- [`playlistsGetPlaylists`](docs/sdks/playlists/README.md#getplaylists) - Get All Playlists
- [`playlistsUpdatePlaylist`](docs/sdks/playlists/README.md#updateplaylist) - Update a Playlist
- [`playlistsUploadPlaylist`](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist
- [`plexGetCompanionsData`](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data
- [`plexGetGeoData`](docs/sdks/plex/README.md#getgeodata) - Get Geo Data
- [`plexGetHomeData`](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data
- [`plexGetPin`](docs/sdks/plex/README.md#getpin) - Get a Pin
- [`plexGetServerResources`](docs/sdks/plex/README.md#getserverresources) - Get Server Resources
- [`plexGetTokenByPinId`](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId
- [`plexGetUserFriends`](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in
- [`searchGetSearchResults`](docs/sdks/search/README.md#getsearchresults) - Get Search Results
- [`searchPerformSearch`](docs/sdks/search/README.md#performsearch) - Perform a search
- [`searchPerformVoiceSearch`](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search
- [`serverGetAvailableClients`](docs/sdks/server/README.md#getavailableclients) - Get Available Clients
- [`serverGetDevices`](docs/sdks/server/README.md#getdevices) - Get Devices
- [`serverGetMediaProviders`](docs/sdks/server/README.md#getmediaproviders) - Get Media Providers
- [`serverGetMyPlexAccount`](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account
- [`serverGetResizedPhoto`](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo
- [`serverGetServerCapabilities`](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities
- [`serverGetServerIdentity`](docs/sdks/server/README.md#getserveridentity) - Get Server Identity
- [`serverGetServerList`](docs/sdks/server/README.md#getserverlist) - Get Server List
- [`serverGetServerPreferences`](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences
- [`sessionsGetSessionHistory`](docs/sdks/sessions/README.md#getsessionhistory) - Get Session History
- [`sessionsGetSessions`](docs/sdks/sessions/README.md#getsessions) - Get Active Sessions
- [`sessionsGetTranscodeSessions`](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions
- [`sessionsStopTranscodeSession`](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session
- [`statisticsGetBandwidthStatistics`](docs/sdks/statistics/README.md#getbandwidthstatistics) - Get Bandwidth Statistics
- [`statisticsGetResourcesStatistics`](docs/sdks/statistics/README.md#getresourcesstatistics) - Get Resources Statistics
- [`statisticsGetStatistics`](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics
- [`updaterApplyUpdates`](docs/sdks/updater/README.md#applyupdates) - Apply Updates
- [`updaterCheckForUpdates`](docs/sdks/updater/README.md#checkforupdates) - Checking for updates
- [`updaterGetUpdateStatus`](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates
- [`videoGetTimeline`](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item
- [`videoStartUniversalTranscode`](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode
- [`watchlistGetWatchList`](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist
</details>
<!-- End Standalone functions [standalone-funcs] -->
@@ -627,11 +578,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -672,11 +618,6 @@ const plexAPI = new PlexAPI({
retryConnectionErrors: false,
},
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -1108,4 +1108,74 @@ Based on:
### Generated
- [typescript v0.25.1] .
### Releases
- [NPM v0.25.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.25.1 - .
- [NPM v0.25.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.25.1 - .
## 2024-10-03 12:26:50
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.406.0 (2.429.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.26.1] .
### Releases
- [NPM v0.26.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.26.1 - .
## 2024-11-11 20:28:21
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.28.0] .
### Releases
- [NPM v0.28.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.28.0 - .
## 2024-11-14 00:09:39
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.30.0] .
### Releases
- [NPM v0.30.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.30.0 - .
## 2024-12-16 22:17:52
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.31.1] .
### Releases
- [NPM v0.31.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.31.1 - .
## 2024-12-20 16:01:16
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.456.1 (2.481.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.32.0] .
### Releases
- [NPM v0.32.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.32.0 - .
## 2024-12-22 00:10:48
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.459.2 (2.483.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.32.1] .
### Releases
- [NPM v0.32.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.32.1 - .
## 2025-01-24 00:09:35
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.474.0 (2.495.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.32.2] .
### Releases
- [NPM v0.32.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.32.2 - .

View File

@@ -1,6 +1,6 @@
# Supported JavaScript runtimes
This SDK is intended to be used in JavaScript runtimes that support the following features:
This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:
* [Web Fetch API][web-fetch]
* [Web Streams API][web-streams] and in particular `ReadableStream`
@@ -20,3 +20,29 @@ Runtime environments that are explicitly supported are:
- Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
[deno-file-streaming]: https://github.com/denoland/deno/issues/11018
## Recommended TypeScript compiler options
The following `tsconfig.json` options are recommended for projects using this
SDK in order to get static type support for features like async iterables,
streams and `fetch`-related APIs ([`for await...of`][for-await-of],
[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
so on):
[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
[abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
[request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
[response]: https://developer.mozilla.org/en-US/docs/Web/API/Response
```jsonc
{
"compilerOptions": {
"target": "es2020", // or higher
"lib": ["es2020", "dom", "dom.iterable"],
}
}
```
While `target` can be set to older ECMAScript versions, it may result in extra,
unnecessary compatibility code being generated if you are not targeting old
runtimes.

View File

@@ -4,11 +4,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -13,11 +13,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -38,11 +33,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -63,11 +53,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -88,11 +73,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -114,11 +94,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -150,11 +125,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -175,11 +145,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -200,11 +165,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -225,11 +185,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -250,11 +205,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -275,11 +225,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -301,11 +246,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -327,11 +267,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -352,11 +287,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -377,11 +307,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -402,11 +327,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -427,11 +347,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -450,13 +365,7 @@ actions:
source: |-
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPI();
async function run() {
const result = await plexAPI.plex.getGeoData();
@@ -476,11 +385,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -501,11 +405,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -527,11 +426,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -559,11 +453,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -584,11 +473,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -609,11 +493,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -632,13 +511,7 @@ actions:
source: |-
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPI();
async function run() {
const result = await plexAPI.server.getServerIdentity();
@@ -659,11 +532,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -684,11 +552,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -709,11 +572,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -734,11 +592,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -766,15 +619,10 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
const result = await plexAPI.library.getMetadataChildren(1539.15, "Stream");
const result = await plexAPI.library.getMetadataChildren(1539.14, "Stream");
// Handle the result
console.log(result);
@@ -791,11 +639,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -823,11 +666,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -849,11 +687,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -896,16 +729,12 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
const result = await plexAPI.library.getSearchAllLibraries({
query: "<value>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
searchTypes: [
SearchTypes.People,
],
@@ -928,11 +757,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -954,11 +778,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -984,11 +803,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1006,18 +820,14 @@ actions:
label: details
source: |-
import { PlexAPI } from "@lukehagar/plexjs";
import { IncludeDetails } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
const result = await plexAPI.library.getLibraryDetails(9518);
const result = await plexAPI.library.getLibraryDetails(9518, IncludeDetails.Zero);
// Handle the result
console.log(result);
@@ -1035,11 +845,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1061,11 +866,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1092,11 +892,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1126,11 +921,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1151,11 +941,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1178,11 +963,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1203,11 +983,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1228,11 +1003,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1254,11 +1024,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1285,16 +1050,17 @@ actions:
source: |-
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPI();
async function run() {
const result = await plexAPI.plex.getPin({});
const result = await plexAPI.plex.getPin({
strong: false,
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",
clientVersion: "2.4.1",
platform: "Roku",
});
// Handle the result
console.log(result);
@@ -1309,17 +1075,16 @@ actions:
source: |-
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPI();
async function run() {
const result = await plexAPI.plex.getTokenByPinId({
pinID: 408895,
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",
clientVersion: "2.4.1",
platform: "Roku",
});
// Handle the result
@@ -1337,11 +1102,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1363,11 +1123,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1394,11 +1149,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1419,11 +1169,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1444,11 +1189,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1469,15 +1209,10 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
const result = await plexAPI.playlists.updatePlaylist(3915.00);
const result = await plexAPI.playlists.updatePlaylist(3915);
// Handle the result
console.log(result);
@@ -1494,11 +1229,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1520,11 +1250,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1545,15 +1270,10 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
const result = await plexAPI.playlists.addPlaylistContents(8502.00, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123);
const result = await plexAPI.playlists.addPlaylistContents(8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123);
// Handle the result
console.log(result);
@@ -1571,15 +1291,10 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
const result = await plexAPI.plex.getServerResources(IncludeHttps.Enable, IncludeRelay.Enable, IncludeIPv6.Enable, "3381b62b-9ab7-4e37-827b-203e9809eb58");
const result = await plexAPI.plex.getServerResources("3381b62b-9ab7-4e37-827b-203e9809eb58", IncludeHttps.Enable, IncludeRelay.Enable, IncludeIPv6.Enable);
// Handle the result
console.log(result);
@@ -1596,11 +1311,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1621,11 +1331,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1647,11 +1352,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1672,11 +1372,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1697,11 +1392,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1722,11 +1412,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1747,11 +1432,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1772,11 +1452,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1797,11 +1472,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1822,11 +1492,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1847,11 +1512,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1873,11 +1533,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1899,11 +1554,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1924,11 +1574,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1949,11 +1594,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1972,19 +1612,19 @@ actions:
source: |-
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPI();
async function run() {
const result = await plexAPI.authentication.postUsersSignInData({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",
clientVersion: "2.4.1",
platform: "Roku",
requestBody: {
login: "username@email.com",
password: "password123",
rememberMe: false,
verificationCode: "123456",
},
});
@@ -2004,11 +1644,6 @@ actions:
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -0,0 +1,19 @@
# EnableCreditsMarkerGeneration
Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
## Example Usage
```typescript
import { EnableCreditsMarkerGeneration } from "@lukehagar/plexjs/sdk/models/operations";
let value: EnableCreditsMarkerGeneration =
EnableCreditsMarkerGeneration.LibraryDefault;
```
## Values
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `Disabled` | 0 |

View File

@@ -0,0 +1,19 @@
# EpisodeSort
Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
## Example Usage
```typescript
import { EpisodeSort } from "@lukehagar/plexjs/sdk/models/operations";
let value: EpisodeSort = EpisodeSort.OldestFirst;
```
## Values
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `OldestFirst` | 0 |
| `NewestFirst` | 1 |

View File

@@ -1,16 +1,19 @@
# FlattenSeasons
Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
## Example Usage
```typescript
import { FlattenSeasons } from "@lukehagar/plexjs/sdk/models/operations";
let value: FlattenSeasons = FlattenSeasons.True;
let value: FlattenSeasons = FlattenSeasons.Show;
```
## Values
| Name | Value |
| ------- | ------- |
| `False` | 0 |
| `True` | 1 |
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `Hide` | 0 |
| `Show` | 1 |

View File

@@ -11,12 +11,8 @@ let value: Friend = {
home: true,
id: 0,
restricted: false,
sharedServers: [
{},
],
sharedSources: [
{},
],
sharedServers: [],
sharedSources: [],
status: Status.Accepted,
thumb: "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578",
title: "username123",

View File

@@ -0,0 +1,19 @@
# GetLibraryItemsEnableCreditsMarkerGeneration
Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
## Example Usage
```typescript
import { GetLibraryItemsEnableCreditsMarkerGeneration } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsEnableCreditsMarkerGeneration =
GetLibraryItemsEnableCreditsMarkerGeneration.LibraryDefault;
```
## Values
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `Disabled` | 0 |

View File

@@ -0,0 +1,19 @@
# GetLibraryItemsEpisodeSort
Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
## Example Usage
```typescript
import { GetLibraryItemsEpisodeSort } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsEpisodeSort = GetLibraryItemsEpisodeSort.OldestFirst;
```
## Values
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `OldestFirst` | 0 |
| `NewestFirst` | 1 |

View File

@@ -1,16 +1,19 @@
# GetLibraryItemsFlattenSeasons
Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
## Example Usage
```typescript
import { GetLibraryItemsFlattenSeasons } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsFlattenSeasons = GetLibraryItemsFlattenSeasons.True;
let value: GetLibraryItemsFlattenSeasons = GetLibraryItemsFlattenSeasons.Show;
```
## Values
| Name | Value |
| ------- | ------- |
| `False` | 0 |
| `True` | 1 |
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `Hide` | 0 |
| `Show` | 1 |

View File

@@ -9,6 +9,8 @@ The Meta object is only included in the response if the `includeMeta` parameter
import {
GetLibraryItemsActiveDirection,
GetLibraryItemsDefaultDirection,
GetLibraryItemsEnableCreditsMarkerGeneration,
GetLibraryItemsEpisodeSort,
GetLibraryItemsFlattenSeasons,
GetLibraryItemsHasThumbnail,
GetLibraryItemsLibraryActiveDirection,
@@ -110,8 +112,11 @@ let value: GetLibraryItemsMediaContainer = {
year: 2022,
seasonCount: 2022,
tagline: "Return to Pandora.",
flattenSeasons: GetLibraryItemsFlattenSeasons.True,
showOrdering: GetLibraryItemsShowOrdering.Dvd,
flattenSeasons: GetLibraryItemsFlattenSeasons.Show,
episodeSort: GetLibraryItemsEpisodeSort.OldestFirst,
enableCreditsMarkerGeneration:
GetLibraryItemsEnableCreditsMarkerGeneration.LibraryDefault,
showOrdering: GetLibraryItemsShowOrdering.TvdbDvd,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
banner: "/library/metadata/58683/banner/1703239236",
@@ -380,5 +385,5 @@ let value: GetLibraryItemsMediaContainer = {
| `viewGroup` | *string* | :heavy_check_mark: | N/A | movie |
| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65592 |
| `mixedParents` | *boolean* | :heavy_minus_sign: | N/A | true |
| `metadata` | [operations.GetLibraryItemsMetadata](../../../sdk/models/operations/getlibraryitemsmetadata.md)[] | :heavy_check_mark: | N/A | |
| `metadata` | [operations.GetLibraryItemsMetadata](../../../sdk/models/operations/getlibraryitemsmetadata.md)[] | :heavy_minus_sign: | N/A | |
| `meta` | [operations.GetLibraryItemsMeta](../../../sdk/models/operations/getlibraryitemsmeta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/> | |

View File

@@ -4,6 +4,8 @@
```typescript
import {
GetLibraryItemsEnableCreditsMarkerGeneration,
GetLibraryItemsEpisodeSort,
GetLibraryItemsFlattenSeasons,
GetLibraryItemsHasThumbnail,
GetLibraryItemsLibraryResponse200Type,
@@ -34,8 +36,11 @@ let value: GetLibraryItemsMetadata = {
year: 2022,
seasonCount: 2022,
tagline: "Return to Pandora.",
flattenSeasons: GetLibraryItemsFlattenSeasons.True,
showOrdering: GetLibraryItemsShowOrdering.Dvd,
flattenSeasons: GetLibraryItemsFlattenSeasons.Show,
episodeSort: GetLibraryItemsEpisodeSort.OldestFirst,
enableCreditsMarkerGeneration:
GetLibraryItemsEnableCreditsMarkerGeneration.LibraryDefault,
showOrdering: GetLibraryItemsShowOrdering.TvdbDvd,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
banner: "/library/metadata/58683/banner/1703239236",
@@ -249,8 +254,10 @@ let value: GetLibraryItemsMetadata = {
| `year` | *number* | :heavy_minus_sign: | N/A | 2022 |
| `seasonCount` | *number* | :heavy_minus_sign: | N/A | 2022 |
| `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. |
| `flattenSeasons` | [operations.GetLibraryItemsFlattenSeasons](../../../sdk/models/operations/getlibraryitemsflattenseasons.md) | :heavy_minus_sign: | N/A | 1 |
| `showOrdering` | [operations.GetLibraryItemsShowOrdering](../../../sdk/models/operations/getlibraryitemsshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show <br/>None = Library default, <br/>tmdbAiring = The Movie Database (Aired), <br/>aired = TheTVDB (Aired), <br/>dvd = TheTVDB (DVD), <br/>absolute = TheTVDB (Absolute)).<br/> | dvd |
| `flattenSeasons` | [operations.GetLibraryItemsFlattenSeasons](../../../sdk/models/operations/getlibraryitemsflattenseasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 |
| `episodeSort` | [operations.GetLibraryItemsEpisodeSort](../../../sdk/models/operations/getlibraryitemsepisodesort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
| `enableCreditsMarkerGeneration` | [operations.GetLibraryItemsEnableCreditsMarkerGeneration](../../../sdk/models/operations/getlibraryitemsenablecreditsmarkergeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
| `showOrdering` | [operations.GetLibraryItemsShowOrdering](../../../sdk/models/operations/getlibraryitemsshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
| `banner` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 |

View File

@@ -23,4 +23,7 @@ let value: GetLibraryItemsQueryParamType = GetLibraryItemsQueryParamType.TvShow;
| `Movie` | 1 |
| `TvShow` | 2 |
| `Season` | 3 |
| `Episode` | 4 |
| `Episode` | 4 |
| `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |

View File

@@ -12,7 +12,7 @@ import {
} from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsRequest = {
tag: Tag.FirstCharacter,
tag: Tag.Folder,
includeGuids: IncludeGuids.Enable,
type: GetLibraryItemsQueryParamType.TvShow,
sectionKey: 9518,

View File

@@ -6,6 +6,8 @@
import {
GetLibraryItemsActiveDirection,
GetLibraryItemsDefaultDirection,
GetLibraryItemsEnableCreditsMarkerGeneration,
GetLibraryItemsEpisodeSort,
GetLibraryItemsFlattenSeasons,
GetLibraryItemsHasThumbnail,
GetLibraryItemsLibraryActiveDirection,
@@ -114,8 +116,11 @@ let value: GetLibraryItemsResponse = {
year: 2022,
seasonCount: 2022,
tagline: "Return to Pandora.",
flattenSeasons: GetLibraryItemsFlattenSeasons.True,
showOrdering: GetLibraryItemsShowOrdering.Dvd,
flattenSeasons: GetLibraryItemsFlattenSeasons.Show,
episodeSort: GetLibraryItemsEpisodeSort.OldestFirst,
enableCreditsMarkerGeneration:
GetLibraryItemsEnableCreditsMarkerGeneration.LibraryDefault,
showOrdering: GetLibraryItemsShowOrdering.TvdbDvd,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
banner: "/library/metadata/58683/banner/1703239236",

View File

@@ -8,6 +8,8 @@ The contents of the library by section and tag
import {
GetLibraryItemsActiveDirection,
GetLibraryItemsDefaultDirection,
GetLibraryItemsEnableCreditsMarkerGeneration,
GetLibraryItemsEpisodeSort,
GetLibraryItemsFlattenSeasons,
GetLibraryItemsHasThumbnail,
GetLibraryItemsLibraryActiveDirection,
@@ -110,8 +112,11 @@ let value: GetLibraryItemsResponseBody = {
year: 2022,
seasonCount: 2022,
tagline: "Return to Pandora.",
flattenSeasons: GetLibraryItemsFlattenSeasons.True,
showOrdering: GetLibraryItemsShowOrdering.Dvd,
flattenSeasons: GetLibraryItemsFlattenSeasons.Show,
episodeSort: GetLibraryItemsEpisodeSort.OldestFirst,
enableCreditsMarkerGeneration:
GetLibraryItemsEnableCreditsMarkerGeneration.LibraryDefault,
showOrdering: GetLibraryItemsShowOrdering.TvdbDvd,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
banner: "/library/metadata/58683/banner/1703239236",

View File

@@ -1,11 +1,11 @@
# GetLibraryItemsShowOrdering
Setting that indicates the episode ordering for the show
None = Library default,
tmdbAiring = The Movie Database (Aired),
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
Setting that indicates the episode ordering for the show
None = Library default,
tmdbAiring = The Movie Database (Aired),
tvdbAiring = TheTVDB (Aired),
tvdbDvd = TheTVDB (DVD),
tvdbAbsolute = TheTVDB (Absolute)).
## Example Usage
@@ -13,15 +13,15 @@ absolute = TheTVDB (Absolute)).
```typescript
import { GetLibraryItemsShowOrdering } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsShowOrdering = GetLibraryItemsShowOrdering.Dvd;
let value: GetLibraryItemsShowOrdering = GetLibraryItemsShowOrdering.TvdbDvd;
```
## Values
| Name | Value |
| ------------ | ------------ |
| `None` | None |
| `TmdbAiring` | tmdbAiring |
| `Aired` | aired |
| `Dvd` | dvd |
| `Absolute` | absolute |
| Name | Value |
| -------------- | -------------- |
| `None` | None |
| `TmdbAiring` | tmdbAiring |
| `TvdbAiring` | tvdbAiring |
| `TvdbDvd` | tvdbDvd |
| `TvdbAbsolute` | tvdbAbsolute |

View File

@@ -185,6 +185,11 @@ let value: GetMetaDataByRatingKeyMetadata = {
| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies |
| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 |
| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 |
| `grandparentTitle` | *string* | :heavy_minus_sign: | The name of the album artist for the track when audio, and the name of the TV show for the episode when video. | |
| `parentTitle` | *string* | :heavy_minus_sign: | The name of the album for the track when audio, and the name of the season for the episode when TV show. | |
| `originalTitle` | *string* | :heavy_minus_sign: | The orginal untranslated name of the media item when non-english. | |
| `index` | *number* | :heavy_minus_sign: | The index starting from 0 of this media item in the MetaData array. | |
| `parentIndex` | *number* | :heavy_minus_sign: | The parent index starting from 0 of this media item in the parent MetaData array. | |
| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 |
| `summary` | *string* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. |
| `rating` | *number* | :heavy_minus_sign: | N/A | 8.2 |

View File

@@ -6,7 +6,7 @@
import { GetMetadataChildrenRequest } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetMetadataChildrenRequest = {
ratingKey: 1716.30,
ratingKey: 1716.29,
};
```

View File

@@ -1,19 +0,0 @@
# GetPinGlobals
## Example Usage
```typescript
import { GetPinGlobals } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetPinGlobals = {};
```
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `clientID` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `clientName` | *string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `deviceNickname` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `clientVersion` | *string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |
| `platform` | *string* | :heavy_minus_sign: | The platform of the client application. | Roku |

View File

@@ -5,7 +5,13 @@
```typescript
import { GetPinRequest } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetPinRequest = {};
let value: GetPinRequest = {
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",
clientVersion: "2.4.1",
platform: "Roku",
};
```
## Fields
@@ -13,7 +19,7 @@ let value: GetPinRequest = {};
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `strong` | *boolean* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> | |
| `clientID` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `clientName` | *string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `deviceNickname` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `clientVersion` | *string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |

View File

@@ -24,4 +24,7 @@ let value: GetPlaylistContentsQueryParamType =
| `Movie` | 1 |
| `TvShow` | 2 |
| `Season` | 3 |
| `Episode` | 4 |
| `Episode` | 4 |
| `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |

View File

@@ -6,7 +6,7 @@
import { GetPlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetPlaylistRequest = {
playlistID: 672.50,
playlistID: 672.49,
};
```

View File

@@ -4,6 +4,8 @@
```typescript
import {
EnableCreditsMarkerGeneration,
EpisodeSort,
FlattenSeasons,
GetRecentlyAddedActiveDirection,
GetRecentlyAddedDefaultDirection,
@@ -90,8 +92,11 @@ let value: GetRecentlyAddedMediaContainer = {
year: 2022,
seasonCount: 2022,
tagline: "Return to Pandora.",
flattenSeasons: FlattenSeasons.True,
showOrdering: ShowOrdering.Dvd,
flattenSeasons: FlattenSeasons.Show,
episodeSort: EpisodeSort.OldestFirst,
enableCreditsMarkerGeneration:
EnableCreditsMarkerGeneration.LibraryDefault,
showOrdering: ShowOrdering.TvdbDvd,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
banner: "/library/metadata/58683/banner/1703239236",

View File

@@ -4,6 +4,8 @@
```typescript
import {
EnableCreditsMarkerGeneration,
EpisodeSort,
FlattenSeasons,
GetRecentlyAddedHubsResponseType,
GetRecentlyAddedHubsType,
@@ -34,8 +36,10 @@ let value: GetRecentlyAddedMetadata = {
year: 2022,
seasonCount: 2022,
tagline: "Return to Pandora.",
flattenSeasons: FlattenSeasons.True,
showOrdering: ShowOrdering.Dvd,
flattenSeasons: FlattenSeasons.Show,
episodeSort: EpisodeSort.OldestFirst,
enableCreditsMarkerGeneration: EnableCreditsMarkerGeneration.LibraryDefault,
showOrdering: ShowOrdering.TvdbDvd,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
banner: "/library/metadata/58683/banner/1703239236",
@@ -249,8 +253,10 @@ let value: GetRecentlyAddedMetadata = {
| `year` | *number* | :heavy_minus_sign: | N/A | 2022 |
| `seasonCount` | *number* | :heavy_minus_sign: | N/A | 2022 |
| `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. |
| `flattenSeasons` | [operations.FlattenSeasons](../../../sdk/models/operations/flattenseasons.md) | :heavy_minus_sign: | N/A | 1 |
| `showOrdering` | [operations.ShowOrdering](../../../sdk/models/operations/showordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show <br/>None = Library default, <br/>tmdbAiring = The Movie Database (Aired), <br/>aired = TheTVDB (Aired), <br/>dvd = TheTVDB (DVD), <br/>absolute = TheTVDB (Absolute)).<br/> | dvd |
| `flattenSeasons` | [operations.FlattenSeasons](../../../sdk/models/operations/flattenseasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 |
| `episodeSort` | [operations.EpisodeSort](../../../sdk/models/operations/episodesort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
| `enableCreditsMarkerGeneration` | [operations.EnableCreditsMarkerGeneration](../../../sdk/models/operations/enablecreditsmarkergeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
| `showOrdering` | [operations.ShowOrdering](../../../sdk/models/operations/showordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
| `banner` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 |

View File

@@ -4,6 +4,8 @@
```typescript
import {
EnableCreditsMarkerGeneration,
EpisodeSort,
FlattenSeasons,
GetRecentlyAddedActiveDirection,
GetRecentlyAddedDefaultDirection,
@@ -97,8 +99,11 @@ let value: GetRecentlyAddedResponse = {
year: 2022,
seasonCount: 2022,
tagline: "Return to Pandora.",
flattenSeasons: FlattenSeasons.True,
showOrdering: ShowOrdering.Dvd,
flattenSeasons: FlattenSeasons.Show,
episodeSort: EpisodeSort.OldestFirst,
enableCreditsMarkerGeneration:
EnableCreditsMarkerGeneration.LibraryDefault,
showOrdering: ShowOrdering.TvdbDvd,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
banner: "/library/metadata/58683/banner/1703239236",

View File

@@ -6,6 +6,8 @@ A successful response with recently added content.
```typescript
import {
EnableCreditsMarkerGeneration,
EpisodeSort,
FlattenSeasons,
GetRecentlyAddedActiveDirection,
GetRecentlyAddedDefaultDirection,
@@ -93,8 +95,11 @@ let value: GetRecentlyAddedResponseBody = {
year: 2022,
seasonCount: 2022,
tagline: "Return to Pandora.",
flattenSeasons: FlattenSeasons.True,
showOrdering: ShowOrdering.Dvd,
flattenSeasons: FlattenSeasons.Show,
episodeSort: EpisodeSort.OldestFirst,
enableCreditsMarkerGeneration:
EnableCreditsMarkerGeneration.LibraryDefault,
showOrdering: ShowOrdering.TvdbDvd,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
banner: "/library/metadata/58683/banner/1703239236",

View File

@@ -0,0 +1,19 @@
# GetSearchAllLibrariesEnableCreditsMarkerGeneration
Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
## Example Usage
```typescript
import { GetSearchAllLibrariesEnableCreditsMarkerGeneration } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetSearchAllLibrariesEnableCreditsMarkerGeneration =
GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault;
```
## Values
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `Disabled` | 0 |

View File

@@ -0,0 +1,20 @@
# GetSearchAllLibrariesEpisodeSort
Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
## Example Usage
```typescript
import { GetSearchAllLibrariesEpisodeSort } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetSearchAllLibrariesEpisodeSort =
GetSearchAllLibrariesEpisodeSort.OldestFirst;
```
## Values
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `OldestFirst` | 0 |
| `NewestFirst` | 1 |

View File

@@ -1,17 +1,20 @@
# GetSearchAllLibrariesFlattenSeasons
Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
## Example Usage
```typescript
import { GetSearchAllLibrariesFlattenSeasons } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetSearchAllLibrariesFlattenSeasons =
GetSearchAllLibrariesFlattenSeasons.True;
GetSearchAllLibrariesFlattenSeasons.Show;
```
## Values
| Name | Value |
| ------- | ------- |
| `False` | 0 |
| `True` | 1 |
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `Hide` | 0 |
| `Show` | 1 |

View File

@@ -1,15 +0,0 @@
# GetSearchAllLibrariesGlobals
## Example Usage
```typescript
import { GetSearchAllLibrariesGlobals } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetSearchAllLibrariesGlobals = {};
```
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `clientID` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |

View File

@@ -4,6 +4,8 @@
```typescript
import {
GetSearchAllLibrariesEnableCreditsMarkerGeneration,
GetSearchAllLibrariesEpisodeSort,
GetSearchAllLibrariesFlattenSeasons,
GetSearchAllLibrariesHasThumbnail,
GetSearchAllLibrariesLibraryType,
@@ -39,8 +41,11 @@ let value: GetSearchAllLibrariesMediaContainer = {
year: 2022,
seasonCount: 2022,
tagline: "Return to Pandora.",
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.True,
showOrdering: GetSearchAllLibrariesShowOrdering.Dvd,
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
episodeSort: GetSearchAllLibrariesEpisodeSort.OldestFirst,
enableCreditsMarkerGeneration:
GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault,
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
banner: "/library/metadata/58683/banner/1703239236",

View File

@@ -4,6 +4,8 @@
```typescript
import {
GetSearchAllLibrariesEnableCreditsMarkerGeneration,
GetSearchAllLibrariesEpisodeSort,
GetSearchAllLibrariesFlattenSeasons,
GetSearchAllLibrariesHasThumbnail,
GetSearchAllLibrariesLibraryType,
@@ -34,8 +36,11 @@ let value: GetSearchAllLibrariesMetadata = {
year: 2022,
seasonCount: 2022,
tagline: "Return to Pandora.",
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.True,
showOrdering: GetSearchAllLibrariesShowOrdering.Dvd,
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
episodeSort: GetSearchAllLibrariesEpisodeSort.OldestFirst,
enableCreditsMarkerGeneration:
GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault,
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
banner: "/library/metadata/58683/banner/1703239236",
@@ -249,8 +254,10 @@ let value: GetSearchAllLibrariesMetadata = {
| `year` | *number* | :heavy_minus_sign: | N/A | 2022 |
| `seasonCount` | *number* | :heavy_minus_sign: | N/A | 2022 |
| `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. |
| `flattenSeasons` | [operations.GetSearchAllLibrariesFlattenSeasons](../../../sdk/models/operations/getsearchalllibrariesflattenseasons.md) | :heavy_minus_sign: | N/A | 1 |
| `showOrdering` | [operations.GetSearchAllLibrariesShowOrdering](../../../sdk/models/operations/getsearchalllibrariesshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show <br/>None = Library default, <br/>tmdbAiring = The Movie Database (Aired), <br/>aired = TheTVDB (Aired), <br/>dvd = TheTVDB (DVD), <br/>absolute = TheTVDB (Absolute)).<br/> | dvd |
| `flattenSeasons` | [operations.GetSearchAllLibrariesFlattenSeasons](../../../sdk/models/operations/getsearchalllibrariesflattenseasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 |
| `episodeSort` | [operations.GetSearchAllLibrariesEpisodeSort](../../../sdk/models/operations/getsearchalllibrariesepisodesort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
| `enableCreditsMarkerGeneration` | [operations.GetSearchAllLibrariesEnableCreditsMarkerGeneration](../../../sdk/models/operations/getsearchalllibrariesenablecreditsmarkergeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
| `showOrdering` | [operations.GetSearchAllLibrariesShowOrdering](../../../sdk/models/operations/getsearchalllibrariesshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
| `banner` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 |

View File

@@ -12,6 +12,7 @@ import {
let value: GetSearchAllLibrariesRequest = {
query: "<value>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
searchTypes: [
SearchTypes.OtherVideos,
],
@@ -25,7 +26,7 @@ let value: GetSearchAllLibrariesRequest = {
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `query` | *string* | :heavy_check_mark: | The search query term. | |
| `clientID` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `limit` | *number* | :heavy_minus_sign: | Limit the number of results returned. | |
| `searchTypes` | [operations.SearchTypes](../../../sdk/models/operations/searchtypes.md)[] | :heavy_minus_sign: | A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv.<br/> | movies,music,otherVideos,people,tv |
| `includeCollections` | [operations.QueryParamIncludeCollections](../../../sdk/models/operations/queryparamincludecollections.md) | :heavy_minus_sign: | Whether to include collections in the search results. | 1 |

View File

@@ -4,6 +4,8 @@
```typescript
import {
GetSearchAllLibrariesEnableCreditsMarkerGeneration,
GetSearchAllLibrariesEpisodeSort,
GetSearchAllLibrariesFlattenSeasons,
GetSearchAllLibrariesHasThumbnail,
GetSearchAllLibrariesLibraryType,
@@ -22,7 +24,7 @@ let value: GetSearchAllLibrariesResponse = {
}),
object: {
mediaContainer: {
size: 8558.03,
size: 8558.04,
searchResult: [
{
score: 117.14,
@@ -46,8 +48,11 @@ let value: GetSearchAllLibrariesResponse = {
year: 2022,
seasonCount: 2022,
tagline: "Return to Pandora.",
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.True,
showOrdering: GetSearchAllLibrariesShowOrdering.Dvd,
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
episodeSort: GetSearchAllLibrariesEpisodeSort.OldestFirst,
enableCreditsMarkerGeneration:
GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault,
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
banner: "/library/metadata/58683/banner/1703239236",

View File

@@ -6,6 +6,8 @@ The libraries available on the Server
```typescript
import {
GetSearchAllLibrariesEnableCreditsMarkerGeneration,
GetSearchAllLibrariesEpisodeSort,
GetSearchAllLibrariesFlattenSeasons,
GetSearchAllLibrariesHasThumbnail,
GetSearchAllLibrariesLibraryType,
@@ -42,8 +44,11 @@ let value: GetSearchAllLibrariesResponseBody = {
year: 2022,
seasonCount: 2022,
tagline: "Return to Pandora.",
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.True,
showOrdering: GetSearchAllLibrariesShowOrdering.Dvd,
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
episodeSort: GetSearchAllLibrariesEpisodeSort.OldestFirst,
enableCreditsMarkerGeneration:
GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault,
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
banner: "/library/metadata/58683/banner/1703239236",

View File

@@ -1,11 +1,11 @@
# GetSearchAllLibrariesShowOrdering
Setting that indicates the episode ordering for the show
None = Library default,
tmdbAiring = The Movie Database (Aired),
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
Setting that indicates the episode ordering for the show
None = Library default,
tmdbAiring = The Movie Database (Aired),
tvdbAiring = TheTVDB (Aired),
tvdbDvd = TheTVDB (DVD),
tvdbAbsolute = TheTVDB (Absolute)).
## Example Usage
@@ -14,15 +14,15 @@ absolute = TheTVDB (Absolute)).
import { GetSearchAllLibrariesShowOrdering } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetSearchAllLibrariesShowOrdering =
GetSearchAllLibrariesShowOrdering.Dvd;
GetSearchAllLibrariesShowOrdering.TvdbDvd;
```
## Values
| Name | Value |
| ------------ | ------------ |
| `None` | None |
| `TmdbAiring` | tmdbAiring |
| `Aired` | aired |
| `Dvd` | dvd |
| `Absolute` | absolute |
| Name | Value |
| -------------- | -------------- |
| `None` | None |
| `TmdbAiring` | tmdbAiring |
| `TvdbAiring` | tvdbAiring |
| `TvdbDvd` | tvdbDvd |
| `TvdbAbsolute` | tvdbAbsolute |

View File

@@ -24,4 +24,7 @@ let value: GetSearchLibraryQueryParamType =
| `Movie` | 1 |
| `TvShow` | 2 |
| `Season` | 3 |
| `Episode` | 4 |
| `Episode` | 4 |
| `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |

View File

@@ -1,15 +0,0 @@
# GetServerResourcesGlobals
## Example Usage
```typescript
import { GetServerResourcesGlobals } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetServerResourcesGlobals = {};
```
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `clientID` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |

View File

@@ -9,6 +9,7 @@ let value: GetServerResourcesRequest = {
includeHttps: IncludeHttps.Enable,
includeRelay: IncludeRelay.Enable,
includeIPv6: IncludeIPv6.Enable,
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
};
```
@@ -19,4 +20,4 @@ let value: GetServerResourcesRequest = {
| `includeHttps` | [operations.IncludeHttps](../../../sdk/models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
| `includeRelay` | [operations.IncludeRelay](../../../sdk/models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
| `includeIPv6` | [operations.IncludeIPv6](../../../sdk/models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
| `clientID` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |

View File

@@ -25,6 +25,7 @@ let value: GetSessionsMediaContainer = {
librarySectionKey: "/library/sections/3",
librarySectionTitle: "Music",
musicAnalysisVersion: "1",
originalTitle: "The American Dream Is Killing Me",
parentGuid: "plex://album/65394d6d472b8ab03ef47f12",
parentIndex: 1,
parentKey: "/library/metadata/67084",

View File

@@ -22,6 +22,7 @@ let value: GetSessionsMetadata = {
librarySectionKey: "/library/sections/3",
librarySectionTitle: "Music",
musicAnalysisVersion: "1",
originalTitle: "The American Dream Is Killing Me",
parentGuid: "plex://album/65394d6d472b8ab03ef47f12",
parentIndex: 1,
parentKey: "/library/metadata/67084",
@@ -120,42 +121,43 @@ let value: GetSessionsMetadata = {
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705543312 |
| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 |
| `duration` | *number* | :heavy_minus_sign: | N/A | 186240 |
| `grandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 |
| `grandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://artist/5d07bbfd403c6402904a6480 |
| `grandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904 |
| `grandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 39904 |
| `grandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/thumb/1705310687 |
| `grandparentTitle` | *string* | :heavy_minus_sign: | N/A | Green Day |
| `guid` | *string* | :heavy_minus_sign: | N/A | plex://track/6535834f71f22f36f71a8e8f |
| `index` | *number* | :heavy_minus_sign: | N/A | 1 |
| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67085 |
| `librarySectionID` | *string* | :heavy_minus_sign: | N/A | 3 |
| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/3 |
| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Music |
| `musicAnalysisVersion` | *string* | :heavy_minus_sign: | N/A | 1 |
| `parentGuid` | *string* | :heavy_minus_sign: | N/A | plex://album/65394d6d472b8ab03ef47f12 |
| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 |
| `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084 |
| `parentRatingKey` | *string* | :heavy_minus_sign: | N/A | 67084 |
| `parentStudio` | *string* | :heavy_minus_sign: | N/A | Reprise Records |
| `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 |
| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Saviors |
| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2024 |
| `ratingCount` | *number* | :heavy_minus_sign: | N/A | 45885 |
| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 67085 |
| `sessionKey` | *string* | :heavy_minus_sign: | N/A | 203 |
| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 |
| `title` | *string* | :heavy_minus_sign: | N/A | The American Dream Is Killing Me |
| `titleSort` | *string* | :heavy_minus_sign: | N/A | American Dream Is Killing Me |
| `type` | *string* | :heavy_minus_sign: | N/A | track |
| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705543314 |
| `viewOffset` | *number* | :heavy_minus_sign: | N/A | 1000 |
| `media` | [operations.GetSessionsMedia](../../../sdk/models/operations/getsessionsmedia.md)[] | :heavy_minus_sign: | N/A | |
| `user` | [operations.GetSessionsUser](../../../sdk/models/operations/getsessionsuser.md) | :heavy_minus_sign: | N/A | |
| `player` | [operations.Player](../../../sdk/models/operations/player.md) | :heavy_minus_sign: | N/A | |
| `session` | [operations.Session](../../../sdk/models/operations/session.md) | :heavy_minus_sign: | N/A | |
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705543312 |
| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 |
| `duration` | *number* | :heavy_minus_sign: | N/A | 186240 |
| `grandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 |
| `grandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://artist/5d07bbfd403c6402904a6480 |
| `grandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904 |
| `grandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 39904 |
| `grandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/thumb/1705310687 |
| `grandparentTitle` | *string* | :heavy_minus_sign: | N/A | Green Day |
| `guid` | *string* | :heavy_minus_sign: | N/A | plex://track/6535834f71f22f36f71a8e8f |
| `index` | *number* | :heavy_minus_sign: | N/A | 1 |
| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67085 |
| `librarySectionID` | *string* | :heavy_minus_sign: | N/A | 3 |
| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/3 |
| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Music |
| `musicAnalysisVersion` | *string* | :heavy_minus_sign: | N/A | 1 |
| `originalTitle` | *string* | :heavy_minus_sign: | The original untranslated name of the media item when non-english, or the track artist if an audio Item has an album artist | The American Dream Is Killing Me |
| `parentGuid` | *string* | :heavy_minus_sign: | N/A | plex://album/65394d6d472b8ab03ef47f12 |
| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 |
| `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084 |
| `parentRatingKey` | *string* | :heavy_minus_sign: | N/A | 67084 |
| `parentStudio` | *string* | :heavy_minus_sign: | N/A | Reprise Records |
| `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 |
| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Saviors |
| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2024 |
| `ratingCount` | *number* | :heavy_minus_sign: | N/A | 45885 |
| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 67085 |
| `sessionKey` | *string* | :heavy_minus_sign: | N/A | 203 |
| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 |
| `title` | *string* | :heavy_minus_sign: | N/A | The American Dream Is Killing Me |
| `titleSort` | *string* | :heavy_minus_sign: | N/A | American Dream Is Killing Me |
| `type` | *string* | :heavy_minus_sign: | N/A | track |
| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705543314 |
| `viewOffset` | *number* | :heavy_minus_sign: | N/A | 1000 |
| `media` | [operations.GetSessionsMedia](../../../sdk/models/operations/getsessionsmedia.md)[] | :heavy_minus_sign: | N/A | |
| `user` | [operations.GetSessionsUser](../../../sdk/models/operations/getsessionsuser.md) | :heavy_minus_sign: | N/A | |
| `player` | [operations.Player](../../../sdk/models/operations/player.md) | :heavy_minus_sign: | N/A | |
| `session` | [operations.Session](../../../sdk/models/operations/session.md) | :heavy_minus_sign: | N/A | |

View File

@@ -32,6 +32,7 @@ let value: GetSessionsResponse = {
librarySectionKey: "/library/sections/3",
librarySectionTitle: "Music",
musicAnalysisVersion: "1",
originalTitle: "The American Dream Is Killing Me",
parentGuid: "plex://album/65394d6d472b8ab03ef47f12",
parentIndex: 1,
parentKey: "/library/metadata/67084",

View File

@@ -28,6 +28,7 @@ let value: GetSessionsResponseBody = {
librarySectionKey: "/library/sections/3",
librarySectionTitle: "Music",
musicAnalysisVersion: "1",
originalTitle: "The American Dream Is Killing Me",
parentGuid: "plex://album/65394d6d472b8ab03ef47f12",
parentIndex: 1,
parentKey: "/library/metadata/67084",

View File

@@ -1,19 +0,0 @@
# GetTokenByPinIdGlobals
## Example Usage
```typescript
import { GetTokenByPinIdGlobals } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetTokenByPinIdGlobals = {};
```
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `clientID` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `clientName` | *string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `deviceNickname` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `clientVersion` | *string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |
| `platform` | *string* | :heavy_minus_sign: | The platform of the client application. | Roku |

View File

@@ -7,6 +7,11 @@ import { GetTokenByPinIdRequest } from "@lukehagar/plexjs/sdk/models/operations"
let value: GetTokenByPinIdRequest = {
pinID: 396506,
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",
clientVersion: "2.4.1",
platform: "Roku",
};
```
@@ -15,7 +20,7 @@ let value: GetTokenByPinIdRequest = {
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `pinID` | *number* | :heavy_check_mark: | The PinID to retrieve an access token for | |
| `clientID` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `clientName` | *string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `deviceNickname` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `clientVersion` | *string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |

File diff suppressed because one or more lines are too long

View File

@@ -19,33 +19,22 @@ import {
} from "@lukehagar/plexjs/sdk/models/operations";
let value: GetTokenDetailsUserPlexAccount = {
adsConsent: true,
adsConsentReminderAt: new Date("2019-08-24T14:15:22Z"),
adsConsentSetAt: new Date("2019-08-24T14:15:22Z"),
anonymous: false,
adsConsent: false,
adsConsentReminderAt: 1556281940,
adsConsentSetAt: 1556281940,
authToken: "CxoUzBTSV5hsxjTpFKaf",
backupCodesCreated: false,
confirmed: false,
country: "US",
email: "username@email.com",
emailOnlyAuth: false,
experimentalFeatures: false,
friendlyName: "friendlyUsername",
entitlements: [
"[]",
],
guest: false,
hasPassword: true,
home: false,
homeAdmin: false,
homeSize: 1,
id: 13692262,
joinedAt: 1721154902,
locale: null,
mailingListActive: false,
mailingListStatus: MailingListStatus.Unsubscribed,
joinedAt: 1556281940,
locale: "ar",
mailingListStatus: MailingListStatus.Active,
maxHomeSize: 15,
pin: "string",
profile: {
autoSelectAudio: true,
defaultAudioLanguage: "ja",
@@ -56,48 +45,32 @@ let value: GetTokenDetailsUserPlexAccount = {
watchedIndicator: WatchedIndicator.Enable,
mediaReviewsVisibility: MediaReviewsVisibility.Enable,
},
protected: false,
rememberExpiresAt: 1722364046,
restricted: false,
roles: [
"string",
],
scrobbleTypes: "",
rememberExpiresAt: 1556281940,
scrobbleTypes: "<value>",
services: [
{
identifier: "metadata-dev",
endpoint: "https://epg.provider.plex.tv",
token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv",
secret: "string",
secret: "<value>",
status: GetTokenDetailsStatus.Online,
},
],
subscription: {
features: [
"Android - Dolby Vision",
],
active: true,
subscribedAt: "2021-04-12T18:21:12Z",
status: GetTokenDetailsAuthenticationStatus.Inactive,
paymentService: "string",
plan: "string",
},
subscriptionDescription: "string",
subscriptionDescription: "<value>",
subscriptions: [
{
features: [
"Android - Dolby Vision",
],
active: true,
subscribedAt: "2021-04-12T18:21:12Z",
status: GetTokenDetailsAuthenticationResponseStatus.Inactive,
paymentService: "string",
plan: "string",
},
],
thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101",
title: "UsernameTitle",
twoFactorEnabled: false,
username: "Username",
uuid: "dae343c1f45beb4f",
attributionPartner: null,
@@ -109,8 +82,8 @@ let value: GetTokenDetailsUserPlexAccount = {
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `adsConsent` | *boolean* | :heavy_check_mark: | Unknown | |
| `adsConsentReminderAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Unknown | |
| `adsConsentSetAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Unknown | |
| `adsConsentReminderAt` | *number* | :heavy_check_mark: | N/A | 1556281940 |
| `adsConsentSetAt` | *number* | :heavy_check_mark: | N/A | 1556281940 |
| `anonymous` | *boolean* | :heavy_minus_sign: | Unknown | |
| `authToken` | *string* | :heavy_check_mark: | The account token | CxoUzBTSV5hsxjTpFKaf |
| `backupCodesCreated` | *boolean* | :heavy_minus_sign: | If the two-factor authentication backup codes have been created | |

View File

@@ -24,4 +24,7 @@ let value: GetTopWatchedContentQueryParamType =
| `Movie` | 1 |
| `TvShow` | 2 |
| `Season` | 3 |
| `Episode` | 4 |
| `Episode` | 4 |
| `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |

View File

@@ -18,12 +18,8 @@ let value: GetUserFriendsResponse = {
home: true,
id: 0,
restricted: false,
sharedServers: [
{},
],
sharedSources: [
{},
],
sharedServers: [],
sharedSources: [],
status: Status.Accepted,
thumb: "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578",
title: "username123",

View File

@@ -1,19 +0,0 @@
# PostUsersSignInDataGlobals
## Example Usage
```typescript
import { PostUsersSignInDataGlobals } from "@lukehagar/plexjs/sdk/models/operations";
let value: PostUsersSignInDataGlobals = {};
```
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `clientID` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `clientName` | *string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `deviceNickname` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `clientVersion` | *string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |
| `platform` | *string* | :heavy_minus_sign: | The platform of the client application. | Roku |

View File

@@ -6,6 +6,11 @@
import { PostUsersSignInDataRequest } from "@lukehagar/plexjs/sdk/models/operations";
let value: PostUsersSignInDataRequest = {
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",
clientVersion: "2.4.1",
platform: "Roku",
requestBody: {
login: "username@email.com",
password: "password123",
@@ -18,7 +23,7 @@ let value: PostUsersSignInDataRequest = {
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `clientID` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `clientName` | *string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `deviceNickname` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `clientVersion` | *string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |

File diff suppressed because one or more lines are too long

View File

@@ -20,33 +20,22 @@ import {
} from "@lukehagar/plexjs/sdk/models/operations";
let value: PostUsersSignInDataUserPlexAccount = {
adsConsent: true,
adsConsentReminderAt: new Date("2019-08-24T14:15:22Z"),
adsConsentSetAt: new Date("2019-08-24T14:15:22Z"),
anonymous: false,
adsConsent: false,
adsConsentReminderAt: 1556281940,
adsConsentSetAt: 1556281940,
authToken: "CxoUzBTSV5hsxjTpFKaf",
backupCodesCreated: false,
confirmed: false,
country: "US",
email: "username@email.com",
emailOnlyAuth: false,
experimentalFeatures: false,
friendlyName: "friendlyUsername",
entitlements: [
"[]",
],
guest: false,
hasPassword: true,
home: false,
homeAdmin: false,
homeSize: 1,
id: 13692262,
joinedAt: 1721154902,
locale: null,
mailingListActive: false,
joinedAt: 1556281940,
locale: "pt",
mailingListStatus: PostUsersSignInDataMailingListStatus.Active,
maxHomeSize: 15,
pin: "string",
profile: {
autoSelectAudio: true,
defaultAudioLanguage: "ja",
@@ -58,66 +47,50 @@ let value: PostUsersSignInDataUserPlexAccount = {
watchedIndicator: PostUsersSignInDataWatchedIndicator.Enable,
mediaReviewsVisibility: PostUsersSignInDataMediaReviewsVisibility.Enable,
},
protected: false,
rememberExpiresAt: 1722364046,
restricted: false,
roles: [
"string",
],
scrobbleTypes: "",
rememberExpiresAt: 1556281940,
scrobbleTypes: "<value>",
services: [
{
identifier: "metadata-dev",
endpoint: "https://epg.provider.plex.tv",
token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv",
secret: "string",
secret: "<value>",
status: PostUsersSignInDataStatus.Online,
},
],
subscription: {
features: [
"Android - Dolby Vision",
],
active: true,
subscribedAt: "2021-04-12T18:21:12Z",
status: PostUsersSignInDataAuthenticationStatus.Inactive,
paymentService: "string",
plan: "string",
},
subscriptionDescription: "string",
subscriptionDescription: "<value>",
subscriptions: [
{
features: [
"Android - Dolby Vision",
],
active: true,
subscribedAt: "2021-04-12T18:21:12Z",
status: PostUsersSignInDataAuthenticationResponseStatus.Inactive,
paymentService: "string",
plan: "string",
},
],
thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101",
title: "UsernameTitle",
twoFactorEnabled: false,
username: "Username",
uuid: "dae343c1f45beb4f",
attributionPartner: null,
pastSubscriptions: [
{
id: "string",
mode: "string",
renewsAt: string,
id: "<id>",
mode: "<value>",
renewsAt: 1556281940,
endsAt: 1556281940,
canceled: true,
gracePeriod: true,
onHold: true,
canReactivate: true,
canUpgrade: true,
canDowngrade: true,
canConvert: true,
canceled: false,
gracePeriod: false,
onHold: false,
canReactivate: false,
canUpgrade: false,
canDowngrade: false,
canConvert: false,
type: "plexpass",
transfer: "string",
transfer: "<value>",
state: PostUsersSignInDataState.Ended,
billing: {
internalPaymentMethod: {},
@@ -136,8 +109,8 @@ let value: PostUsersSignInDataUserPlexAccount = {
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `adsConsent` | *boolean* | :heavy_check_mark: | Unknown | |
| `adsConsentReminderAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Unknown | |
| `adsConsentSetAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Unknown | |
| `adsConsentReminderAt` | *number* | :heavy_check_mark: | N/A | 1556281940 |
| `adsConsentSetAt` | *number* | :heavy_check_mark: | N/A | 1556281940 |
| `anonymous` | *boolean* | :heavy_minus_sign: | Unknown | |
| `authToken` | *string* | :heavy_check_mark: | The account token | CxoUzBTSV5hsxjTpFKaf |
| `backupCodesCreated` | *boolean* | :heavy_minus_sign: | If the two-factor authentication backup codes have been created | |

View File

@@ -23,4 +23,7 @@ let value: QueryParamType = QueryParamType.TvShow;
| `Movie` | 1 |
| `TvShow` | 2 |
| `Season` | 3 |
| `Episode` | 4 |
| `Episode` | 4 |
| `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |

View File

@@ -4,6 +4,8 @@
```typescript
import {
GetSearchAllLibrariesEnableCreditsMarkerGeneration,
GetSearchAllLibrariesEpisodeSort,
GetSearchAllLibrariesFlattenSeasons,
GetSearchAllLibrariesHasThumbnail,
GetSearchAllLibrariesLibraryType,
@@ -36,8 +38,11 @@ let value: SearchResult = {
year: 2022,
seasonCount: 2022,
tagline: "Return to Pandora.",
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.True,
showOrdering: GetSearchAllLibrariesShowOrdering.Dvd,
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
episodeSort: GetSearchAllLibrariesEpisodeSort.OldestFirst,
enableCreditsMarkerGeneration:
GetSearchAllLibrariesEnableCreditsMarkerGeneration.LibraryDefault,
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbDvd,
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
banner: "/library/metadata/58683/banner/1703239236",

View File

@@ -1,11 +1,11 @@
# ShowOrdering
Setting that indicates the episode ordering for the show
None = Library default,
tmdbAiring = The Movie Database (Aired),
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
Setting that indicates the episode ordering for the show
None = Library default,
tmdbAiring = The Movie Database (Aired),
tvdbAiring = TheTVDB (Aired),
tvdbDvd = TheTVDB (DVD),
tvdbAbsolute = TheTVDB (Absolute)).
## Example Usage
@@ -13,15 +13,15 @@ absolute = TheTVDB (Absolute)).
```typescript
import { ShowOrdering } from "@lukehagar/plexjs/sdk/models/operations";
let value: ShowOrdering = ShowOrdering.Dvd;
let value: ShowOrdering = ShowOrdering.TvdbDvd;
```
## Values
| Name | Value |
| ------------ | ------------ |
| `None` | None |
| `TmdbAiring` | tmdbAiring |
| `Aired` | aired |
| `Dvd` | dvd |
| `Absolute` | absolute |
| Name | Value |
| -------------- | -------------- |
| `None` | None |
| `TmdbAiring` | tmdbAiring |
| `TvdbAiring` | tvdbAiring |
| `TvdbDvd` | tvdbDvd |
| `TvdbAbsolute` | tvdbAbsolute |

View File

@@ -7,7 +7,7 @@ A key representing a specific tag within the section.
```typescript
import { Tag } from "@lukehagar/plexjs/sdk/models/operations";
let value: Tag = Tag.Unwatched;
let value: Tag = Tag.Newest;
```
## Values
@@ -32,4 +32,5 @@ let value: Tag = Tag.Unwatched;
| `Rating` | rating |
| `Resolution` | resolution |
| `FirstCharacter` | firstCharacter |
| `Folder` | folder |
| `Folder` | folder |
| `Albums` | albums |

View File

@@ -23,4 +23,7 @@ let value: Type = Type.TvShow;
| `Movie` | 1 |
| `TvShow` | 2 |
| `Season` | 3 |
| `Episode` | 4 |
| `Episode` | 4 |
| `Audio` | 8 |
| `Album` | 9 |
| `Track` | 10 |

View File

@@ -28,11 +28,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -57,11 +52,6 @@ import { activitiesGetServerActivities } from "@lukehagar/plexjs/funcs/activitie
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -111,11 +101,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -140,11 +125,6 @@ import { activitiesCancelServerActivities } from "@lukehagar/plexjs/funcs/activi
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -26,11 +26,6 @@ import { GetTransientTokenQueryParamType, Scope } from "@lukehagar/plexjs/sdk/mo
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -56,11 +51,6 @@ import { GetTransientTokenQueryParamType, Scope } from "@lukehagar/plexjs/sdk/mo
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -114,11 +104,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -143,11 +128,6 @@ import { authenticationGetSourceConnectionInformation } from "@lukehagar/plexjs/
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -198,11 +178,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -227,11 +202,6 @@ import { authenticationGetTokenDetails } from "@lukehagar/plexjs/funcs/authentic
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -280,19 +250,19 @@ Sign in user with username and password and return user data with Plex authentic
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPI();
async function run() {
const result = await plexAPI.authentication.postUsersSignInData({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",
clientVersion: "2.4.1",
platform: "Roku",
requestBody: {
login: "username@email.com",
password: "password123",
rememberMe: false,
verificationCode: "123456",
},
});
@@ -314,19 +284,19 @@ import { authenticationPostUsersSignInData } from "@lukehagar/plexjs/funcs/authe
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPICore();
async function run() {
const res = await authenticationPostUsersSignInData(plexAPI, {
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",
clientVersion: "2.4.1",
platform: "Roku",
requestBody: {
login: "username@email.com",
password: "password123",
rememberMe: false,
verificationCode: "123456",
},
});

View File

@@ -25,11 +25,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -54,11 +49,6 @@ import { butlerGetButlerTasks } from "@lukehagar/plexjs/funcs/butlerGetButlerTas
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -113,11 +103,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -142,11 +127,6 @@ import { butlerStartAllTasks } from "@lukehagar/plexjs/funcs/butlerStartAllTasks
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -197,11 +177,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -226,11 +201,6 @@ import { butlerStopAllTasks } from "@lukehagar/plexjs/funcs/butlerStopAllTasks.j
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -286,11 +256,6 @@ import { TaskName } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -316,11 +281,6 @@ import { TaskName } from "@lukehagar/plexjs/sdk/models/operations";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -373,11 +333,6 @@ import { PathParamTaskName } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -403,11 +358,6 @@ import { PathParamTaskName } from "@lukehagar/plexjs/sdk/models/operations";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -23,11 +23,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -52,11 +47,6 @@ import { hubsGetGlobalHubs } from "@lukehagar/plexjs/funcs/hubsGetGlobalHubs.js"
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -110,11 +100,6 @@ import { IncludeMeta, Type } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -147,11 +132,6 @@ import { IncludeMeta, Type } from "@lukehagar/plexjs/sdk/models/operations";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -208,11 +188,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -237,11 +212,6 @@ import { hubsGetLibraryHubs } from "@lukehagar/plexjs/funcs/hubsGetLibraryHubs.j
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -33,11 +33,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -62,11 +57,6 @@ import { libraryGetFileHash } from "@lukehagar/plexjs/funcs/libraryGetFileHash.j
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -120,11 +110,6 @@ import { QueryParamIncludeMeta, QueryParamType } from "@lukehagar/plexjs/sdk/mod
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -171,11 +156,6 @@ import { QueryParamIncludeMeta, QueryParamType } from "@lukehagar/plexjs/sdk/mod
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -253,11 +233,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -282,11 +257,6 @@ import { libraryGetAllLibraries } from "@lukehagar/plexjs/funcs/libraryGetAllLib
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -372,18 +342,14 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
import { IncludeDetails } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
const result = await plexAPI.library.getLibraryDetails(9518);
const result = await plexAPI.library.getLibraryDetails(9518, IncludeDetails.Zero);
// Handle the result
console.log(result);
@@ -399,20 +365,16 @@ The standalone function version of this method:
```typescript
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryGetLibraryDetails } from "@lukehagar/plexjs/funcs/libraryGetLibraryDetails.js";
import { IncludeDetails } from "@lukehagar/plexjs/sdk/models/operations";
// 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>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
const res = await libraryGetLibraryDetails(plexAPI, 9518);
const res = await libraryGetLibraryDetails(plexAPI, 9518, IncludeDetails.Zero);
if (!res.ok) {
throw res.error;
@@ -460,11 +422,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -489,11 +446,6 @@ import { libraryDeleteLibrary } from "@lukehagar/plexjs/funcs/libraryDeleteLibra
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -555,6 +507,7 @@ Fetches details from a specific section of the library identified by a section k
- `resolution`: Items categorized by resolution.
- `firstCharacter`: Items categorized by the first letter.
- `folder`: Items categorized by folder.
- `albums`: Items categorized by album.
### Example Usage
@@ -570,11 +523,6 @@ import {
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -613,11 +561,6 @@ import {
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -678,11 +621,6 @@ import { Force } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -708,11 +646,6 @@ import { Force } from "@lukehagar/plexjs/sdk/models/operations";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -783,11 +716,6 @@ import { GetSearchLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/ope
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -813,11 +741,6 @@ import { GetSearchLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/ope
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -871,16 +794,12 @@ import { QueryParamIncludeCollections, QueryParamIncludeExternalMedia, SearchTyp
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
const result = await plexAPI.library.getSearchAllLibraries({
query: "<value>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
searchTypes: [
SearchTypes.People,
],
@@ -908,16 +827,12 @@ import { QueryParamIncludeCollections, QueryParamIncludeExternalMedia, SearchTyp
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
const res = await libraryGetSearchAllLibraries(plexAPI, {
query: "<value>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
searchTypes: [
SearchTypes.People,
],
@@ -971,11 +886,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1000,11 +910,6 @@ import { libraryGetMetaDataByRatingKey } from "@lukehagar/plexjs/funcs/libraryGe
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1056,11 +961,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1085,11 +985,6 @@ import { libraryGetMetadataChildren } from "@lukehagar/plexjs/funcs/libraryGetMe
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1143,11 +1038,6 @@ import { GetTopWatchedContentQueryParamType } from "@lukehagar/plexjs/sdk/models
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1173,11 +1063,6 @@ import { GetTopWatchedContentQueryParamType } from "@lukehagar/plexjs/sdk/models
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1230,11 +1115,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -1259,11 +1139,6 @@ import { libraryGetOnDeck } from "@lukehagar/plexjs/funcs/libraryGetOnDeck.js";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -25,11 +25,6 @@ import { Level } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -55,11 +50,6 @@ import { Level } from "@lukehagar/plexjs/sdk/models/operations";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -133,11 +123,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -164,11 +149,6 @@ import { logLogMultiLine } from "@lukehagar/plexjs/funcs/logLogMultiLine.js";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -222,11 +202,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -251,11 +226,6 @@ import { logEnablePaperTrail } from "@lukehagar/plexjs/funcs/logEnablePaperTrail
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -25,11 +25,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -54,11 +49,6 @@ import { mediaMarkPlayed } from "@lukehagar/plexjs/funcs/mediaMarkPlayed.js";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -109,11 +99,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -138,11 +123,6 @@ import { mediaMarkUnplayed } from "@lukehagar/plexjs/funcs/mediaMarkUnplayed.js"
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -194,11 +174,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -223,11 +198,6 @@ import { mediaUpdatePlayProgress } from "@lukehagar/plexjs/funcs/mediaUpdatePlay
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -280,11 +250,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -316,11 +281,6 @@ import { mediaGetBannerImage } from "@lukehagar/plexjs/funcs/mediaGetBannerImage
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -378,11 +338,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -414,11 +369,6 @@ import { mediaGetThumbImage } from "@lukehagar/plexjs/funcs/mediaGetThumbImage.j
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -36,11 +36,6 @@ import { CreatePlaylistQueryParamType, Smart } from "@lukehagar/plexjs/sdk/model
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -48,7 +43,7 @@ async function run() {
title: "<value>",
type: CreatePlaylistQueryParamType.Photo,
smart: Smart.One,
uri: "https://inborn-brochure.biz",
uri: "https://hoarse-testing.info/",
});
// Handle the result
@@ -71,11 +66,6 @@ import { CreatePlaylistQueryParamType, Smart } from "@lukehagar/plexjs/sdk/model
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -83,7 +73,7 @@ async function run() {
title: "<value>",
type: CreatePlaylistQueryParamType.Photo,
smart: Smart.One,
uri: "https://inborn-brochure.biz",
uri: "https://hoarse-testing.info/",
});
if (!res.ok) {
@@ -131,11 +121,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -160,11 +145,6 @@ import { playlistsGetPlaylists } from "@lukehagar/plexjs/funcs/playlistsGetPlayl
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -218,11 +198,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -247,11 +222,6 @@ import { playlistsGetPlaylist } from "@lukehagar/plexjs/funcs/playlistsGetPlayli
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -303,11 +273,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -332,11 +297,6 @@ import { playlistsDeletePlaylist } from "@lukehagar/plexjs/funcs/playlistsDelete
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -388,11 +348,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -417,11 +372,6 @@ import { playlistsUpdatePlaylist } from "@lukehagar/plexjs/funcs/playlistsUpdate
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -479,11 +429,6 @@ import { GetPlaylistContentsQueryParamType } from "@lukehagar/plexjs/sdk/models/
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -509,11 +454,6 @@ import { GetPlaylistContentsQueryParamType } from "@lukehagar/plexjs/sdk/models/
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -566,11 +506,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -595,11 +530,6 @@ import { playlistsClearPlaylistContents } from "@lukehagar/plexjs/funcs/playlist
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -652,11 +582,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -681,11 +606,6 @@ import { playlistsAddPlaylistContents } from "@lukehagar/plexjs/funcs/playlistsA
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -740,11 +660,6 @@ import { QueryParamForce } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -770,11 +685,6 @@ import { QueryParamForce } from "@lukehagar/plexjs/sdk/models/operations";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -27,11 +27,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -56,11 +51,6 @@ import { plexGetCompanionsData } from "@lukehagar/plexjs/funcs/plexGetCompanions
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -111,11 +101,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -140,11 +125,6 @@ import { plexGetUserFriends } from "@lukehagar/plexjs/funcs/plexGetUserFriends.j
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -193,13 +173,7 @@ Returns the geolocation and locale data of the caller
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPI();
async function run() {
const result = await plexAPI.plex.getGeoData();
@@ -221,13 +195,7 @@ import { plexGetGeoData } from "@lukehagar/plexjs/funcs/plexGetGeoData.js";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPICore();
async function run() {
const res = await plexGetGeoData(plexAPI);
@@ -277,11 +245,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -306,11 +269,6 @@ import { plexGetHomeData } from "@lukehagar/plexjs/funcs/plexGetHomeData.js";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -361,15 +319,10 @@ import { IncludeHttps, IncludeIPv6, IncludeRelay } from "@lukehagar/plexjs/sdk/m
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
const result = await plexAPI.plex.getServerResources(IncludeHttps.Enable, IncludeRelay.Enable, IncludeIPv6.Enable, "3381b62b-9ab7-4e37-827b-203e9809eb58");
const result = await plexAPI.plex.getServerResources("3381b62b-9ab7-4e37-827b-203e9809eb58", IncludeHttps.Enable, IncludeRelay.Enable, IncludeIPv6.Enable);
// Handle the result
console.log(result);
@@ -391,15 +344,10 @@ import { IncludeHttps, IncludeIPv6, IncludeRelay } from "@lukehagar/plexjs/sdk/m
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
const res = await plexGetServerResources(plexAPI, IncludeHttps.Enable, IncludeRelay.Enable, IncludeIPv6.Enable, "3381b62b-9ab7-4e37-827b-203e9809eb58");
const res = await plexGetServerResources(plexAPI, "3381b62b-9ab7-4e37-827b-203e9809eb58", IncludeHttps.Enable, IncludeRelay.Enable, IncludeIPv6.Enable);
if (!res.ok) {
throw res.error;
@@ -418,10 +366,10 @@ run();
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | [object Object] |
| `includeHttps` | [operations.IncludeHttps](../../sdk/models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | [object Object] |
| `includeRelay` | [operations.IncludeRelay](../../sdk/models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | [object Object] |
| `includeIPv6` | [operations.IncludeIPv6](../../sdk/models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | [object Object] |
| `clientID` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | [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. | |
@@ -448,16 +396,17 @@ Retrieve a Pin ID from Plex.tv to use for authentication flows
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPI();
async function run() {
const result = await plexAPI.plex.getPin({});
const result = await plexAPI.plex.getPin({
strong: false,
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",
clientVersion: "2.4.1",
platform: "Roku",
});
// Handle the result
console.log(result);
@@ -476,16 +425,17 @@ import { plexGetPin } from "@lukehagar/plexjs/funcs/plexGetPin.js";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPICore();
async function run() {
const res = await plexGetPin(plexAPI, {});
const res = await plexGetPin(plexAPI, {
strong: false,
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",
clientVersion: "2.4.1",
platform: "Roku",
});
if (!res.ok) {
throw res.error;
@@ -530,17 +480,16 @@ Retrieve an Access Token from Plex.tv after the Pin has been authenticated
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPI();
async function run() {
const result = await plexAPI.plex.getTokenByPinId({
pinID: 408895,
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",
clientVersion: "2.4.1",
platform: "Roku",
});
// Handle the result
@@ -560,17 +509,16 @@ import { plexGetTokenByPinId } from "@lukehagar/plexjs/funcs/plexGetTokenByPinId
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPICore();
async function run() {
const res = await plexGetTokenByPinId(plexAPI, {
pinID: 408895,
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",
clientVersion: "2.4.1",
platform: "Roku",
});
if (!res.ok) {

View File

@@ -26,3 +26,6 @@ The following SDKs are generated from the OpenAPI Specification. They are automa
| PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - |
| Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - |
| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | -
### Available Operations

View File

@@ -35,11 +35,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -64,11 +59,6 @@ import { searchPerformSearch } from "@lukehagar/plexjs/funcs/searchPerformSearch
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -125,11 +115,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -154,11 +139,6 @@ import { searchPerformVoiceSearch } from "@lukehagar/plexjs/funcs/searchPerformV
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -211,11 +191,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -240,11 +215,6 @@ import { searchGetSearchResults } from "@lukehagar/plexjs/funcs/searchGetSearchR
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -29,11 +29,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -58,11 +53,6 @@ import { serverGetServerCapabilities } from "@lukehagar/plexjs/funcs/serverGetSe
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -112,11 +102,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -141,11 +126,6 @@ import { serverGetServerPreferences } from "@lukehagar/plexjs/funcs/serverGetSer
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -195,11 +175,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -224,11 +199,6 @@ import { serverGetAvailableClients } from "@lukehagar/plexjs/funcs/serverGetAvai
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -278,11 +248,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -307,11 +272,6 @@ import { serverGetDevices } from "@lukehagar/plexjs/funcs/serverGetDevices.js";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -359,13 +319,7 @@ This request is useful to determine if the server is online or offline
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPI();
async function run() {
const result = await plexAPI.server.getServerIdentity();
@@ -387,13 +341,7 @@ import { serverGetServerIdentity } from "@lukehagar/plexjs/funcs/serverGetServer
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
const plexAPI = new PlexAPICore();
async function run() {
const res = await serverGetServerIdentity(plexAPI);
@@ -441,11 +389,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -470,11 +413,6 @@ import { serverGetMyPlexAccount } from "@lukehagar/plexjs/funcs/serverGetMyPlexA
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -526,11 +464,6 @@ import { MinSize, Upscale } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -564,11 +497,6 @@ import { MinSize, Upscale } from "@lukehagar/plexjs/sdk/models/operations";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -627,11 +555,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -656,11 +579,6 @@ import { serverGetMediaProviders } from "@lukehagar/plexjs/funcs/serverGetMediaP
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -711,11 +629,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -740,11 +653,6 @@ import { serverGetServerList } from "@lukehagar/plexjs/funcs/serverGetServerList
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -24,11 +24,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -53,11 +48,6 @@ import { sessionsGetSessions } from "@lukehagar/plexjs/funcs/sessionsGetSessions
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -107,11 +97,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -136,11 +121,6 @@ import { sessionsGetSessionHistory } from "@lukehagar/plexjs/funcs/sessionsGetSe
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -194,11 +174,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -223,11 +198,6 @@ import { sessionsGetTranscodeSessions } from "@lukehagar/plexjs/funcs/sessionsGe
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -277,11 +247,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -306,11 +271,6 @@ import { sessionsStopTranscodeSession } from "@lukehagar/plexjs/funcs/sessionsSt
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -23,11 +23,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -52,11 +47,6 @@ import { statisticsGetStatistics } from "@lukehagar/plexjs/funcs/statisticsGetSt
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -107,11 +97,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -136,11 +121,6 @@ import { statisticsGetResourcesStatistics } from "@lukehagar/plexjs/funcs/statis
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -191,11 +171,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -220,11 +195,6 @@ import { statisticsGetBandwidthStatistics } from "@lukehagar/plexjs/funcs/statis
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -24,11 +24,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -53,11 +48,6 @@ import { updaterGetUpdateStatus } from "@lukehagar/plexjs/funcs/updaterGetUpdate
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -108,11 +98,6 @@ import { Download } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -138,11 +123,6 @@ import { Download } from "@lukehagar/plexjs/sdk/models/operations";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -195,11 +175,6 @@ import { Skip, Tonight } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -225,11 +200,6 @@ import { Skip, Tonight } from "@lukehagar/plexjs/sdk/models/operations";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -23,11 +23,6 @@ import { State } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -64,11 +59,6 @@ import { State } from "@lukehagar/plexjs/sdk/models/operations";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -130,11 +120,6 @@ import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -176,11 +161,6 @@ import { videoStartUniversalTranscode } from "@lukehagar/plexjs/funcs/videoStart
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -22,11 +22,6 @@ import { Filter } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {
@@ -57,11 +52,6 @@ import { Filter } from "@lukehagar/plexjs/sdk/models/operations";
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
clientVersion: "2.4.1",
platform: "Roku",
deviceNickname: "Roku 3",
});
async function run() {

View File

@@ -2,7 +2,7 @@
{
"name": "@lukehagar/plexjs",
"version": "0.25.1",
"version": "0.32.2",
"exports": {
".": "./src/index.ts",
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@lukehagar/plexjs",
"version": "0.25.1",
"version": "0.32.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@lukehagar/plexjs",
"version": "0.25.1",
"version": "0.32.2",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@lukehagar/plexjs",
"version": "0.25.1",
"version": "0.32.2",
"author": "LukeHagar",
"main": "./index.js",
"sideEffects": false,

View File

@@ -5,6 +5,7 @@
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";
@@ -71,22 +72,31 @@ export async function activitiesCancelServerActivities(
const path = pathToFunc("/activities/{activityUUID}")(pathParams);
const headers = new Headers({
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 = {
operationID: "cancelServerActivities",
oAuth2Scopes: [],
resolvedSecurity: requestSecurity,
securitySource: client._options.accessToken,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};
const requestSecurity = resolveGlobalSecurity(securityInput);
const requestRes = client._createRequest(context, {
security: requestSecurity,
method: "DELETE",
baseURL: options?.serverURL,
path: path,
headers: headers,
body: body,
@@ -100,19 +110,8 @@ export async function activitiesCancelServerActivities(
const doResult = await client._do(req, {
context,
errorCodes: ["400", "401", "4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig
|| {
strategy: "backoff",
backoff: {
initialInterval: 500,
maxInterval: 60000,
exponent: 1.5,
maxElapsedTime: 3600000,
},
retryConnectionErrors: true,
},
retryCodes: options?.retryCodes || ["5XX"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
@@ -142,7 +141,8 @@ export async function activitiesCancelServerActivities(
M.nil(200, operations.CancelServerActivitiesResponse$inboundSchema),
M.jsonErr(400, errors.CancelServerActivitiesBadRequest$inboundSchema),
M.jsonErr(401, errors.CancelServerActivitiesUnauthorized$inboundSchema),
M.fail(["4XX", "5XX"]),
M.fail("4XX"),
M.fail("5XX"),
)(response, { extraFields: responseFields });
if (!result.ok) {
return result;

View File

@@ -4,6 +4,7 @@
import { PlexAPICore } from "../core.js";
import * as M from "../lib/matchers.js";
import { compactMap } from "../lib/primitives.js";
import { RequestOptions } from "../lib/sdks.js";
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
import { pathToFunc } from "../lib/url.js";
@@ -45,22 +46,31 @@ export async function activitiesGetServerActivities(
> {
const path = pathToFunc("/activities")();
const headers = new Headers({
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 = {
operationID: "getServerActivities",
oAuth2Scopes: [],
resolvedSecurity: requestSecurity,
securitySource: client._options.accessToken,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};
const requestSecurity = resolveGlobalSecurity(securityInput);
const requestRes = client._createRequest(context, {
security: requestSecurity,
method: "GET",
baseURL: options?.serverURL,
path: path,
headers: headers,
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
@@ -73,19 +83,8 @@ export async function activitiesGetServerActivities(
const doResult = await client._do(req, {
context,
errorCodes: ["400", "401", "4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig
|| {
strategy: "backoff",
backoff: {
initialInterval: 500,
maxInterval: 60000,
exponent: 1.5,
maxElapsedTime: 3600000,
},
retryConnectionErrors: true,
},
retryCodes: options?.retryCodes || ["5XX"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
@@ -117,7 +116,8 @@ export async function activitiesGetServerActivities(
}),
M.jsonErr(400, errors.GetServerActivitiesBadRequest$inboundSchema),
M.jsonErr(401, errors.GetServerActivitiesUnauthorized$inboundSchema),
M.fail(["4XX", "5XX"]),
M.fail("4XX"),
M.fail("5XX"),
)(response, { extraFields: responseFields });
if (!result.ok) {
return result;

View File

@@ -5,6 +5,7 @@
import { PlexAPICore } from "../core.js";
import { encodeFormQuery } 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";
@@ -71,22 +72,31 @@ export async function authenticationGetSourceConnectionInformation(
"source": payload.source,
});
const headers = new Headers({
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 = {
operationID: "getSourceConnectionInformation",
oAuth2Scopes: [],
resolvedSecurity: requestSecurity,
securitySource: client._options.accessToken,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};
const requestSecurity = resolveGlobalSecurity(securityInput);
const requestRes = client._createRequest(context, {
security: requestSecurity,
method: "GET",
baseURL: options?.serverURL,
path: path,
headers: headers,
query: query,
@@ -101,19 +111,8 @@ export async function authenticationGetSourceConnectionInformation(
const doResult = await client._do(req, {
context,
errorCodes: ["400", "401", "4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig
|| {
strategy: "backoff",
backoff: {
initialInterval: 500,
maxInterval: 60000,
exponent: 1.5,
maxElapsedTime: 3600000,
},
retryConnectionErrors: true,
},
retryCodes: options?.retryCodes || ["5XX"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
@@ -149,7 +148,8 @@ export async function authenticationGetSourceConnectionInformation(
401,
errors.GetSourceConnectionInformationUnauthorized$inboundSchema,
),
M.fail(["4XX", "5XX"]),
M.fail("4XX"),
M.fail("5XX"),
)(response, { extraFields: responseFields });
if (!result.ok) {
return result;

View File

@@ -4,6 +4,7 @@
import { PlexAPICore } from "../core.js";
import * as M from "../lib/matchers.js";
import { compactMap } from "../lib/primitives.js";
import { RequestOptions } from "../lib/sdks.js";
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
import { pathToFunc } from "../lib/url.js";
@@ -29,7 +30,7 @@ import { Result } from "../sdk/types/fp.js";
*/
export async function authenticationGetTokenDetails(
client: PlexAPICore,
options?: RequestOptions & { serverURL?: string },
options?: RequestOptions,
): Promise<
Result<
operations.GetTokenDetailsResponse,
@@ -49,18 +50,26 @@ export async function authenticationGetTokenDetails(
const path = pathToFunc("/user")();
const headers = new Headers({
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 = {
operationID: "getTokenDetails",
oAuth2Scopes: [],
resolvedSecurity: requestSecurity,
securitySource: client._options.accessToken,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};
const requestSecurity = resolveGlobalSecurity(securityInput);
const requestRes = client._createRequest(context, {
security: requestSecurity,
@@ -78,19 +87,8 @@ export async function authenticationGetTokenDetails(
const doResult = await client._do(req, {
context,
errorCodes: ["400", "401", "4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig
|| {
strategy: "backoff",
backoff: {
initialInterval: 500,
maxInterval: 60000,
exponent: 1.5,
maxElapsedTime: 3600000,
},
retryConnectionErrors: true,
},
retryCodes: options?.retryCodes || ["5XX"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
@@ -122,7 +120,8 @@ export async function authenticationGetTokenDetails(
}),
M.jsonErr(400, errors.GetTokenDetailsBadRequest$inboundSchema),
M.jsonErr(401, errors.GetTokenDetailsUnauthorized$inboundSchema),
M.fail(["4XX", "5XX"]),
M.fail("4XX"),
M.fail("5XX"),
)(response, { extraFields: responseFields });
if (!result.ok) {
return result;

View File

@@ -5,6 +5,7 @@
import { PlexAPICore } from "../core.js";
import { encodeFormQuery } 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";
@@ -70,22 +71,31 @@ export async function authenticationGetTransientToken(
"type": payload.type,
});
const headers = new Headers({
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 = {
operationID: "getTransientToken",
oAuth2Scopes: [],
resolvedSecurity: requestSecurity,
securitySource: client._options.accessToken,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};
const requestSecurity = resolveGlobalSecurity(securityInput);
const requestRes = client._createRequest(context, {
security: requestSecurity,
method: "GET",
baseURL: options?.serverURL,
path: path,
headers: headers,
query: query,
@@ -100,19 +110,8 @@ export async function authenticationGetTransientToken(
const doResult = await client._do(req, {
context,
errorCodes: ["400", "401", "4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig
|| {
strategy: "backoff",
backoff: {
initialInterval: 500,
maxInterval: 60000,
exponent: 1.5,
maxElapsedTime: 3600000,
},
retryConnectionErrors: true,
},
retryCodes: options?.retryCodes || ["5XX"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
@@ -142,7 +141,8 @@ export async function authenticationGetTransientToken(
M.nil(200, operations.GetTransientTokenResponse$inboundSchema),
M.jsonErr(400, errors.GetTransientTokenBadRequest$inboundSchema),
M.jsonErr(401, errors.GetTransientTokenUnauthorized$inboundSchema),
M.fail(["4XX", "5XX"]),
M.fail("4XX"),
M.fail("5XX"),
)(response, { extraFields: responseFields });
if (!result.ok) {
return result;

View File

@@ -5,6 +5,7 @@
import { PlexAPICore } from "../core.js";
import { encodeBodyForm, 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 { pathToFunc } from "../lib/url.js";
@@ -31,7 +32,7 @@ import { Result } from "../sdk/types/fp.js";
export async function authenticationPostUsersSignInData(
client: PlexAPICore,
request: operations.PostUsersSignInDataRequest,
options?: RequestOptions & { serverURL?: string },
options?: RequestOptions,
): Promise<
Result<
operations.PostUsersSignInDataResponse,
@@ -46,10 +47,8 @@ export async function authenticationPostUsersSignInData(
| ConnectionError
>
> {
const input = request;
const parsed = safeParse(
input,
request,
(value) =>
operations.PostUsersSignInDataRequest$outboundSchema.parse(value),
"Input validation failed",
@@ -70,7 +69,7 @@ export async function authenticationPostUsersSignInData(
const path = pathToFunc("/users/signin")();
const headers = new Headers({
const headers = new Headers(compactMap({
"Content-Type": "application/x-www-form-urlencoded",
Accept: "application/json",
"X-Plex-Client-Identifier": encodeSimple(
@@ -94,37 +93,19 @@ export async function authenticationPostUsersSignInData(
explode: false,
charEncoding: "none",
}),
"X-Plex-Client-Identifier": encodeSimple(
"X-Plex-Client-Identifier",
client._options.clientID,
{ explode: false, charEncoding: "none" },
),
"X-Plex-Device": encodeSimple(
"X-Plex-Device",
client._options.deviceNickname,
{ explode: false, charEncoding: "none" },
),
"X-Plex-Platform": encodeSimple(
"X-Plex-Platform",
client._options.platform,
{ explode: false, charEncoding: "none" },
),
"X-Plex-Product": encodeSimple(
"X-Plex-Product",
client._options.clientName,
{ explode: false, charEncoding: "none" },
),
"X-Plex-Version": encodeSimple(
"X-Plex-Version",
client._options.clientVersion,
{ explode: false, charEncoding: "none" },
),
});
}));
const context = {
operationID: "post-users-sign-in-data",
oAuth2Scopes: [],
resolvedSecurity: null,
securitySource: null,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};
const requestRes = client._createRequest(context, {
@@ -143,19 +124,8 @@ export async function authenticationPostUsersSignInData(
const doResult = await client._do(req, {
context,
errorCodes: ["400", "401", "4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig
|| {
strategy: "backoff",
backoff: {
initialInterval: 500,
maxInterval: 60000,
exponent: 1.5,
maxElapsedTime: 3600000,
},
retryConnectionErrors: true,
},
retryCodes: options?.retryCodes || ["5XX"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
@@ -187,7 +157,8 @@ export async function authenticationPostUsersSignInData(
}),
M.jsonErr(400, errors.PostUsersSignInDataBadRequest$inboundSchema),
M.jsonErr(401, errors.PostUsersSignInDataUnauthorized$inboundSchema),
M.fail(["4XX", "5XX"]),
M.fail("4XX"),
M.fail("5XX"),
)(response, { extraFields: responseFields });
if (!result.ok) {
return result;

View File

@@ -4,6 +4,7 @@
import { PlexAPICore } from "../core.js";
import * as M from "../lib/matchers.js";
import { compactMap } from "../lib/primitives.js";
import { RequestOptions } from "../lib/sdks.js";
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
import { pathToFunc } from "../lib/url.js";
@@ -45,22 +46,31 @@ export async function butlerGetButlerTasks(
> {
const path = pathToFunc("/butler")();
const headers = new Headers({
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 = {
operationID: "getButlerTasks",
oAuth2Scopes: [],
resolvedSecurity: requestSecurity,
securitySource: client._options.accessToken,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};
const requestSecurity = resolveGlobalSecurity(securityInput);
const requestRes = client._createRequest(context, {
security: requestSecurity,
method: "GET",
baseURL: options?.serverURL,
path: path,
headers: headers,
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
@@ -73,19 +83,8 @@ export async function butlerGetButlerTasks(
const doResult = await client._do(req, {
context,
errorCodes: ["400", "401", "4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig
|| {
strategy: "backoff",
backoff: {
initialInterval: 500,
maxInterval: 60000,
exponent: 1.5,
maxElapsedTime: 3600000,
},
retryConnectionErrors: true,
},
retryCodes: options?.retryCodes || ["5XX"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
@@ -117,7 +116,8 @@ export async function butlerGetButlerTasks(
}),
M.jsonErr(400, errors.GetButlerTasksBadRequest$inboundSchema),
M.jsonErr(401, errors.GetButlerTasksUnauthorized$inboundSchema),
M.fail(["4XX", "5XX"]),
M.fail("4XX"),
M.fail("5XX"),
)(response, { extraFields: responseFields });
if (!result.ok) {
return result;

View File

@@ -4,6 +4,7 @@
import { PlexAPICore } from "../core.js";
import * as M from "../lib/matchers.js";
import { compactMap } from "../lib/primitives.js";
import { RequestOptions } from "../lib/sdks.js";
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
import { pathToFunc } from "../lib/url.js";
@@ -49,22 +50,31 @@ export async function butlerStartAllTasks(
> {
const path = pathToFunc("/butler")();
const headers = new Headers({
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 = {
operationID: "startAllTasks",
oAuth2Scopes: [],
resolvedSecurity: requestSecurity,
securitySource: client._options.accessToken,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};
const requestSecurity = resolveGlobalSecurity(securityInput);
const requestRes = client._createRequest(context, {
security: requestSecurity,
method: "POST",
baseURL: options?.serverURL,
path: path,
headers: headers,
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
@@ -77,19 +87,8 @@ export async function butlerStartAllTasks(
const doResult = await client._do(req, {
context,
errorCodes: ["400", "401", "4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig
|| {
strategy: "backoff",
backoff: {
initialInterval: 500,
maxInterval: 60000,
exponent: 1.5,
maxElapsedTime: 3600000,
},
retryConnectionErrors: true,
},
retryCodes: options?.retryCodes || ["5XX"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
@@ -119,7 +118,8 @@ export async function butlerStartAllTasks(
M.nil(200, operations.StartAllTasksResponse$inboundSchema),
M.jsonErr(400, errors.StartAllTasksBadRequest$inboundSchema),
M.jsonErr(401, errors.StartAllTasksUnauthorized$inboundSchema),
M.fail(["4XX", "5XX"]),
M.fail("4XX"),
M.fail("5XX"),
)(response, { extraFields: responseFields });
if (!result.ok) {
return result;

View File

@@ -5,6 +5,7 @@
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";
@@ -74,22 +75,31 @@ export async function butlerStartTask(
const path = pathToFunc("/butler/{taskName}")(pathParams);
const headers = new Headers({
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 = {
operationID: "startTask",
oAuth2Scopes: [],
resolvedSecurity: requestSecurity,
securitySource: client._options.accessToken,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};
const requestSecurity = resolveGlobalSecurity(securityInput);
const requestRes = client._createRequest(context, {
security: requestSecurity,
method: "POST",
baseURL: options?.serverURL,
path: path,
headers: headers,
body: body,
@@ -103,19 +113,8 @@ export async function butlerStartTask(
const doResult = await client._do(req, {
context,
errorCodes: ["400", "401", "4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig
|| {
strategy: "backoff",
backoff: {
initialInterval: 500,
maxInterval: 60000,
exponent: 1.5,
maxElapsedTime: 3600000,
},
retryConnectionErrors: true,
},
retryCodes: options?.retryCodes || ["5XX"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
@@ -145,7 +144,8 @@ export async function butlerStartTask(
M.nil([200, 202], operations.StartTaskResponse$inboundSchema),
M.jsonErr(400, errors.StartTaskBadRequest$inboundSchema),
M.jsonErr(401, errors.StartTaskUnauthorized$inboundSchema),
M.fail(["4XX", "5XX"]),
M.fail("4XX"),
M.fail("5XX"),
)(response, { extraFields: responseFields });
if (!result.ok) {
return result;

View File

@@ -4,6 +4,7 @@
import { PlexAPICore } from "../core.js";
import * as M from "../lib/matchers.js";
import { compactMap } from "../lib/primitives.js";
import { RequestOptions } from "../lib/sdks.js";
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
import { pathToFunc } from "../lib/url.js";
@@ -45,22 +46,31 @@ export async function butlerStopAllTasks(
> {
const path = pathToFunc("/butler")();
const headers = new Headers({
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 = {
operationID: "stopAllTasks",
oAuth2Scopes: [],
resolvedSecurity: requestSecurity,
securitySource: client._options.accessToken,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};
const requestSecurity = resolveGlobalSecurity(securityInput);
const requestRes = client._createRequest(context, {
security: requestSecurity,
method: "DELETE",
baseURL: options?.serverURL,
path: path,
headers: headers,
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
@@ -73,19 +83,8 @@ export async function butlerStopAllTasks(
const doResult = await client._do(req, {
context,
errorCodes: ["400", "401", "4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig
|| {
strategy: "backoff",
backoff: {
initialInterval: 500,
maxInterval: 60000,
exponent: 1.5,
maxElapsedTime: 3600000,
},
retryConnectionErrors: true,
},
retryCodes: options?.retryCodes || ["5XX"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
@@ -115,7 +114,8 @@ export async function butlerStopAllTasks(
M.nil(200, operations.StopAllTasksResponse$inboundSchema),
M.jsonErr(400, errors.StopAllTasksBadRequest$inboundSchema),
M.jsonErr(401, errors.StopAllTasksUnauthorized$inboundSchema),
M.fail(["4XX", "5XX"]),
M.fail("4XX"),
M.fail("5XX"),
)(response, { extraFields: responseFields });
if (!result.ok) {
return result;

View File

@@ -5,6 +5,7 @@
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";
@@ -70,22 +71,31 @@ export async function butlerStopTask(
const path = pathToFunc("/butler/{taskName}")(pathParams);
const headers = new Headers({
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 = {
operationID: "stopTask",
oAuth2Scopes: [],
resolvedSecurity: requestSecurity,
securitySource: client._options.accessToken,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};
const requestSecurity = resolveGlobalSecurity(securityInput);
const requestRes = client._createRequest(context, {
security: requestSecurity,
method: "DELETE",
baseURL: options?.serverURL,
path: path,
headers: headers,
body: body,
@@ -99,19 +109,8 @@ export async function butlerStopTask(
const doResult = await client._do(req, {
context,
errorCodes: ["400", "401", "404", "4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig
|| {
strategy: "backoff",
backoff: {
initialInterval: 500,
maxInterval: 60000,
exponent: 1.5,
maxElapsedTime: 3600000,
},
retryConnectionErrors: true,
},
retryCodes: options?.retryCodes || ["5XX"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
@@ -141,7 +140,8 @@ export async function butlerStopTask(
M.nil(200, operations.StopTaskResponse$inboundSchema),
M.jsonErr(400, errors.StopTaskBadRequest$inboundSchema),
M.jsonErr(401, errors.StopTaskUnauthorized$inboundSchema),
M.fail([404, "4XX", "5XX"]),
M.fail([404, "4XX"]),
M.fail("5XX"),
)(response, { extraFields: responseFields });
if (!result.ok) {
return result;

View File

@@ -5,6 +5,7 @@
import { PlexAPICore } from "../core.js";
import { encodeFormQuery } 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";
@@ -70,22 +71,31 @@ export async function hubsGetGlobalHubs(
"onlyTransient": payload.onlyTransient,
});
const headers = new Headers({
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 = {
operationID: "getGlobalHubs",
oAuth2Scopes: [],
resolvedSecurity: requestSecurity,
securitySource: client._options.accessToken,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};
const requestSecurity = resolveGlobalSecurity(securityInput);
const requestRes = client._createRequest(context, {
security: requestSecurity,
method: "GET",
baseURL: options?.serverURL,
path: path,
headers: headers,
query: query,
@@ -100,19 +110,8 @@ export async function hubsGetGlobalHubs(
const doResult = await client._do(req, {
context,
errorCodes: ["400", "401", "4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig
|| {
strategy: "backoff",
backoff: {
initialInterval: 500,
maxInterval: 60000,
exponent: 1.5,
maxElapsedTime: 3600000,
},
retryConnectionErrors: true,
},
retryCodes: options?.retryCodes || ["5XX"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
@@ -144,7 +143,8 @@ export async function hubsGetGlobalHubs(
}),
M.jsonErr(400, errors.GetGlobalHubsBadRequest$inboundSchema),
M.jsonErr(401, errors.GetGlobalHubsUnauthorized$inboundSchema),
M.fail(["4XX", "5XX"]),
M.fail("4XX"),
M.fail("5XX"),
)(response, { extraFields: responseFields });
if (!result.ok) {
return result;

Some files were not shown because too many files have changed in this diff Show More