diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 1c41c671..ce589b78 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 16f22cbf-f23f-4419-8924-3a4b06381947 management: docChecksum: 911d74baa0d06121d2ce2c71d94e977a docVersion: 0.0.3 - speakeasyVersion: 1.299.1 - generationVersion: 2.338.5 - releaseVersion: 0.16.2 - configChecksum: 3db609966ab8ab6b8d6b084f8c5fee42 + speakeasyVersion: 1.299.6 + generationVersion: 2.338.12 + releaseVersion: 0.16.3 + configChecksum: 4484f850f7d4c0597aad55fb526056c5 repoURL: https://github.com/LukeHagar/plexjs.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexjs @@ -15,7 +15,7 @@ features: typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.5 - core: 3.9.10 + core: 3.9.11 flattening: 2.81.1 globalSecurity: 2.82.9 globalSecurityCallbacks: 0.1.0 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index ff7cb4b8..89d605a6 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.16.2 + version: 0.16.3 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c90bed35..b21c84bb 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.299.4 +speakeasyVersion: 1.299.6 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:10fb63346f355ec7f88bb8c1f0a9a420843e63b86df0d2968a03f63b2a64ee6b - sourceBlobDigest: sha256:3e5211864e8613f605331e2b06931389f1a33d50c065731431c4ab2eeac28895 + sourceRevisionDigest: sha256:cb2ebcfddd8b90fb13065bf5b30f94be03c16a369a0ae36dd0d86be42ac9515d + sourceBlobDigest: sha256:2566064a45c5301a8ec12f4fc2001348306136c0c8d5b010b7a74c17c0cf4bba tags: - latest - main @@ -11,8 +11,8 @@ targets: plexjs: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:10fb63346f355ec7f88bb8c1f0a9a420843e63b86df0d2968a03f63b2a64ee6b - sourceBlobDigest: sha256:3e5211864e8613f605331e2b06931389f1a33d50c065731431c4ab2eeac28895 + sourceRevisionDigest: sha256:cb2ebcfddd8b90fb13065bf5b30f94be03c16a369a0ae36dd0d86be42ac9515d + sourceBlobDigest: sha256:2566064a45c5301a8ec12f4fc2001348306136c0c8d5b010b7a74c17c0cf4bba outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index 5748bc79..5c60c7d7 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -688,4 +688,14 @@ Based on: ### Generated - [typescript v0.16.2] . ### Releases -- [NPM v0.16.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.2 - . \ No newline at end of file +- [NPM v0.16.2] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.2 - . + +## 2024-06-04 00:28:27 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.299.6 (2.338.12) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.16.3] . +### Releases +- [NPM v0.16.3] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.16.3 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 233f1a69..11784eb0 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -25,11 +25,11 @@ actions: } run(); - - target: $["paths"]["/playlists/{playlistID}"]["delete"] + - target: $["paths"]["/library/sections/{sectionId}/refresh"]["get"] update: x-codeSamples: - lang: typescript - label: deletePlaylist + label: refreshLibrary source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -39,21 +39,20 @@ actions: }); async function run() { - const result = await plexAPI.playlists.deletePlaylist(216.22); + const result = await plexAPI.library.refreshLibrary(934.16); // Handle the result console.log(result) } run(); - - target: $["paths"]["/playlists/upload"]["post"] + - target: $["paths"]["/status/sessions"]["get"] update: x-codeSamples: - lang: typescript - label: uploadPlaylist + label: getSessions source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { Force } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -61,18 +60,18 @@ actions: }); async function run() { - const result = await plexAPI.playlists.uploadPlaylist("/home/barkley/playlist.m3u", Force.Zero); + const result = await plexAPI.sessions.getSessions(); // Handle the result console.log(result) } run(); - - target: $["paths"]["/butler"]["get"] + - target: $["paths"]["/clients"]["get"] update: x-codeSamples: - lang: typescript - label: getButlerTasks + label: getAvailableClients source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -82,18 +81,18 @@ actions: }); async function run() { - const result = await plexAPI.butler.getButlerTasks(); + const result = await plexAPI.server.getAvailableClients(); // Handle the result console.log(result) } run(); - - target: $["paths"]["/butler"]["delete"] + - target: $["paths"]["/:/unscrobble"]["get"] update: x-codeSamples: - lang: typescript - label: stopAllTasks + label: markUnplayed source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -103,7 +102,69 @@ actions: }); async function run() { - const result = await plexAPI.butler.stopAllTasks(); + const result = await plexAPI.media.markUnplayed(59398); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/hubs/search/voice"]["get"] + update: + x-codeSamples: + - lang: typescript + label: performVoiceSearch + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.search.performVoiceSearch("dead+poop", 4094.8, 5); + + // Handle the result + 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"]["/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) @@ -131,6 +192,324 @@ actions: 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"]["/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"]["/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"]["/butler/{taskName}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: stopTask + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { PathParamTaskName } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.butler.stopTask(PathParamTaskName.BackupDatabase); + + // 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"]["/hubs/sections/{sectionId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getLibraryHubs + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { QueryParamOnlyTransient } from "@lukehagar/plexjs/models/operations"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.hubs.getLibraryHubs(6728.76, 9010.22, QueryParamOnlyTransient.Zero); + + // 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/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"]["/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}"]["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"]["/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(); + + // 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"]["/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"]["/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"]["/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"]["/activities"]["get"] update: @@ -153,11 +532,11 @@ actions: } run(); - - target: $["paths"]["/library/sections/{sectionId}"]["delete"] + - target: $["paths"]["/butler"]["get"] update: x-codeSamples: - lang: typescript - label: deleteLibrary + label: getButlerTasks source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -167,18 +546,18 @@ actions: }); async function run() { - const result = await plexAPI.library.deleteLibrary(1000); + const result = await plexAPI.butler.getButlerTasks(); // Handle the result console.log(result) } run(); - - target: $["paths"]["/library/metadata/{ratingKey}"]["get"] + - target: $["paths"]["/hubs/search"]["get"] update: x-codeSamples: - lang: typescript - label: getMetadata + label: performSearch source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -188,7 +567,72 @@ actions: }); async function run() { - const result = await plexAPI.library.getMetadata(8382.31); + const result = await plexAPI.search.performSearch("dylan", 1516.53, 5); + + // 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"]["/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"]["/"]["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) @@ -233,11 +677,11 @@ actions: } run(); - - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] + - target: $["paths"]["/library/sections"]["get"] update: x-codeSamples: - lang: typescript - label: getMetadataChildren + label: getLibraries source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -247,18 +691,18 @@ actions: }); async function run() { - const result = await plexAPI.library.getMetadataChildren(1539.14); + const result = await plexAPI.library.getLibraries(); // Handle the result console.log(result) } run(); - - target: $["paths"]["/status/sessions"]["get"] + - target: $["paths"]["/:/scrobble"]["get"] update: x-codeSamples: - lang: typescript - label: getSessions + label: markPlayed source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -268,18 +712,18 @@ actions: }); async function run() { - const result = await plexAPI.sessions.getSessions(); + const result = await plexAPI.media.markPlayed(59398); // Handle the result console.log(result) } run(); - - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] + - target: $["paths"]["/library/sections/{sectionId}"]["delete"] update: x-codeSamples: - lang: typescript - label: stopTranscodeSession + label: deleteLibrary source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -289,18 +733,18 @@ actions: }); async function run() { - const result = await plexAPI.sessions.stopTranscodeSession("zz7llzqlx8w9vnrsbnwhbmep"); + const result = await plexAPI.library.deleteLibrary(1000); // Handle the result console.log(result) } run(); - - target: $["paths"]["/devices"]["get"] + - target: $["paths"]["/status/sessions/history/all"]["get"] update: x-codeSamples: - lang: typescript - label: getDevices + label: getSessionHistory source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -310,21 +754,21 @@ actions: }); async function run() { - const result = await plexAPI.server.getDevices(); + const result = await plexAPI.sessions.getSessionHistory(); // Handle the result console.log(result) } run(); - - target: $["paths"]["/hubs/sections/{sectionId}"]["get"] + - target: $["paths"]["/butler/{taskName}"]["post"] update: x-codeSamples: - lang: typescript - label: getLibraryHubs + label: startTask source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { QueryParamOnlyTransient } from "@lukehagar/plexjs/models/operations"; + import { TaskName } from "@lukehagar/plexjs/models/operations"; const plexAPI = new PlexAPI({ accessToken: "", @@ -332,7 +776,28 @@ actions: }); async function run() { - const result = await plexAPI.hubs.getLibraryHubs(6728.76, 9010.22, QueryParamOnlyTransient.Zero); + const result = await plexAPI.butler.startTask(TaskName.CleanOldBundles); + + // 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) @@ -361,11 +826,11 @@ actions: } run(); - - target: $["paths"]["/playlists/{playlistID}"]["get"] + - target: $["paths"]["/:/progress"]["post"] update: x-codeSamples: - lang: typescript - label: getPlaylist + label: updatePlayProgress source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -375,18 +840,18 @@ actions: }); async function run() { - const result = await plexAPI.playlists.getPlaylist(4109.48); + const result = await plexAPI.media.updatePlayProgress("", 90000, "played"); // Handle the result console.log(result) } run(); - - target: $["paths"]["/:/unscrobble"]["get"] + - target: $["paths"]["/butler"]["delete"] update: x-codeSamples: - lang: typescript - label: markUnplayed + label: stopAllTasks source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -396,112 +861,7 @@ actions: }); async function run() { - const result = await plexAPI.media.markUnplayed(59398); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/butler"]["post"] - update: - x-codeSamples: - - lang: typescript - label: startAllTasks - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.butler.startAllTasks(); - - // 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"]["/butler/{taskName}"]["delete"] - update: - x-codeSamples: - - lang: typescript - label: stopTask - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { PathParamTaskName } from "@lukehagar/plexjs/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.butler.stopTask(PathParamTaskName.BackupDatabase); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/security/resources"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getSourceConnectionInformation - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.authentication.getSourceConnectionInformation("server://client-identifier"); - - // 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(); + const result = await plexAPI.butler.stopAllTasks(); // Handle the result console.log(result) @@ -529,132 +889,6 @@ actions: 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"]["/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"]["/hubs/search"]["get"] - update: - x-codeSamples: - - lang: typescript - label: performSearch - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.search.performSearch("dylan", 1516.53, 5); - - // 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/{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"]["/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"]["/log"]["post"] update: @@ -679,11 +913,11 @@ actions: } run(); - - target: $["paths"]["/"]["get"] + - target: $["paths"]["/log/networked"]["get"] update: x-codeSamples: - lang: typescript - label: getServerCapabilities + label: enablePaperTrail source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -693,92 +927,7 @@ actions: }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); - - // 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"]["/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"]["/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"]["/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); + const result = await plexAPI.log.enablePaperTrail(); // Handle the result console.log(result) @@ -869,33 +1018,11 @@ actions: } run(); - - target: $["paths"]["/playlists"]["get"] + - target: $["paths"]["/playlists/{playlistID}"]["delete"] 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 + label: deletePlaylist source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -905,40 +1032,18 @@ actions: }); async function run() { - const result = await plexAPI.sessions.getSessionHistory(); + const result = await plexAPI.playlists.deletePlaylist(216.22); // Handle the result console.log(result) } run(); - - target: $["paths"]["/updater/apply"]["put"] + - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] 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); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/playlists/{playlistID}"]["put"] - update: - x-codeSamples: - - lang: typescript - label: updatePlaylist + label: stopTranscodeSession source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -948,18 +1053,18 @@ actions: }); async function run() { - const result = await plexAPI.playlists.updatePlaylist(3915, "", ""); + const result = await plexAPI.sessions.stopTranscodeSession("zz7llzqlx8w9vnrsbnwhbmep"); // Handle the result console.log(result) } run(); - - target: $["paths"]["/activities/{activityUUID}"]["delete"] + - target: $["paths"]["/library/recentlyAdded"]["get"] update: x-codeSamples: - lang: typescript - label: cancelServerActivities + label: getRecentlyAdded source: |- import { PlexAPI } from "@lukehagar/plexjs"; @@ -969,303 +1074,7 @@ actions: }); 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"]["/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"]["/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}/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"]["/servers"]["get"] - update: - x-codeSamples: - - lang: typescript - label: getServerList - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.server.getServerList(); - - // 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"]["/:/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"]["/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"]["/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(); - - // 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"]["/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"]["/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"]["/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"]["/hubs/search/voice"]["get"] - update: - x-codeSamples: - - lang: typescript - label: performVoiceSearch - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "Postman", - }); - - async function run() { - const result = await plexAPI.search.performVoiceSearch("dead+poop", 4094.8, 5); + const result = await plexAPI.library.getRecentlyAdded(); // Handle the result console.log(result) @@ -1298,6 +1107,176 @@ actions: 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"]["/security/resources"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getSourceConnectionInformation + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.authentication.getSourceConnectionInformation("server://client-identifier"); + + // 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"]["/butler"]["post"] + update: + x-codeSamples: + - lang: typescript + label: startAllTasks + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.butler.startAllTasks(); + + // 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); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/servers"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getServerList + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.server.getServerList(); + + // Handle the result + console.log(result) + } + + run(); + - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] + update: + x-codeSamples: + - lang: typescript + label: getMetadataChildren + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + accessToken: "", + xPlexClientIdentifier: "Postman", + }); + + async function run() { + const result = await plexAPI.library.getMetadataChildren(1539.14); + + // 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"]["/statistics/media"]["get"] update: @@ -1319,4 +1298,25 @@ actions: 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(); diff --git a/jsr.json b/jsr.json index 0553a607..69db3a36 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@lukehagar/plexjs", - "version": "0.16.2", + "version": "0.16.3", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index ebc20273..43eca29d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lukehagar/plexjs", - "version": "0.16.2", + "version": "0.16.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lukehagar/plexjs", - "version": "0.16.2", + "version": "0.16.3", "devDependencies": { "@types/jsonpath": "^0.2.4", "@typescript-eslint/eslint-plugin": "^7.7.1", diff --git a/package.json b/package.json index e198c751..b9b0c71a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lukehagar/plexjs", - "version": "0.16.2", + "version": "0.16.3", "author": "LukeHagar", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 558cc582..55436ab2 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -87,7 +87,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.3", - sdkVersion: "0.16.2", - genVersion: "2.338.5", - userAgent: "speakeasy-sdk/typescript 0.16.2 2.338.5 0.0.3 @lukehagar/plexjs", + sdkVersion: "0.16.3", + genVersion: "2.338.12", + userAgent: "speakeasy-sdk/typescript 0.16.3 2.338.12 0.0.3 @lukehagar/plexjs", } as const;