ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.129.1

This commit is contained in:
speakeasybot
2023-12-24 06:38:56 +00:00
parent 312e0ecc12
commit 02c32497a7
462 changed files with 35699 additions and 0 deletions

627
docs/sdks/library/README.md Normal file
View File

@@ -0,0 +1,627 @@
# Library
(*library*)
## Overview
API Calls interacting with Plex Media Server Libraries
### Available Operations
* [getFileHash](#getfilehash) - Get Hash Value
* [getRecentlyAdded](#getrecentlyadded) - Get Recently Added
* [getLibraries](#getlibraries) - Get All Libraries
* [getLibrary](#getlibrary) - Get Library Details
* [deleteLibrary](#deletelibrary) - Delete Library Section
* [getLibraryItems](#getlibraryitems) - Get Library Items
* [refreshLibrary](#refreshlibrary) - Refresh Library
* [getLatestLibraryItems](#getlatestlibraryitems) - Get Latest Library Items
* [getCommonLibraryItems](#getcommonlibraryitems) - Get Common Library Items
* [getMetadata](#getmetadata) - Get Items Metadata
* [getMetadataChildren](#getmetadatachildren) - Get Items Children
* [getOnDeck](#getondeck) - Get On Deck
## getFileHash
This resource returns hash values for local files
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const url = "file://C:\Image.png&type=13";
const type = 4462.17;
const res = await sdk.library.getFileHash(url, type);
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `url` | *string* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | [object Object] |
| `type` | *number* | :heavy_minus_sign: | Item type | |
| `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. | |
### Response
**Promise<[operations.GetFileHashResponse](../../models/operations/getfilehashresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------ | ------------------------------ | ------------------------------ |
| errors.GetFileHashResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## getRecentlyAdded
This endpoint will return the recently added content.
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const res = await sdk.library.getRecentlyAdded();
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `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. |
### Response
**Promise<[operations.GetRecentlyAddedResponse](../../models/operations/getrecentlyaddedresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
| errors.GetRecentlyAddedResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## getLibraries
A library section (commonly referred to as just a library) is a collection of media.
Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media.
For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat.
Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts.
This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year).
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const res = await sdk.library.getLibraries();
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `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. |
### Response
**Promise<[operations.GetLibrariesResponse](../../models/operations/getlibrariesresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------- | ------------------------------- | ------------------------------- |
| errors.GetLibrariesResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## getLibrary
Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. These details are:
- A list of `Directory` objects: These used to be used by clients to build a menuing system. There are four flavors of directory found here:
- Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users.
- Secondary: These are marked with `secondary="1"` and were used by old clients to provide nested menus allowing for primative (but structured) navigation.
- Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `search="1"` which used to be used to allow clients to build search dialogs on the fly.
- A list of `Type` objects: These represent the types of things found in this library, and for each one, a list of `Filter` and `Sort` objects. These can be used to build rich controls around a grid of media to allow filtering and organizing. Note that these filters and sorts are optional, and without them, the client won't render any filtering controls. The `Type` object contains:
- `key`: This provides the root endpoint returning the actual media list for the type.
- `type`: This is the metadata type for the type (if a standard Plex type).
- `title`: The title for for the content of this type (e.g. "Movies").
- Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an inportant subset useful for top-level API.
- `filter`: This represents the filter name used for the filter, which can be used to construct complex media queries with.
- `filterType`: This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter.
- `key`: This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element.
- `title`: The title for the filter.
- Each `Sort` object contains a description of the sort field.
- `defaultDirection`: Can be either `asc` or `desc`, and specifies the default direction for the sort field (e.g. titles default to alphabetically ascending).
- `descKey` and `key`: Contains the parameters passed to the `sort=...` media query for each direction of the sort.
- `title`: The title of the field.
### Example Usage
```typescript
import { SDK } from "openapi";
import { IncludeDetails } from "openapi/models/operations";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const sectionId = 1000;
const includeDetails = IncludeDetails.Zero;
const res = await sdk.library.getLibrary(sectionId, includeDetails);
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | [object Object] |
| `includeDetails` | [operations.IncludeDetails](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
| `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. | |
### Response
**Promise<[operations.GetLibraryResponse](../../models/operations/getlibraryresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| ----------------------------- | ----------------------------- | ----------------------------- |
| errors.GetLibraryResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## deleteLibrary
Delate a library using a specific section
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const sectionId = 1000;
const res = await sdk.library.deleteLibrary(sectionId);
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | [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. | |
### Response
**Promise<[operations.DeleteLibraryResponse](../../models/operations/deletelibraryresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| -------------------------------- | -------------------------------- | -------------------------------- |
| errors.DeleteLibraryResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## getLibraryItems
This endpoint will return a list of library items filtered by the filter and type provided
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const sectionId = 4510.92;
const type = 760.66;
const filter = "string";
const res = await sdk.library.getLibraryItems(sectionId, type, filter);
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query |
| `type` | *number* | :heavy_minus_sign: | item type |
| `filter` | *string* | :heavy_minus_sign: | the filter parameter |
| `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. |
### Response
**Promise<[operations.GetLibraryItemsResponse](../../models/operations/getlibraryitemsresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
| errors.GetLibraryItemsResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## refreshLibrary
This endpoint Refreshes the library.
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const sectionId = 934.16;
const res = await sdk.library.refreshLibrary(sectionId);
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to refresh |
| `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. |
### Response
**Promise<[operations.RefreshLibraryResponse](../../models/operations/refreshlibraryresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| --------------------------------- | --------------------------------- | --------------------------------- |
| errors.RefreshLibraryResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## getLatestLibraryItems
This endpoint will return a list of the latest library items filtered by the filter and type provided
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const sectionId = 7171.54;
const type = 8015.12;
const filter = "string";
const res = await sdk.library.getLatestLibraryItems(sectionId, type, filter);
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query |
| `type` | *number* | :heavy_check_mark: | item type |
| `filter` | *string* | :heavy_minus_sign: | the filter parameter |
| `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. |
### Response
**Promise<[operations.GetLatestLibraryItemsResponse](../../models/operations/getlatestlibraryitemsresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
| errors.GetLatestLibraryItemsResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## getCommonLibraryItems
Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const sectionId = 2710.37;
const type = 2760.31;
const filter = "string";
const res = await sdk.library.getCommonLibraryItems(sectionId, type, filter);
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query |
| `type` | *number* | :heavy_check_mark: | item type |
| `filter` | *string* | :heavy_minus_sign: | the filter parameter |
| `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. |
### Response
**Promise<[operations.GetCommonLibraryItemsResponse](../../models/operations/getcommonlibraryitemsresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
| errors.GetCommonLibraryItemsResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## getMetadata
This endpoint will return the metadata of a library item specified with the ratingKey.
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const ratingKey = 8382.31;
const res = await sdk.library.getMetadata(ratingKey);
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the children of. |
| `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. |
### Response
**Promise<[operations.GetMetadataResponse](../../models/operations/getmetadataresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------ | ------------------------------ | ------------------------------ |
| errors.GetMetadataResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## getMetadataChildren
This endpoint will return the children of of a library item specified with the ratingKey.
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const ratingKey = 1539.14;
const res = await sdk.library.getMetadataChildren(ratingKey);
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the children of. |
| `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. |
### Response
**Promise<[operations.GetMetadataChildrenResponse](../../models/operations/getmetadatachildrenresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
| errors.GetMetadataChildrenResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## getOnDeck
This endpoint will return the on deck content.
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const res = await sdk.library.getOnDeck();
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `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. |
### Response
**Promise<[operations.GetOnDeckResponse](../../models/operations/getondeckresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| ---------------------------- | ---------------------------- | ---------------------------- |
| errors.GetOnDeckResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |