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

255
docs/sdks/butler/README.md Normal file
View File

@@ -0,0 +1,255 @@
# Butler
(*butler*)
## Overview
Butler is the task manager of the Plex Media Server Ecosystem.
### Available Operations
* [getButlerTasks](#getbutlertasks) - Get Butler tasks
* [startAllTasks](#startalltasks) - Start all Butler tasks
* [stopAllTasks](#stopalltasks) - Stop all Butler tasks
* [startTask](#starttask) - Start a single Butler task
* [stopTask](#stoptask) - Stop a single Butler task
## getButlerTasks
Returns a list of butler tasks
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const res = await sdk.butler.getButlerTasks();
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.GetButlerTasksResponse](../../models/operations/getbutlertasksresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| --------------------------------- | --------------------------------- | --------------------------------- |
| errors.GetButlerTasksResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## startAllTasks
This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
1. Any tasks not scheduled to run on the current day will be skipped.
2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.
3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
4. If we are outside the configured window, the task will start immediately.
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const res = await sdk.butler.startAllTasks();
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.StartAllTasksResponse](../../models/operations/startalltasksresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| -------------------------------- | -------------------------------- | -------------------------------- |
| errors.StartAllTasksResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## stopAllTasks
This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
### Example Usage
```typescript
import { SDK } from "openapi";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const res = await sdk.butler.stopAllTasks();
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.StopAllTasksResponse](../../models/operations/stopalltasksresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------- | ------------------------------- | ------------------------------- |
| errors.StopAllTasksResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## startTask
This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
1. Any tasks not scheduled to run on the current day will be skipped.
2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.
3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
4. If we are outside the configured window, the task will start immediately.
### Example Usage
```typescript
import { SDK } from "openapi";
import { TaskName } from "openapi/models/operations";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const taskName = TaskName.CleanOldBundles;
const res = await sdk.butler.startTask(taskName);
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `taskName` | [operations.TaskName](../../models/operations/taskname.md) | :heavy_check_mark: | the name of the task to be started. |
| `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.StartTaskResponse](../../models/operations/starttaskresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| ---------------------------- | ---------------------------- | ---------------------------- |
| errors.StartTaskResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |
## stopTask
This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
### Example Usage
```typescript
import { SDK } from "openapi";
import { PathParamTaskName } from "openapi/models/operations";
async function run() {
const sdk = new SDK({
accessToken: "<YOUR_API_KEY_HERE>",
});
const taskName = PathParamTaskName.BackupDatabase;
const res = await sdk.butler.stopTask(taskName);
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `taskName` | [operations.PathParamTaskName](../../models/operations/pathparamtaskname.md) | :heavy_check_mark: | The name of the task to be started. |
| `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.StopTaskResponse](../../models/operations/stoptaskresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.StopTaskResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |