mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 20:47:46 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
454b20d045 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,3 +1,9 @@
|
||||
/funcs
|
||||
/core.*
|
||||
/esm
|
||||
/dist
|
||||
/.tshy
|
||||
/.tshy-*
|
||||
/hooks
|
||||
/models
|
||||
/models/errors
|
||||
|
||||
@@ -5,3 +5,5 @@
|
||||
|
||||
/.eslintrc.js
|
||||
/cjs
|
||||
/.tshy
|
||||
/.tshy-*
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: 16f22cbf-f23f-4419-8924-3a4b06381947
|
||||
management:
|
||||
docChecksum: e73920abd3a55e8d249592f2e3090574
|
||||
docChecksum: 2ad2b4c59994082e04faa0c3e7675f3e
|
||||
docVersion: 0.0.3
|
||||
speakeasyVersion: 1.323.0
|
||||
generationVersion: 2.356.0
|
||||
releaseVersion: 0.18.2
|
||||
configChecksum: f685b81e83e5dfee0dae18eae6baa522
|
||||
speakeasyVersion: 1.377.1
|
||||
generationVersion: 2.404.1
|
||||
releaseVersion: 0.19.0
|
||||
configChecksum: 685039d8e4f59693f709afebf0849817
|
||||
repoURL: https://github.com/LukeHagar/plexjs.git
|
||||
repoSubDirectory: .
|
||||
installationURL: https://github.com/LukeHagar/plexjs
|
||||
@@ -14,10 +14,13 @@ management:
|
||||
features:
|
||||
typescript:
|
||||
additionalDependencies: 0.1.0
|
||||
constsAndDefaults: 0.1.5
|
||||
core: 3.10.2
|
||||
constsAndDefaults: 0.1.10
|
||||
core: 3.14.1
|
||||
defaultEnabledRetries: 0.1.0
|
||||
deprecations: 2.81.1
|
||||
envVarSecurityUsage: 0.1.1
|
||||
flattening: 2.81.1
|
||||
globalSecurity: 2.82.9
|
||||
globalSecurity: 2.82.11
|
||||
globalSecurityCallbacks: 0.1.0
|
||||
globalSecurityFlattening: 0.1.0
|
||||
globalServerURLs: 2.82.4
|
||||
@@ -26,10 +29,82 @@ features:
|
||||
nameOverrides: 2.81.2
|
||||
nullables: 0.1.0
|
||||
responseFormat: 0.2.3
|
||||
retries: 2.83.0
|
||||
sdkHooks: 0.1.0
|
||||
typeOverrides: 2.81.1
|
||||
unions: 2.85.5
|
||||
unions: 2.85.7
|
||||
generatedFiles:
|
||||
- src/funcs/serverGetServerCapabilities.ts
|
||||
- src/funcs/serverGetServerPreferences.ts
|
||||
- src/funcs/serverGetAvailableClients.ts
|
||||
- src/funcs/serverGetDevices.ts
|
||||
- src/funcs/serverGetServerIdentity.ts
|
||||
- src/funcs/serverGetMyPlexAccount.ts
|
||||
- src/funcs/serverGetResizedPhoto.ts
|
||||
- src/funcs/serverGetServerList.ts
|
||||
- src/funcs/mediaMarkPlayed.ts
|
||||
- src/funcs/mediaMarkUnplayed.ts
|
||||
- src/funcs/mediaUpdatePlayProgress.ts
|
||||
- src/funcs/videoGetTimeline.ts
|
||||
- src/funcs/videoStartUniversalTranscode.ts
|
||||
- src/funcs/activitiesGetServerActivities.ts
|
||||
- src/funcs/activitiesCancelServerActivities.ts
|
||||
- src/funcs/butlerGetButlerTasks.ts
|
||||
- src/funcs/butlerStartAllTasks.ts
|
||||
- src/funcs/butlerStopAllTasks.ts
|
||||
- src/funcs/butlerStartTask.ts
|
||||
- src/funcs/butlerStopTask.ts
|
||||
- src/funcs/plexGetCompanionsData.ts
|
||||
- src/funcs/plexGetUserFriends.ts
|
||||
- src/funcs/plexGetGeoData.ts
|
||||
- src/funcs/plexGetHomeData.ts
|
||||
- src/funcs/plexGetResources.ts
|
||||
- src/funcs/plexGetPin.ts
|
||||
- src/funcs/plexGetTokenByPinId.ts
|
||||
- src/funcs/plexGetUserDetails.ts
|
||||
- src/funcs/hubsGetGlobalHubs.ts
|
||||
- src/funcs/hubsGetLibraryHubs.ts
|
||||
- src/funcs/searchPerformSearch.ts
|
||||
- src/funcs/searchPerformVoiceSearch.ts
|
||||
- src/funcs/searchGetSearchResults.ts
|
||||
- src/funcs/libraryGetFileHash.ts
|
||||
- src/funcs/libraryGetRecentlyAdded.ts
|
||||
- src/funcs/libraryGetLibraries.ts
|
||||
- src/funcs/libraryGetLibrary.ts
|
||||
- src/funcs/libraryDeleteLibrary.ts
|
||||
- src/funcs/libraryGetLibraryItems.ts
|
||||
- src/funcs/libraryRefreshLibrary.ts
|
||||
- src/funcs/librarySearchLibrary.ts
|
||||
- src/funcs/libraryGetMetadata.ts
|
||||
- src/funcs/libraryGetMetadataChildren.ts
|
||||
- src/funcs/libraryGetTopWatchedContent.ts
|
||||
- src/funcs/libraryGetOnDeck.ts
|
||||
- src/funcs/logLogLine.ts
|
||||
- src/funcs/logLogMultiLine.ts
|
||||
- src/funcs/logEnablePaperTrail.ts
|
||||
- src/funcs/playlistsCreatePlaylist.ts
|
||||
- src/funcs/playlistsGetPlaylists.ts
|
||||
- src/funcs/playlistsGetPlaylist.ts
|
||||
- src/funcs/playlistsDeletePlaylist.ts
|
||||
- src/funcs/playlistsUpdatePlaylist.ts
|
||||
- src/funcs/playlistsGetPlaylistContents.ts
|
||||
- src/funcs/playlistsClearPlaylistContents.ts
|
||||
- src/funcs/playlistsAddPlaylistContents.ts
|
||||
- src/funcs/playlistsUploadPlaylist.ts
|
||||
- src/funcs/authenticationGetTransientToken.ts
|
||||
- src/funcs/authenticationGetSourceConnectionInformation.ts
|
||||
- src/funcs/statisticsGetStatistics.ts
|
||||
- src/funcs/statisticsGetResourcesStatistics.ts
|
||||
- src/funcs/statisticsGetBandwidthStatistics.ts
|
||||
- src/funcs/sessionsGetSessions.ts
|
||||
- src/funcs/sessionsGetSessionHistory.ts
|
||||
- src/funcs/sessionsGetTranscodeSessions.ts
|
||||
- src/funcs/sessionsStopTranscodeSession.ts
|
||||
- src/funcs/updaterGetUpdateStatus.ts
|
||||
- src/funcs/updaterCheckForUpdates.ts
|
||||
- src/funcs/updaterApplyUpdates.ts
|
||||
- src/funcs/userPostUsersSigninData.ts
|
||||
- src/funcs/watchlistGetWatchlist.ts
|
||||
- src/sdk/server.ts
|
||||
- src/sdk/media.ts
|
||||
- src/sdk/video.ts
|
||||
@@ -45,19 +120,25 @@ generatedFiles:
|
||||
- src/sdk/statistics.ts
|
||||
- src/sdk/sessions.ts
|
||||
- src/sdk/updater.ts
|
||||
- src/sdk/user.ts
|
||||
- src/sdk/watchlist.ts
|
||||
- src/sdk/sdk.ts
|
||||
- .eslintrc.cjs
|
||||
- .npmignore
|
||||
- FUNCTIONS.md
|
||||
- RUNTIMES.md
|
||||
- jsr.json
|
||||
- package.json
|
||||
- src/core.ts
|
||||
- src/index.ts
|
||||
- src/lib/base64.ts
|
||||
- src/lib/config.ts
|
||||
- src/lib/dlv.ts
|
||||
- src/lib/encodings.ts
|
||||
- src/lib/http.ts
|
||||
- src/lib/is-plain-object.ts
|
||||
- src/lib/logger.ts
|
||||
- src/lib/matchers.ts
|
||||
- src/lib/primitives.ts
|
||||
- src/lib/retries.ts
|
||||
- src/lib/schemas.ts
|
||||
@@ -65,10 +146,13 @@ generatedFiles:
|
||||
- src/lib/security.ts
|
||||
- src/lib/url.ts
|
||||
- src/sdk/index.ts
|
||||
- src/models/httpclienterrors.ts
|
||||
- src/models/sdkerror.ts
|
||||
- src/models/sdkvalidationerror.ts
|
||||
- src/types/blobs.ts
|
||||
- src/types/constdatetime.ts
|
||||
- src/types/enums.ts
|
||||
- src/types/fp.ts
|
||||
- src/types/index.ts
|
||||
- src/types/operations.ts
|
||||
- src/types/rfcdate.ts
|
||||
@@ -93,9 +177,14 @@ generatedFiles:
|
||||
- src/models/stopalltasksop.ts
|
||||
- src/models/starttaskop.ts
|
||||
- src/models/stoptaskop.ts
|
||||
- src/models/getcompanionsdataop.ts
|
||||
- src/models/getuserfriendsop.ts
|
||||
- src/models/getgeodataop.ts
|
||||
- src/models/gethomedataop.ts
|
||||
- src/models/getresourcesop.ts
|
||||
- src/models/getpinop.ts
|
||||
- src/models/gettokenop.ts
|
||||
- src/models/gettokenbypinidop.ts
|
||||
- src/models/getuserdetailsop.ts
|
||||
- src/models/getglobalhubsop.ts
|
||||
- src/models/getlibraryhubsop.ts
|
||||
- src/models/performsearchop.ts
|
||||
@@ -137,6 +226,7 @@ generatedFiles:
|
||||
- src/models/getupdatestatusop.ts
|
||||
- src/models/checkforupdatesop.ts
|
||||
- src/models/applyupdatesop.ts
|
||||
- src/models/postuserssignindataop.ts
|
||||
- src/models/getwatchlistop.ts
|
||||
- src/models/security.ts
|
||||
- src/models/index.ts
|
||||
@@ -240,24 +330,63 @@ generatedFiles:
|
||||
- docs/models/stoptaskerrors.md
|
||||
- docs/models/stoptaskresponsebody.md
|
||||
- docs/models/stoptaskresponse.md
|
||||
- docs/models/getcompanionsdataerrors.md
|
||||
- docs/models/getcompanionsdataresponsebody.md
|
||||
- docs/models/responsebody.md
|
||||
- docs/models/getcompanionsdataresponse.md
|
||||
- docs/models/getuserfriendserrors.md
|
||||
- docs/models/getuserfriendsresponsebody.md
|
||||
- docs/models/sharedservers.md
|
||||
- docs/models/sharedsources.md
|
||||
- docs/models/status.md
|
||||
- docs/models/friend.md
|
||||
- docs/models/getuserfriendsresponse.md
|
||||
- docs/models/getgeodataerrors.md
|
||||
- docs/models/getgeodataresponsebody.md
|
||||
- docs/models/getgeodatageodata.md
|
||||
- docs/models/getgeodataresponse.md
|
||||
- docs/models/gethomedataerrors.md
|
||||
- docs/models/gethomedataplexresponsebody.md
|
||||
- docs/models/gethomedataresponsebody.md
|
||||
- docs/models/gethomedataresponse.md
|
||||
- docs/models/getresourcesglobals.md
|
||||
- docs/models/includehttps.md
|
||||
- docs/models/includerelay.md
|
||||
- docs/models/includeipv6.md
|
||||
- docs/models/getresourcesrequest.md
|
||||
- docs/models/getresourceserrors.md
|
||||
- docs/models/getresourcesresponsebody.md
|
||||
- docs/models/connections.md
|
||||
- docs/models/plexdevice.md
|
||||
- docs/models/getresourcesresponse.md
|
||||
- docs/models/getpinglobals.md
|
||||
- docs/models/getpinrequest.md
|
||||
- docs/models/getpinerrors.md
|
||||
- docs/models/getpinplexresponsebody.md
|
||||
- docs/models/location.md
|
||||
- docs/models/getpinresponsebody.md
|
||||
- docs/models/geodata.md
|
||||
- docs/models/getpinauthpincontainer.md
|
||||
- docs/models/getpinresponse.md
|
||||
- docs/models/gettokenglobals.md
|
||||
- docs/models/gettokenrequest.md
|
||||
- docs/models/gettokenerrors.md
|
||||
- docs/models/gettokenplexresponsebody.md
|
||||
- docs/models/gettokenlocation.md
|
||||
- docs/models/gettokenresponsebody.md
|
||||
- docs/models/gettokenresponse.md
|
||||
- docs/models/gettokenbypinidglobals.md
|
||||
- docs/models/gettokenbypinidrequest.md
|
||||
- docs/models/gettokenbypiniderrors.md
|
||||
- docs/models/gettokenbypinidresponsebody.md
|
||||
- docs/models/gettokenbypinidgeodata.md
|
||||
- docs/models/gettokenbypinidauthpincontainer.md
|
||||
- docs/models/gettokenbypinidresponse.md
|
||||
- docs/models/getuserdetailserrors.md
|
||||
- docs/models/getuserdetailsresponsebody.md
|
||||
- docs/models/mailingliststatus.md
|
||||
- docs/models/userprofile.md
|
||||
- docs/models/getuserdetailsstatus.md
|
||||
- docs/models/services.md
|
||||
- docs/models/features.md
|
||||
- docs/models/getuserdetailsplexstatus.md
|
||||
- docs/models/subscription.md
|
||||
- docs/models/getuserdetailsfeatures.md
|
||||
- docs/models/getuserdetailsplexresponsestatus.md
|
||||
- docs/models/getuserdetailssubscription.md
|
||||
- docs/models/getuserdetailsuserplexaccount.md
|
||||
- docs/models/getuserdetailsresponse.md
|
||||
- docs/models/onlytransient.md
|
||||
- docs/models/getglobalhubsrequest.md
|
||||
- docs/models/getglobalhubserrors.md
|
||||
@@ -326,7 +455,7 @@ generatedFiles:
|
||||
- docs/models/getrecentlyaddedresponse.md
|
||||
- docs/models/getlibrarieserrors.md
|
||||
- docs/models/getlibrarieslibraryresponsebody.md
|
||||
- docs/models/getlibrarieslocation.md
|
||||
- docs/models/location.md
|
||||
- docs/models/getlibrariesdirectory.md
|
||||
- docs/models/getlibrariesmediacontainer.md
|
||||
- docs/models/getlibrariesresponsebody.md
|
||||
@@ -408,7 +537,7 @@ generatedFiles:
|
||||
- docs/models/gettopwatchedcontentcountry.md
|
||||
- docs/models/gettopwatchedcontentguids.md
|
||||
- docs/models/gettopwatchedcontentrole.md
|
||||
- docs/models/user.md
|
||||
- docs/models/gettopwatchedcontentuser.md
|
||||
- docs/models/gettopwatchedcontentmetadata.md
|
||||
- docs/models/gettopwatchedcontentmediacontainer.md
|
||||
- docs/models/gettopwatchedcontentresponsebody.md
|
||||
@@ -579,6 +708,28 @@ generatedFiles:
|
||||
- docs/models/applyupdateserrors.md
|
||||
- docs/models/applyupdatesresponsebody.md
|
||||
- docs/models/applyupdatesresponse.md
|
||||
- docs/models/postuserssignindataglobals.md
|
||||
- docs/models/postuserssignindatarequestbody.md
|
||||
- docs/models/postuserssignindatarequest.md
|
||||
- docs/models/postuserssignindataerrors.md
|
||||
- docs/models/postuserssignindataresponsebody.md
|
||||
- docs/models/postuserssignindatamailingliststatus.md
|
||||
- docs/models/postuserssignindatauserprofile.md
|
||||
- docs/models/postuserssignindatastatus.md
|
||||
- docs/models/postuserssignindataservices.md
|
||||
- docs/models/postuserssignindatafeatures.md
|
||||
- docs/models/postuserssignindatauserstatus.md
|
||||
- docs/models/postuserssignindatasubscription.md
|
||||
- docs/models/postuserssignindatauserfeatures.md
|
||||
- docs/models/postuserssignindatauserresponsestatus.md
|
||||
- docs/models/postuserssignindatausersubscription.md
|
||||
- docs/models/postuserssignindatastate.md
|
||||
- docs/models/internalpaymentmethod.md
|
||||
- docs/models/billing.md
|
||||
- docs/models/pastsubscription.md
|
||||
- docs/models/trials.md
|
||||
- docs/models/postuserssignindatauserplexaccount.md
|
||||
- docs/models/postuserssignindataresponse.md
|
||||
- docs/models/pathparamfilter.md
|
||||
- docs/models/libtype.md
|
||||
- docs/models/includecollections.md
|
||||
@@ -592,6 +743,7 @@ generatedFiles:
|
||||
- docs/models/getwatchlistresponse.md
|
||||
- docs/models/security.md
|
||||
- docs/sdks/plexapi/README.md
|
||||
- docs/lib/utils/retryconfig.md
|
||||
- docs/sdks/server/README.md
|
||||
- docs/sdks/media/README.md
|
||||
- docs/sdks/video/README.md
|
||||
@@ -607,9 +759,11 @@ generatedFiles:
|
||||
- docs/sdks/statistics/README.md
|
||||
- docs/sdks/sessions/README.md
|
||||
- docs/sdks/updater/README.md
|
||||
- docs/sdks/user/README.md
|
||||
- docs/sdks/watchlist/README.md
|
||||
- USAGE.md
|
||||
- .gitattributes
|
||||
- src/hooks/hooks.ts
|
||||
- src/hooks/types.ts
|
||||
- src/hooks/index.ts
|
||||
- CONTRIBUTING.md
|
||||
|
||||
@@ -12,7 +12,7 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
typescript:
|
||||
version: 0.18.2
|
||||
version: 0.19.0
|
||||
additionalDependencies:
|
||||
dependencies: {}
|
||||
devDependencies: {}
|
||||
@@ -33,6 +33,7 @@ typescript:
|
||||
inputModelSuffix: input
|
||||
maxMethodParams: 4
|
||||
methodArguments: require-security-and-request
|
||||
moduleFormat: commonjs
|
||||
outputModelSuffix: output
|
||||
packageName: '@lukehagar/plexjs'
|
||||
responseFormat: envelope
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
speakeasyVersion: 1.323.0
|
||||
speakeasyVersion: 1.377.1
|
||||
sources:
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
sourceRevisionDigest: sha256:34d6078f698b0dd8314b634f063edbd2737ff9fa225839111b308effa0b3fc79
|
||||
sourceBlobDigest: sha256:1be3aa6d41b4e7a554218e6e10a32ece43156023f8a843127fa77e2e5c9a67b2
|
||||
sourceRevisionDigest: sha256:4e103669d4bcf7c698608fa37524f3d644510de45959c5437c21b60b2fb2dd9f
|
||||
sourceBlobDigest: sha256:3cb937b6d66508640fa6080fa4c16ebef73a438fbb21a1f8833d6dd2e8fcd5ee
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
@@ -11,10 +11,10 @@ targets:
|
||||
plexjs:
|
||||
source: my-source
|
||||
sourceNamespace: my-source
|
||||
sourceRevisionDigest: sha256:34d6078f698b0dd8314b634f063edbd2737ff9fa225839111b308effa0b3fc79
|
||||
sourceBlobDigest: sha256:1be3aa6d41b4e7a554218e6e10a32ece43156023f8a843127fa77e2e5c9a67b2
|
||||
sourceRevisionDigest: sha256:4e103669d4bcf7c698608fa37524f3d644510de45959c5437c21b60b2fb2dd9f
|
||||
sourceBlobDigest: sha256:3cb937b6d66508640fa6080fa4c16ebef73a438fbb21a1f8833d6dd2e8fcd5ee
|
||||
codeSamplesNamespace: code-samples-typescript-plexjs
|
||||
codeSamplesRevisionDigest: sha256:b37dc035436959bd4af4ea4323a6fdf3461e482c3ec03538e949589a3e13c935
|
||||
codeSamplesRevisionDigest: sha256:439dcb28ca6dc855201641d70fc56ac3a6685187d824eb3077145b6a5be15b8b
|
||||
outLocation: /github/workspace/repo
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
|
||||
26
CONTRIBUTING.md
Normal file
26
CONTRIBUTING.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Contributing to This Repository
|
||||
|
||||
Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements.
|
||||
|
||||
## How to Report Issues
|
||||
|
||||
If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes:
|
||||
|
||||
- A clear and descriptive title
|
||||
- Steps to reproduce the issue
|
||||
- Expected and actual behavior
|
||||
- Any relevant logs, screenshots, or error messages
|
||||
- Information about your environment (e.g., operating system, software versions)
|
||||
- For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed
|
||||
|
||||
## Issue Triage and Upstream Fixes
|
||||
|
||||
We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code.
|
||||
|
||||
## Contact
|
||||
|
||||
If you have any questions or need further assistance, please feel free to reach out by opening an issue.
|
||||
|
||||
Thank you for your understanding and cooperation!
|
||||
|
||||
The Maintainers
|
||||
105
FUNCTIONS.md
Normal file
105
FUNCTIONS.md
Normal file
@@ -0,0 +1,105 @@
|
||||
# Standalone Functions
|
||||
|
||||
> [!NOTE]
|
||||
> This section is useful if you are using a bundler and targetting browsers and
|
||||
> runtimes where the size of an application affects performance and load times.
|
||||
|
||||
Every method in this SDK is also available as a standalone function. This
|
||||
alternative API is suitable when targetting the browser or serverless runtimes
|
||||
and using a bundler to build your application since all unused functionality
|
||||
will be tree-shaken away. This includes code for unused methods, Zod schemas,
|
||||
encoding helpers and response handlers. The result is dramatically smaller
|
||||
impact on the application's final bundle size which grows very slowly as you use
|
||||
more and more functionality from this SDK.
|
||||
|
||||
Calling methods through the main SDK class remains a valid and generally more
|
||||
more ergonomic option. Standalone functions represent an optimisation for a
|
||||
specific category of applications.
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
|
||||
import { serverGetServerCapabilities } from "@lukehagar/plexjs/funcs/serverGetServerCapabilities.js";
|
||||
import { SDKValidationError } from "@lukehagar/plexjs/models/sdkvalidationerror.js";
|
||||
|
||||
// Use `PlexAPICore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const plexAPI = new PlexAPICore({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
xPlexClientIdentifier: "Postman",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const res = await serverGetServerCapabilities(plexAPI);
|
||||
|
||||
switch (true) {
|
||||
case res.ok:
|
||||
// The success case will be handled outside of the switch block
|
||||
break;
|
||||
case res.error instanceof SDKValidationError:
|
||||
// Pretty-print validation errors.
|
||||
return console.log(res.error.pretty());
|
||||
case res.error instanceof Error:
|
||||
return console.log(res.error);
|
||||
default:
|
||||
// TypeScript's type checking will fail on the following line if the above
|
||||
// cases were not exhaustive.
|
||||
res.error satisfies never;
|
||||
throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error);
|
||||
}
|
||||
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
## Result types
|
||||
|
||||
Standalone functions differ from SDK methods in that they return a
|
||||
`Result<Value, Error>` type to capture _known errors_ and document them using
|
||||
the type system. By avoiding throwing errors, application code maintains clear
|
||||
control flow and error-handling become part of the regular flow of application
|
||||
code.
|
||||
|
||||
> We use the term "known errors" because standalone functions, and JavaScript
|
||||
> code in general, can still throw unexpected errors such as `TypeError`s,
|
||||
> `RangeError`s and `DOMException`s. Exhaustively catching all errors may be
|
||||
> something this SDK addresses in the future. Nevertheless, there is still a lot
|
||||
> of benefit from capturing most errors and turning them into values.
|
||||
|
||||
The second reason for this style of programming is because these functions will
|
||||
typically be used in front-end applications where exception throwing is
|
||||
sometimes discouraged or considered unidiomatic. React and similar ecosystems
|
||||
and libraries tend to promote this style of programming so that components
|
||||
render useful content under all states (loading, success, error and so on).
|
||||
|
||||
The general pattern when calling standalone functions looks like this:
|
||||
|
||||
```typescript
|
||||
import { Core } from "<sdk-package-name>";
|
||||
import { fetchSomething } from "<sdk-package-name>/funcs/fetchSomething.js";
|
||||
|
||||
const client = new Core();
|
||||
|
||||
async function run() {
|
||||
const result = await fetchSomething(client, { id: "123" });
|
||||
if (!result.ok) {
|
||||
// You can throw the error or handle it. It's your choice now.
|
||||
throw result.error;
|
||||
}
|
||||
|
||||
console.log(result.value);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
Notably, `result.error` above will have an explicit type compared to a try-catch
|
||||
variation where the error in the catch block can only be of type `unknown` (or
|
||||
`any` depending on your TypeScript settings).
|
||||
182
README.md
182
README.md
@@ -103,9 +103,14 @@ run();
|
||||
|
||||
### [plex](docs/sdks/plex/README.md)
|
||||
|
||||
* [getCompanionsData](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data
|
||||
* [getUserFriends](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in
|
||||
* [getGeoData](docs/sdks/plex/README.md#getgeodata) - Get Geo Data
|
||||
* [getHomeData](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data
|
||||
* [getResources](docs/sdks/plex/README.md#getresources) - Get Resources
|
||||
* [getPin](docs/sdks/plex/README.md#getpin) - Get a Pin
|
||||
* [getToken](docs/sdks/plex/README.md#gettoken) - Get Access Token
|
||||
* [getTokenByPinId](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId
|
||||
* [getUserDetails](docs/sdks/plex/README.md#getuserdetails) - Get UserData By Token
|
||||
|
||||
### [hubs](docs/sdks/hubs/README.md)
|
||||
|
||||
@@ -175,6 +180,10 @@ run();
|
||||
* [checkForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates
|
||||
* [applyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates
|
||||
|
||||
### [user](docs/sdks/user/README.md)
|
||||
|
||||
* [postUsersSigninData](docs/sdks/user/README.md#postuserssignindata) - Get User SignIn Data
|
||||
|
||||
### [watchlist](docs/sdks/watchlist/README.md)
|
||||
|
||||
* [getWatchlist](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist
|
||||
@@ -303,11 +312,12 @@ The server URL can also be overridden on a per-operation basis, provided a serve
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
xPlexClientIdentifier: "Postman",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.plex.getPin("Postman", false, "Postman", {
|
||||
const result = await plexAPI.plex.getCompanionsData({
|
||||
serverURL: "https://plex.tv/api/v2",
|
||||
});
|
||||
|
||||
@@ -407,37 +417,124 @@ run();
|
||||
For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
|
||||
<!-- End Requirements [requirements] -->
|
||||
|
||||
<!-- Start Global Parameters [global-parameters] -->
|
||||
## Global Parameters
|
||||
<!-- Start Standalone functions [standalone-funcs] -->
|
||||
## Standalone functions
|
||||
|
||||
A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
|
||||
All the methods listed above are available as standalone functions. These
|
||||
functions are ideal for use in applications running in the browser, serverless
|
||||
runtimes or other environments where application bundle size is a primary
|
||||
concern. When using a bundler to build your application, all unused
|
||||
functionality will be either excluded from the final bundle or tree-shaken away.
|
||||
|
||||
For example, you can set `X-Plex-Client-Identifier` to `"Postman"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
|
||||
To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
||||
|
||||
<details>
|
||||
|
||||
<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)
|
||||
- [authenticationGetTransientToken](docs/sdks/authentication/README.md#gettransienttoken)
|
||||
- [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)
|
||||
- [libraryDeleteLibrary](docs/sdks/library/README.md#deletelibrary)
|
||||
- [libraryGetFileHash](docs/sdks/library/README.md#getfilehash)
|
||||
- [libraryGetLibraries](docs/sdks/library/README.md#getlibraries)
|
||||
- [libraryGetLibraryItems](docs/sdks/library/README.md#getlibraryitems)
|
||||
- [libraryGetLibrary](docs/sdks/library/README.md#getlibrary)
|
||||
- [libraryGetMetadataChildren](docs/sdks/library/README.md#getmetadatachildren)
|
||||
- [libraryGetMetadata](docs/sdks/library/README.md#getmetadata)
|
||||
- [libraryGetOnDeck](docs/sdks/library/README.md#getondeck)
|
||||
- [libraryGetRecentlyAdded](docs/sdks/library/README.md#getrecentlyadded)
|
||||
- [libraryGetTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent)
|
||||
- [libraryRefreshLibrary](docs/sdks/library/README.md#refreshlibrary)
|
||||
- [librarySearchLibrary](docs/sdks/library/README.md#searchlibrary)
|
||||
- [logEnablePaperTrail](docs/sdks/log/README.md#enablepapertrail)
|
||||
- [logLogLine](docs/sdks/log/README.md#logline)
|
||||
- [logLogMultiLine](docs/sdks/log/README.md#logmultiline)
|
||||
- [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)
|
||||
- [plexGetResources](docs/sdks/plex/README.md#getresources)
|
||||
- [plexGetTokenByPinId](docs/sdks/plex/README.md#gettokenbypinid)
|
||||
- [plexGetUserDetails](docs/sdks/plex/README.md#getuserdetails)
|
||||
- [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)
|
||||
- [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)
|
||||
- [userPostUsersSigninData](docs/sdks/user/README.md#postuserssignindata)
|
||||
- [videoGetTimeline](docs/sdks/video/README.md#gettimeline)
|
||||
- [videoStartUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode)
|
||||
- [watchlistGetWatchlist](docs/sdks/watchlist/README.md#getwatchlist)
|
||||
|
||||
|
||||
### Available Globals
|
||||
</details>
|
||||
<!-- End Standalone functions [standalone-funcs] -->
|
||||
|
||||
The following global parameter is available.
|
||||
<!-- Start Retries [retries] -->
|
||||
## Retries
|
||||
|
||||
| Name | Type | Required | Description |
|
||||
| ---- | ---- |:--------:| ----------- |
|
||||
| xPlexClientIdentifier | string | | The unique identifier for the client application
|
||||
This is used to track the client application and its usage
|
||||
(UUID, serial number, or other number unique per device)
|
||||
|
|
||||
|
||||
|
||||
### Example
|
||||
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
|
||||
|
||||
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
xPlexClientIdentifier: "Postman",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.plex.getPin("Postman", false, "Postman");
|
||||
const result = await plexAPI.server.getServerCapabilities({
|
||||
retries: {
|
||||
strategy: "backoff",
|
||||
backoff: {
|
||||
initialInterval: 1,
|
||||
maxInterval: 50,
|
||||
exponent: 1.1,
|
||||
maxElapsedTime: 100,
|
||||
},
|
||||
retryConnectionErrors: false,
|
||||
},
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
@@ -446,7 +543,54 @@ async function run() {
|
||||
run();
|
||||
|
||||
```
|
||||
<!-- End Global Parameters [global-parameters] -->
|
||||
|
||||
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const plexAPI = new PlexAPI({
|
||||
retryConfig: {
|
||||
strategy: "backoff",
|
||||
backoff: {
|
||||
initialInterval: 1,
|
||||
maxInterval: 50,
|
||||
exponent: 1.1,
|
||||
maxElapsedTime: 100,
|
||||
},
|
||||
retryConnectionErrors: false,
|
||||
},
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
xPlexClientIdentifier: "Postman",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await plexAPI.server.getServerCapabilities();
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
|
||||
```
|
||||
<!-- End Retries [retries] -->
|
||||
|
||||
<!-- Start Debugging [debug] -->
|
||||
## Debugging
|
||||
|
||||
You can setup your SDK to emit debug logs for SDK requests and responses.
|
||||
|
||||
You can pass a logger that matches `console`'s interface as an SDK option.
|
||||
|
||||
> [!WARNING]
|
||||
> Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
|
||||
|
||||
```typescript
|
||||
import { PlexAPI } from "@lukehagar/plexjs";
|
||||
|
||||
const sdk = new PlexAPI({ debugLogger: console });
|
||||
```
|
||||
<!-- End Debugging [debug] -->
|
||||
|
||||
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
||||
|
||||
|
||||
10
RELEASES.md
10
RELEASES.md
@@ -929,3 +929,13 @@ Based on:
|
||||
- [typescript v0.18.2] .
|
||||
### Releases
|
||||
- [NPM v0.18.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.18.2 - .
|
||||
|
||||
## 2024-08-22 05:15:43
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.377.1 (2.404.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [typescript v0.19.0] .
|
||||
### Releases
|
||||
- [NPM v0.19.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.19.0 - .
|
||||
@@ -3,7 +3,7 @@
|
||||
This SDK is intended to be used in JavaScript runtimes that support the following features:
|
||||
|
||||
* [Web Fetch API][web-fetch]
|
||||
* [Web Streams API](web-streams) and in particular `ReadableStream`
|
||||
* [Web Streams API][web-streams] and in particular `ReadableStream`
|
||||
* [Async iterables][async-iter] using `Symbol.asyncIterator`
|
||||
|
||||
[web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
|
||||
|
||||
1718
codeSamples.yaml
1718
codeSamples.yaml
File diff suppressed because it is too large
Load Diff
24
docs/lib/utils/retryconfig.md
Normal file
24
docs/lib/utils/retryconfig.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# RetryConfig
|
||||
|
||||
Allows customizing the default retry configuration. It is only permitted in methods that accept retry policies.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Description | Example |
|
||||
| ------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------ | ----------- |
|
||||
| `strategy` | `"backoff" | "none"` | The retry strategy to use. | `"backoff"` |
|
||||
| `backoff` | [BackoffStrategy](#backoffstrategy) | When strategy is "backoff", this configurates for the backoff parameters. | |
|
||||
| `retryConnectionErrors` | `*boolean*` | When strategy is "backoff", this determines whether or not to retry on connection errors. | `true` |
|
||||
|
||||
## BackoffStrategy
|
||||
|
||||
The backoff strategy allows retrying a request with an exponential backoff between each retry.
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Description | Example |
|
||||
| ------------------ | ------------ | ----------------------------------------- | -------- |
|
||||
| `initialInterval` | `*number*` | The initial interval in milliseconds. | `500` |
|
||||
| `maxInterval` | `*number*` | The maximum interval in milliseconds. | `60000` |
|
||||
| `exponent` | `*number*` | The exponent to use for the backoff. | `1.5` |
|
||||
| `maxElapsedTime` | `*number*` | The maximum elapsed time in milliseconds. | `300000` |
|
||||
@@ -1,5 +1,21 @@
|
||||
# Account
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Account } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Account = {
|
||||
id: 238960586,
|
||||
key: "/accounts/238960586",
|
||||
name: "Diane",
|
||||
defaultAudioLanguage: "en",
|
||||
autoSelectAudio: true,
|
||||
defaultSubtitleLanguage: "en",
|
||||
subtitleMode: 1,
|
||||
thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# Activity
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Activity } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Activity = {};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# AddPlaylistContentsErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { AddPlaylistContentsErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: AddPlaylistContentsErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
# AddPlaylistContentsMediaContainer
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { AddPlaylistContentsMediaContainer } from "@lukehagar/plexjs";
|
||||
|
||||
let value: AddPlaylistContentsMediaContainer = {
|
||||
size: 1,
|
||||
leafCountAdded: 1,
|
||||
leafCountRequested: 1,
|
||||
metadata: [
|
||||
{
|
||||
ratingKey: "94",
|
||||
key: "/playlists/94/items",
|
||||
guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2",
|
||||
type: "playlist",
|
||||
title: "A great playlist",
|
||||
summary: "One of my great playlists",
|
||||
smart: false,
|
||||
playlistType: "video",
|
||||
composite: "/playlists/94/composite/1705800070",
|
||||
duration: 423000,
|
||||
leafCount: 3,
|
||||
addedAt: 1705716458,
|
||||
updatedAt: 1705800070,
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
# AddPlaylistContentsMetadata
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { AddPlaylistContentsMetadata } from "@lukehagar/plexjs";
|
||||
|
||||
let value: AddPlaylistContentsMetadata = {
|
||||
ratingKey: "94",
|
||||
key: "/playlists/94/items",
|
||||
guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2",
|
||||
type: "playlist",
|
||||
title: "A great playlist",
|
||||
summary: "One of my great playlists",
|
||||
smart: false,
|
||||
playlistType: "video",
|
||||
composite: "/playlists/94/composite/1705800070",
|
||||
duration: 423000,
|
||||
leafCount: 3,
|
||||
addedAt: 1705716458,
|
||||
updatedAt: 1705800070,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { AddPlaylistContentsPlaylistsResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# AddPlaylistContentsRequest
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { AddPlaylistContentsRequest } from "@lukehagar/plexjs";
|
||||
|
||||
let value: AddPlaylistContentsRequest = {
|
||||
playlistID: 6350.59,
|
||||
uri: "server://12345/com.plexapp.plugins.library/library/metadata/1",
|
||||
playQueueID: 123,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,42 @@
|
||||
# AddPlaylistContentsResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { AddPlaylistContentsResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: AddPlaylistContentsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 161309,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
object: {
|
||||
mediaContainer: {
|
||||
size: 1,
|
||||
leafCountAdded: 1,
|
||||
leafCountRequested: 1,
|
||||
metadata: [
|
||||
{
|
||||
ratingKey: "94",
|
||||
key: "/playlists/94/items",
|
||||
guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2",
|
||||
type: "playlist",
|
||||
title: "A great playlist",
|
||||
summary: "One of my great playlists",
|
||||
smart: false,
|
||||
playlistType: "video",
|
||||
composite: "/playlists/94/composite/1705800070",
|
||||
duration: 423000,
|
||||
leafCount: 3,
|
||||
addedAt: 1705716458,
|
||||
updatedAt: 1705800070,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,36 @@
|
||||
|
||||
Playlist Updated
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { AddPlaylistContentsResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
let value: AddPlaylistContentsResponseBody = {
|
||||
mediaContainer: {
|
||||
size: 1,
|
||||
leafCountAdded: 1,
|
||||
leafCountRequested: 1,
|
||||
metadata: [
|
||||
{
|
||||
ratingKey: "94",
|
||||
key: "/playlists/94/items",
|
||||
guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2",
|
||||
type: "playlist",
|
||||
title: "A great playlist",
|
||||
summary: "One of my great playlists",
|
||||
smart: false,
|
||||
playlistType: "video",
|
||||
composite: "/playlists/94/composite/1705800070",
|
||||
duration: 423000,
|
||||
leafCount: 3,
|
||||
addedAt: 1705716458,
|
||||
updatedAt: 1705800070,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# ApplyUpdatesErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { ApplyUpdatesErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: ApplyUpdatesErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# ApplyUpdatesRequest
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { ApplyUpdatesRequest, Skip, Tonight } from "@lukehagar/plexjs";
|
||||
|
||||
let value: ApplyUpdatesRequest = {
|
||||
tonight: Tonight.One,
|
||||
skip: Skip.One,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# ApplyUpdatesResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { ApplyUpdatesResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: ApplyUpdatesResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 138183,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { ApplyUpdatesResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
19
docs/models/billing.md
Normal file
19
docs/models/billing.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Billing
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Billing } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Billing = {
|
||||
internalPaymentMethod: {},
|
||||
paymentMethodId: 368725,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| `internalPaymentMethod` | [models.InternalPaymentMethod](../models/internalpaymentmethod.md) | :heavy_check_mark: | N/A |
|
||||
| `paymentMethodId` | *number* | :heavy_check_mark: | N/A |
|
||||
@@ -1,5 +1,17 @@
|
||||
# ButlerTask
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { ButlerTask } from "@lukehagar/plexjs";
|
||||
|
||||
let value: ButlerTask = {
|
||||
name: "BackupDatabase",
|
||||
interval: 3,
|
||||
title: "Backup Database",
|
||||
description: "Create a backup copy of the server's database in the configured backup directory",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
# ButlerTasks
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { ButlerTasks } from "@lukehagar/plexjs";
|
||||
|
||||
let value: ButlerTasks = {
|
||||
butlerTask: [
|
||||
{
|
||||
name: "BackupDatabase",
|
||||
interval: 3,
|
||||
title: "Backup Database",
|
||||
description:
|
||||
"Create a backup copy of the server's database in the configured backup directory",
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# CancelServerActivitiesErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CancelServerActivitiesErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: CancelServerActivitiesErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# CancelServerActivitiesRequest
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CancelServerActivitiesRequest } from "@lukehagar/plexjs";
|
||||
|
||||
let value: CancelServerActivitiesRequest = {
|
||||
activityUUID: "25b71ed5-0f9d-461c-baa7-d404e9e10d3e",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# CancelServerActivitiesResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CancelServerActivitiesResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: CancelServerActivitiesResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 477665,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CancelServerActivitiesResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# CheckForUpdatesErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CheckForUpdatesErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: CheckForUpdatesErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# CheckForUpdatesRequest
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CheckForUpdatesRequest, Download } from "@lukehagar/plexjs";
|
||||
|
||||
let value: CheckForUpdatesRequest = {
|
||||
download: Download.One,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# CheckForUpdatesResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CheckForUpdatesResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: CheckForUpdatesResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 317202,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CheckForUpdatesResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# ClearPlaylistContentsErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { ClearPlaylistContentsErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: ClearPlaylistContentsErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# ClearPlaylistContentsRequest
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { ClearPlaylistContentsRequest } from "@lukehagar/plexjs";
|
||||
|
||||
let value: ClearPlaylistContentsRequest = {
|
||||
playlistID: 6527.9,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# ClearPlaylistContentsResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { ClearPlaylistContentsResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: ClearPlaylistContentsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 208876,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { ClearPlaylistContentsResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
21
docs/models/connections.md
Normal file
21
docs/models/connections.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Connections
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Connections } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Connections = {};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `protocol` | *string* | :heavy_minus_sign: | N/A |
|
||||
| `address` | *string* | :heavy_minus_sign: | N/A |
|
||||
| `port` | *number* | :heavy_minus_sign: | N/A |
|
||||
| `uri` | *string* | :heavy_minus_sign: | N/A |
|
||||
| `local` | *boolean* | :heavy_minus_sign: | N/A |
|
||||
| `relay` | *boolean* | :heavy_minus_sign: | N/A |
|
||||
| `iPv6` | *boolean* | :heavy_minus_sign: | N/A |
|
||||
@@ -1,5 +1,12 @@
|
||||
# Context
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Context } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Context = {};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# Country
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Country } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Country = {
|
||||
tag: "United States of America",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# CreatePlaylistErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CreatePlaylistErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: CreatePlaylistErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,34 @@
|
||||
# CreatePlaylistMediaContainer
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CreatePlaylistMediaContainer } from "@lukehagar/plexjs";
|
||||
|
||||
let value: CreatePlaylistMediaContainer = {
|
||||
size: 7,
|
||||
metadata: [
|
||||
{
|
||||
ratingKey: "96",
|
||||
key: "/playlists/96/items",
|
||||
guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55",
|
||||
type: "playlist",
|
||||
title: "A Great Playlist",
|
||||
summary: "What a great playlist",
|
||||
smart: false,
|
||||
playlistType: "video",
|
||||
icon: "playlist://image.smart",
|
||||
viewCount: 1,
|
||||
lastViewedAt: 1705719589,
|
||||
leafCount: 1,
|
||||
addedAt: 1705719589,
|
||||
updatedAt: 1705724593,
|
||||
composite: "/playlists/96/composite/1705724593",
|
||||
duration: 141000,
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
# CreatePlaylistMetadata
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CreatePlaylistMetadata } from "@lukehagar/plexjs";
|
||||
|
||||
let value: CreatePlaylistMetadata = {
|
||||
ratingKey: "96",
|
||||
key: "/playlists/96/items",
|
||||
guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55",
|
||||
type: "playlist",
|
||||
title: "A Great Playlist",
|
||||
summary: "What a great playlist",
|
||||
smart: false,
|
||||
playlistType: "video",
|
||||
icon: "playlist://image.smart",
|
||||
viewCount: 1,
|
||||
lastViewedAt: 1705719589,
|
||||
leafCount: 1,
|
||||
addedAt: 1705719589,
|
||||
updatedAt: 1705724593,
|
||||
composite: "/playlists/96/composite/1705724593",
|
||||
duration: 141000,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CreatePlaylistPlaylistsResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# CreatePlaylistRequest
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CreatePlaylistRequest, QueryParamType, Smart } from "@lukehagar/plexjs";
|
||||
|
||||
let value: CreatePlaylistRequest = {
|
||||
title: "<value>",
|
||||
type: QueryParamType.Photo,
|
||||
smart: Smart.One,
|
||||
uri: "https://deadly-corsage.info",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,43 @@
|
||||
# CreatePlaylistResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CreatePlaylistResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: CreatePlaylistResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 128926,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
object: {
|
||||
mediaContainer: {
|
||||
size: 7,
|
||||
metadata: [
|
||||
{
|
||||
ratingKey: "96",
|
||||
key: "/playlists/96/items",
|
||||
guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55",
|
||||
type: "playlist",
|
||||
title: "A Great Playlist",
|
||||
summary: "What a great playlist",
|
||||
smart: false,
|
||||
playlistType: "video",
|
||||
icon: "playlist://image.smart",
|
||||
viewCount: 1,
|
||||
lastViewedAt: 1705719589,
|
||||
leafCount: 1,
|
||||
addedAt: 1705719589,
|
||||
updatedAt: 1705724593,
|
||||
composite: "/playlists/96/composite/1705724593",
|
||||
duration: 141000,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,37 @@
|
||||
|
||||
returns all playlists
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { CreatePlaylistResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
let value: CreatePlaylistResponseBody = {
|
||||
mediaContainer: {
|
||||
size: 7,
|
||||
metadata: [
|
||||
{
|
||||
ratingKey: "96",
|
||||
key: "/playlists/96/items",
|
||||
guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55",
|
||||
type: "playlist",
|
||||
title: "A Great Playlist",
|
||||
summary: "What a great playlist",
|
||||
smart: false,
|
||||
playlistType: "video",
|
||||
icon: "playlist://image.smart",
|
||||
viewCount: 1,
|
||||
lastViewedAt: 1705719589,
|
||||
leafCount: 1,
|
||||
addedAt: 1705719589,
|
||||
updatedAt: 1705724593,
|
||||
composite: "/playlists/96/composite/1705724593",
|
||||
duration: 141000,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# DeleteLibraryErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { DeleteLibraryErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: DeleteLibraryErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# DeleteLibraryRequest
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { DeleteLibraryRequest } from "@lukehagar/plexjs";
|
||||
|
||||
let value: DeleteLibraryRequest = {
|
||||
sectionId: 1000,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# DeleteLibraryResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { DeleteLibraryResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: DeleteLibraryResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 736918,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { DeleteLibraryResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# DeletePlaylistErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { DeletePlaylistErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: DeletePlaylistErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# DeletePlaylistRequest
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { DeletePlaylistRequest } from "@lukehagar/plexjs";
|
||||
|
||||
let value: DeletePlaylistRequest = {
|
||||
playlistID: 5701.97,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# DeletePlaylistResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { DeletePlaylistResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: DeletePlaylistResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 38425,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { DeletePlaylistResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Device
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Device } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Device = {
|
||||
id: 1,
|
||||
name: "iPhone",
|
||||
platform: "iOS",
|
||||
createdAt: 1654131230,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# Director
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Director } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Director = {
|
||||
tag: "Peyton Reed",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# Directory
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Directory } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Directory = {};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Indicate that you want to start download any updates found.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Download } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Download = Download.One;
|
||||
```
|
||||
|
||||
## Values
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# EnablePaperTrailErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { EnablePaperTrailErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: EnablePaperTrailErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# EnablePaperTrailResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { EnablePaperTrailResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: EnablePaperTrailResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 99280,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { EnablePaperTrailResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# Errors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Errors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Errors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
73
docs/models/features.md
Normal file
73
docs/models/features.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# Features
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Features } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Features = Features.SharedServerNotification;
|
||||
```
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------------------------------------- | --------------------------------------- |
|
||||
| `AndroidDolbyVision` | Android - Dolby Vision |
|
||||
| `AndroidPiP` | Android - PiP |
|
||||
| `CUSunset` | CU Sunset |
|
||||
| `HRKEnableEUR` | HRK_enable_EUR |
|
||||
| `TREBLEShowFeatures` | TREBLE-show-features |
|
||||
| `AdCountdownTimer` | ad-countdown-timer |
|
||||
| `AdaptiveBitrate` | adaptive_bitrate |
|
||||
| `AmazonLoopDebug` | amazon-loop-debug |
|
||||
| `AvodAdAnalysis` | avod-ad-analysis |
|
||||
| `AvodNewMedia` | avod-new-media |
|
||||
| `BlacklistGetSignin` | blacklist_get_signin |
|
||||
| `ClientRadioStations` | client-radio-stations |
|
||||
| `CloudflareTurnstileRequired` | cloudflare-turnstile-required |
|
||||
| `Collections` | collections |
|
||||
| `CommentsAndRepliesPushNotifications` | comments_and_replies_push_notifications |
|
||||
| `CommunityAccessPlexTv` | community_access_plex_tv |
|
||||
| `CompanionsSonos` | companions_sonos |
|
||||
| `CustomHomeRemoval` | custom-home-removal |
|
||||
| `DisableHomeUserFriendships` | disable_home_user_friendships |
|
||||
| `DisableSharingFriendships` | disable_sharing_friendships |
|
||||
| `DrmSupport` | drm_support |
|
||||
| `ExcludeRestrictions` | exclude restrictions |
|
||||
| `FederatedAuth` | federated-auth |
|
||||
| `FriendRequestPushNotifications` | friend_request_push_notifications |
|
||||
| `GuidedUpgrade` | guided-upgrade |
|
||||
| `Home` | home |
|
||||
| `IncreasePasswordComplexity` | increase-password-complexity |
|
||||
| `Ios14PrivacyBanner` | ios14-privacy-banner |
|
||||
| `IterableNotificationTokens` | iterable-notification-tokens |
|
||||
| `KeepPaymentMethod` | keep-payment-method |
|
||||
| `KevinBacon` | kevin-bacon |
|
||||
| `KoreaConsent` | korea-consent |
|
||||
| `LeIsrgRootX1` | le_isrg_root_x1 |
|
||||
| `LetsEncrypt` | lets_encrypt |
|
||||
| `LightningDvrPivot` | lightning-dvr-pivot |
|
||||
| `LiveTvSupportIncompleteSegments` | live-tv-support-incomplete-segments |
|
||||
| `Livetv` | livetv |
|
||||
| `MetadataSearch` | metadata_search |
|
||||
| `NewPlexPassPrices` | new_plex_pass_prices |
|
||||
| `NewsProviderSunsetModal` | news-provider-sunset-modal |
|
||||
| `PhotosFavorites` | photos-favorites |
|
||||
| `PhotosMetadataEdition` | photos-metadata-edition |
|
||||
| `PmsHealth` | pms_health |
|
||||
| `Radio` | radio |
|
||||
| `RateLimitClientToken` | rate-limit-client-token |
|
||||
| `ScrobblingServicePlexTv` | scrobbling-service-plex-tv |
|
||||
| `SharedServerNotification` | shared_server_notification |
|
||||
| `SharedSourceNotification` | shared_source_notification |
|
||||
| `SigninWithApple` | signin_with_apple |
|
||||
| `SpringServeAdProvider` | spring_serve_ad_provider |
|
||||
| `TranscoderCache` | transcoder_cache |
|
||||
| `TunerSharing` | tuner-sharing |
|
||||
| `TwoFactorAuthentication` | two-factor-authentication |
|
||||
| `Unsupportedtuners` | unsupportedtuners |
|
||||
| `Upgrade3ds2` | upgrade-3ds2 |
|
||||
| `VodSchema` | vod-schema |
|
||||
| `VodCloudflare` | vod_cloudflare |
|
||||
| `WatchTogetherInvite` | watch-together-invite |
|
||||
| `WebServerDashboard` | web_server_dashboard |
|
||||
@@ -1,5 +1,17 @@
|
||||
# Field
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Field } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Field = {
|
||||
key: "label",
|
||||
title: "Label",
|
||||
type: "tag",
|
||||
subType: "bitrate",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# FieldType
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { FieldType } from "@lukehagar/plexjs";
|
||||
|
||||
let value: FieldType = {
|
||||
type: "resolution",
|
||||
operator: [
|
||||
{
|
||||
key: "=",
|
||||
title: "is",
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -4,6 +4,13 @@ Filters content by field and direction/equality
|
||||
(Unknown if viewedAt is the only supported column)
|
||||
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Filter } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Filter = {};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -6,6 +6,13 @@ The `force` argument is used to disable overwriting.
|
||||
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
|
||||
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Force } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Force = Force.One;
|
||||
```
|
||||
|
||||
## Values
|
||||
|
||||
|
||||
39
docs/models/friend.md
Normal file
39
docs/models/friend.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Friend
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Friend, Status } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Friend = {
|
||||
email: "username@email.com",
|
||||
friendlyName: "exampleUser",
|
||||
home: true,
|
||||
id: 0,
|
||||
restricted: false,
|
||||
sharedServers: [{}],
|
||||
sharedSources: [{}],
|
||||
status: Status.Accepted,
|
||||
thumb: "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578",
|
||||
title: "username123",
|
||||
username: "username123",
|
||||
uuid: "7d1916e0d8f6e76b",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| `email` | *string* | :heavy_check_mark: | The account email address | username@email.com |
|
||||
| `friendlyName` | *string* | :heavy_check_mark: | The account full name | exampleUser |
|
||||
| `home` | *boolean* | :heavy_check_mark: | If the account is a Plex Home user | |
|
||||
| `id` | *number* | :heavy_check_mark: | The Plex account ID | |
|
||||
| `restricted` | *boolean* | :heavy_minus_sign: | If the account is a Plex Home managed user | |
|
||||
| `sharedServers` | [models.SharedServers](../models/sharedservers.md)[] | :heavy_check_mark: | N/A | |
|
||||
| `sharedSources` | [models.SharedSources](../models/sharedsources.md)[] | :heavy_check_mark: | N/A | |
|
||||
| `status` | [models.Status](../models/status.md) | :heavy_check_mark: | Current friend request status | accepted |
|
||||
| `thumb` | *string* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578 |
|
||||
| `title` | *string* | :heavy_check_mark: | The title of the account (username or friendly name) | username123 |
|
||||
| `username` | *string* | :heavy_check_mark: | The account username | username123 |
|
||||
| `uuid` | *string* | :heavy_check_mark: | The account Universally Unique Identifier (UUID) | 7d1916e0d8f6e76b |
|
||||
@@ -1,5 +1,14 @@
|
||||
# Genre
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { Genre } from "@lukehagar/plexjs";
|
||||
|
||||
let value: Genre = {
|
||||
tag: "Comedy",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
39
docs/models/geodata.md
Normal file
39
docs/models/geodata.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# GeoData
|
||||
|
||||
Geo location data
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GeoData } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GeoData = {
|
||||
code: "VI",
|
||||
continentCode: "NA",
|
||||
country: "United States Virgin Islands",
|
||||
city: "Amsterdam",
|
||||
europeanUnionMember: true,
|
||||
timeZone: "America/St_Thomas",
|
||||
postalCode: 802,
|
||||
inPrivacyRestrictedCountry: true,
|
||||
inPrivacyRestrictedRegion: true,
|
||||
subdivisions: "Saint Thomas",
|
||||
coordinates: "18.3381, -64.8941",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `code` | *string* | :heavy_check_mark: | The ISO 3166-1 alpha-2 code of the country. | VI |
|
||||
| `continentCode` | *string* | :heavy_check_mark: | The continent code where the country is located. | NA |
|
||||
| `country` | *string* | :heavy_check_mark: | The official name of the country. | United States Virgin Islands |
|
||||
| `city` | *string* | :heavy_check_mark: | The name of the city. | Amsterdam |
|
||||
| `europeanUnionMember` | *boolean* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true |
|
||||
| `timeZone` | *string* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas |
|
||||
| `postalCode` | *number* | :heavy_check_mark: | The postal code of the location. | 802 |
|
||||
| `inPrivacyRestrictedCountry` | *boolean* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true |
|
||||
| `inPrivacyRestrictedRegion` | *boolean* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true |
|
||||
| `subdivisions` | *string* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas |
|
||||
| `coordinates` | *string* | :heavy_check_mark: | The geographical coordinates (latitude, longitude) of the location. | 18.3381, -64.8941 |
|
||||
@@ -1,5 +1,16 @@
|
||||
# GetAvailableClientsErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetAvailableClientsErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetAvailableClientsErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
# GetAvailableClientsMediaContainer
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetAvailableClientsMediaContainer } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetAvailableClientsMediaContainer = {
|
||||
size: 1,
|
||||
server: [
|
||||
{
|
||||
name: "iPad",
|
||||
host: "10.10.10.102",
|
||||
address: "10.10.10.102",
|
||||
port: 32500,
|
||||
machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05",
|
||||
version: "8.17",
|
||||
protocol: "plex",
|
||||
product: "Plex for iOS",
|
||||
deviceClass: "tablet",
|
||||
protocolVersion: 2,
|
||||
protocolCapabilities: "playback,playqueues,timeline,provider-playback",
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,38 @@
|
||||
# GetAvailableClientsResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetAvailableClientsResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetAvailableClientsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 715190,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
object: {
|
||||
mediaContainer: {
|
||||
size: 1,
|
||||
server: [
|
||||
{
|
||||
name: "iPad",
|
||||
host: "10.10.10.102",
|
||||
address: "10.10.10.102",
|
||||
port: 32500,
|
||||
machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05",
|
||||
version: "8.17",
|
||||
protocol: "plex",
|
||||
product: "Plex for iOS",
|
||||
deviceClass: "tablet",
|
||||
protocolVersion: 2,
|
||||
protocolCapabilities: "playback,playqueues,timeline,provider-playback",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,32 @@
|
||||
|
||||
Available Clients
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetAvailableClientsResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetAvailableClientsResponseBody = {
|
||||
mediaContainer: {
|
||||
size: 1,
|
||||
server: [
|
||||
{
|
||||
name: "iPad",
|
||||
host: "10.10.10.102",
|
||||
address: "10.10.10.102",
|
||||
port: 32500,
|
||||
machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05",
|
||||
version: "8.17",
|
||||
protocol: "plex",
|
||||
product: "Plex for iOS",
|
||||
deviceClass: "tablet",
|
||||
protocolVersion: 2,
|
||||
protocolCapabilities: "playback,playqueues,timeline,provider-playback",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,24 @@
|
||||
# GetAvailableClientsServer
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetAvailableClientsServer } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetAvailableClientsServer = {
|
||||
name: "iPad",
|
||||
host: "10.10.10.102",
|
||||
address: "10.10.10.102",
|
||||
port: 32500,
|
||||
machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05",
|
||||
version: "8.17",
|
||||
protocol: "plex",
|
||||
product: "Plex for iOS",
|
||||
deviceClass: "tablet",
|
||||
protocolVersion: 2,
|
||||
protocolCapabilities: "playback,playqueues,timeline,provider-playback",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetAvailableClientsServerResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# GetBandwidthStatisticsAccount
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetBandwidthStatisticsAccount } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetBandwidthStatisticsAccount = {
|
||||
id: 238960586,
|
||||
key: "/accounts/238960586",
|
||||
name: "Diane",
|
||||
defaultAudioLanguage: "en",
|
||||
autoSelectAudio: true,
|
||||
defaultSubtitleLanguage: "en",
|
||||
subtitleMode: 1,
|
||||
thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967",
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# GetBandwidthStatisticsDevice
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetBandwidthStatisticsDevice } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetBandwidthStatisticsDevice = {
|
||||
id: 208,
|
||||
name: "Roku Express",
|
||||
platform: "Roku",
|
||||
clientIdentifier: "793095d235660625108ef785cc7646e9",
|
||||
createdAt: 1706470556,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# GetBandwidthStatisticsErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetBandwidthStatisticsErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetBandwidthStatisticsErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
# GetBandwidthStatisticsMediaContainer
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetBandwidthStatisticsMediaContainer } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetBandwidthStatisticsMediaContainer = {
|
||||
size: 5497,
|
||||
device: [
|
||||
{
|
||||
id: 208,
|
||||
name: "Roku Express",
|
||||
platform: "Roku",
|
||||
clientIdentifier: "793095d235660625108ef785cc7646e9",
|
||||
createdAt: 1706470556,
|
||||
},
|
||||
],
|
||||
account: [
|
||||
{
|
||||
id: 238960586,
|
||||
key: "/accounts/238960586",
|
||||
name: "Diane",
|
||||
defaultAudioLanguage: "en",
|
||||
autoSelectAudio: true,
|
||||
defaultSubtitleLanguage: "en",
|
||||
subtitleMode: 1,
|
||||
thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967",
|
||||
},
|
||||
],
|
||||
statisticsBandwidth: [
|
||||
{
|
||||
accountID: 238960586,
|
||||
timespan: 6,
|
||||
at: 1718387650,
|
||||
lan: true,
|
||||
bytes: 22,
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# GetBandwidthStatisticsRequest
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetBandwidthStatisticsRequest } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetBandwidthStatisticsRequest = {
|
||||
timespan: 4,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,53 @@
|
||||
# GetBandwidthStatisticsResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetBandwidthStatisticsResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetBandwidthStatisticsResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 623510,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
object: {
|
||||
mediaContainer: {
|
||||
size: 5497,
|
||||
device: [
|
||||
{
|
||||
id: 208,
|
||||
name: "Roku Express",
|
||||
platform: "Roku",
|
||||
clientIdentifier: "793095d235660625108ef785cc7646e9",
|
||||
createdAt: 1706470556,
|
||||
},
|
||||
],
|
||||
account: [
|
||||
{
|
||||
id: 238960586,
|
||||
key: "/accounts/238960586",
|
||||
name: "Diane",
|
||||
defaultAudioLanguage: "en",
|
||||
autoSelectAudio: true,
|
||||
defaultSubtitleLanguage: "en",
|
||||
subtitleMode: 1,
|
||||
thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967",
|
||||
},
|
||||
],
|
||||
statisticsBandwidth: [
|
||||
{
|
||||
accountID: 238960586,
|
||||
timespan: 6,
|
||||
at: 1718387650,
|
||||
lan: true,
|
||||
bytes: 22,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,47 @@
|
||||
|
||||
Bandwidth Statistics
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetBandwidthStatisticsResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetBandwidthStatisticsResponseBody = {
|
||||
mediaContainer: {
|
||||
size: 5497,
|
||||
device: [
|
||||
{
|
||||
id: 208,
|
||||
name: "Roku Express",
|
||||
platform: "Roku",
|
||||
clientIdentifier: "793095d235660625108ef785cc7646e9",
|
||||
createdAt: 1706470556,
|
||||
},
|
||||
],
|
||||
account: [
|
||||
{
|
||||
id: 238960586,
|
||||
key: "/accounts/238960586",
|
||||
name: "Diane",
|
||||
defaultAudioLanguage: "en",
|
||||
autoSelectAudio: true,
|
||||
defaultSubtitleLanguage: "en",
|
||||
subtitleMode: 1,
|
||||
thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967",
|
||||
},
|
||||
],
|
||||
statisticsBandwidth: [
|
||||
{
|
||||
accountID: 238960586,
|
||||
timespan: 6,
|
||||
at: 1718387650,
|
||||
lan: true,
|
||||
bytes: 22,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetBandwidthStatisticsStatisticsResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetButlerTasksButlerResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# GetButlerTasksErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetButlerTasksErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetButlerTasksErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,31 @@
|
||||
# GetButlerTasksResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetButlerTasksResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetButlerTasksResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 791725,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
object: {
|
||||
butlerTasks: {
|
||||
butlerTask: [
|
||||
{
|
||||
name: "BackupDatabase",
|
||||
interval: 3,
|
||||
title: "Backup Database",
|
||||
description:
|
||||
"Create a backup copy of the server's database in the configured backup directory",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,25 @@
|
||||
|
||||
All butler tasks
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetButlerTasksResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetButlerTasksResponseBody = {
|
||||
butlerTasks: {
|
||||
butlerTask: [
|
||||
{
|
||||
name: "BackupDatabase",
|
||||
interval: 3,
|
||||
title: "Backup Database",
|
||||
description:
|
||||
"Create a backup copy of the server's database in the configured backup directory",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
21
docs/models/getcompanionsdataerrors.md
Normal file
21
docs/models/getcompanionsdataerrors.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# GetCompanionsDataErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetCompanionsDataErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetCompanionsDataErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
||||
| `code` | *number* | :heavy_minus_sign: | N/A | 1001 |
|
||||
| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
||||
| `status` | *number* | :heavy_minus_sign: | N/A | 401 |
|
||||
34
docs/models/getcompanionsdataresponse.md
Normal file
34
docs/models/getcompanionsdataresponse.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# GetCompanionsDataResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetCompanionsDataResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetCompanionsDataResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 337396,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
responseBodies: [
|
||||
{
|
||||
identifier: "tv.plex.sonos",
|
||||
baseURL: "https://sonos.plex.tv",
|
||||
title: "Sonos",
|
||||
linkURL: "https://sonos.plex.tv/link",
|
||||
provides: "client,player",
|
||||
token: "<value>",
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||
| `responseBodies` | [models.ResponseBody](../models/responsebody.md)[] | :heavy_minus_sign: | Companions Data |
|
||||
18
docs/models/getcompanionsdataresponsebody.md
Normal file
18
docs/models/getcompanionsdataresponsebody.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# GetCompanionsDataResponseBody
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetCompanionsDataResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
||||
| `errors` | [models.GetCompanionsDataErrors](../models/getcompanionsdataerrors.md)[] | :heavy_minus_sign: | N/A |
|
||||
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
||||
@@ -1,5 +1,16 @@
|
||||
# GetDevicesErrors
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetDevicesErrors } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetDevicesErrors = {
|
||||
code: 1001,
|
||||
message: "User could not be authenticated",
|
||||
status: 401,
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# GetDevicesMediaContainer
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetDevicesMediaContainer } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetDevicesMediaContainer = {
|
||||
size: 151,
|
||||
identifier: "com.plexapp.system.devices",
|
||||
device: [
|
||||
{
|
||||
id: 1,
|
||||
name: "iPhone",
|
||||
platform: "iOS",
|
||||
createdAt: 1654131230,
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
# GetDevicesResponse
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetDevicesResponse } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetDevicesResponse = {
|
||||
contentType: "<value>",
|
||||
statusCode: 844266,
|
||||
rawResponse: new Response('{"message": "hello world"}', {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
object: {
|
||||
mediaContainer: {
|
||||
size: 151,
|
||||
identifier: "com.plexapp.system.devices",
|
||||
device: [
|
||||
{
|
||||
id: 1,
|
||||
name: "iPhone",
|
||||
platform: "iOS",
|
||||
createdAt: 1654131230,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,26 @@
|
||||
|
||||
Devices
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetDevicesResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
let value: GetDevicesResponseBody = {
|
||||
mediaContainer: {
|
||||
size: 151,
|
||||
identifier: "com.plexapp.system.devices",
|
||||
device: [
|
||||
{
|
||||
id: 1,
|
||||
name: "iPhone",
|
||||
platform: "iOS",
|
||||
createdAt: 1654131230,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```typescript
|
||||
import { GetDevicesServerResponseBody } from "@lukehagar/plexjs";
|
||||
|
||||
// No examples available for this model
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user