mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 04:20:46 +00:00
ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.129.1
This commit is contained in:
157
docs/sdks/updater/README.md
Normal file
157
docs/sdks/updater/README.md
Normal file
@@ -0,0 +1,157 @@
|
||||
# Updater
|
||||
(*updater*)
|
||||
|
||||
## Overview
|
||||
|
||||
This describes the API for searching and applying updates to the Plex Media Server.
|
||||
Updates to the status can be observed via the Event API.
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [getUpdateStatus](#getupdatestatus) - Querying status of updates
|
||||
* [checkForUpdates](#checkforupdates) - Checking for updates
|
||||
* [applyUpdates](#applyupdates) - Apply Updates
|
||||
|
||||
## getUpdateStatus
|
||||
|
||||
Querying status of updates
|
||||
|
||||
### Example Usage
|
||||
|
||||
```typescript
|
||||
import { SDK } from "openapi";
|
||||
|
||||
async function run() {
|
||||
const sdk = new SDK({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
const res = await sdk.updater.getUpdateStatus();
|
||||
|
||||
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.GetUpdateStatusResponse](../../models/operations/getupdatestatusresponse.md)>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
||||
| errors.GetUpdateStatusResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## checkForUpdates
|
||||
|
||||
Checking for updates
|
||||
|
||||
### Example Usage
|
||||
|
||||
```typescript
|
||||
import { SDK } from "openapi";
|
||||
import { Download } from "openapi/models/operations";
|
||||
|
||||
async function run() {
|
||||
const sdk = new SDK({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
const download = Download.One;
|
||||
|
||||
const res = await sdk.updater.checkForUpdates(download);
|
||||
|
||||
if (res?.statusCode !== 200) {
|
||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `download` | [operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. |
|
||||
| `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.CheckForUpdatesResponse](../../models/operations/checkforupdatesresponse.md)>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
||||
| errors.CheckForUpdatesResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## applyUpdates
|
||||
|
||||
Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
```typescript
|
||||
import { SDK } from "openapi";
|
||||
import { Skip, Tonight } from "openapi/models/operations";
|
||||
|
||||
async function run() {
|
||||
const sdk = new SDK({
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
});
|
||||
|
||||
const tonight = Tonight.One;
|
||||
const skip = Skip.Zero;
|
||||
|
||||
const res = await sdk.updater.applyUpdates(tonight, skip);
|
||||
|
||||
if (res?.statusCode !== 200) {
|
||||
throw new Error("Unexpected status code: " + res?.statusCode || "-");
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `tonight` | [operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install |
|
||||
| `skip` | [operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. |
|
||||
| `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.ApplyUpdatesResponse](../../models/operations/applyupdatesresponse.md)>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------- | ------------------------------- | ------------------------------- |
|
||||
| errors.ApplyUpdatesResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
Reference in New Issue
Block a user