From 796edd717486a6ef3de7d64cb8ffd24fa9336073 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 7 Jun 2024 00:30:12 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.300.1 --- .speakeasy/workflow.lock | 10 +- RELEASES.md | 10 + codeSamples.yaml | 1676 +++++++++++++++++++------------------- 3 files changed, 853 insertions(+), 843 deletions(-) diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 325e84ee..b83297fc 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.300.0 +speakeasyVersion: 1.300.1 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:31ee48b100bebabe13cfbe15c880f40812cd1db5d9b81e28dcf0e9d4ea6aff79 - sourceBlobDigest: sha256:9d2bf709e5a90650a617963ce8fa023f7f08a9ee25df905c715895cde1605161 + sourceRevisionDigest: sha256:6260c3d190bdd8435ede29b8e06807c59a38a24e140f29136285e4d84dc01011 + sourceBlobDigest: sha256:e9a1673951bc199f871ba8c5043b248ab66addc1e0201312d6a634bd9241874c tags: - latest - main @@ -11,8 +11,8 @@ targets: plexjs: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:31ee48b100bebabe13cfbe15c880f40812cd1db5d9b81e28dcf0e9d4ea6aff79 - sourceBlobDigest: sha256:9d2bf709e5a90650a617963ce8fa023f7f08a9ee25df905c715895cde1605161 + sourceRevisionDigest: sha256:6260c3d190bdd8435ede29b8e06807c59a38a24e140f29136285e4d84dc01011 + sourceBlobDigest: sha256:e9a1673951bc199f871ba8c5043b248ab66addc1e0201312d6a634bd9241874c outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index 67e10424..6a9bdecc 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -718,4 +718,14 @@ Based on: ### Generated - [typescript v0.16.4] . ### Releases +- [NPM v0.16.4] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.4 - . + +## 2024-06-07 00:29:43 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.300.1 (2.339.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.16.4] . +### Releases - [NPM v0.16.4] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.4 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 5d07b117..11dca340 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,14 +3,13 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: - - target: $["paths"]["/playlists"]["get"] + - target: $["paths"]["/log"]["post"] update: x-codeSamples: - lang: typescript - label: getPlaylists + label: logMultiLine source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { PlaylistType, QueryParamSmart } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -18,18 +17,20 @@ actions: }); async function run() { - const result = await plexAPI.playlists.getPlaylists(PlaylistType.Audio, QueryParamSmart.Zero); + const result = await plexAPI.log.logMultiLine("level=4&message=Test%20message%201&source=postman + level=3&message=Test%20message%202&source=postman + level=1&message=Test%20message%203&source=postman"); // Handle the result console.log(result) } run(); - - target: $["paths"]["/security/resources"]["get"] + - target: $["paths"]["/transcode/sessions"]["get"] update: x-codeSamples: - lang: typescript - label: getSourceConnectionInformation + label: getTranscodeSessions source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -39,18 +40,18 @@ actions: }); async function run() { - const result = await plexAPI.authentication.getSourceConnectionInformation("server://client-identifier"); + const result = await plexAPI.sessions.getTranscodeSessions(); // Handle the result console.log(result) } run(); - - target: $["paths"]["/myplex/account"]["get"] + - target: $["paths"]["/updater/status"]["get"] update: x-codeSamples: - lang: typescript - label: getMyPlexAccount + label: getUpdateStatus source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -60,122 +61,7 @@ actions: }); async function run() { - const result = await plexAPI.server.getMyPlexAccount(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/library/sections"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getLibraries - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.library.getLibraries(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/library/sections/{sectionId}/refresh"]["get"] - update: - x-codeSamples: - - lang: typescript - label: refreshLibrary - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.library.refreshLibrary(934.16); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/photo/:/transcode"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getResizedPhoto - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { MinSize, Upscale } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.server.getResizedPhoto({ - width: 110, - height: 165, - opacity: 100, - blur: 20, - minSize: MinSize.One, - upscale: Upscale.Zero, - url: "/library/metadata/49564/thumb/1654258204", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/search"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getSearchResults - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.search.getSearchResults("110"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/updater/apply"]["put"] - update: - x-codeSamples: - - lang: typescript - label: applyUpdates - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { Skip, Tonight } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.updater.applyUpdates(Tonight.One, Skip.One); + const result = await plexAPI.updater.getUpdateStatus(); // Handle the result console.log(result) @@ -203,14 +89,13 @@ actions: } run(); - - target: $["paths"]["/log"]["get"] + - target: $["paths"]["/playlists/{playlistID}"]["get"] update: x-codeSamples: - lang: typescript - label: logLine + label: getPlaylist source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { Level } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -218,21 +103,20 @@ actions: }); async function run() { - const result = await plexAPI.log.logLine(Level.Three, "Test log message", "Postman"); + const result = await plexAPI.playlists.getPlaylist(4109.48); // Handle the result console.log(result) } run(); - - target: $["paths"]["/playlists"]["post"] + - target: $["paths"]["/playlists/{playlistID}"]["put"] update: x-codeSamples: - lang: typescript - label: createPlaylist + label: updatePlaylist source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { QueryParamType, Smart } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -240,26 +124,20 @@ actions: }); async function run() { - const result = await plexAPI.playlists.createPlaylist({ - title: "", - type: QueryParamType.Photo, - smart: Smart.One, - uri: "https://inborn-brochure.biz", - }); + const result = await plexAPI.playlists.updatePlaylist(3915, "", ""); // Handle the result console.log(result) } run(); - - target: $["paths"]["/:/timeline"]["get"] + - target: $["paths"]["/security/resources"]["get"] update: x-codeSamples: - lang: typescript - label: getTimeline + label: getSourceConnectionInformation source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { State } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -267,32 +145,20 @@ actions: }); async function run() { - const result = await plexAPI.video.getTimeline({ - ratingKey: 23409, - key: "/library/metadata/23409", - state: State.Playing, - hasMDE: 1, - time: 2000, - duration: 10000, - context: "home:hub.continueWatching", - playQueueItemID: 1, - playBackTime: 2000, - row: 1, - }); + const result = await plexAPI.authentication.getSourceConnectionInformation("server://client-identifier"); // Handle the result console.log(result) } run(); - - target: $["paths"]["/updater/check"]["put"] + - target: $["paths"]["/library/hashes"]["get"] update: x-codeSamples: - lang: typescript - label: checkForUpdates + label: getFileHash source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { Download } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -300,18 +166,18 @@ actions: }); async function run() { - const result = await plexAPI.updater.checkForUpdates(Download.One); + const result = await plexAPI.library.getFileHash("file://C:\Image.png&type=13", 4462.17); // Handle the result console.log(result) } run(); - - target: $["paths"]["/clients"]["get"] + - target: $["paths"]["/library/sections"]["get"] update: x-codeSamples: - lang: typescript - label: getAvailableClients + label: getLibraries source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -321,18 +187,18 @@ actions: }); async function run() { - const result = await plexAPI.server.getAvailableClients(); + const result = await plexAPI.library.getLibraries(); // Handle the result console.log(result) } run(); - - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] + - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] update: x-codeSamples: - lang: typescript - label: stopTranscodeSession + label: getMetadataChildren source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -342,7 +208,135 @@ actions: }); async function run() { - const result = await plexAPI.sessions.stopTranscodeSession("zz7llzqlx8w9vnrsbnwhbmep"); + const result = await plexAPI.library.getMetadataChildren(1539.14); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/:/prefs"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getServerPreferences + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.server.getServerPreferences(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/:/unscrobble"]["get"] + update: + x-codeSamples: + - lang: typescript + label: markUnplayed + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.media.markUnplayed(59398); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/butler"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: stopAllTasks + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.butler.stopAllTasks(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/hubs"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getGlobalHubs + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { OnlyTransient } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.hubs.getGlobalHubs(1262.49, OnlyTransient.One); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/search"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getSearchResults + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.search.getSearchResults("110"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/security/token"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getTransientToken + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetTransientTokenQueryParamType, Scope } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.authentication.getTransientToken(GetTransientTokenQueryParamType.Delegation, Scope.All); // Handle the result console.log(result) @@ -371,13 +365,14 @@ actions: } run(); - - target: $["paths"]["/library/metadata/{ratingKey}"]["get"] + - target: $["paths"]["/log"]["get"] update: x-codeSamples: - lang: typescript - label: getMetadata + label: logLine source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { Level } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -385,175 +380,27 @@ actions: }); async function run() { - const result = await plexAPI.library.getMetadata(8382.31); + const result = await plexAPI.log.logLine(Level.Three, "Test log message", "Postman"); // Handle the result console.log(result) } run(); - - target: $["paths"]["/log"]["post"] + - target: $["paths"]["/pins/{pinID}"]["get"] update: x-codeSamples: - lang: typescript - label: logMultiLine + label: getToken source: |- import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", xPlexClientIdentifier: "Postman", }); async function run() { - const result = await plexAPI.log.logMultiLine("level=4&message=Test%20message%201&source=postman - level=3&message=Test%20message%202&source=postman - level=1&message=Test%20message%203&source=postman"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/log/networked"]["get"] - update: - x-codeSamples: - - lang: typescript - label: enablePaperTrail - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.log.enablePaperTrail(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists/upload"]["post"] - update: - x-codeSamples: - - lang: typescript - label: uploadPlaylist - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { Force } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.playlists.uploadPlaylist("/home/barkley/playlist.m3u", Force.Zero); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/:/progress"]["post"] - update: - x-codeSamples: - - lang: typescript - label: updatePlayProgress - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.media.updatePlayProgress("", 90000, "played"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/activities/{activityUUID}"]["delete"] - update: - x-codeSamples: - - lang: typescript - label: cancelServerActivities - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.activities.cancelServerActivities("25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/butler/{taskName}"]["post"] - update: - x-codeSamples: - - lang: typescript - label: startTask - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { TaskName } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.butler.startTask(TaskName.CleanOldBundles); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"] - update: - x-codeSamples: - - lang: typescript - label: startUniversalTranscode - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.video.startUniversalTranscode({ - hasMDE: 1, - path: "/library/metadata/23409", - mediaIndex: 0, - partIndex: 0, - protocol: "hls", - fastSeek: 0, - directPlay: 0, - directStream: 0, - subtitleSize: 100, - subtites: "burn", - audioBoost: 100, - location: "lan", - mediaBufferSize: 102400, - session: "zvcage8b7rkioqcm8f4uns4c", - addDebugOverlay: 0, - autoAdjustQuality: 0, - }); + const result = await plexAPI.plex.getToken("", "Postman"); // Handle the result console.log(result) @@ -603,6 +450,254 @@ actions: console.log(result) } + run(); + - target: $["paths"]["/library/metadata/{ratingKey}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getMetadata + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.getMetadata(8382.31); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/status/sessions"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getSessions + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.sessions.getSessions(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: deleteLibrary + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.deleteLibrary(1000); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/playlists"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getPlaylists + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { PlaylistType, QueryParamSmart } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.playlists.getPlaylists(PlaylistType.Audio, QueryParamSmart.Zero); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/status/sessions/history/all"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getSessionHistory + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.sessions.getSessionHistory(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getServerCapabilities + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.server.getServerCapabilities(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/playlists"]["post"] + update: + x-codeSamples: + - lang: typescript + label: createPlaylist + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { QueryParamType, Smart } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.playlists.createPlaylist({ + title: "", + type: QueryParamType.Photo, + smart: Smart.One, + uri: "https://inborn-brochure.biz", + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/updater/check"]["put"] + update: + x-codeSamples: + - lang: typescript + label: checkForUpdates + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Download } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.updater.checkForUpdates(Download.One); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/playlists/{playlistID}/items"]["put"] + update: + x-codeSamples: + - lang: typescript + label: addPlaylistContents + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.playlists.addPlaylistContents(8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/myplex/account"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getMyPlexAccount + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.server.getMyPlexAccount(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/photo/:/transcode"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getResizedPhoto + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { MinSize, Upscale } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.server.getResizedPhoto({ + width: 110, + height: 165, + opacity: 100, + blur: 20, + minSize: MinSize.One, + upscale: Upscale.Zero, + url: "/library/metadata/49564/thumb/1654258204", + }); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/hubs/search"]["get"] update: @@ -624,6 +719,360 @@ actions: console.log(result) } + run(); + - target: $["paths"]["/library/sections/{sectionId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getLibrary + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { IncludeDetails } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.getLibrary(1000, IncludeDetails.Zero); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/onDeck"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getOnDeck + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.getOnDeck(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/playlists/{playlistID}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: deletePlaylist + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.playlists.deletePlaylist(216.22); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/butler/{taskName}"]["post"] + update: + x-codeSamples: + - lang: typescript + label: startTask + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { TaskName } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.butler.startTask(TaskName.CleanOldBundles); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/refresh"]["get"] + update: + x-codeSamples: + - lang: typescript + label: refreshLibrary + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.refreshLibrary(934.16); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/pins"]["post"] + update: + x-codeSamples: + - lang: typescript + label: getPin + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.plex.getPin(false, "Postman"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/playlists/{playlistID}/items"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getPlaylistContents + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.playlists.getPlaylistContents(5004.46, 9403.59); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/clients"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getAvailableClients + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.server.getAvailableClients(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/identity"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getServerIdentity + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.server.getServerIdentity(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/:/scrobble"]["get"] + update: + x-codeSamples: + - lang: typescript + label: markPlayed + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.media.markPlayed(59398); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/butler"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getButlerTasks + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.butler.getButlerTasks(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/log/networked"]["get"] + update: + x-codeSamples: + - lang: typescript + label: enablePaperTrail + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.log.enablePaperTrail(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"] + update: + x-codeSamples: + - lang: typescript + label: startUniversalTranscode + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.video.startUniversalTranscode({ + hasMDE: 1, + path: "/library/metadata/23409", + mediaIndex: 0, + partIndex: 0, + protocol: "hls", + fastSeek: 0, + directPlay: 0, + directStream: 0, + subtitleSize: 100, + subtites: "burn", + audioBoost: 100, + location: "lan", + mediaBufferSize: 102400, + session: "zvcage8b7rkioqcm8f4uns4c", + addDebugOverlay: 0, + autoAdjustQuality: 0, + }); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/activities/{activityUUID}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: cancelServerActivities + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.activities.cancelServerActivities("25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/recentlyAdded"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getRecentlyAdded + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.getRecentlyAdded(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/:/progress"]["post"] + update: + x-codeSamples: + - lang: typescript + label: updatePlayProgress + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.media.updatePlayProgress("", 90000, "played"); + + // Handle the result + console.log(result) + } + run(); - target: $["paths"]["/hubs/search/voice"]["get"] update: @@ -646,13 +1095,14 @@ actions: } run(); - - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] + - target: $["paths"]["/library/sections/{sectionId}/search"]["get"] update: x-codeSamples: - lang: typescript - label: getMetadataChildren + label: searchLibrary source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { Type } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -660,18 +1110,18 @@ actions: }); async function run() { - const result = await plexAPI.library.getMetadataChildren(1539.14); + const result = await plexAPI.library.searchLibrary(933505, Type.Four); // Handle the result console.log(result) } run(); - - target: $["paths"]["/status/sessions"]["get"] + - target: $["paths"]["/playlists/{playlistID}/items"]["delete"] update: x-codeSamples: - lang: typescript - label: getSessions + label: clearPlaylistContents source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -681,7 +1131,49 @@ actions: }); async function run() { - const result = await plexAPI.sessions.getSessions(); + const result = await plexAPI.playlists.clearPlaylistContents(1893.18); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: stopTranscodeSession + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.sessions.stopTranscodeSession("zz7llzqlx8w9vnrsbnwhbmep"); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/devices"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getDevices + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.server.getDevices(); // Handle the result console.log(result) @@ -730,13 +1222,14 @@ actions: } run(); - - target: $["paths"]["/butler"]["delete"] + - target: $["paths"]["/:/timeline"]["get"] update: x-codeSamples: - lang: typescript - label: stopAllTasks + label: getTimeline source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { State } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -744,20 +1237,32 @@ actions: }); async function run() { - const result = await plexAPI.butler.stopAllTasks(); + const result = await plexAPI.video.getTimeline({ + ratingKey: 23409, + key: "/library/metadata/23409", + state: State.Playing, + hasMDE: 1, + time: 2000, + duration: 10000, + context: "home:hub.continueWatching", + playQueueItemID: 1, + playBackTime: 2000, + row: 1, + }); // Handle the result console.log(result) } run(); - - target: $["paths"]["/library/sections/{sectionId}"]["delete"] + - target: $["paths"]["/playlists/upload"]["post"] update: x-codeSamples: - lang: typescript - label: deleteLibrary + label: uploadPlaylist source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { Force } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -765,406 +1270,7 @@ actions: }); async function run() { - const result = await plexAPI.library.deleteLibrary(1000); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/library/onDeck"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getOnDeck - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.library.getOnDeck(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists/{playlistID}/items"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getPlaylistContents - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.playlists.getPlaylistContents(5004.46, 9403.59); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/:/scrobble"]["get"] - update: - x-codeSamples: - - lang: typescript - label: markPlayed - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.media.markPlayed(59398); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/hubs"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getGlobalHubs - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { OnlyTransient } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.hubs.getGlobalHubs(1262.49, OnlyTransient.One); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/library/recentlyAdded"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getRecentlyAdded - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.library.getRecentlyAdded(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/security/token"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getTransientToken - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { GetTransientTokenQueryParamType, Scope } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.authentication.getTransientToken(GetTransientTokenQueryParamType.Delegation, Scope.All); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/:/prefs"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getServerPreferences - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.server.getServerPreferences(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists/{playlistID}"]["delete"] - update: - x-codeSamples: - - lang: typescript - label: deletePlaylist - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.playlists.deletePlaylist(216.22); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists/{playlistID}/items"]["delete"] - update: - x-codeSamples: - - lang: typescript - label: clearPlaylistContents - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.playlists.clearPlaylistContents(1893.18); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/pins/{pinID}"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getToken - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.plex.getToken("", "Postman"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists/{playlistID}"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getPlaylist - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.playlists.getPlaylist(4109.48); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/status/sessions/history/all"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getSessionHistory - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.sessions.getSessionHistory(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/updater/status"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getUpdateStatus - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.updater.getUpdateStatus(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getServerCapabilities - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.server.getServerCapabilities(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/devices"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getDevices - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.server.getDevices(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/:/unscrobble"]["get"] - update: - x-codeSamples: - - lang: typescript - label: markUnplayed - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.media.markUnplayed(59398); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/pins"]["post"] - update: - x-codeSamples: - - lang: typescript - label: getPin - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.plex.getPin(false, "Postman"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/identity"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getServerIdentity - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.server.getServerIdentity(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/butler"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getButlerTasks - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.butler.getButlerTasks(); + const result = await plexAPI.playlists.uploadPlaylist("/home/barkley/playlist.m3u", Force.Zero); // Handle the result console.log(result) @@ -1192,14 +1298,14 @@ actions: } run(); - - target: $["paths"]["/library/sections/{sectionId}"]["get"] + - target: $["paths"]["/updater/apply"]["put"] update: x-codeSamples: - lang: typescript - label: getLibrary + label: applyUpdates source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { IncludeDetails } from "@lukehagar/plexjs/models/operations"; + import { Skip, Tonight } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -1207,113 +1313,7 @@ actions: }); async function run() { - const result = await plexAPI.library.getLibrary(1000, IncludeDetails.Zero); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists/{playlistID}"]["put"] - update: - x-codeSamples: - - lang: typescript - label: updatePlaylist - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.playlists.updatePlaylist(3915, "", ""); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists/{playlistID}/items"]["put"] - update: - x-codeSamples: - - lang: typescript - label: addPlaylistContents - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.playlists.addPlaylistContents(8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/library/hashes"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getFileHash - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.library.getFileHash("file://C:\Image.png&type=13", 4462.17); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/library/sections/{sectionId}/search"]["get"] - update: - x-codeSamples: - - lang: typescript - label: searchLibrary - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { Type } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.library.searchLibrary(933505, Type.Four); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/transcode/sessions"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getTranscodeSessions - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.sessions.getTranscodeSessions(); + const result = await plexAPI.updater.applyUpdates(Tonight.One, Skip.One); // Handle the result console.log(result)