ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.129.1

This commit is contained in:
speakeasybot
2024-01-01 15:06:15 +00:00
parent ea6e427d7b
commit b77c4d818f
23 changed files with 487 additions and 148 deletions

329
README.md Normal file
View File

@@ -0,0 +1,329 @@
# plexjs
<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://opensource.org/licenses/MIT">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
</a>
</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] -->
## SDK Installation
### NPM
```bash
npm add plexjs
```
### Yarn
```bash
yarn add plexjs
```
<!-- End SDK Installation [installation] -->
<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage
### Example
```typescript
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
const res = await sdk.server.getServerCapabilities();
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
<!-- End SDK Example Usage [usage] -->
<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations
### [server](docs/sdks/server/README.md)
* [getServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Server Capabilities
* [getServerPreferences](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences
* [getAvailableClients](docs/sdks/server/README.md#getavailableclients) - Get Available Clients
* [getDevices](docs/sdks/server/README.md#getdevices) - Get Devices
* [getServerIdentity](docs/sdks/server/README.md#getserveridentity) - Get Server Identity
* [getMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account
* [getResizedPhoto](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo
* [getServerList](docs/sdks/server/README.md#getserverlist) - Get Server List
### [media](docs/sdks/media/README.md)
* [markPlayed](docs/sdks/media/README.md#markplayed) - Mark Media Played
* [markUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed
* [updatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress
### [activities](docs/sdks/activities/README.md)
* [getServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities
* [cancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities
### [butler](docs/sdks/butler/README.md)
* [getButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks
* [startAllTasks](docs/sdks/butler/README.md#startalltasks) - Start all Butler tasks
* [stopAllTasks](docs/sdks/butler/README.md#stopalltasks) - Stop all Butler tasks
* [startTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task
* [stopTask](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task
### [hubs](docs/sdks/hubs/README.md)
* [getGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs
* [getLibraryHubs](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs
### [search](docs/sdks/search/README.md)
* [performSearch](docs/sdks/search/README.md#performsearch) - Perform a search
* [performVoiceSearch](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search
* [getSearchResults](docs/sdks/search/README.md#getsearchresults) - Get Search Results
### [library](docs/sdks/library/README.md)
* [getFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value
* [getRecentlyAdded](docs/sdks/library/README.md#getrecentlyadded) - Get Recently Added
* [getLibraries](docs/sdks/library/README.md#getlibraries) - Get All Libraries
* [getLibrary](docs/sdks/library/README.md#getlibrary) - Get Library Details
* [deleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section
* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
* [refreshLibrary](docs/sdks/library/README.md#refreshlibrary) - Refresh Library
* [getLatestLibraryItems](docs/sdks/library/README.md#getlatestlibraryitems) - Get Latest Library Items
* [getCommonLibraryItems](docs/sdks/library/README.md#getcommonlibraryitems) - Get Common Library Items
* [getMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
* [getOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck
### [log](docs/sdks/log/README.md)
* [logLine](docs/sdks/log/README.md#logline) - Logging a single line message.
* [logMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message
* [enablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail
### [playlists](docs/sdks/playlists/README.md)
* [createPlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist
* [getPlaylists](docs/sdks/playlists/README.md#getplaylists) - Get All Playlists
* [getPlaylist](docs/sdks/playlists/README.md#getplaylist) - Retrieve Playlist
* [deletePlaylist](docs/sdks/playlists/README.md#deleteplaylist) - Deletes a Playlist
* [updatePlaylist](docs/sdks/playlists/README.md#updateplaylist) - Update a Playlist
* [getPlaylistContents](docs/sdks/playlists/README.md#getplaylistcontents) - Retrieve Playlist Contents
* [clearPlaylistContents](docs/sdks/playlists/README.md#clearplaylistcontents) - Delete Playlist Contents
* [addPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist
* [uploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist
### [security](docs/sdks/security/README.md)
* [getTransientToken](docs/sdks/security/README.md#gettransienttoken) - Get a Transient Token.
* [getSourceConnectionInformation](docs/sdks/security/README.md#getsourceconnectioninformation) - Get Source Connection Information
### [sessions](docs/sdks/sessions/README.md)
* [getSessions](docs/sdks/sessions/README.md#getsessions) - Get Active Sessions
* [getSessionHistory](docs/sdks/sessions/README.md#getsessionhistory) - Get Session History
* [getTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions
* [stopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session
### [updater](docs/sdks/updater/README.md)
* [getUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates
* [checkForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates
* [applyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates
### [video](docs/sdks/video/README.md)
* [startUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode
* [getTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item
<!-- End Available Resources and Operations [operations] -->
<!-- Start Error Handling [errors] -->
## Error Handling
All SDK methods return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type.
| Error Object | Status Code | Content Type |
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
| errors.GetServerCapabilitiesResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
Example
```typescript
import { PlexAPI } from "plexjs";
import * as errors from "plexjs/models/errors";
async function run() {
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
const res = await sdk.server.getServerCapabilities().catch((err) => {
if (err instanceof errors.GetServerCapabilitiesResponseBody) {
console.error(err); // handle exception
return null;
} else {
throw err;
}
});
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
<!-- End Error Handling [errors] -->
<!-- Start Server Selection [server] -->
## Server Selection
### 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:
| # | Server | Variables |
| - | ------ | --------- |
| 0 | `http://10.10.10.47:32400` | None |
| 1 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) |
#### Variables
Some of the server options above contain variables. If you want to set the values of those variables, the following optional parameters are available when initializing the SDK client instance:
* `protocol: models.ServerProtocol`
* `ip: string`
* `port: string`
### Override Server URL Per-Client
The default server can also be overridden globally by passing a URL to the `serverURL: str` optional parameter when initializing the SDK client instance. For example:
<!-- End Server Selection [server] -->
<!-- Start Custom HTTP Client [http-client] -->
## Custom HTTP Client
The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native
[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This
client is a thin wrapper around `fetch` and provides the ability to attach hooks
around the request lifecycle that can be used to modify the request or handle
errors and response.
The `HTTPClient` constructor takes an optional `fetcher` argument that can be
used to integrate a third-party HTTP client or when writing tests to mock out
the HTTP client and feed in fixtures.
The following example shows how to use the `"beforeRequest"` hook to to add a
custom header and a timeout to requests and how to use the `"requestError"` hook
to log errors:
```typescript
import { PlexAPI } from "plexjs";
import { HTTPClient } from "plexjs/lib/http";
const httpClient = new HTTPClient({
// fetcher takes a function that has the same signature as native `fetch`.
fetcher: (request) => {
return fetch(request);
}
});
httpClient.addHook("beforeRequest", (request) => {
const nextRequest = new Request(request, {
signal: request.signal || AbortSignal.timeout(5000);
});
nextRequest.headers.set("x-custom-header", "custom value");
return nextRequest;
});
httpClient.addHook("requestError", (error, request) => {
console.group("Request Error");
console.log("Reason:", `${error}`);
console.log("Endpoint:", `${request.method} ${request.url}`);
console.groupEnd();
});
const sdk = new PlexAPI({ httpClient });
```
<!-- End Custom HTTP Client [http-client] -->
<!-- Start Authentication [security] -->
## Authentication
### Per-Client Security Schemes
This SDK supports the following security scheme globally:
| Name | Type | Scheme |
| ------------- | ------------- | ------------- |
| `accessToken` | apiKey | API key |
To authenticate with the API the `accessToken` parameter must be set when initializing the SDK client instance. For example:
```typescript
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
const res = await sdk.server.getServerCapabilities();
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
<!-- End Authentication [security] -->
<!-- Placeholder for Future Speakeasy SDK Sections -->
# Development
## Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
looking for the latest version.
## Contributions
While we value open-source contributions to this SDK, this library is generated programmatically.
Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!
### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)

View File

@@ -8,4 +8,14 @@ Based on:
### Generated
- [typescript v0.1.0] .
### 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 - .

View File

@@ -1,9 +1,9 @@
<!-- Start SDK Example Usage [usage] -->
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -24,10 +24,10 @@ Get Server Activities
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -68,10 +68,10 @@ Cancel Server Activities
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -21,10 +21,10 @@ Returns a list of butler tasks
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -70,10 +70,10 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -115,10 +115,10 @@ This endpoint will stop all currently running tasks and remove any scheduled tas
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -164,11 +164,11 @@ This endpoint will attempt to start a single Butler task that is enabled in the
### Example Usage
```typescript
import { SDK } from "openapi";
import { TaskName } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { TaskName } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -213,11 +213,11 @@ This endpoint will stop a currently running task by name, or remove it from the
### Example Usage
```typescript
import { SDK } from "openapi";
import { PathParamTaskName } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { PathParamTaskName } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -18,11 +18,11 @@ Get Global Hubs filtered by the parameters provided.
### Example Usage
```typescript
import { SDK } from "openapi";
import { OnlyTransient } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { OnlyTransient } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -69,11 +69,11 @@ This endpoint will return a list of library specific hubs
### Example Usage
```typescript
import { SDK } from "openapi";
import { QueryParamOnlyTransient } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { QueryParamOnlyTransient } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -28,10 +28,10 @@ This resource returns hash values for local files
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -78,10 +78,10 @@ This endpoint will return the recently added content.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -128,10 +128,10 @@ This allows a client to provide a rich interface around the media (e.g. allow so
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -191,11 +191,11 @@ Returns details for the library. This can be thought of as an interstitial endpo
### Example Usage
```typescript
import { SDK } from "openapi";
import { IncludeDetails } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { IncludeDetails } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -241,10 +241,10 @@ Delate a library using a specific section
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -289,10 +289,10 @@ This endpoint will return a list of library items filtered by the filter and typ
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -341,10 +341,10 @@ This endpoint Refreshes the library.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -389,10 +389,10 @@ This endpoint will return a list of the latest library items filtered by the fil
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -441,10 +441,10 @@ Represents a "Common" item. It contains only the common attributes of the items
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -493,10 +493,10 @@ This endpoint will return the metadata of a library item specified with the rati
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -541,10 +541,10 @@ This endpoint will return the children of of a library item specified with the r
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -589,10 +589,10 @@ This endpoint will return the on deck content.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -20,11 +20,11 @@ This endpoint will write a single-line log message, including a level and source
### Example Usage
```typescript
import { SDK } from "openapi";
import { Level } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { Level } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -73,10 +73,10 @@ This endpoint will write multiple lines to the main Plex Media Server log in a s
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -118,10 +118,10 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -19,10 +19,10 @@ This will mark the provided media key as Played.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -66,10 +66,10 @@ This will mark the provided media key as Unplayed.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -114,10 +114,10 @@ This API command can be used to update the play progress of a media item.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -31,11 +31,11 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
### Example Usage
```typescript
import { SDK } from "openapi";
import { Smart, TypeT } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { Smart, TypeT } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -81,11 +81,11 @@ Get All Playlists given the specified filters.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlaylistType, QueryParamSmart } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { PlaylistType, QueryParamSmart } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -133,10 +133,10 @@ Smart playlist details contain the `content` attribute. This is the content URI
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -181,10 +181,10 @@ This endpoint will delete a playlist
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -229,10 +229,10 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -280,10 +280,10 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -330,10 +330,10 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -379,10 +379,10 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -431,11 +431,11 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
### Example Usage
```typescript
import { SDK } from "openapi";
import { Force } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { Force } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -1,4 +1,4 @@
# SDK
# PlexAPI SDK
## Overview

View File

@@ -31,10 +31,10 @@ This request is intended to be very fast, and called as the user types.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -86,10 +86,10 @@ Results, as well as their containing per-type hubs, contain a `distance` attribu
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -137,10 +137,10 @@ This will search the database for the string provided.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -19,11 +19,11 @@ This endpoint provides the caller with a temporary token with the same access le
### Example Usage
```typescript
import { SDK } from "openapi";
import { QueryParamType, Scope } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { QueryParamType, Scope } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -71,10 +71,10 @@ Note: requires Plex Media Server >= 1.15.4.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -24,10 +24,10 @@ Server Capabilities
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -68,10 +68,10 @@ Get Server Preferences
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -112,10 +112,10 @@ Get Available Clients
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -156,10 +156,10 @@ Get Devices
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -200,10 +200,10 @@ Get Server Identity
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -244,10 +244,10 @@ Returns MyPlex Account Information
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -289,11 +289,11 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
### Example Usage
```typescript
import { SDK } from "openapi";
import { MinSize, Upscale } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { MinSize, Upscale } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -343,10 +343,10 @@ Get Server List
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -20,10 +20,10 @@ This will retrieve the "Now Playing" Information of the PMS.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -64,10 +64,10 @@ This will Retrieve a listing of all history views.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -108,10 +108,10 @@ Get Transcode Sessions
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -152,10 +152,10 @@ Stop a Transcode Session
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -20,10 +20,10 @@ Querying status of updates
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -64,11 +64,11 @@ Checking for updates
### Example Usage
```typescript
import { SDK } from "openapi";
import { Download } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { Download } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -113,11 +113,11 @@ Note that these two parameters are effectively mutually exclusive. The `tonight`
### Example Usage
```typescript
import { SDK } from "openapi";
import { Skip, Tonight } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { Skip, Tonight } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -18,10 +18,10 @@ Begin a Universal Transcode Session
### Example Usage
```typescript
import { SDK } from "openapi";
import { PlexAPI } from "plexjs";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
@@ -69,11 +69,11 @@ Get the timeline for a media item
### Example Usage
```typescript
import { SDK } from "openapi";
import { State } from "openapi/models/operations";
import { PlexAPI } from "plexjs";
import { State } from "plexjs/models/operations";
async function run() {
const sdk = new SDK({
const sdk = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});

View File

@@ -439,7 +439,7 @@ docs/models/errors/startuniversaltranscoderesponsebody.md
docs/models/errors/gettimelineerrors.md
docs/models/errors/gettimelineresponsebody.md
docs/models/components/security.md
docs/sdks/sdk/README.md
docs/sdks/plexapi/README.md
docs/sdks/server/README.md
docs/sdks/media/README.md
docs/sdks/activities/README.md

View File

@@ -7,13 +7,13 @@ management:
generation:
comments: {}
sdkClassName: Plex-API
repoURL: https://github.com/speakeasy-sdks/Personal-sample-sdk-9.git
repoURL: https://github.com/LukeHagar/plexjs.git
maintainOpenAPIOrder: true
usageSnippets:
optionalPropertyRendering: withExample
useClassNamesForArrayFields: true
fixes:
nameResolutionDec2023: false
useClassNamesForArrayFields: true
features:
typescript:
core: 3.3.12
@@ -22,7 +22,7 @@ features:
globalServerURLs: 2.82.1
nameOverrides: 2.81.1
typescript:
version: 0.1.0
version: 0.2.0
author: LukeHagar
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true

8
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "openapi",
"version": "0.1.0",
"name": "plexjs",
"version": "0.2.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openapi",
"version": "0.1.0",
"name": "plexjs",
"version": "0.2.0",
"dependencies": {
"decimal.js": "^10.4.3",
"jsonpath": "^1.1.1"

View File

@@ -1,8 +1,8 @@
{
"type": "commonjs",
"name": "openapi",
"version": "0.1.0",
"author": "Speakeasy",
"name": "plexjs",
"version": "0.2.0",
"author": "LukeHagar",
"main": "./index.js",
"sideEffects": false,
"repository": {

View File

@@ -84,7 +84,7 @@ export function serverURLFromOptions(options: SDKOptions): URL {
export const SDK_METADATA = Object.freeze({
language: "typescript",
openapiDocVersion: "0.0.3",
sdkVersion: "0.1.0",
sdkVersion: "0.2.0",
genVersion: "2.223.3",
userAgent: "speakeasy-sdk/typescript 0.1.0 2.223.3 0.0.3 openapi",
userAgent: "speakeasy-sdk/typescript 0.2.0 2.223.3 0.0.3 plexjs",
});

View File

@@ -19,7 +19,7 @@ import { Sessions } from "./sessions";
import { Updater } from "./updater";
import { Video } from "./video";
export class SDK extends ClientSDK {
export class PlexAPI extends ClientSDK {
private readonly options$: SDKOptions;
constructor(options: SDKOptions = {}) {