ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.484.1

This commit is contained in:
speakeasybot
2025-02-05 00:11:28 +00:00
parent 13cd8a7fe5
commit 3152372037
154 changed files with 3865 additions and 3802 deletions

View File

@@ -262,7 +262,6 @@ async function run() {
requestBody: {
login: "username@email.com",
password: "password123",
rememberMe: false,
verificationCode: "123456",
},
});
@@ -296,7 +295,6 @@ async function run() {
requestBody: {
login: "username@email.com",
password: "password123",
rememberMe: false,
verificationCode: "123456",
},
});

View File

@@ -96,7 +96,7 @@ This endpoint will return the recently added content.
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
import { IncludeMeta, Type } from "@lukehagar/plexjs/sdk/models/operations";
import { Type } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
@@ -107,9 +107,6 @@ async function run() {
contentDirectoryID: 470161,
sectionID: 2,
type: Type.TvShow,
includeMeta: IncludeMeta.Enable,
xPlexContainerStart: 0,
xPlexContainerSize: 50,
});
// Handle the result
@@ -126,7 +123,7 @@ The standalone function version of this method:
```typescript
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsGetRecentlyAdded } from "@lukehagar/plexjs/funcs/hubsGetRecentlyAdded.js";
import { IncludeMeta, Type } from "@lukehagar/plexjs/sdk/models/operations";
import { Type } from "@lukehagar/plexjs/sdk/models/operations";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
@@ -139,9 +136,6 @@ async function run() {
contentDirectoryID: 470161,
sectionID: 2,
type: Type.TvShow,
includeMeta: IncludeMeta.Enable,
xPlexContainerStart: 0,
xPlexContainerSize: 50,
});
if (!res.ok) {

View File

@@ -16,6 +16,8 @@ API Calls interacting with Plex Media Server Libraries
* [getLibraryItems](#getlibraryitems) - Get Library Items
* [getRefreshLibraryMetadata](#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
* [getSearchLibrary](#getsearchlibrary) - Search Library
* [getGenresLibrary](#getgenreslibrary) - Get Genres of library media
* [getCountriesLibrary](#getcountrieslibrary) - Get Countries of library media
* [getSearchAllLibraries](#getsearchalllibraries) - Search All Libraries
* [getMetaDataByRatingKey](#getmetadatabyratingkey) - Get Metadata by RatingKey
* [getMetadataChildren](#getmetadatachildren) - Get Items Children
@@ -106,7 +108,7 @@ This endpoint will return the recently added content.
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
import { QueryParamIncludeMeta, QueryParamType } from "@lukehagar/plexjs/sdk/models/operations";
import { QueryParamType } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
@@ -131,9 +133,6 @@ async function run() {
],
sectionID: 2,
type: QueryParamType.TvShow,
includeMeta: QueryParamIncludeMeta.Enable,
xPlexContainerStart: 0,
xPlexContainerSize: 50,
});
// Handle the result
@@ -150,7 +149,7 @@ The standalone function version of this method:
```typescript
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryGetRecentlyAddedLibrary } from "@lukehagar/plexjs/funcs/libraryGetRecentlyAddedLibrary.js";
import { QueryParamIncludeMeta, QueryParamType } from "@lukehagar/plexjs/sdk/models/operations";
import { QueryParamType } from "@lukehagar/plexjs/sdk/models/operations";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
@@ -177,9 +176,6 @@ async function run() {
],
sectionID: 2,
type: QueryParamType.TvShow,
includeMeta: QueryParamIncludeMeta.Enable,
xPlexContainerStart: 0,
xPlexContainerSize: 50,
});
if (!res.ok) {
@@ -342,14 +338,13 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
import { IncludeDetails } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.library.getLibraryDetails(9518, IncludeDetails.Zero);
const result = await plexAPI.library.getLibraryDetails(9518);
// Handle the result
console.log(result);
@@ -365,7 +360,6 @@ The standalone function version of this method:
```typescript
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryGetLibraryDetails } from "@lukehagar/plexjs/funcs/libraryGetLibraryDetails.js";
import { IncludeDetails } from "@lukehagar/plexjs/sdk/models/operations";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
@@ -374,7 +368,7 @@ const plexAPI = new PlexAPICore({
});
async function run() {
const res = await libraryGetLibraryDetails(plexAPI, 9518, IncludeDetails.Zero);
const res = await libraryGetLibraryDetails(plexAPI, 9518);
if (!res.ok) {
throw res.error;
@@ -514,12 +508,7 @@ Fetches details from a specific section of the library identified by a section k
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
import {
GetLibraryItemsQueryParamIncludeMeta,
GetLibraryItemsQueryParamType,
IncludeGuids,
Tag,
} from "@lukehagar/plexjs/sdk/models/operations";
import { GetLibraryItemsQueryParamType, Tag } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
@@ -528,12 +517,8 @@ const plexAPI = new PlexAPI({
async function run() {
const result = await plexAPI.library.getLibraryItems({
tag: Tag.Edition,
includeGuids: IncludeGuids.Enable,
type: GetLibraryItemsQueryParamType.TvShow,
sectionKey: 9518,
includeMeta: GetLibraryItemsQueryParamIncludeMeta.Enable,
xPlexContainerStart: 0,
xPlexContainerSize: 50,
});
// Handle the result
@@ -550,12 +535,7 @@ The standalone function version of this method:
```typescript
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryGetLibraryItems } from "@lukehagar/plexjs/funcs/libraryGetLibraryItems.js";
import {
GetLibraryItemsQueryParamIncludeMeta,
GetLibraryItemsQueryParamType,
IncludeGuids,
Tag,
} from "@lukehagar/plexjs/sdk/models/operations";
import { GetLibraryItemsQueryParamType, Tag } from "@lukehagar/plexjs/sdk/models/operations";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
@@ -566,12 +546,8 @@ const plexAPI = new PlexAPICore({
async function run() {
const res = await libraryGetLibraryItems(plexAPI, {
tag: Tag.Edition,
includeGuids: IncludeGuids.Enable,
type: GetLibraryItemsQueryParamType.TvShow,
sectionKey: 9518,
includeMeta: GetLibraryItemsQueryParamIncludeMeta.Enable,
xPlexContainerStart: 0,
xPlexContainerSize: 50,
});
if (!res.ok) {
@@ -781,6 +757,156 @@ run();
| errors.GetSearchLibraryUnauthorized | 401 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |
## getGenresLibrary
Retrieves a list of all the genres that are found for the media in this library.
### Example Usage
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.library.getGenresLibrary(9518);
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryGetGenresLibrary } from "@lukehagar/plexjs/funcs/libraryGetGenresLibrary.js";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryGetGenresLibrary(plexAPI, 9518);
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | [object Object] |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
### Response
**Promise\<[operations.GetGenresLibraryResponse](../../sdk/models/operations/getgenreslibraryresponse.md)\>**
### Errors
| Error Type | Status Code | Content Type |
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
| errors.GetGenresLibraryBadRequest | 400 | application/json |
| errors.GetGenresLibraryUnauthorized | 401 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |
## getCountriesLibrary
Retrieves a list of all the countries that are found for the media in this library.
### Example Usage
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.library.getCountriesLibrary(9518);
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryGetCountriesLibrary } from "@lukehagar/plexjs/funcs/libraryGetCountriesLibrary.js";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
accessToken: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await libraryGetCountriesLibrary(plexAPI, 9518);
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | [object Object] |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
### Response
**Promise\<[operations.GetCountriesLibraryResponse](../../sdk/models/operations/getcountrieslibraryresponse.md)\>**
### Errors
| Error Type | Status Code | Content Type |
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
| errors.GetCountriesLibraryBadRequest | 400 | application/json |
| errors.GetCountriesLibraryUnauthorized | 401 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |
## getSearchAllLibraries
Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type.
@@ -790,7 +916,7 @@ Search the provided query across all library sections, or a single section, and
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
import { QueryParamIncludeCollections, QueryParamIncludeExternalMedia, SearchTypes } from "@lukehagar/plexjs/sdk/models/operations";
import { SearchTypes } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
@@ -803,8 +929,6 @@ async function run() {
searchTypes: [
SearchTypes.People,
],
includeCollections: QueryParamIncludeCollections.Enable,
includeExternalMedia: QueryParamIncludeExternalMedia.Enable,
});
// Handle the result
@@ -821,7 +945,7 @@ The standalone function version of this method:
```typescript
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { libraryGetSearchAllLibraries } from "@lukehagar/plexjs/funcs/libraryGetSearchAllLibraries.js";
import { QueryParamIncludeCollections, QueryParamIncludeExternalMedia, SearchTypes } from "@lukehagar/plexjs/sdk/models/operations";
import { SearchTypes } from "@lukehagar/plexjs/sdk/models/operations";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
@@ -836,8 +960,6 @@ async function run() {
searchTypes: [
SearchTypes.People,
],
includeCollections: QueryParamIncludeCollections.Enable,
includeExternalMedia: QueryParamIncludeExternalMedia.Enable,
});
if (!res.ok) {

View File

@@ -315,14 +315,13 @@ Get Plex server access tokens and server connections
```typescript
import { PlexAPI } from "@lukehagar/plexjs";
import { IncludeHttps, IncludeIPv6, IncludeRelay } from "@lukehagar/plexjs/sdk/models/operations";
const plexAPI = new PlexAPI({
accessToken: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await plexAPI.plex.getServerResources("3381b62b-9ab7-4e37-827b-203e9809eb58", IncludeHttps.Enable, IncludeRelay.Enable, IncludeIPv6.Enable);
const result = await plexAPI.plex.getServerResources("3381b62b-9ab7-4e37-827b-203e9809eb58");
// Handle the result
console.log(result);
@@ -338,7 +337,6 @@ The standalone function version of this method:
```typescript
import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { plexGetServerResources } from "@lukehagar/plexjs/funcs/plexGetServerResources.js";
import { IncludeHttps, IncludeIPv6, IncludeRelay } from "@lukehagar/plexjs/sdk/models/operations";
// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
@@ -347,7 +345,7 @@ const plexAPI = new PlexAPICore({
});
async function run() {
const res = await plexGetServerResources(plexAPI, "3381b62b-9ab7-4e37-827b-203e9809eb58", IncludeHttps.Enable, IncludeRelay.Enable, IncludeIPv6.Enable);
const res = await plexGetServerResources(plexAPI, "3381b62b-9ab7-4e37-827b-203e9809eb58");
if (!res.ok) {
throw res.error;
@@ -400,7 +398,6 @@ const plexAPI = new PlexAPI();
async function run() {
const result = await plexAPI.plex.getPin({
strong: false,
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",
@@ -429,7 +426,6 @@ const plexAPI = new PlexAPICore();
async function run() {
const res = await plexGetPin(plexAPI, {
strong: false,
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
clientName: "Plex for Roku",
deviceNickname: "Roku 3",

View File

@@ -38,7 +38,7 @@ const plexAPI = new PlexAPI({
});
async function run() {
const result = await plexAPI.search.performSearch("dylan", 5);
const result = await plexAPI.search.performSearch("dylan");
// Handle the result
console.log(result);
@@ -62,7 +62,7 @@ const plexAPI = new PlexAPICore({
});
async function run() {
const res = await searchPerformSearch(plexAPI, "dylan", 5);
const res = await searchPerformSearch(plexAPI, "dylan");
if (!res.ok) {
throw res.error;
@@ -118,7 +118,7 @@ const plexAPI = new PlexAPI({
});
async function run() {
const result = await plexAPI.search.performVoiceSearch("dead+poop", 5);
const result = await plexAPI.search.performVoiceSearch("dead+poop");
// Handle the result
console.log(result);
@@ -142,7 +142,7 @@ const plexAPI = new PlexAPICore({
});
async function run() {
const res = await searchPerformVoiceSearch(plexAPI, "dead+poop", 5);
const res = await searchPerformVoiceSearch(plexAPI, "dead+poop");
if (!res.ok) {
throw res.error;

View File

@@ -27,8 +27,6 @@ const plexAPI = new PlexAPI({
async function run() {
const result = await plexAPI.watchlist.getWatchList({
filter: Filter.Available,
xPlexContainerStart: 0,
xPlexContainerSize: 50,
xPlexToken: "CV5xoxjTpFKUzBTShsaf",
});
@@ -57,8 +55,6 @@ const plexAPI = new PlexAPICore({
async function run() {
const res = await watchlistGetWatchList(plexAPI, {
filter: Filter.Available,
xPlexContainerStart: 0,
xPlexContainerSize: 50,
xPlexToken: "CV5xoxjTpFKUzBTShsaf",
});