mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 12:37:46 +00:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
100d1e093b | ||
|
|
ff9f3dc489 | ||
|
|
b9629abe33 | ||
|
|
f306faa1ff | ||
|
|
e5abca0f3c | ||
|
|
78acc1880a | ||
|
|
a31aae3cd8 | ||
|
|
bc64130459 | ||
|
|
b553c6204c | ||
|
|
9b02d27d5e | ||
|
|
f200bc563f | ||
|
|
5c4b98300b | ||
|
|
1e46343716 | ||
|
|
c34f35ba3d | ||
|
|
b77c4d818f | ||
|
|
ea6e427d7b | ||
|
|
4ed36cd1a2 | ||
|
|
1b0b5c218c | ||
|
|
e92eb2ba92 |
480
.speakeasy/gen.lock
Executable file
480
.speakeasy/gen.lock
Executable file
@@ -0,0 +1,480 @@
|
|||||||
|
lockVersion: 2.0.0
|
||||||
|
id: 16f22cbf-f23f-4419-8924-3a4b06381947
|
||||||
|
management:
|
||||||
|
docChecksum: 34d22936f2456c2c461abdfc773e3fc4
|
||||||
|
docVersion: 0.0.3
|
||||||
|
speakeasyVersion: internal
|
||||||
|
generationVersion: 2.233.2
|
||||||
|
releaseVersion: 0.4.0
|
||||||
|
configChecksum: 857d3a3d03c912d0f09faf0342203722
|
||||||
|
repoURL: https://github.com/LukeHagar/plexjs.git
|
||||||
|
repoSubDirectory: .
|
||||||
|
installationURL: https://github.com/LukeHagar/plexjs
|
||||||
|
published: true
|
||||||
|
features:
|
||||||
|
typescript:
|
||||||
|
constsAndDefaults: 0.1.1
|
||||||
|
core: 3.4.6
|
||||||
|
flattening: 2.81.1
|
||||||
|
globalSecurity: 2.82.2
|
||||||
|
globalServerURLs: 2.82.1
|
||||||
|
nameOverrides: 2.81.1
|
||||||
|
generatedFiles:
|
||||||
|
- src/sdk/server.ts
|
||||||
|
- src/sdk/media.ts
|
||||||
|
- src/sdk/activities.ts
|
||||||
|
- src/sdk/butler.ts
|
||||||
|
- src/sdk/hubs.ts
|
||||||
|
- src/sdk/search.ts
|
||||||
|
- src/sdk/library.ts
|
||||||
|
- src/sdk/log.ts
|
||||||
|
- src/sdk/playlists.ts
|
||||||
|
- src/sdk/security.ts
|
||||||
|
- src/sdk/sessions.ts
|
||||||
|
- src/sdk/updater.ts
|
||||||
|
- src/sdk/video.ts
|
||||||
|
- src/sdk/sdk.ts
|
||||||
|
- .eslintrc.js
|
||||||
|
- .npmignore
|
||||||
|
- RUNTIMES.md
|
||||||
|
- package-lock.json
|
||||||
|
- package.json
|
||||||
|
- src/index.ts
|
||||||
|
- src/lib/base64.ts
|
||||||
|
- src/lib/config.ts
|
||||||
|
- src/lib/encodings.ts
|
||||||
|
- src/lib/http.ts
|
||||||
|
- src/lib/retries.ts
|
||||||
|
- src/lib/sdks.ts
|
||||||
|
- src/lib/security.ts
|
||||||
|
- src/lib/url.ts
|
||||||
|
- src/sdk/index.ts
|
||||||
|
- src/models/errors/sdkerror.ts
|
||||||
|
- src/types/blobs.ts
|
||||||
|
- src/types/decimal.ts
|
||||||
|
- src/types/index.ts
|
||||||
|
- src/types/operations.ts
|
||||||
|
- src/types/rfcdate.ts
|
||||||
|
- tsconfig.json
|
||||||
|
- src/models/operations/getservercapabilities.ts
|
||||||
|
- src/models/operations/getserverpreferences.ts
|
||||||
|
- src/models/operations/getavailableclients.ts
|
||||||
|
- src/models/operations/getdevices.ts
|
||||||
|
- src/models/operations/getserveridentity.ts
|
||||||
|
- src/models/operations/getmyplexaccount.ts
|
||||||
|
- src/models/operations/getresizedphoto.ts
|
||||||
|
- src/models/operations/getserverlist.ts
|
||||||
|
- src/models/operations/markplayed.ts
|
||||||
|
- src/models/operations/markunplayed.ts
|
||||||
|
- src/models/operations/updateplayprogress.ts
|
||||||
|
- src/models/operations/getserveractivities.ts
|
||||||
|
- src/models/operations/cancelserveractivities.ts
|
||||||
|
- src/models/operations/getbutlertasks.ts
|
||||||
|
- src/models/operations/startalltasks.ts
|
||||||
|
- src/models/operations/stopalltasks.ts
|
||||||
|
- src/models/operations/starttask.ts
|
||||||
|
- src/models/operations/stoptask.ts
|
||||||
|
- src/models/operations/getglobalhubs.ts
|
||||||
|
- src/models/operations/getlibraryhubs.ts
|
||||||
|
- src/models/operations/performsearch.ts
|
||||||
|
- src/models/operations/performvoicesearch.ts
|
||||||
|
- src/models/operations/getsearchresults.ts
|
||||||
|
- src/models/operations/getfilehash.ts
|
||||||
|
- src/models/operations/getrecentlyadded.ts
|
||||||
|
- src/models/operations/getlibraries.ts
|
||||||
|
- src/models/operations/getlibrary.ts
|
||||||
|
- src/models/operations/deletelibrary.ts
|
||||||
|
- src/models/operations/getlibraryitems.ts
|
||||||
|
- src/models/operations/refreshlibrary.ts
|
||||||
|
- src/models/operations/getlatestlibraryitems.ts
|
||||||
|
- src/models/operations/getcommonlibraryitems.ts
|
||||||
|
- src/models/operations/getmetadata.ts
|
||||||
|
- src/models/operations/getmetadatachildren.ts
|
||||||
|
- src/models/operations/getondeck.ts
|
||||||
|
- src/models/operations/logline.ts
|
||||||
|
- src/models/operations/logmultiline.ts
|
||||||
|
- src/models/operations/enablepapertrail.ts
|
||||||
|
- src/models/operations/createplaylist.ts
|
||||||
|
- src/models/operations/getplaylists.ts
|
||||||
|
- src/models/operations/getplaylist.ts
|
||||||
|
- src/models/operations/deleteplaylist.ts
|
||||||
|
- src/models/operations/updateplaylist.ts
|
||||||
|
- src/models/operations/getplaylistcontents.ts
|
||||||
|
- src/models/operations/clearplaylistcontents.ts
|
||||||
|
- src/models/operations/addplaylistcontents.ts
|
||||||
|
- src/models/operations/uploadplaylist.ts
|
||||||
|
- src/models/operations/gettransienttoken.ts
|
||||||
|
- src/models/operations/getsourceconnectioninformation.ts
|
||||||
|
- src/models/operations/getsessions.ts
|
||||||
|
- src/models/operations/getsessionhistory.ts
|
||||||
|
- src/models/operations/gettranscodesessions.ts
|
||||||
|
- src/models/operations/stoptranscodesession.ts
|
||||||
|
- src/models/operations/getupdatestatus.ts
|
||||||
|
- src/models/operations/checkforupdates.ts
|
||||||
|
- src/models/operations/applyupdates.ts
|
||||||
|
- src/models/operations/startuniversaltranscode.ts
|
||||||
|
- src/models/operations/gettimeline.ts
|
||||||
|
- src/models/errors/getservercapabilities.ts
|
||||||
|
- src/models/errors/getserverpreferences.ts
|
||||||
|
- src/models/errors/getavailableclients.ts
|
||||||
|
- src/models/errors/getdevices.ts
|
||||||
|
- src/models/errors/getserveridentity.ts
|
||||||
|
- src/models/errors/getmyplexaccount.ts
|
||||||
|
- src/models/errors/getresizedphoto.ts
|
||||||
|
- src/models/errors/getserverlist.ts
|
||||||
|
- src/models/errors/markplayed.ts
|
||||||
|
- src/models/errors/markunplayed.ts
|
||||||
|
- src/models/errors/updateplayprogress.ts
|
||||||
|
- src/models/errors/getserveractivities.ts
|
||||||
|
- src/models/errors/cancelserveractivities.ts
|
||||||
|
- src/models/errors/getbutlertasks.ts
|
||||||
|
- src/models/errors/startalltasks.ts
|
||||||
|
- src/models/errors/stopalltasks.ts
|
||||||
|
- src/models/errors/starttask.ts
|
||||||
|
- src/models/errors/stoptask.ts
|
||||||
|
- src/models/errors/getglobalhubs.ts
|
||||||
|
- src/models/errors/getlibraryhubs.ts
|
||||||
|
- src/models/errors/performsearch.ts
|
||||||
|
- src/models/errors/performvoicesearch.ts
|
||||||
|
- src/models/errors/getsearchresults.ts
|
||||||
|
- src/models/errors/getfilehash.ts
|
||||||
|
- src/models/errors/getrecentlyadded.ts
|
||||||
|
- src/models/errors/getlibraries.ts
|
||||||
|
- src/models/errors/getlibrary.ts
|
||||||
|
- src/models/errors/deletelibrary.ts
|
||||||
|
- src/models/errors/getlibraryitems.ts
|
||||||
|
- src/models/errors/refreshlibrary.ts
|
||||||
|
- src/models/errors/getlatestlibraryitems.ts
|
||||||
|
- src/models/errors/getcommonlibraryitems.ts
|
||||||
|
- src/models/errors/getmetadata.ts
|
||||||
|
- src/models/errors/getmetadatachildren.ts
|
||||||
|
- src/models/errors/getondeck.ts
|
||||||
|
- src/models/errors/logline.ts
|
||||||
|
- src/models/errors/logmultiline.ts
|
||||||
|
- src/models/errors/enablepapertrail.ts
|
||||||
|
- src/models/errors/createplaylist.ts
|
||||||
|
- src/models/errors/getplaylists.ts
|
||||||
|
- src/models/errors/getplaylist.ts
|
||||||
|
- src/models/errors/deleteplaylist.ts
|
||||||
|
- src/models/errors/updateplaylist.ts
|
||||||
|
- src/models/errors/getplaylistcontents.ts
|
||||||
|
- src/models/errors/clearplaylistcontents.ts
|
||||||
|
- src/models/errors/addplaylistcontents.ts
|
||||||
|
- src/models/errors/uploadplaylist.ts
|
||||||
|
- src/models/errors/gettransienttoken.ts
|
||||||
|
- src/models/errors/getsourceconnectioninformation.ts
|
||||||
|
- src/models/errors/getsessions.ts
|
||||||
|
- src/models/errors/getsessionhistory.ts
|
||||||
|
- src/models/errors/gettranscodesessions.ts
|
||||||
|
- src/models/errors/stoptranscodesession.ts
|
||||||
|
- src/models/errors/getupdatestatus.ts
|
||||||
|
- src/models/errors/checkforupdates.ts
|
||||||
|
- src/models/errors/applyupdates.ts
|
||||||
|
- src/models/errors/startuniversaltranscode.ts
|
||||||
|
- src/models/errors/gettimeline.ts
|
||||||
|
- src/models/components/security.ts
|
||||||
|
- src/models/errors/index.ts
|
||||||
|
- src/models/operations/index.ts
|
||||||
|
- src/models/components/index.ts
|
||||||
|
- docs/models/operations/directory.md
|
||||||
|
- docs/models/operations/mediacontainer.md
|
||||||
|
- docs/models/operations/getservercapabilitiesresponsebody.md
|
||||||
|
- docs/models/operations/getservercapabilitiesresponse.md
|
||||||
|
- docs/models/operations/getserverpreferencesresponse.md
|
||||||
|
- docs/models/operations/server.md
|
||||||
|
- docs/models/operations/getavailableclientsmediacontainer.md
|
||||||
|
- docs/models/operations/responsebody.md
|
||||||
|
- docs/models/operations/getavailableclientsresponse.md
|
||||||
|
- docs/models/operations/device.md
|
||||||
|
- docs/models/operations/getdevicesmediacontainer.md
|
||||||
|
- docs/models/operations/getdevicesresponsebody.md
|
||||||
|
- docs/models/operations/getdevicesresponse.md
|
||||||
|
- docs/models/operations/getserveridentitymediacontainer.md
|
||||||
|
- docs/models/operations/getserveridentityresponsebody.md
|
||||||
|
- docs/models/operations/getserveridentityresponse.md
|
||||||
|
- docs/models/operations/myplex.md
|
||||||
|
- docs/models/operations/getmyplexaccountresponsebody.md
|
||||||
|
- docs/models/operations/getmyplexaccountresponse.md
|
||||||
|
- docs/models/operations/minsize.md
|
||||||
|
- docs/models/operations/upscale.md
|
||||||
|
- docs/models/operations/getresizedphotorequest.md
|
||||||
|
- docs/models/operations/getresizedphotoresponse.md
|
||||||
|
- docs/models/operations/getserverlistserver.md
|
||||||
|
- docs/models/operations/getserverlistmediacontainer.md
|
||||||
|
- docs/models/operations/getserverlistresponsebody.md
|
||||||
|
- docs/models/operations/getserverlistresponse.md
|
||||||
|
- docs/models/operations/markplayedrequest.md
|
||||||
|
- docs/models/operations/markplayedresponse.md
|
||||||
|
- docs/models/operations/markunplayedrequest.md
|
||||||
|
- docs/models/operations/markunplayedresponse.md
|
||||||
|
- docs/models/operations/updateplayprogressrequest.md
|
||||||
|
- docs/models/operations/updateplayprogressresponse.md
|
||||||
|
- docs/models/operations/context.md
|
||||||
|
- docs/models/operations/activity.md
|
||||||
|
- docs/models/operations/getserveractivitiesmediacontainer.md
|
||||||
|
- docs/models/operations/getserveractivitiesresponsebody.md
|
||||||
|
- docs/models/operations/getserveractivitiesresponse.md
|
||||||
|
- docs/models/operations/cancelserveractivitiesrequest.md
|
||||||
|
- docs/models/operations/cancelserveractivitiesresponse.md
|
||||||
|
- docs/models/operations/butlertask.md
|
||||||
|
- docs/models/operations/butlertasks.md
|
||||||
|
- docs/models/operations/getbutlertasksresponsebody.md
|
||||||
|
- docs/models/operations/getbutlertasksresponse.md
|
||||||
|
- docs/models/operations/startalltasksresponse.md
|
||||||
|
- docs/models/operations/stopalltasksresponse.md
|
||||||
|
- docs/models/operations/taskname.md
|
||||||
|
- docs/models/operations/starttaskrequest.md
|
||||||
|
- docs/models/operations/starttaskresponse.md
|
||||||
|
- docs/models/operations/pathparamtaskname.md
|
||||||
|
- docs/models/operations/stoptaskrequest.md
|
||||||
|
- docs/models/operations/stoptaskresponse.md
|
||||||
|
- docs/models/operations/onlytransient.md
|
||||||
|
- docs/models/operations/getglobalhubsrequest.md
|
||||||
|
- docs/models/operations/getglobalhubsresponse.md
|
||||||
|
- docs/models/operations/queryparamonlytransient.md
|
||||||
|
- docs/models/operations/getlibraryhubsrequest.md
|
||||||
|
- docs/models/operations/getlibraryhubsresponse.md
|
||||||
|
- docs/models/operations/performsearchrequest.md
|
||||||
|
- docs/models/operations/performsearchresponse.md
|
||||||
|
- docs/models/operations/performvoicesearchrequest.md
|
||||||
|
- docs/models/operations/performvoicesearchresponse.md
|
||||||
|
- docs/models/operations/getsearchresultsrequest.md
|
||||||
|
- docs/models/operations/getsearchresultspart.md
|
||||||
|
- docs/models/operations/getsearchresultsmedia.md
|
||||||
|
- docs/models/operations/getsearchresultsgenre.md
|
||||||
|
- docs/models/operations/getsearchresultsdirector.md
|
||||||
|
- docs/models/operations/getsearchresultswriter.md
|
||||||
|
- docs/models/operations/getsearchresultscountry.md
|
||||||
|
- docs/models/operations/getsearchresultsrole.md
|
||||||
|
- docs/models/operations/getsearchresultsmetadata.md
|
||||||
|
- docs/models/operations/provider.md
|
||||||
|
- docs/models/operations/getsearchresultsmediacontainer.md
|
||||||
|
- docs/models/operations/getsearchresultsresponsebody.md
|
||||||
|
- docs/models/operations/getsearchresultsresponse.md
|
||||||
|
- docs/models/operations/getfilehashrequest.md
|
||||||
|
- docs/models/operations/getfilehashresponse.md
|
||||||
|
- docs/models/operations/part.md
|
||||||
|
- docs/models/operations/media.md
|
||||||
|
- docs/models/operations/genre.md
|
||||||
|
- docs/models/operations/director.md
|
||||||
|
- docs/models/operations/writer.md
|
||||||
|
- docs/models/operations/country.md
|
||||||
|
- docs/models/operations/role.md
|
||||||
|
- docs/models/operations/metadata.md
|
||||||
|
- docs/models/operations/getrecentlyaddedmediacontainer.md
|
||||||
|
- docs/models/operations/getrecentlyaddedresponsebody.md
|
||||||
|
- docs/models/operations/getrecentlyaddedresponse.md
|
||||||
|
- docs/models/operations/getlibrariesresponse.md
|
||||||
|
- docs/models/operations/includedetails.md
|
||||||
|
- docs/models/operations/getlibraryrequest.md
|
||||||
|
- docs/models/operations/getlibraryresponse.md
|
||||||
|
- docs/models/operations/deletelibraryrequest.md
|
||||||
|
- docs/models/operations/deletelibraryresponse.md
|
||||||
|
- docs/models/operations/getlibraryitemsrequest.md
|
||||||
|
- docs/models/operations/getlibraryitemsresponse.md
|
||||||
|
- docs/models/operations/refreshlibraryrequest.md
|
||||||
|
- docs/models/operations/refreshlibraryresponse.md
|
||||||
|
- docs/models/operations/getlatestlibraryitemsrequest.md
|
||||||
|
- docs/models/operations/getlatestlibraryitemsresponse.md
|
||||||
|
- docs/models/operations/getcommonlibraryitemsrequest.md
|
||||||
|
- docs/models/operations/getcommonlibraryitemsresponse.md
|
||||||
|
- docs/models/operations/getmetadatarequest.md
|
||||||
|
- docs/models/operations/getmetadataresponse.md
|
||||||
|
- docs/models/operations/getmetadatachildrenrequest.md
|
||||||
|
- docs/models/operations/getmetadatachildrenresponse.md
|
||||||
|
- docs/models/operations/stream.md
|
||||||
|
- docs/models/operations/getondeckpart.md
|
||||||
|
- docs/models/operations/getondeckmedia.md
|
||||||
|
- docs/models/operations/guids.md
|
||||||
|
- docs/models/operations/getondeckmetadata.md
|
||||||
|
- docs/models/operations/getondeckmediacontainer.md
|
||||||
|
- docs/models/operations/getondeckresponsebody.md
|
||||||
|
- docs/models/operations/getondeckresponse.md
|
||||||
|
- docs/models/operations/level.md
|
||||||
|
- docs/models/operations/loglinerequest.md
|
||||||
|
- docs/models/operations/loglineresponse.md
|
||||||
|
- docs/models/operations/logmultilineresponse.md
|
||||||
|
- docs/models/operations/enablepapertrailresponse.md
|
||||||
|
- docs/models/operations/typet.md
|
||||||
|
- docs/models/operations/smart.md
|
||||||
|
- docs/models/operations/createplaylistrequest.md
|
||||||
|
- docs/models/operations/createplaylistresponse.md
|
||||||
|
- docs/models/operations/playlisttype.md
|
||||||
|
- docs/models/operations/queryparamsmart.md
|
||||||
|
- docs/models/operations/getplaylistsrequest.md
|
||||||
|
- docs/models/operations/getplaylistsresponse.md
|
||||||
|
- docs/models/operations/getplaylistrequest.md
|
||||||
|
- docs/models/operations/getplaylistresponse.md
|
||||||
|
- docs/models/operations/deleteplaylistrequest.md
|
||||||
|
- docs/models/operations/deleteplaylistresponse.md
|
||||||
|
- docs/models/operations/updateplaylistrequest.md
|
||||||
|
- docs/models/operations/updateplaylistresponse.md
|
||||||
|
- docs/models/operations/getplaylistcontentsrequest.md
|
||||||
|
- docs/models/operations/getplaylistcontentsresponse.md
|
||||||
|
- docs/models/operations/clearplaylistcontentsrequest.md
|
||||||
|
- docs/models/operations/clearplaylistcontentsresponse.md
|
||||||
|
- docs/models/operations/addplaylistcontentsrequest.md
|
||||||
|
- docs/models/operations/addplaylistcontentsresponse.md
|
||||||
|
- docs/models/operations/force.md
|
||||||
|
- docs/models/operations/uploadplaylistrequest.md
|
||||||
|
- docs/models/operations/uploadplaylistresponse.md
|
||||||
|
- docs/models/operations/queryparamtype.md
|
||||||
|
- docs/models/operations/scope.md
|
||||||
|
- docs/models/operations/gettransienttokenrequest.md
|
||||||
|
- docs/models/operations/gettransienttokenresponse.md
|
||||||
|
- docs/models/operations/getsourceconnectioninformationrequest.md
|
||||||
|
- docs/models/operations/getsourceconnectioninformationresponse.md
|
||||||
|
- docs/models/operations/getsessionsresponse.md
|
||||||
|
- docs/models/operations/getsessionhistoryresponse.md
|
||||||
|
- docs/models/operations/transcodesession.md
|
||||||
|
- docs/models/operations/gettranscodesessionsmediacontainer.md
|
||||||
|
- docs/models/operations/gettranscodesessionsresponsebody.md
|
||||||
|
- docs/models/operations/gettranscodesessionsresponse.md
|
||||||
|
- docs/models/operations/stoptranscodesessionrequest.md
|
||||||
|
- docs/models/operations/stoptranscodesessionresponse.md
|
||||||
|
- docs/models/operations/getupdatestatusresponse.md
|
||||||
|
- docs/models/operations/download.md
|
||||||
|
- docs/models/operations/checkforupdatesrequest.md
|
||||||
|
- docs/models/operations/checkforupdatesresponse.md
|
||||||
|
- docs/models/operations/tonight.md
|
||||||
|
- docs/models/operations/skip.md
|
||||||
|
- docs/models/operations/applyupdatesrequest.md
|
||||||
|
- docs/models/operations/applyupdatesresponse.md
|
||||||
|
- docs/models/operations/startuniversaltranscoderequest.md
|
||||||
|
- docs/models/operations/startuniversaltranscoderesponse.md
|
||||||
|
- docs/models/operations/state.md
|
||||||
|
- docs/models/operations/gettimelinerequest.md
|
||||||
|
- docs/models/operations/gettimelineresponse.md
|
||||||
|
- docs/models/errors/errors.md
|
||||||
|
- docs/models/errors/getservercapabilitiesresponsebody.md
|
||||||
|
- docs/models/errors/getserverpreferenceserrors.md
|
||||||
|
- docs/models/errors/getserverpreferencesresponsebody.md
|
||||||
|
- docs/models/errors/getavailableclientserrors.md
|
||||||
|
- docs/models/errors/getavailableclientsresponsebody.md
|
||||||
|
- docs/models/errors/getdeviceserrors.md
|
||||||
|
- docs/models/errors/getdevicesresponsebody.md
|
||||||
|
- docs/models/errors/getserveridentityerrors.md
|
||||||
|
- docs/models/errors/getserveridentityresponsebody.md
|
||||||
|
- docs/models/errors/getmyplexaccounterrors.md
|
||||||
|
- docs/models/errors/getmyplexaccountresponsebody.md
|
||||||
|
- docs/models/errors/getresizedphotoerrors.md
|
||||||
|
- docs/models/errors/getresizedphotoresponsebody.md
|
||||||
|
- docs/models/errors/getserverlisterrors.md
|
||||||
|
- docs/models/errors/getserverlistresponsebody.md
|
||||||
|
- docs/models/errors/markplayederrors.md
|
||||||
|
- docs/models/errors/markplayedresponsebody.md
|
||||||
|
- docs/models/errors/markunplayederrors.md
|
||||||
|
- docs/models/errors/markunplayedresponsebody.md
|
||||||
|
- docs/models/errors/updateplayprogresserrors.md
|
||||||
|
- docs/models/errors/updateplayprogressresponsebody.md
|
||||||
|
- docs/models/errors/getserveractivitieserrors.md
|
||||||
|
- docs/models/errors/getserveractivitiesresponsebody.md
|
||||||
|
- docs/models/errors/cancelserveractivitieserrors.md
|
||||||
|
- docs/models/errors/cancelserveractivitiesresponsebody.md
|
||||||
|
- docs/models/errors/getbutlertaskserrors.md
|
||||||
|
- docs/models/errors/getbutlertasksresponsebody.md
|
||||||
|
- docs/models/errors/startalltaskserrors.md
|
||||||
|
- docs/models/errors/startalltasksresponsebody.md
|
||||||
|
- docs/models/errors/stopalltaskserrors.md
|
||||||
|
- docs/models/errors/stopalltasksresponsebody.md
|
||||||
|
- docs/models/errors/starttaskerrors.md
|
||||||
|
- docs/models/errors/starttaskresponsebody.md
|
||||||
|
- docs/models/errors/stoptaskerrors.md
|
||||||
|
- docs/models/errors/stoptaskresponsebody.md
|
||||||
|
- docs/models/errors/getglobalhubserrors.md
|
||||||
|
- docs/models/errors/getglobalhubsresponsebody.md
|
||||||
|
- docs/models/errors/getlibraryhubserrors.md
|
||||||
|
- docs/models/errors/getlibraryhubsresponsebody.md
|
||||||
|
- docs/models/errors/performsearcherrors.md
|
||||||
|
- docs/models/errors/performsearchresponsebody.md
|
||||||
|
- docs/models/errors/performvoicesearcherrors.md
|
||||||
|
- docs/models/errors/performvoicesearchresponsebody.md
|
||||||
|
- docs/models/errors/getsearchresultserrors.md
|
||||||
|
- docs/models/errors/getsearchresultsresponsebody.md
|
||||||
|
- docs/models/errors/getfilehasherrors.md
|
||||||
|
- docs/models/errors/getfilehashresponsebody.md
|
||||||
|
- docs/models/errors/getrecentlyaddederrors.md
|
||||||
|
- docs/models/errors/getrecentlyaddedresponsebody.md
|
||||||
|
- docs/models/errors/getlibrarieserrors.md
|
||||||
|
- docs/models/errors/getlibrariesresponsebody.md
|
||||||
|
- docs/models/errors/getlibraryerrors.md
|
||||||
|
- docs/models/errors/getlibraryresponsebody.md
|
||||||
|
- docs/models/errors/deletelibraryerrors.md
|
||||||
|
- docs/models/errors/deletelibraryresponsebody.md
|
||||||
|
- docs/models/errors/getlibraryitemserrors.md
|
||||||
|
- docs/models/errors/getlibraryitemsresponsebody.md
|
||||||
|
- docs/models/errors/refreshlibraryerrors.md
|
||||||
|
- docs/models/errors/refreshlibraryresponsebody.md
|
||||||
|
- docs/models/errors/getlatestlibraryitemserrors.md
|
||||||
|
- docs/models/errors/getlatestlibraryitemsresponsebody.md
|
||||||
|
- docs/models/errors/getcommonlibraryitemserrors.md
|
||||||
|
- docs/models/errors/getcommonlibraryitemsresponsebody.md
|
||||||
|
- docs/models/errors/getmetadataerrors.md
|
||||||
|
- docs/models/errors/getmetadataresponsebody.md
|
||||||
|
- docs/models/errors/getmetadatachildrenerrors.md
|
||||||
|
- docs/models/errors/getmetadatachildrenresponsebody.md
|
||||||
|
- docs/models/errors/getondeckerrors.md
|
||||||
|
- docs/models/errors/getondeckresponsebody.md
|
||||||
|
- docs/models/errors/loglineerrors.md
|
||||||
|
- docs/models/errors/loglineresponsebody.md
|
||||||
|
- docs/models/errors/logmultilineerrors.md
|
||||||
|
- docs/models/errors/logmultilineresponsebody.md
|
||||||
|
- docs/models/errors/enablepapertrailerrors.md
|
||||||
|
- docs/models/errors/enablepapertrailresponsebody.md
|
||||||
|
- docs/models/errors/createplaylisterrors.md
|
||||||
|
- docs/models/errors/createplaylistresponsebody.md
|
||||||
|
- docs/models/errors/getplaylistserrors.md
|
||||||
|
- docs/models/errors/getplaylistsresponsebody.md
|
||||||
|
- docs/models/errors/getplaylisterrors.md
|
||||||
|
- docs/models/errors/getplaylistresponsebody.md
|
||||||
|
- docs/models/errors/deleteplaylisterrors.md
|
||||||
|
- docs/models/errors/deleteplaylistresponsebody.md
|
||||||
|
- docs/models/errors/updateplaylisterrors.md
|
||||||
|
- docs/models/errors/updateplaylistresponsebody.md
|
||||||
|
- docs/models/errors/getplaylistcontentserrors.md
|
||||||
|
- docs/models/errors/getplaylistcontentsresponsebody.md
|
||||||
|
- docs/models/errors/clearplaylistcontentserrors.md
|
||||||
|
- docs/models/errors/clearplaylistcontentsresponsebody.md
|
||||||
|
- docs/models/errors/addplaylistcontentserrors.md
|
||||||
|
- docs/models/errors/addplaylistcontentsresponsebody.md
|
||||||
|
- docs/models/errors/uploadplaylisterrors.md
|
||||||
|
- docs/models/errors/uploadplaylistresponsebody.md
|
||||||
|
- docs/models/errors/gettransienttokenerrors.md
|
||||||
|
- docs/models/errors/gettransienttokenresponsebody.md
|
||||||
|
- docs/models/errors/getsourceconnectioninformationerrors.md
|
||||||
|
- docs/models/errors/getsourceconnectioninformationresponsebody.md
|
||||||
|
- docs/models/errors/getsessionserrors.md
|
||||||
|
- docs/models/errors/getsessionsresponsebody.md
|
||||||
|
- docs/models/errors/getsessionhistoryerrors.md
|
||||||
|
- docs/models/errors/getsessionhistoryresponsebody.md
|
||||||
|
- docs/models/errors/gettranscodesessionserrors.md
|
||||||
|
- docs/models/errors/gettranscodesessionsresponsebody.md
|
||||||
|
- docs/models/errors/stoptranscodesessionerrors.md
|
||||||
|
- docs/models/errors/stoptranscodesessionresponsebody.md
|
||||||
|
- docs/models/errors/getupdatestatuserrors.md
|
||||||
|
- docs/models/errors/getupdatestatusresponsebody.md
|
||||||
|
- docs/models/errors/checkforupdateserrors.md
|
||||||
|
- docs/models/errors/checkforupdatesresponsebody.md
|
||||||
|
- docs/models/errors/applyupdateserrors.md
|
||||||
|
- docs/models/errors/applyupdatesresponsebody.md
|
||||||
|
- docs/models/errors/startuniversaltranscodeerrors.md
|
||||||
|
- docs/models/errors/startuniversaltranscoderesponsebody.md
|
||||||
|
- docs/models/errors/gettimelineerrors.md
|
||||||
|
- docs/models/errors/gettimelineresponsebody.md
|
||||||
|
- docs/models/components/security.md
|
||||||
|
- docs/sdks/plexapi/README.md
|
||||||
|
- docs/sdks/server/README.md
|
||||||
|
- docs/sdks/media/README.md
|
||||||
|
- docs/sdks/activities/README.md
|
||||||
|
- docs/sdks/butler/README.md
|
||||||
|
- docs/sdks/hubs/README.md
|
||||||
|
- docs/sdks/search/README.md
|
||||||
|
- docs/sdks/library/README.md
|
||||||
|
- docs/sdks/log/README.md
|
||||||
|
- docs/sdks/playlists/README.md
|
||||||
|
- docs/sdks/security/README.md
|
||||||
|
- docs/sdks/sessions/README.md
|
||||||
|
- docs/sdks/updater/README.md
|
||||||
|
- docs/sdks/video/README.md
|
||||||
|
- USAGE.md
|
||||||
|
- .gitattributes
|
||||||
127
README.md
127
README.md
@@ -1,4 +1,4 @@
|
|||||||
# openapi
|
# @lukehagar/plexjs
|
||||||
|
|
||||||
<div align="left">
|
<div align="left">
|
||||||
<a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
|
<a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
|
||||||
@@ -7,28 +7,19 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
## 🏗 **Welcome to your new SDK!** 🏗
|
|
||||||
|
|
||||||
It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:
|
|
||||||
- [ ] 🛠 Make your SDK feel handcrafted by [customizing it](https://www.speakeasyapi.dev/docs/customize-sdks)
|
|
||||||
- [ ] ♻️ Refine your SDK quickly by iterating locally with the [Speakeasy CLI](https://github.com/speakeasy-api/speakeasy)
|
|
||||||
- [ ] 🎁 Publish your SDK to package managers by [configuring automatic publishing](https://www.speakeasyapi.dev/docs/productionize-sdks/publish-sdks)
|
|
||||||
- [ ] ✨ When ready to productionize, delete this section from the README
|
|
||||||
|
|
||||||
<!-- Start SDK Installation [installation] -->
|
<!-- Start SDK Installation [installation] -->
|
||||||
## SDK Installation
|
## SDK Installation
|
||||||
|
|
||||||
### NPM
|
### NPM
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm add openapi
|
npm add @lukehagar/plexjs
|
||||||
```
|
```
|
||||||
|
|
||||||
### Yarn
|
### Yarn
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn add openapi
|
yarn add @lukehagar/plexjs
|
||||||
```
|
```
|
||||||
<!-- End SDK Installation [installation] -->
|
<!-- End SDK Installation [installation] -->
|
||||||
|
|
||||||
@@ -38,20 +29,17 @@ yarn add openapi
|
|||||||
### Example
|
### Example
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getServerCapabilities();
|
const result = await sdk.server.getServerCapabilities();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result);
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -173,28 +161,31 @@ All SDK methods return a response object or throw an error. If Error objects are
|
|||||||
Example
|
Example
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import * as errors from "openapi/models/errors";
|
import * as errors from "@lukehagar/plexjs/models/errors";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getServerCapabilities().catch((err) => {
|
let result;
|
||||||
if (err instanceof errors.GetServerCapabilitiesResponseBody) {
|
try {
|
||||||
console.error(err); // handle exception
|
result = await sdk.server.getServerCapabilities();
|
||||||
return null;
|
} catch (err) {
|
||||||
} else {
|
switch (true) {
|
||||||
throw err;
|
case err instanceof errors.GetServerCapabilitiesResponseBody: {
|
||||||
|
console.error(err); // handle exception
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle response
|
// Handle the result
|
||||||
|
console.log(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -207,14 +198,30 @@ run();
|
|||||||
|
|
||||||
### Select Server by Index
|
### Select Server by Index
|
||||||
|
|
||||||
You can override the default server globally by passing a server index to the `serverIdx: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
|
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 |
|
| # | Server | Variables |
|
||||||
| - | ------ | --------- |
|
| - | ------ | --------- |
|
||||||
| 0 | `http://10.10.10.47:32400` | None |
|
| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) |
|
||||||
| 1 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) |
|
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const sdk = new PlexAPI({
|
||||||
|
serverIdx: 0,
|
||||||
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
|
});
|
||||||
|
|
||||||
|
const result = await sdk.server.getServerCapabilities();
|
||||||
|
|
||||||
|
// Handle the result
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
#### Variables
|
#### Variables
|
||||||
|
|
||||||
@@ -225,7 +232,26 @@ Some of the server options above contain variables. If you want to set the value
|
|||||||
|
|
||||||
### Override Server URL Per-Client
|
### Override Server URL Per-Client
|
||||||
|
|
||||||
The default server can also be overridden globally by passing a URL to the `serverURL: str` optional parameter when initializing the SDK client instance. For example:
|
The default server can also be overridden globally by passing a URL to the `serverURL` optional parameter when initializing the SDK client instance. For example:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const sdk = new PlexAPI({
|
||||||
|
serverURL: "{protocol}://{ip}:{port}",
|
||||||
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
|
});
|
||||||
|
|
||||||
|
const result = await sdk.server.getServerCapabilities();
|
||||||
|
|
||||||
|
// Handle the result
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
|
||||||
|
```
|
||||||
<!-- End Server Selection [server] -->
|
<!-- End Server Selection [server] -->
|
||||||
|
|
||||||
<!-- Start Custom HTTP Client [http-client] -->
|
<!-- Start Custom HTTP Client [http-client] -->
|
||||||
@@ -246,8 +272,8 @@ custom header and a timeout to requests and how to use the `"requestError"` hook
|
|||||||
to log errors:
|
to log errors:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { HTTPClient } from "openapi/lib/http";
|
import { HTTPClient } from "@lukehagar/plexjs/lib/http";
|
||||||
|
|
||||||
const httpClient = new HTTPClient({
|
const httpClient = new HTTPClient({
|
||||||
// fetcher takes a function that has the same signature as native `fetch`.
|
// fetcher takes a function that has the same signature as native `fetch`.
|
||||||
@@ -273,7 +299,7 @@ httpClient.addHook("requestError", (error, request) => {
|
|||||||
console.groupEnd();
|
console.groupEnd();
|
||||||
});
|
});
|
||||||
|
|
||||||
const sdk = new SDK({ httpClient });
|
const sdk = new PlexAPI({ httpClient });
|
||||||
```
|
```
|
||||||
<!-- End Custom HTTP Client [http-client] -->
|
<!-- End Custom HTTP Client [http-client] -->
|
||||||
|
|
||||||
@@ -290,20 +316,17 @@ This SDK supports the following security scheme globally:
|
|||||||
|
|
||||||
To authenticate with the API the `accessToken` parameter must be set when initializing the SDK client instance. For example:
|
To authenticate with the API the `accessToken` parameter must be set when initializing the SDK client instance. For example:
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getServerCapabilities();
|
const result = await sdk.server.getServerCapabilities();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result);
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -311,6 +334,12 @@ run();
|
|||||||
```
|
```
|
||||||
<!-- End Authentication [security] -->
|
<!-- End Authentication [security] -->
|
||||||
|
|
||||||
|
<!-- Start Requirements [requirements] -->
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
|
||||||
|
<!-- End Requirements [requirements] -->
|
||||||
|
|
||||||
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
|
|||||||
72
RELEASES.md
72
RELEASES.md
@@ -8,4 +8,74 @@ Based on:
|
|||||||
### Generated
|
### Generated
|
||||||
- [typescript v0.1.0] .
|
- [typescript v0.1.0] .
|
||||||
### Releases
|
### Releases
|
||||||
- [NPM v0.1.0] https://www.npmjs.com/package/openapi/v/0.1.0 - .
|
- [NPM v0.1.0] https://www.npmjs.com/package/openapi/v/0.1.0 - .
|
||||||
|
|
||||||
|
## 2024-01-01 15:05:18
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.129.1 (2.223.3) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.2.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.2.0] https://www.npmjs.com/package/plexjs/v/0.2.0 - .
|
||||||
|
|
||||||
|
## 2024-01-01 15:11:44
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.129.1 (2.223.3) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.3.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.3.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.3.0 - .
|
||||||
|
|
||||||
|
## 2024-01-05 00:27:32
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.130.1 (2.225.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.3.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.3.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.3.0 - .
|
||||||
|
|
||||||
|
## 2024-01-05 19:51:02
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.133.1 (2.228.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.3.1] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.3.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.3.1 - .
|
||||||
|
|
||||||
|
## 2024-01-09 00:28:08
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.134.0 (2.230.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.3.2] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.3.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.3.2 - .
|
||||||
|
|
||||||
|
## 2024-01-10 00:27:58
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.134.1 (2.230.3) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.3.3] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.3.3] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.3.3 - .
|
||||||
|
|
||||||
|
## 2024-01-16 00:27:43
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.141.1 (2.233.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.4.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.4.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.4.0 - .
|
||||||
22
RUNTIMES.md
Normal file
22
RUNTIMES.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Supported JavaScript runtimes
|
||||||
|
|
||||||
|
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`
|
||||||
|
* [Async iterables][async-iter] using `Symbol.asyncIterator`
|
||||||
|
|
||||||
|
[web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
|
||||||
|
[web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
|
||||||
|
[async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
|
||||||
|
|
||||||
|
Runtime environments that are explicitly supported are:
|
||||||
|
|
||||||
|
- Evergreen browsers which include: Chrome, Safari, Edge, Firefox
|
||||||
|
- Node.js active and maintenance LTS releases
|
||||||
|
- Currently, this is v18 and v20
|
||||||
|
- Bun v1 and above
|
||||||
|
- Deno v1.39
|
||||||
|
- Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
|
||||||
|
|
||||||
|
[deno-file-streaming]: https://github.com/denoland/deno/issues/11018
|
||||||
13
USAGE.md
13
USAGE.md
@@ -1,19 +1,16 @@
|
|||||||
<!-- Start SDK Example Usage [usage] -->
|
<!-- Start SDK Example Usage [usage] -->
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getServerCapabilities();
|
const result = await sdk.server.getServerCapabilities();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result);
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -24,20 +24,17 @@ Get Server Activities
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.activities.getServerActivities();
|
const result = await sdk.activities.getServerActivities();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -68,22 +65,19 @@ Cancel Server Activities
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const activityUUID = "string";
|
const activityUUID = "string";
|
||||||
|
|
||||||
const res = await sdk.activities.cancelServerActivities(activityUUID);
|
const result = await sdk.activities.cancelServerActivities(activityUUID);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -21,20 +21,17 @@ Returns a list of butler tasks
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.butler.getButlerTasks();
|
const result = await sdk.butler.getButlerTasks();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -70,20 +67,17 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.butler.startAllTasks();
|
const result = await sdk.butler.startAllTasks();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -115,20 +109,17 @@ This endpoint will stop all currently running tasks and remove any scheduled tas
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.butler.stopAllTasks();
|
const result = await sdk.butler.stopAllTasks();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -164,23 +155,20 @@ This endpoint will attempt to start a single Butler task that is enabled in the
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { TaskName } from "openapi/models/operations";
|
import { TaskName } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const taskName = TaskName.CleanOldBundles;
|
const taskName = TaskName.CleanOldBundles;
|
||||||
|
|
||||||
const res = await sdk.butler.startTask(taskName);
|
const result = await sdk.butler.startTask(taskName);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -213,23 +201,20 @@ This endpoint will stop a currently running task by name, or remove it from the
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { PathParamTaskName } from "openapi/models/operations";
|
import { PathParamTaskName } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const taskName = PathParamTaskName.BackupDatabase;
|
const taskName = PathParamTaskName.BackupDatabase;
|
||||||
|
|
||||||
const res = await sdk.butler.stopTask(taskName);
|
const result = await sdk.butler.stopTask(taskName);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -18,24 +18,21 @@ Get Global Hubs filtered by the parameters provided.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { OnlyTransient } from "openapi/models/operations";
|
import { OnlyTransient } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const count = 1262.49;
|
const count = 1262.49;
|
||||||
const onlyTransient = OnlyTransient.One;
|
const onlyTransient = OnlyTransient.One;
|
||||||
|
|
||||||
const res = await sdk.hubs.getGlobalHubs(count, onlyTransient);
|
const result = await sdk.hubs.getGlobalHubs(count, onlyTransient);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -69,11 +66,11 @@ This endpoint will return a list of library specific hubs
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { QueryParamOnlyTransient } from "openapi/models/operations";
|
import { QueryParamOnlyTransient } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -81,13 +78,10 @@ async function run() {
|
|||||||
const count = 9010.22;
|
const count = 9010.22;
|
||||||
const onlyTransient = QueryParamOnlyTransient.Zero;
|
const onlyTransient = QueryParamOnlyTransient.Zero;
|
||||||
|
|
||||||
const res = await sdk.hubs.getLibraryHubs(sectionId, count, onlyTransient);
|
const result = await sdk.hubs.getLibraryHubs(sectionId, count, onlyTransient);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -28,23 +28,20 @@ This resource returns hash values for local files
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const url = "file://C:\Image.png&type=13";
|
const url = "file://C:\Image.png&type=13";
|
||||||
const type = 4462.17;
|
const type = 4462.17;
|
||||||
|
|
||||||
const res = await sdk.library.getFileHash(url, type);
|
const result = await sdk.library.getFileHash(url, type);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -78,20 +75,17 @@ This endpoint will return the recently added content.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.library.getRecentlyAdded();
|
const result = await sdk.library.getRecentlyAdded();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -128,20 +122,17 @@ This allows a client to provide a rich interface around the media (e.g. allow so
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.library.getLibraries();
|
const result = await sdk.library.getLibraries();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -191,24 +182,21 @@ Returns details for the library. This can be thought of as an interstitial endpo
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { IncludeDetails } from "openapi/models/operations";
|
import { IncludeDetails } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const sectionId = 1000;
|
const sectionId = 1000;
|
||||||
const includeDetails = IncludeDetails.Zero;
|
const includeDetails = IncludeDetails.Zero;
|
||||||
|
|
||||||
const res = await sdk.library.getLibrary(sectionId, includeDetails);
|
const result = await sdk.library.getLibrary(sectionId, includeDetails);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -241,22 +229,19 @@ Delate a library using a specific section
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const sectionId = 1000;
|
const sectionId = 1000;
|
||||||
|
|
||||||
const res = await sdk.library.deleteLibrary(sectionId);
|
const result = await sdk.library.deleteLibrary(sectionId);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -289,10 +274,10 @@ This endpoint will return a list of library items filtered by the filter and typ
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -300,13 +285,10 @@ async function run() {
|
|||||||
const type = 760.66;
|
const type = 760.66;
|
||||||
const filter = "string";
|
const filter = "string";
|
||||||
|
|
||||||
const res = await sdk.library.getLibraryItems(sectionId, type, filter);
|
const result = await sdk.library.getLibraryItems(sectionId, type, filter);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -341,22 +323,19 @@ This endpoint Refreshes the library.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const sectionId = 934.16;
|
const sectionId = 934.16;
|
||||||
|
|
||||||
const res = await sdk.library.refreshLibrary(sectionId);
|
const result = await sdk.library.refreshLibrary(sectionId);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -389,10 +368,10 @@ This endpoint will return a list of the latest library items filtered by the fil
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -400,13 +379,10 @@ async function run() {
|
|||||||
const type = 8015.12;
|
const type = 8015.12;
|
||||||
const filter = "string";
|
const filter = "string";
|
||||||
|
|
||||||
const res = await sdk.library.getLatestLibraryItems(sectionId, type, filter);
|
const result = await sdk.library.getLatestLibraryItems(sectionId, type, filter);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -441,10 +417,10 @@ Represents a "Common" item. It contains only the common attributes of the items
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -452,13 +428,10 @@ async function run() {
|
|||||||
const type = 2760.31;
|
const type = 2760.31;
|
||||||
const filter = "string";
|
const filter = "string";
|
||||||
|
|
||||||
const res = await sdk.library.getCommonLibraryItems(sectionId, type, filter);
|
const result = await sdk.library.getCommonLibraryItems(sectionId, type, filter);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -493,22 +466,19 @@ This endpoint will return the metadata of a library item specified with the rati
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const ratingKey = 8382.31;
|
const ratingKey = 8382.31;
|
||||||
|
|
||||||
const res = await sdk.library.getMetadata(ratingKey);
|
const result = await sdk.library.getMetadata(ratingKey);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -541,22 +511,19 @@ This endpoint will return the children of of a library item specified with the r
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const ratingKey = 1539.14;
|
const ratingKey = 1539.14;
|
||||||
|
|
||||||
const res = await sdk.library.getMetadataChildren(ratingKey);
|
const result = await sdk.library.getMetadataChildren(ratingKey);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -589,20 +556,17 @@ This endpoint will return the on deck content.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.library.getOnDeck();
|
const result = await sdk.library.getOnDeck();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ This endpoint will write a single-line log message, including a level and source
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { Level } from "openapi/models/operations";
|
import { Level } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -32,13 +32,10 @@ async function run() {
|
|||||||
const message = "string";
|
const message = "string";
|
||||||
const source = "string";
|
const source = "string";
|
||||||
|
|
||||||
const res = await sdk.log.logLine(level, message, source);
|
const result = await sdk.log.logLine(level, message, source);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -73,20 +70,17 @@ This endpoint will write multiple lines to the main Plex Media Server log in a s
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.log.logMultiLine();
|
const result = await sdk.log.logMultiLine();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -118,20 +112,17 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.log.enablePaperTrail();
|
const result = await sdk.log.enablePaperTrail();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -19,22 +19,19 @@ This will mark the provided media key as Played.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const key = 59398;
|
const key = 59398;
|
||||||
|
|
||||||
const res = await sdk.media.markPlayed(key);
|
const result = await sdk.media.markPlayed(key);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -66,22 +63,19 @@ This will mark the provided media key as Unplayed.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const key = 59398;
|
const key = 59398;
|
||||||
|
|
||||||
const res = await sdk.media.markUnplayed(key);
|
const result = await sdk.media.markUnplayed(key);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -114,10 +108,10 @@ This API command can be used to update the play progress of a media item.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -125,13 +119,10 @@ async function run() {
|
|||||||
const time = 6900.91;
|
const time = 6900.91;
|
||||||
const state = "string";
|
const state = "string";
|
||||||
|
|
||||||
const res = await sdk.media.updatePlayProgress(key, time, state);
|
const result = await sdk.media.updatePlayProgress(key, time, state);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -31,25 +31,22 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { Smart, TypeT } from "openapi/models/operations";
|
import { Smart, TypeT } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.playlists.createPlaylist({
|
const result = await sdk.playlists.createPlaylist({
|
||||||
title: "string",
|
title: "string",
|
||||||
type: TypeT.Photo,
|
type: TypeT.Photo,
|
||||||
smart: Smart.One,
|
smart: Smart.One,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -81,24 +78,21 @@ Get All Playlists given the specified filters.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { PlaylistType, QueryParamSmart } from "openapi/models/operations";
|
import { PlaylistType, QueryParamSmart } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const playlistType = PlaylistType.Audio;
|
const playlistType = PlaylistType.Audio;
|
||||||
const smart = QueryParamSmart.Zero;
|
const smart = QueryParamSmart.Zero;
|
||||||
|
|
||||||
const res = await sdk.playlists.getPlaylists(playlistType, smart);
|
const result = await sdk.playlists.getPlaylists(playlistType, smart);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -133,22 +127,19 @@ Smart playlist details contain the `content` attribute. This is the content URI
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const playlistID = 4109.48;
|
const playlistID = 4109.48;
|
||||||
|
|
||||||
const res = await sdk.playlists.getPlaylist(playlistID);
|
const result = await sdk.playlists.getPlaylist(playlistID);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -181,22 +172,19 @@ This endpoint will delete a playlist
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const playlistID = 216.22;
|
const playlistID = 216.22;
|
||||||
|
|
||||||
const res = await sdk.playlists.deletePlaylist(playlistID);
|
const result = await sdk.playlists.deletePlaylist(playlistID);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -229,22 +217,19 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const playlistID = 3915;
|
const playlistID = 3915;
|
||||||
|
|
||||||
const res = await sdk.playlists.updatePlaylist(playlistID);
|
const result = await sdk.playlists.updatePlaylist(playlistID);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -280,23 +265,20 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const playlistID = 5004.46;
|
const playlistID = 5004.46;
|
||||||
const type = 9403.59;
|
const type = 9403.59;
|
||||||
|
|
||||||
const res = await sdk.playlists.getPlaylistContents(playlistID, type);
|
const result = await sdk.playlists.getPlaylistContents(playlistID, type);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -330,22 +312,19 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const playlistID = 1893.18;
|
const playlistID = 1893.18;
|
||||||
|
|
||||||
const res = await sdk.playlists.clearPlaylistContents(playlistID);
|
const result = await sdk.playlists.clearPlaylistContents(playlistID);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -379,10 +358,10 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -390,13 +369,10 @@ async function run() {
|
|||||||
const uri = "library://..";
|
const uri = "library://..";
|
||||||
const playQueueID = 123;
|
const playQueueID = 123;
|
||||||
|
|
||||||
const res = await sdk.playlists.addPlaylistContents(playlistID, uri, playQueueID);
|
const result = await sdk.playlists.addPlaylistContents(playlistID, uri, playQueueID);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -431,24 +407,21 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { Force } from "openapi/models/operations";
|
import { Force } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const path = "/home/barkley/playlist.m3u";
|
const path = "/home/barkley/playlist.m3u";
|
||||||
const force = Force.Zero;
|
const force = Force.Zero;
|
||||||
|
|
||||||
const res = await sdk.playlists.uploadPlaylist(path, force);
|
const result = await sdk.playlists.uploadPlaylist(path, force);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# SDK
|
# PlexAPI SDK
|
||||||
|
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
@@ -31,10 +31,10 @@ This request is intended to be very fast, and called as the user types.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -42,13 +42,10 @@ async function run() {
|
|||||||
const sectionId = 1516.53;
|
const sectionId = 1516.53;
|
||||||
const limit = 5;
|
const limit = 5;
|
||||||
|
|
||||||
const res = await sdk.search.performSearch(query, sectionId, limit);
|
const result = await sdk.search.performSearch(query, sectionId, limit);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -86,10 +83,10 @@ Results, as well as their containing per-type hubs, contain a `distance` attribu
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -97,13 +94,10 @@ async function run() {
|
|||||||
const sectionId = 4094.8;
|
const sectionId = 4094.8;
|
||||||
const limit = 5;
|
const limit = 5;
|
||||||
|
|
||||||
const res = await sdk.search.performVoiceSearch(query, sectionId, limit);
|
const result = await sdk.search.performVoiceSearch(query, sectionId, limit);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -137,22 +131,19 @@ This will search the database for the string provided.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const query = "110";
|
const query = "110";
|
||||||
|
|
||||||
const res = await sdk.search.getSearchResults(query);
|
const result = await sdk.search.getSearchResults(query);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -19,24 +19,21 @@ This endpoint provides the caller with a temporary token with the same access le
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { QueryParamType, Scope } from "openapi/models/operations";
|
import { QueryParamType, Scope } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const type = QueryParamType.Delegation;
|
const type = QueryParamType.Delegation;
|
||||||
const scope = Scope.All;
|
const scope = Scope.All;
|
||||||
|
|
||||||
const res = await sdk.security.getTransientToken(type, scope);
|
const result = await sdk.security.getTransientToken(type, scope);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -71,22 +68,19 @@ Note: requires Plex Media Server >= 1.15.4.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const source = "server://client-identifier";
|
const source = "server://client-identifier";
|
||||||
|
|
||||||
const res = await sdk.security.getSourceConnectionInformation(source);
|
const result = await sdk.security.getSourceConnectionInformation(source);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -24,20 +24,17 @@ Server Capabilities
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getServerCapabilities();
|
const result = await sdk.server.getServerCapabilities();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -68,20 +65,17 @@ Get Server Preferences
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getServerPreferences();
|
const result = await sdk.server.getServerPreferences();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -112,20 +106,17 @@ Get Available Clients
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getAvailableClients();
|
const result = await sdk.server.getAvailableClients();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -156,20 +147,17 @@ Get Devices
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getDevices();
|
const result = await sdk.server.getDevices();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -200,20 +188,17 @@ Get Server Identity
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getServerIdentity();
|
const result = await sdk.server.getServerIdentity();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -244,20 +229,17 @@ Returns MyPlex Account Information
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getMyPlexAccount();
|
const result = await sdk.server.getMyPlexAccount();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -289,15 +271,15 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { MinSize, Upscale } from "openapi/models/operations";
|
import { MinSize, Upscale } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getResizedPhoto({
|
const result = await sdk.server.getResizedPhoto({
|
||||||
width: 110,
|
width: 110,
|
||||||
height: 165,
|
height: 165,
|
||||||
opacity: 643869,
|
opacity: 643869,
|
||||||
@@ -307,11 +289,8 @@ async function run() {
|
|||||||
url: "/library/metadata/49564/thumb/1654258204",
|
url: "/library/metadata/49564/thumb/1654258204",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -343,20 +322,17 @@ Get Server List
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.server.getServerList();
|
const result = await sdk.server.getServerList();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -20,20 +20,17 @@ This will retrieve the "Now Playing" Information of the PMS.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.sessions.getSessions();
|
const result = await sdk.sessions.getSessions();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -64,20 +61,17 @@ This will Retrieve a listing of all history views.
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.sessions.getSessionHistory();
|
const result = await sdk.sessions.getSessionHistory();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -108,20 +102,17 @@ Get Transcode Sessions
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.sessions.getTranscodeSessions();
|
const result = await sdk.sessions.getTranscodeSessions();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -152,22 +143,19 @@ Stop a Transcode Session
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const sessionKey = "zz7llzqlx8w9vnrsbnwhbmep";
|
const sessionKey = "zz7llzqlx8w9vnrsbnwhbmep";
|
||||||
|
|
||||||
const res = await sdk.sessions.stopTranscodeSession(sessionKey);
|
const result = await sdk.sessions.stopTranscodeSession(sessionKey);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -20,20 +20,17 @@ Querying status of updates
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.updater.getUpdateStatus();
|
const result = await sdk.updater.getUpdateStatus();
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -64,23 +61,20 @@ Checking for updates
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { Download } from "openapi/models/operations";
|
import { Download } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const download = Download.One;
|
const download = Download.One;
|
||||||
|
|
||||||
const res = await sdk.updater.checkForUpdates(download);
|
const result = await sdk.updater.checkForUpdates(download);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -113,24 +107,21 @@ Note that these two parameters are effectively mutually exclusive. The `tonight`
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { Skip, Tonight } from "openapi/models/operations";
|
import { Skip, Tonight } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const tonight = Tonight.One;
|
const tonight = Tonight.One;
|
||||||
const skip = Skip.Zero;
|
const skip = Skip.Zero;
|
||||||
|
|
||||||
const res = await sdk.updater.applyUpdates(tonight, skip);
|
const result = await sdk.updater.applyUpdates(tonight, skip);
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ Begin a Universal Transcode Session
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.video.startUniversalTranscode({
|
const result = await sdk.video.startUniversalTranscode({
|
||||||
hasMDE: 8924.99,
|
hasMDE: 8924.99,
|
||||||
path: "/etc/mail",
|
path: "/etc/mail",
|
||||||
mediaIndex: 9962.95,
|
mediaIndex: 9962.95,
|
||||||
@@ -33,11 +33,8 @@ async function run() {
|
|||||||
protocol: "string",
|
protocol: "string",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -69,15 +66,15 @@ Get the timeline for a media item
|
|||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SDK } from "openapi";
|
import { PlexAPI } from "@lukehagar/plexjs";
|
||||||
import { State } from "openapi/models/operations";
|
import { State } from "@lukehagar/plexjs/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new PlexAPI({
|
||||||
accessToken: "<YOUR_API_KEY_HERE>",
|
accessToken: "<YOUR_API_KEY_HERE>",
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.video.getTimeline({
|
const result = await sdk.video.getTimeline({
|
||||||
ratingKey: 716.56,
|
ratingKey: 716.56,
|
||||||
key: "<key>",
|
key: "<key>",
|
||||||
state: State.Paused,
|
state: State.Paused,
|
||||||
@@ -90,11 +87,8 @@ async function run() {
|
|||||||
row: 3536.42,
|
row: 3536.42,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res?.statusCode !== 200) {
|
// Handle the result
|
||||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
console.log(result)
|
||||||
}
|
|
||||||
|
|
||||||
// handle response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -439,7 +439,7 @@ docs/models/errors/startuniversaltranscoderesponsebody.md
|
|||||||
docs/models/errors/gettimelineerrors.md
|
docs/models/errors/gettimelineerrors.md
|
||||||
docs/models/errors/gettimelineresponsebody.md
|
docs/models/errors/gettimelineresponsebody.md
|
||||||
docs/models/components/security.md
|
docs/models/components/security.md
|
||||||
docs/sdks/sdk/README.md
|
docs/sdks/plexapi/README.md
|
||||||
docs/sdks/server/README.md
|
docs/sdks/server/README.md
|
||||||
docs/sdks/media/README.md
|
docs/sdks/media/README.md
|
||||||
docs/sdks/activities/README.md
|
docs/sdks/activities/README.md
|
||||||
|
|||||||
31
gen.yaml
31
gen.yaml
@@ -1,29 +1,15 @@
|
|||||||
configVersion: 1.0.0
|
configVersion: 2.0.0
|
||||||
management:
|
|
||||||
docChecksum: 550154cf1b4d0c237436fb18c418b5db
|
|
||||||
docVersion: 0.0.3
|
|
||||||
speakeasyVersion: 1.129.1
|
|
||||||
generationVersion: 2.223.3
|
|
||||||
generation:
|
generation:
|
||||||
comments: {}
|
sdkClassName: Plex-API
|
||||||
sdkClassName: SDK
|
|
||||||
repoURL: https://github.com/LukeHagar/plexjs.git
|
|
||||||
maintainOpenAPIOrder: true
|
maintainOpenAPIOrder: true
|
||||||
usageSnippets:
|
usageSnippets:
|
||||||
optionalPropertyRendering: withExample
|
optionalPropertyRendering: withExample
|
||||||
fixes:
|
|
||||||
nameResolutionDec2023: true
|
|
||||||
useClassNamesForArrayFields: true
|
useClassNamesForArrayFields: true
|
||||||
features:
|
fixes:
|
||||||
typescript:
|
nameResolutionDec2023: false
|
||||||
core: 3.3.12
|
|
||||||
flattening: 2.81.1
|
|
||||||
globalSecurity: 2.82.2
|
|
||||||
globalServerURLs: 2.82.1
|
|
||||||
nameOverrides: 2.81.1
|
|
||||||
typescript:
|
typescript:
|
||||||
version: 0.1.0
|
version: 0.4.0
|
||||||
author: Speakeasy
|
author: LukeHagar
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
flattenGlobalSecurity: true
|
flattenGlobalSecurity: true
|
||||||
imports:
|
imports:
|
||||||
@@ -35,10 +21,7 @@ typescript:
|
|||||||
shared: models/components
|
shared: models/components
|
||||||
webhooks: models/webhooks
|
webhooks: models/webhooks
|
||||||
inputModelSuffix: input
|
inputModelSuffix: input
|
||||||
installationURL: https://github.com/LukeHagar/plexjs
|
|
||||||
maxMethodParams: 4
|
maxMethodParams: 4
|
||||||
outputModelSuffix: output
|
outputModelSuffix: output
|
||||||
packageName: openapi
|
packageName: '@lukehagar/plexjs'
|
||||||
published: true
|
|
||||||
repoSubDirectory: .
|
|
||||||
templateVersion: v2
|
templateVersion: v2
|
||||||
|
|||||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "openapi",
|
"name": "@lukehagar/plexjs",
|
||||||
"version": "0.1.0",
|
"version": "0.4.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "openapi",
|
"name": "@lukehagar/plexjs",
|
||||||
"version": "0.1.0",
|
"version": "0.4.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"decimal.js": "^10.4.3",
|
"decimal.js": "^10.4.3",
|
||||||
"jsonpath": "^1.1.1"
|
"jsonpath": "^1.1.1"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"name": "openapi",
|
"name": "@lukehagar/plexjs",
|
||||||
"version": "0.1.0",
|
"version": "0.4.0",
|
||||||
"author": "Speakeasy",
|
"author": "LukeHagar",
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ import { RetryConfig } from "./retries";
|
|||||||
* Contains the list of servers available to the SDK
|
* Contains the list of servers available to the SDK
|
||||||
*/
|
*/
|
||||||
export const ServerList = [
|
export const ServerList = [
|
||||||
/**
|
|
||||||
* The full address of your Plex Server
|
|
||||||
*/
|
|
||||||
"http://10.10.10.47:32400",
|
|
||||||
/**
|
/**
|
||||||
* The full address of your Plex Server
|
* The full address of your Plex Server
|
||||||
*/
|
*/
|
||||||
@@ -62,7 +58,6 @@ export function serverURLFromOptions(options: SDKOptions): URL {
|
|||||||
let serverURL = options.serverURL;
|
let serverURL = options.serverURL;
|
||||||
|
|
||||||
const serverParams = [
|
const serverParams = [
|
||||||
{},
|
|
||||||
{
|
{
|
||||||
protocol: options.protocol?.toString() ?? "http",
|
protocol: options.protocol?.toString() ?? "http",
|
||||||
ip: options.ip?.toString() ?? "10.10.10.47",
|
ip: options.ip?.toString() ?? "10.10.10.47",
|
||||||
@@ -84,7 +79,7 @@ export function serverURLFromOptions(options: SDKOptions): URL {
|
|||||||
export const SDK_METADATA = Object.freeze({
|
export const SDK_METADATA = Object.freeze({
|
||||||
language: "typescript",
|
language: "typescript",
|
||||||
openapiDocVersion: "0.0.3",
|
openapiDocVersion: "0.0.3",
|
||||||
sdkVersion: "0.1.0",
|
sdkVersion: "0.4.0",
|
||||||
genVersion: "2.223.3",
|
genVersion: "2.233.2",
|
||||||
userAgent: "speakeasy-sdk/typescript 0.1.0 2.223.3 0.0.3 openapi",
|
userAgent: "speakeasy-sdk/typescript 0.4.0 2.233.2 0.0.3 @lukehagar/plexjs",
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
import { bytesToBase64 } from "./base64";
|
import { bytesToBase64 } from "./base64";
|
||||||
|
|
||||||
export class EncodingError extends Error {
|
export class EncodingError extends Error {
|
||||||
constructor(message: string, options?: ErrorOptions) {
|
constructor(message: string) {
|
||||||
super(message, options);
|
super(message);
|
||||||
this.name = "EncodingError";
|
this.name = "EncodingError";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -201,7 +201,12 @@ export function encodeDeepObject(
|
|||||||
value: unknown,
|
value: unknown,
|
||||||
options?: { charEncoding?: "percent" | "none" },
|
options?: { charEncoding?: "percent" | "none" },
|
||||||
) {
|
) {
|
||||||
|
if (value == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
let out = "";
|
let out = "";
|
||||||
|
|
||||||
const encodeString = (v: string) => {
|
const encodeString = (v: string) => {
|
||||||
return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
|
return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ export type Fetcher = (
|
|||||||
init?: RequestInit,
|
init?: RequestInit,
|
||||||
) => Promise<Response>;
|
) => Promise<Response>;
|
||||||
|
|
||||||
|
const DEFAULT_FETCHER: Fetcher = (input, init) => fetch(input, init);
|
||||||
|
|
||||||
export interface HTTPClientOptions {
|
export interface HTTPClientOptions {
|
||||||
fetcher?: Fetcher;
|
fetcher?: Fetcher;
|
||||||
}
|
}
|
||||||
@@ -22,7 +24,7 @@ export class HTTPClient {
|
|||||||
private responseHooks: ResponseHook[] = [];
|
private responseHooks: ResponseHook[] = [];
|
||||||
|
|
||||||
constructor(private options: HTTPClientOptions = {}) {
|
constructor(private options: HTTPClientOptions = {}) {
|
||||||
this.fetcher = options.fetcher || fetch;
|
this.fetcher = options.fetcher || DEFAULT_FETCHER;
|
||||||
}
|
}
|
||||||
|
|
||||||
async request(request: Request): Promise<Response> {
|
async request(request: Request): Promise<Response> {
|
||||||
|
|||||||
@@ -23,14 +23,14 @@ type RequestConfig = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export class ClientSDK {
|
export class ClientSDK {
|
||||||
readonly #client: HTTPClient;
|
private readonly client: HTTPClient;
|
||||||
protected readonly baseURL: URL;
|
protected readonly baseURL: URL;
|
||||||
|
|
||||||
constructor(init: { client: HTTPClient; baseURL: URL }) {
|
constructor(init: { client: HTTPClient; baseURL: URL }) {
|
||||||
const url = init.baseURL;
|
const url = init.baseURL;
|
||||||
url.pathname = url.pathname.replace(/\/+$/, "") + "/";
|
url.pathname = url.pathname.replace(/\/+$/, "") + "/";
|
||||||
|
|
||||||
this.#client = init.client;
|
this.client = init.client;
|
||||||
this.baseURL = url;
|
this.baseURL = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ export class ClientSDK {
|
|||||||
method,
|
method,
|
||||||
});
|
});
|
||||||
|
|
||||||
return this.#client.request(req);
|
return this.client.request(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected unpackHeaders = unpackHeaders;
|
protected unpackHeaders = unpackHeaders;
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ export enum SecurityErrorCode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class SecurityError extends Error {
|
export class SecurityError extends Error {
|
||||||
constructor(public code: SecurityErrorCode, message: string, options?: ErrorOptions) {
|
constructor(public code: SecurityErrorCode, message: string) {
|
||||||
super(message, options);
|
super(message);
|
||||||
this.name = "SecurityError";
|
this.name = "SecurityError";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class AddPlaylistContentsResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: AddPlaylistContentsResponseBodyData;
|
data$: AddPlaylistContentsResponseBodyData;
|
||||||
|
|
||||||
constructor(err: AddPlaylistContentsResponseBodyData, options?: ErrorOptions) {
|
constructor(err: AddPlaylistContentsResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class ApplyUpdatesResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: ApplyUpdatesResponseBodyData;
|
data$: ApplyUpdatesResponseBodyData;
|
||||||
|
|
||||||
constructor(err: ApplyUpdatesResponseBodyData, options?: ErrorOptions) {
|
constructor(err: ApplyUpdatesResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class CancelServerActivitiesResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: CancelServerActivitiesResponseBodyData;
|
data$: CancelServerActivitiesResponseBodyData;
|
||||||
|
|
||||||
constructor(err: CancelServerActivitiesResponseBodyData, options?: ErrorOptions) {
|
constructor(err: CancelServerActivitiesResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class CheckForUpdatesResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: CheckForUpdatesResponseBodyData;
|
data$: CheckForUpdatesResponseBodyData;
|
||||||
|
|
||||||
constructor(err: CheckForUpdatesResponseBodyData, options?: ErrorOptions) {
|
constructor(err: CheckForUpdatesResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class ClearPlaylistContentsResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: ClearPlaylistContentsResponseBodyData;
|
data$: ClearPlaylistContentsResponseBodyData;
|
||||||
|
|
||||||
constructor(err: ClearPlaylistContentsResponseBodyData, options?: ErrorOptions) {
|
constructor(err: ClearPlaylistContentsResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class CreatePlaylistResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: CreatePlaylistResponseBodyData;
|
data$: CreatePlaylistResponseBodyData;
|
||||||
|
|
||||||
constructor(err: CreatePlaylistResponseBodyData, options?: ErrorOptions) {
|
constructor(err: CreatePlaylistResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class DeleteLibraryResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: DeleteLibraryResponseBodyData;
|
data$: DeleteLibraryResponseBodyData;
|
||||||
|
|
||||||
constructor(err: DeleteLibraryResponseBodyData, options?: ErrorOptions) {
|
constructor(err: DeleteLibraryResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class DeletePlaylistResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: DeletePlaylistResponseBodyData;
|
data$: DeletePlaylistResponseBodyData;
|
||||||
|
|
||||||
constructor(err: DeletePlaylistResponseBodyData, options?: ErrorOptions) {
|
constructor(err: DeletePlaylistResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class EnablePaperTrailResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: EnablePaperTrailResponseBodyData;
|
data$: EnablePaperTrailResponseBodyData;
|
||||||
|
|
||||||
constructor(err: EnablePaperTrailResponseBodyData, options?: ErrorOptions) {
|
constructor(err: EnablePaperTrailResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetAvailableClientsResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetAvailableClientsResponseBodyData;
|
data$: GetAvailableClientsResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetAvailableClientsResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetAvailableClientsResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetButlerTasksResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetButlerTasksResponseBodyData;
|
data$: GetButlerTasksResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetButlerTasksResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetButlerTasksResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetCommonLibraryItemsResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetCommonLibraryItemsResponseBodyData;
|
data$: GetCommonLibraryItemsResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetCommonLibraryItemsResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetCommonLibraryItemsResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetDevicesResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetDevicesResponseBodyData;
|
data$: GetDevicesResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetDevicesResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetDevicesResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetFileHashResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetFileHashResponseBodyData;
|
data$: GetFileHashResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetFileHashResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetFileHashResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetGlobalHubsResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetGlobalHubsResponseBodyData;
|
data$: GetGlobalHubsResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetGlobalHubsResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetGlobalHubsResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetLatestLibraryItemsResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetLatestLibraryItemsResponseBodyData;
|
data$: GetLatestLibraryItemsResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetLatestLibraryItemsResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetLatestLibraryItemsResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetLibrariesResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetLibrariesResponseBodyData;
|
data$: GetLibrariesResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetLibrariesResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetLibrariesResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetLibraryResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetLibraryResponseBodyData;
|
data$: GetLibraryResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetLibraryResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetLibraryResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetLibraryHubsResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetLibraryHubsResponseBodyData;
|
data$: GetLibraryHubsResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetLibraryHubsResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetLibraryHubsResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetLibraryItemsResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetLibraryItemsResponseBodyData;
|
data$: GetLibraryItemsResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetLibraryItemsResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetLibraryItemsResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetMetadataResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetMetadataResponseBodyData;
|
data$: GetMetadataResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetMetadataResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetMetadataResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetMetadataChildrenResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetMetadataChildrenResponseBodyData;
|
data$: GetMetadataChildrenResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetMetadataChildrenResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetMetadataChildrenResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetMyPlexAccountResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetMyPlexAccountResponseBodyData;
|
data$: GetMyPlexAccountResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetMyPlexAccountResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetMyPlexAccountResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetOnDeckResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetOnDeckResponseBodyData;
|
data$: GetOnDeckResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetOnDeckResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetOnDeckResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetPlaylistResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetPlaylistResponseBodyData;
|
data$: GetPlaylistResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetPlaylistResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetPlaylistResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetPlaylistContentsResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetPlaylistContentsResponseBodyData;
|
data$: GetPlaylistContentsResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetPlaylistContentsResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetPlaylistContentsResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetPlaylistsResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetPlaylistsResponseBodyData;
|
data$: GetPlaylistsResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetPlaylistsResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetPlaylistsResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetRecentlyAddedResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetRecentlyAddedResponseBodyData;
|
data$: GetRecentlyAddedResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetRecentlyAddedResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetRecentlyAddedResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetResizedPhotoResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetResizedPhotoResponseBodyData;
|
data$: GetResizedPhotoResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetResizedPhotoResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetResizedPhotoResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetSearchResultsResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetSearchResultsResponseBodyData;
|
data$: GetSearchResultsResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetSearchResultsResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetSearchResultsResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetServerActivitiesResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetServerActivitiesResponseBodyData;
|
data$: GetServerActivitiesResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetServerActivitiesResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetServerActivitiesResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetServerCapabilitiesResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetServerCapabilitiesResponseBodyData;
|
data$: GetServerCapabilitiesResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetServerCapabilitiesResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetServerCapabilitiesResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetServerIdentityResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetServerIdentityResponseBodyData;
|
data$: GetServerIdentityResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetServerIdentityResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetServerIdentityResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetServerListResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetServerListResponseBodyData;
|
data$: GetServerListResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetServerListResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetServerListResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetServerPreferencesResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetServerPreferencesResponseBodyData;
|
data$: GetServerPreferencesResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetServerPreferencesResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetServerPreferencesResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetSessionHistoryResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetSessionHistoryResponseBodyData;
|
data$: GetSessionHistoryResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetSessionHistoryResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetSessionHistoryResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetSessionsResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetSessionsResponseBodyData;
|
data$: GetSessionsResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetSessionsResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetSessionsResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetSourceConnectionInformationResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetSourceConnectionInformationResponseBodyData;
|
data$: GetSourceConnectionInformationResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetSourceConnectionInformationResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetSourceConnectionInformationResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetTimelineResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetTimelineResponseBodyData;
|
data$: GetTimelineResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetTimelineResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetTimelineResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetTranscodeSessionsResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetTranscodeSessionsResponseBodyData;
|
data$: GetTranscodeSessionsResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetTranscodeSessionsResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetTranscodeSessionsResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetTransientTokenResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetTransientTokenResponseBodyData;
|
data$: GetTransientTokenResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetTransientTokenResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetTransientTokenResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class GetUpdateStatusResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: GetUpdateStatusResponseBodyData;
|
data$: GetUpdateStatusResponseBodyData;
|
||||||
|
|
||||||
constructor(err: GetUpdateStatusResponseBodyData, options?: ErrorOptions) {
|
constructor(err: GetUpdateStatusResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class LogLineResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: LogLineResponseBodyData;
|
data$: LogLineResponseBodyData;
|
||||||
|
|
||||||
constructor(err: LogLineResponseBodyData, options?: ErrorOptions) {
|
constructor(err: LogLineResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class LogMultiLineResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: LogMultiLineResponseBodyData;
|
data$: LogMultiLineResponseBodyData;
|
||||||
|
|
||||||
constructor(err: LogMultiLineResponseBodyData, options?: ErrorOptions) {
|
constructor(err: LogMultiLineResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class MarkPlayedResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: MarkPlayedResponseBodyData;
|
data$: MarkPlayedResponseBodyData;
|
||||||
|
|
||||||
constructor(err: MarkPlayedResponseBodyData, options?: ErrorOptions) {
|
constructor(err: MarkPlayedResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class MarkUnplayedResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: MarkUnplayedResponseBodyData;
|
data$: MarkUnplayedResponseBodyData;
|
||||||
|
|
||||||
constructor(err: MarkUnplayedResponseBodyData, options?: ErrorOptions) {
|
constructor(err: MarkUnplayedResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class PerformSearchResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: PerformSearchResponseBodyData;
|
data$: PerformSearchResponseBodyData;
|
||||||
|
|
||||||
constructor(err: PerformSearchResponseBodyData, options?: ErrorOptions) {
|
constructor(err: PerformSearchResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class PerformVoiceSearchResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: PerformVoiceSearchResponseBodyData;
|
data$: PerformVoiceSearchResponseBodyData;
|
||||||
|
|
||||||
constructor(err: PerformVoiceSearchResponseBodyData, options?: ErrorOptions) {
|
constructor(err: PerformVoiceSearchResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class RefreshLibraryResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: RefreshLibraryResponseBodyData;
|
data$: RefreshLibraryResponseBodyData;
|
||||||
|
|
||||||
constructor(err: RefreshLibraryResponseBodyData, options?: ErrorOptions) {
|
constructor(err: RefreshLibraryResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class StartAllTasksResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: StartAllTasksResponseBodyData;
|
data$: StartAllTasksResponseBodyData;
|
||||||
|
|
||||||
constructor(err: StartAllTasksResponseBodyData, options?: ErrorOptions) {
|
constructor(err: StartAllTasksResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class StartTaskResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: StartTaskResponseBodyData;
|
data$: StartTaskResponseBodyData;
|
||||||
|
|
||||||
constructor(err: StartTaskResponseBodyData, options?: ErrorOptions) {
|
constructor(err: StartTaskResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class StartUniversalTranscodeResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: StartUniversalTranscodeResponseBodyData;
|
data$: StartUniversalTranscodeResponseBodyData;
|
||||||
|
|
||||||
constructor(err: StartUniversalTranscodeResponseBodyData, options?: ErrorOptions) {
|
constructor(err: StartUniversalTranscodeResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class StopAllTasksResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: StopAllTasksResponseBodyData;
|
data$: StopAllTasksResponseBodyData;
|
||||||
|
|
||||||
constructor(err: StopAllTasksResponseBodyData, options?: ErrorOptions) {
|
constructor(err: StopAllTasksResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class StopTaskResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: StopTaskResponseBodyData;
|
data$: StopTaskResponseBodyData;
|
||||||
|
|
||||||
constructor(err: StopTaskResponseBodyData, options?: ErrorOptions) {
|
constructor(err: StopTaskResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class StopTranscodeSessionResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: StopTranscodeSessionResponseBodyData;
|
data$: StopTranscodeSessionResponseBodyData;
|
||||||
|
|
||||||
constructor(err: StopTranscodeSessionResponseBodyData, options?: ErrorOptions) {
|
constructor(err: StopTranscodeSessionResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class UpdatePlaylistResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: UpdatePlaylistResponseBodyData;
|
data$: UpdatePlaylistResponseBodyData;
|
||||||
|
|
||||||
constructor(err: UpdatePlaylistResponseBodyData, options?: ErrorOptions) {
|
constructor(err: UpdatePlaylistResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class UpdatePlayProgressResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: UpdatePlayProgressResponseBodyData;
|
data$: UpdatePlayProgressResponseBodyData;
|
||||||
|
|
||||||
constructor(err: UpdatePlayProgressResponseBodyData, options?: ErrorOptions) {
|
constructor(err: UpdatePlayProgressResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export class UploadPlaylistResponseBody extends Error {
|
|||||||
/** The original data that was passed to this error instance. */
|
/** The original data that was passed to this error instance. */
|
||||||
data$: UploadPlaylistResponseBodyData;
|
data$: UploadPlaylistResponseBodyData;
|
||||||
|
|
||||||
constructor(err: UploadPlaylistResponseBodyData, options?: ErrorOptions) {
|
constructor(err: UploadPlaylistResponseBodyData) {
|
||||||
super("", options);
|
super("");
|
||||||
this.data$ = err;
|
this.data$ = err;
|
||||||
|
|
||||||
if (err.errors != null) {
|
if (err.errors != null) {
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export namespace GetLibraryRequest$ {
|
|||||||
export const inboundSchema: z.ZodType<GetLibraryRequest, z.ZodTypeDef, Inbound> = z
|
export const inboundSchema: z.ZodType<GetLibraryRequest, z.ZodTypeDef, Inbound> = z
|
||||||
.object({
|
.object({
|
||||||
sectionId: z.number(),
|
sectionId: z.number(),
|
||||||
includeDetails: IncludeDetails$.optional(),
|
includeDetails: IncludeDetails$.default(IncludeDetails.Zero),
|
||||||
})
|
})
|
||||||
.transform((v) => {
|
.transform((v) => {
|
||||||
return {
|
return {
|
||||||
@@ -70,18 +70,18 @@ export namespace GetLibraryRequest$ {
|
|||||||
|
|
||||||
export type Outbound = {
|
export type Outbound = {
|
||||||
sectionId: number;
|
sectionId: number;
|
||||||
includeDetails?: IncludeDetails | undefined;
|
includeDetails: IncludeDetails;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryRequest> = z
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLibraryRequest> = z
|
||||||
.object({
|
.object({
|
||||||
sectionId: z.number(),
|
sectionId: z.number(),
|
||||||
includeDetails: IncludeDetails$.optional(),
|
includeDetails: IncludeDetails$.default(IncludeDetails.Zero),
|
||||||
})
|
})
|
||||||
.transform((v) => {
|
.transform((v) => {
|
||||||
return {
|
return {
|
||||||
sectionId: v.sectionId,
|
sectionId: v.sectionId,
|
||||||
...(v.includeDetails === undefined ? null : { includeDetails: v.includeDetails }),
|
includeDetails: v.includeDetails,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export type GetResizedPhotoRequest = {
|
|||||||
/**
|
/**
|
||||||
* The opacity for the resized photo
|
* The opacity for the resized photo
|
||||||
*/
|
*/
|
||||||
opacity: number;
|
opacity?: number | undefined;
|
||||||
/**
|
/**
|
||||||
* The width for the resized photo
|
* The width for the resized photo
|
||||||
*/
|
*/
|
||||||
@@ -77,7 +77,7 @@ export namespace GetResizedPhotoRequest$ {
|
|||||||
export type Inbound = {
|
export type Inbound = {
|
||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
opacity: number;
|
opacity?: number | undefined;
|
||||||
blur: number;
|
blur: number;
|
||||||
minSize: MinSize;
|
minSize: MinSize;
|
||||||
upscale: Upscale;
|
upscale: Upscale;
|
||||||
@@ -88,7 +88,7 @@ export namespace GetResizedPhotoRequest$ {
|
|||||||
.object({
|
.object({
|
||||||
width: z.number(),
|
width: z.number(),
|
||||||
height: z.number(),
|
height: z.number(),
|
||||||
opacity: z.number().int(),
|
opacity: z.number().int().default(100),
|
||||||
blur: z.number(),
|
blur: z.number(),
|
||||||
minSize: MinSize$,
|
minSize: MinSize$,
|
||||||
upscale: Upscale$,
|
upscale: Upscale$,
|
||||||
@@ -98,7 +98,7 @@ export namespace GetResizedPhotoRequest$ {
|
|||||||
return {
|
return {
|
||||||
width: v.width,
|
width: v.width,
|
||||||
height: v.height,
|
height: v.height,
|
||||||
opacity: v.opacity,
|
...(v.opacity === undefined ? null : { opacity: v.opacity }),
|
||||||
blur: v.blur,
|
blur: v.blur,
|
||||||
minSize: v.minSize,
|
minSize: v.minSize,
|
||||||
upscale: v.upscale,
|
upscale: v.upscale,
|
||||||
@@ -120,7 +120,7 @@ export namespace GetResizedPhotoRequest$ {
|
|||||||
.object({
|
.object({
|
||||||
width: z.number(),
|
width: z.number(),
|
||||||
height: z.number(),
|
height: z.number(),
|
||||||
opacity: z.number().int(),
|
opacity: z.number().int().default(100),
|
||||||
blur: z.number(),
|
blur: z.number(),
|
||||||
minSize: MinSize$,
|
minSize: MinSize$,
|
||||||
upscale: Upscale$,
|
upscale: Upscale$,
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export namespace PerformSearchRequest$ {
|
|||||||
.object({
|
.object({
|
||||||
query: z.string(),
|
query: z.string(),
|
||||||
sectionId: z.number().optional(),
|
sectionId: z.number().optional(),
|
||||||
limit: z.number().optional(),
|
limit: z.number().default(3),
|
||||||
})
|
})
|
||||||
.transform((v) => {
|
.transform((v) => {
|
||||||
return {
|
return {
|
||||||
@@ -59,20 +59,20 @@ export namespace PerformSearchRequest$ {
|
|||||||
export type Outbound = {
|
export type Outbound = {
|
||||||
query: string;
|
query: string;
|
||||||
sectionId?: number | undefined;
|
sectionId?: number | undefined;
|
||||||
limit?: number | undefined;
|
limit: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, PerformSearchRequest> = z
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, PerformSearchRequest> = z
|
||||||
.object({
|
.object({
|
||||||
query: z.string(),
|
query: z.string(),
|
||||||
sectionId: z.number().optional(),
|
sectionId: z.number().optional(),
|
||||||
limit: z.number().optional(),
|
limit: z.number().default(3),
|
||||||
})
|
})
|
||||||
.transform((v) => {
|
.transform((v) => {
|
||||||
return {
|
return {
|
||||||
query: v.query,
|
query: v.query,
|
||||||
...(v.sectionId === undefined ? null : { sectionId: v.sectionId }),
|
...(v.sectionId === undefined ? null : { sectionId: v.sectionId }),
|
||||||
...(v.limit === undefined ? null : { limit: v.limit }),
|
limit: v.limit,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export namespace PerformVoiceSearchRequest$ {
|
|||||||
.object({
|
.object({
|
||||||
query: z.string(),
|
query: z.string(),
|
||||||
sectionId: z.number().optional(),
|
sectionId: z.number().optional(),
|
||||||
limit: z.number().optional(),
|
limit: z.number().default(3),
|
||||||
})
|
})
|
||||||
.transform((v) => {
|
.transform((v) => {
|
||||||
return {
|
return {
|
||||||
@@ -59,20 +59,20 @@ export namespace PerformVoiceSearchRequest$ {
|
|||||||
export type Outbound = {
|
export type Outbound = {
|
||||||
query: string;
|
query: string;
|
||||||
sectionId?: number | undefined;
|
sectionId?: number | undefined;
|
||||||
limit?: number | undefined;
|
limit: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, PerformVoiceSearchRequest> = z
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, PerformVoiceSearchRequest> = z
|
||||||
.object({
|
.object({
|
||||||
query: z.string(),
|
query: z.string(),
|
||||||
sectionId: z.number().optional(),
|
sectionId: z.number().optional(),
|
||||||
limit: z.number().optional(),
|
limit: z.number().default(3),
|
||||||
})
|
})
|
||||||
.transform((v) => {
|
.transform((v) => {
|
||||||
return {
|
return {
|
||||||
query: v.query,
|
query: v.query,
|
||||||
...(v.sectionId === undefined ? null : { sectionId: v.sectionId }),
|
...(v.sectionId === undefined ? null : { sectionId: v.sectionId }),
|
||||||
...(v.limit === undefined ? null : { limit: v.limit }),
|
limit: v.limit,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export class Activities extends ClientSDK {
|
|||||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||||
|
|
||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{ security: securitySettings$, method: "get", path: path$, headers: headers$ },
|
{ security: securitySettings$, method: "GET", path: path$, headers: headers$ },
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ export class Activities extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "delete",
|
method: "DELETE",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
body: body$,
|
body: body$,
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export class Butler extends ClientSDK {
|
|||||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||||
|
|
||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{ security: securitySettings$, method: "get", path: path$, headers: headers$ },
|
{ security: securitySettings$, method: "GET", path: path$, headers: headers$ },
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ export class Butler extends ClientSDK {
|
|||||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||||
|
|
||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{ security: securitySettings$, method: "post", path: path$, headers: headers$ },
|
{ security: securitySettings$, method: "POST", path: path$, headers: headers$ },
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ export class Butler extends ClientSDK {
|
|||||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||||
|
|
||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{ security: securitySettings$, method: "delete", path: path$, headers: headers$ },
|
{ security: securitySettings$, method: "DELETE", path: path$, headers: headers$ },
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ export class Butler extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "post",
|
method: "POST",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
body: body$,
|
body: body$,
|
||||||
@@ -304,7 +304,7 @@ export class Butler extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "delete",
|
method: "DELETE",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
body: body$,
|
body: body$,
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export class Hubs extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -157,7 +157,7 @@ export class Hubs extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export class Library extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -122,7 +122,7 @@ export class Library extends ClientSDK {
|
|||||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||||
|
|
||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{ security: securitySettings$, method: "get", path: path$, headers: headers$ },
|
{ security: securitySettings$, method: "GET", path: path$, headers: headers$ },
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ export class Library extends ClientSDK {
|
|||||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||||
|
|
||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{ security: securitySettings$, method: "get", path: path$, headers: headers$ },
|
{ security: securitySettings$, method: "GET", path: path$, headers: headers$ },
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ export class Library extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -355,7 +355,7 @@ export class Library extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "delete",
|
method: "DELETE",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
body: body$,
|
body: body$,
|
||||||
@@ -440,7 +440,7 @@ export class Library extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -517,7 +517,7 @@ export class Library extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
body: body$,
|
body: body$,
|
||||||
@@ -604,7 +604,7 @@ export class Library extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -692,7 +692,7 @@ export class Library extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -767,7 +767,7 @@ export class Library extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
body: body$,
|
body: body$,
|
||||||
@@ -843,7 +843,7 @@ export class Library extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
body: body$,
|
body: body$,
|
||||||
@@ -899,7 +899,7 @@ export class Library extends ClientSDK {
|
|||||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||||
|
|
||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{ security: securitySettings$, method: "get", path: path$, headers: headers$ },
|
{ security: securitySettings$, method: "GET", path: path$, headers: headers$ },
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export class Log extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -129,7 +129,7 @@ export class Log extends ClientSDK {
|
|||||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||||
|
|
||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{ security: securitySettings$, method: "post", path: path$, headers: headers$ },
|
{ security: securitySettings$, method: "POST", path: path$, headers: headers$ },
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ export class Log extends ClientSDK {
|
|||||||
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
||||||
|
|
||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{ security: securitySettings$, method: "get", path: path$, headers: headers$ },
|
{ security: securitySettings$, method: "GET", path: path$, headers: headers$ },
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export class Media extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -135,7 +135,7 @@ export class Media extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -215,7 +215,7 @@ export class Media extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "post",
|
method: "POST",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export class Playlists extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "post",
|
method: "POST",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -148,7 +148,7 @@ export class Playlists extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -224,7 +224,7 @@ export class Playlists extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
body: body$,
|
body: body$,
|
||||||
@@ -298,7 +298,7 @@ export class Playlists extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "delete",
|
method: "DELETE",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
body: body$,
|
body: body$,
|
||||||
@@ -372,7 +372,7 @@ export class Playlists extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "put",
|
method: "PUT",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
body: body$,
|
body: body$,
|
||||||
@@ -457,7 +457,7 @@ export class Playlists extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -532,7 +532,7 @@ export class Playlists extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "delete",
|
method: "DELETE",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
body: body$,
|
body: body$,
|
||||||
@@ -621,7 +621,7 @@ export class Playlists extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "put",
|
method: "PUT",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -698,7 +698,7 @@ export class Playlists extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "post",
|
method: "POST",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { Sessions } from "./sessions";
|
|||||||
import { Updater } from "./updater";
|
import { Updater } from "./updater";
|
||||||
import { Video } from "./video";
|
import { Video } from "./video";
|
||||||
|
|
||||||
export class SDK extends ClientSDK {
|
export class PlexAPI extends ClientSDK {
|
||||||
private readonly options$: SDKOptions;
|
private readonly options$: SDKOptions;
|
||||||
|
|
||||||
constructor(options: SDKOptions = {}) {
|
constructor(options: SDKOptions = {}) {
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export class Search extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -169,7 +169,7 @@ export class Search extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -242,7 +242,7 @@ export class Search extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export class Security extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
@@ -142,7 +142,7 @@ export class Security extends ClientSDK {
|
|||||||
const response = await this.fetch$(
|
const response = await this.fetch$(
|
||||||
{
|
{
|
||||||
security: securitySettings$,
|
security: securitySettings$,
|
||||||
method: "get",
|
method: "GET",
|
||||||
path: path$,
|
path: path$,
|
||||||
headers: headers$,
|
headers: headers$,
|
||||||
query: query$,
|
query: query$,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user