ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.129.1

This commit is contained in:
speakeasybot
2024-01-01 14:37:30 +00:00
parent 4d1564b0b7
commit d69f35d589
621 changed files with 22413 additions and 3 deletions

View File

@@ -0,0 +1,77 @@
# Activities
(*Activities*)
## Overview
Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity.
Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details:
- They can contain a `progress` (from 0 to 100) marking the percent completion of the activity.
- They must contain an `type` which is used by clients to distinguish the specific activity.
- They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.)
- The may contain a `Response` object which attributes which represent the result of the asynchronous operation.
### Available Operations
* [GetServerActivities](#getserveractivities) - Get Server Activities
* [CancelServerActivities](#cancelserveractivities) - Cancel Server Activities
## GetServerActivities
Get Server Activities
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Activities.GetServerActivitiesAsync();
// handle response
```
### Response
**[GetServerActivitiesResponse](../../Models/Requests/GetServerActivitiesResponse.md)**
## CancelServerActivities
Cancel Server Activities
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Activities.CancelServerActivitiesAsync(ActivityUUID: "string");
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. |
### Response
**[CancelServerActivitiesResponse](../../Models/Requests/CancelServerActivitiesResponse.md)**

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

@@ -0,0 +1,171 @@
# 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
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Butler.GetButlerTasksAsync();
// handle response
```
### Response
**[GetButlerTasksResponse](../../Models/Requests/GetButlerTasksResponse.md)**
## 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
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Butler.StartAllTasksAsync();
// handle response
```
### Response
**[StartAllTasksResponse](../../Models/Requests/StartAllTasksResponse.md)**
## StopAllTasks
This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Butler.StopAllTasksAsync();
// handle response
```
### Response
**[StopAllTasksResponse](../../Models/Requests/StopAllTasksResponse.md)**
## 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
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Butler.StartTaskAsync(TaskName: TaskName.CleanOldBundles);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
| `TaskName` | [TaskName](../../Models/Requests/TaskName.md) | :heavy_check_mark: | the name of the task to be started. |
### Response
**[StartTaskResponse](../../Models/Requests/StartTaskResponse.md)**
## 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
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Butler.StopTaskAsync(TaskName: PathParamTaskName.BackupDatabase);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
| `TaskName` | [PathParamTaskName](../../Models/Requests/PathParamTaskName.md) | :heavy_check_mark: | The name of the task to be started. |
### Response
**[StopTaskResponse](../../Models/Requests/StopTaskResponse.md)**

82
docs/sdks/hubs/README.md Normal file
View File

@@ -0,0 +1,82 @@
# Hubs
(*Hubs*)
## Overview
Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
### Available Operations
* [GetGlobalHubs](#getglobalhubs) - Get Global Hubs
* [GetLibraryHubs](#getlibraryhubs) - Get library specific hubs
## GetGlobalHubs
Get Global Hubs filtered by the parameters provided.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Hubs.GetGlobalHubsAsync(Count: 1262.49D, OnlyTransient: OnlyTransient.One);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Count` | *double* | :heavy_minus_sign: | The number of items to return with each hub. |
| `OnlyTransient` | [OnlyTransient](../../Models/Requests/OnlyTransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). |
### Response
**[GetGlobalHubsResponse](../../Models/Requests/GetGlobalHubsResponse.md)**
## GetLibraryHubs
This endpoint will return a list of library specific hubs
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Hubs.GetLibraryHubsAsync(SectionId: 6728.76D, Count: 9010.22D, OnlyTransient: QueryParamOnlyTransient.Zero);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `SectionId` | *double* | :heavy_check_mark: | the Id of the library to query |
| `Count` | *double* | :heavy_minus_sign: | The number of items to return with each hub. |
| `OnlyTransient` | [QueryParamOnlyTransient](../../Models/Requests/QueryParamOnlyTransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). |
### Response
**[GetLibraryHubsResponse](../../Models/Requests/GetLibraryHubsResponse.md)**

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

@@ -0,0 +1,438 @@
# 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
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Library.GetFileHashAsync(Url: "file://C:\Image.png&type=13", Type: 4462.17D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
| `Url` | *string* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | file://C:\Image.png&type=13 |
| `Type` | *double* | :heavy_minus_sign: | Item type | |
### Response
**[GetFileHashResponse](../../Models/Requests/GetFileHashResponse.md)**
## GetRecentlyAdded
This endpoint will return the recently added content.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Library.GetRecentlyAddedAsync();
// handle response
```
### Response
**[GetRecentlyAddedResponse](../../Models/Requests/GetRecentlyAddedResponse.md)**
## 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
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Library.GetLibrariesAsync();
// handle response
```
### Response
**[GetLibrariesResponse](../../Models/Requests/GetLibrariesResponse.md)**
## 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
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Library.GetLibraryAsync(SectionId: 1000D, IncludeDetails: IncludeDetails.Zero);
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `SectionId` | *double* | :heavy_check_mark: | the Id of the library to query | 1000 |
| `IncludeDetails` | [IncludeDetails](../../Models/Requests/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/> | |
### Response
**[GetLibraryResponse](../../Models/Requests/GetLibraryResponse.md)**
## DeleteLibrary
Delate a library using a specific section
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Library.DeleteLibraryAsync(SectionId: 1000D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `SectionId` | *double* | :heavy_check_mark: | the Id of the library to query | 1000 |
### Response
**[DeleteLibraryResponse](../../Models/Requests/DeleteLibraryResponse.md)**
## GetLibraryItems
This endpoint will return a list of library items filtered by the filter and type provided
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Library.GetLibraryItemsAsync(SectionId: 4510.92D, Type: 760.66D, Filter: "string");
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `SectionId` | *double* | :heavy_check_mark: | the Id of the library to query |
| `Type` | *double* | :heavy_minus_sign: | item type |
| `Filter` | *string* | :heavy_minus_sign: | the filter parameter |
### Response
**[GetLibraryItemsResponse](../../Models/Requests/GetLibraryItemsResponse.md)**
## RefreshLibrary
This endpoint Refreshes the library.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Library.RefreshLibraryAsync(SectionId: 934.16D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
| `SectionId` | *double* | :heavy_check_mark: | the Id of the library to refresh |
### Response
**[RefreshLibraryResponse](../../Models/Requests/RefreshLibraryResponse.md)**
## GetLatestLibraryItems
This endpoint will return a list of the latest library items filtered by the filter and type provided
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Library.GetLatestLibraryItemsAsync(SectionId: 7171.54D, Type: 8015.12D, Filter: "string");
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `SectionId` | *double* | :heavy_check_mark: | the Id of the library to query |
| `Type` | *double* | :heavy_check_mark: | item type |
| `Filter` | *string* | :heavy_minus_sign: | the filter parameter |
### Response
**[GetLatestLibraryItemsResponse](../../Models/Requests/GetLatestLibraryItemsResponse.md)**
## GetCommonLibraryItems
Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Library.GetCommonLibraryItemsAsync(SectionId: 2710.37D, Type: 2760.31D, Filter: "string");
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `SectionId` | *double* | :heavy_check_mark: | the Id of the library to query |
| `Type` | *double* | :heavy_check_mark: | item type |
| `Filter` | *string* | :heavy_minus_sign: | the filter parameter |
### Response
**[GetCommonLibraryItemsResponse](../../Models/Requests/GetCommonLibraryItemsResponse.md)**
## GetMetadata
This endpoint will return the metadata of a library item specified with the ratingKey.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Library.GetMetadataAsync(RatingKey: 8382.31D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `RatingKey` | *double* | :heavy_check_mark: | the id of the library item to return the children of. |
### Response
**[GetMetadataResponse](../../Models/Requests/GetMetadataResponse.md)**
## GetMetadataChildren
This endpoint will return the children of of a library item specified with the ratingKey.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Library.GetMetadataChildrenAsync(RatingKey: 1539.14D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `RatingKey` | *double* | :heavy_check_mark: | the id of the library item to return the children of. |
### Response
**[GetMetadataChildrenResponse](../../Models/Requests/GetMetadataChildrenResponse.md)**
## GetOnDeck
This endpoint will return the on deck content.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Library.GetOnDeckAsync();
// handle response
```
### Response
**[GetOnDeckResponse](../../Models/Requests/GetOnDeckResponse.md)**

103
docs/sdks/log/README.md Normal file
View File

@@ -0,0 +1,103 @@
# Log
(*Log*)
## Overview
Submit logs to the Log Handler for Plex Media Server
### Available Operations
* [LogLine](#logline) - Logging a single line message.
* [LogMultiLine](#logmultiline) - Logging a multi-line message
* [EnablePaperTrail](#enablepapertrail) - Enabling Papertrail
## LogLine
This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Log.LogLineAsync(Level: Level.Three, Message: "string", Source: "string");
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `Level` | [Level](../../Models/Requests/Level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with. <br/>0: Error <br/>1: Warning <br/>2: Info <br/>3: Debug <br/>4: Verbose<br/> | |
| `Message` | *string* | :heavy_check_mark: | The text of the message to write to the log. | |
| `Source` | *string* | :heavy_check_mark: | a string indicating the source of the message. | |
### Response
**[LogLineResponse](../../Models/Requests/LogLineResponse.md)**
## LogMultiLine
This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above GET endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Log.LogMultiLineAsync();
// handle response
```
### Response
**[LogMultiLineResponse](../../Models/Requests/LogMultiLineResponse.md)**
## EnablePaperTrail
This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Log.EnablePaperTrailAsync();
// handle response
```
### Response
**[EnablePaperTrailResponse](../../Models/Requests/EnablePaperTrailResponse.md)**

115
docs/sdks/media/README.md Normal file
View File

@@ -0,0 +1,115 @@
# Media
(*Media*)
## Overview
API Calls interacting with Plex Media Server Media
### Available Operations
* [MarkPlayed](#markplayed) - Mark Media Played
* [MarkUnplayed](#markunplayed) - Mark Media Unplayed
* [UpdatePlayProgress](#updateplayprogress) - Update Media Play Progress
## MarkPlayed
This will mark the provided media key as Played.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Media.MarkPlayedAsync(Key: 59398D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
| `Key` | *double* | :heavy_check_mark: | The media key to mark as played | 59398 |
### Response
**[MarkPlayedResponse](../../Models/Requests/MarkPlayedResponse.md)**
## MarkUnplayed
This will mark the provided media key as Unplayed.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Media.MarkUnplayedAsync(Key: 59398D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- |
| `Key` | *double* | :heavy_check_mark: | The media key to mark as Unplayed | 59398 |
### Response
**[MarkUnplayedResponse](../../Models/Requests/MarkUnplayedResponse.md)**
## UpdatePlayProgress
This API command can be used to update the play progress of a media item.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Media.UpdatePlayProgressAsync(Key: "string", Time: 6900.91D, State: "string");
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `Key` | *string* | :heavy_check_mark: | the media key |
| `Time` | *double* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. |
| `State` | *string* | :heavy_check_mark: | The playback state of the media item. |
### Response
**[UpdatePlayProgressResponse](../../Models/Requests/UpdatePlayProgressResponse.md)**

View File

@@ -0,0 +1,345 @@
# Playlists
(*Playlists*)
## Overview
Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
They can be organized in (optionally nesting) folders.
Retrieving a playlist, or its items, will trigger a refresh of its metadata.
This may cause the duration and number of items to change.
### Available Operations
* [CreatePlaylist](#createplaylist) - Create a Playlist
* [GetPlaylists](#getplaylists) - Get All Playlists
* [GetPlaylist](#getplaylist) - Retrieve Playlist
* [DeletePlaylist](#deleteplaylist) - Deletes a Playlist
* [UpdatePlaylist](#updateplaylist) - Update a Playlist
* [GetPlaylistContents](#getplaylistcontents) - Retrieve Playlist Contents
* [ClearPlaylistContents](#clearplaylistcontents) - Delete Playlist Contents
* [AddPlaylistContents](#addplaylistcontents) - Adding to a Playlist
* [UploadPlaylist](#uploadplaylist) - Upload Playlist
## CreatePlaylist
Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass:
- `uri` - The content URI for what we're playing (e.g. `library://...`).
- `playQueueID` - To create a playlist from an existing play queue.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
CreatePlaylistRequest req = new CreatePlaylistRequest() {
Title = "string",
Type = Type.Photo,
Smart = Smart.One,
};
var res = await sdk.Playlists.CreatePlaylistAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `request` | [CreatePlaylistRequest](../../Models/Requests/CreatePlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[CreatePlaylistResponse](../../Models/Requests/CreatePlaylistResponse.md)**
## GetPlaylists
Get All Playlists given the specified filters.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Playlists.GetPlaylistsAsync(PlaylistType: PlaylistType.Audio, Smart: QueryParamSmart.Zero);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
| `PlaylistType` | [PlaylistType](../../Models/Requests/PlaylistType.md) | :heavy_minus_sign: | limit to a type of playlist. |
| `Smart` | [QueryParamSmart](../../Models/Requests/QueryParamSmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). |
### Response
**[GetPlaylistsResponse](../../Models/Requests/GetPlaylistsResponse.md)**
## GetPlaylist
Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item:
Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Playlists.GetPlaylistAsync(PlaylistID: 4109.48D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ---------------------- | ---------------------- | ---------------------- | ---------------------- |
| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist |
### Response
**[GetPlaylistResponse](../../Models/Requests/GetPlaylistResponse.md)**
## DeletePlaylist
This endpoint will delete a playlist
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Playlists.DeletePlaylistAsync(PlaylistID: 216.22D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ---------------------- | ---------------------- | ---------------------- | ---------------------- |
| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist |
### Response
**[DeletePlaylistResponse](../../Models/Requests/DeletePlaylistResponse.md)**
## UpdatePlaylist
From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Playlists.UpdatePlaylistAsync(PlaylistID: 3915D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ---------------------- | ---------------------- | ---------------------- | ---------------------- |
| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist |
### Response
**[UpdatePlaylistResponse](../../Models/Requests/UpdatePlaylistResponse.md)**
## GetPlaylistContents
Gets the contents of a playlist. Should be paged by clients via standard mechanisms.
By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter.
For example, you could use this to display a list of recently added albums vis a smart playlist.
Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Playlists.GetPlaylistContentsAsync(PlaylistID: 5004.46D, Type: 9403.59D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- |
| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist |
| `Type` | *double* | :heavy_check_mark: | the metadata type of the item to return |
### Response
**[GetPlaylistContentsResponse](../../Models/Requests/GetPlaylistContentsResponse.md)**
## ClearPlaylistContents
Clears a playlist, only works with dumb playlists. Returns the playlist.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Playlists.ClearPlaylistContentsAsync(PlaylistID: 1893.18D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ---------------------- | ---------------------- | ---------------------- | ---------------------- |
| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist |
### Response
**[ClearPlaylistContentsResponse](../../Models/Requests/ClearPlaylistContentsResponse.md)**
## AddPlaylistContents
Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist.
With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Playlists.AddPlaylistContentsAsync(PlaylistID: 8502.01D, Uri: "library://..", PlayQueueID: 123D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist | |
| `Uri` | *string* | :heavy_check_mark: | the content URI for the playlist | library://.. |
| `PlayQueueID` | *double* | :heavy_check_mark: | the play queue to add to a playlist | 123 |
### Response
**[AddPlaylistContentsResponse](../../Models/Requests/AddPlaylistContentsResponse.md)**
## UploadPlaylist
Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Playlists.UploadPlaylistAsync(Path: "/home/barkley/playlist.m3u", Force: Force.Zero);
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
| `Force` | [Force](../../Models/Requests/Force.md) | :heavy_check_mark: | force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
### Response
**[UploadPlaylistResponse](../../Models/Requests/UploadPlaylistResponse.md)**

View File

@@ -0,0 +1,9 @@
# PlexAPI SDK
## Overview
An Open API Spec for interacting with Plex.tv and Plex Servers
### Available Operations

132
docs/sdks/search/README.md Normal file
View File

@@ -0,0 +1,132 @@
# Search
(*Search*)
## Overview
API Calls that perform search operations with Plex Media Server
### Available Operations
* [PerformSearch](#performsearch) - Perform a search
* [PerformVoiceSearch](#performvoicesearch) - Perform a voice search
* [GetSearchResults](#getsearchresults) - Get Search Results
## PerformSearch
This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor).
In the response's items, the following extra attributes are returned to further describe or disambiguate the result:
- `reason`: The reason for the result, if not because of a direct search term match; can be either:
- `section`: There are multiple identical results from different sections.
- `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language).
- `<hub identifier>`: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor`
- `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold").
- `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID.
This request is intended to be very fast, and called as the user types.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Search.PerformSearchAsync(Query: "dylan", SectionId: 1516.53D, Limit: 5D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `Query` | *string* | :heavy_check_mark: | The query term | arnold |
| `SectionId` | *double* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | |
| `Limit` | *double* | :heavy_minus_sign: | The number of items to return per hub | 5 |
### Response
**[PerformSearchResponse](../../Models/Requests/PerformSearchResponse.md)**
## PerformVoiceSearch
This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint.
It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint.
Whenever possible, clients should limit the search to the appropriate type.
Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Search.PerformVoiceSearchAsync(Query: "dead+poop", SectionId: 4094.8D, Limit: 5D);
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `Query` | *string* | :heavy_check_mark: | The query term | dead+poop |
| `SectionId` | *double* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | |
| `Limit` | *double* | :heavy_minus_sign: | The number of items to return per hub | 5 |
### Response
**[PerformVoiceSearchResponse](../../Models/Requests/PerformVoiceSearchResponse.md)**
## GetSearchResults
This will search the database for the string provided.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Search.GetSearchResultsAsync(Query: "110");
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `Query` | *string* | :heavy_check_mark: | The search query string to use | 110 |
### Response
**[GetSearchResultsResponse](../../Models/Requests/GetSearchResultsResponse.md)**

View File

@@ -0,0 +1,82 @@
# Security
(*Security*)
## Overview
API Calls against Security for Plex Media Server
### Available Operations
* [GetTransientToken](#gettransienttoken) - Get a Transient Token.
* [GetSourceConnectionInformation](#getsourceconnectioninformation) - Get Source Connection Information
## GetTransientToken
This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Security.GetTransientTokenAsync(Type: QueryParamType.Delegation, Scope: Scope.All);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
| `Type` | [QueryParamType](../../Models/Requests/QueryParamType.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. |
| `Scope` | [Scope](../../Models/Requests/Scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. |
### Response
**[GetTransientTokenResponse](../../Models/Requests/GetTransientTokenResponse.md)**
## GetSourceConnectionInformation
If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
Note: requires Plex Media Server >= 1.15.4.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Security.GetSourceConnectionInformationAsync(Source: "server://client-identifier");
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
| `Source` | *string* | :heavy_check_mark: | The source identifier with an included prefix. | server://client-identifier |
### Response
**[GetSourceConnectionInformationResponse](../../Models/Requests/GetSourceConnectionInformationResponse.md)**

244
docs/sdks/server/README.md Normal file
View File

@@ -0,0 +1,244 @@
# Server
(*Server*)
## Overview
Operations against the Plex Media Server System.
### Available Operations
* [GetServerCapabilities](#getservercapabilities) - Server Capabilities
* [GetServerPreferences](#getserverpreferences) - Get Server Preferences
* [GetAvailableClients](#getavailableclients) - Get Available Clients
* [GetDevices](#getdevices) - Get Devices
* [GetServerIdentity](#getserveridentity) - Get Server Identity
* [GetMyPlexAccount](#getmyplexaccount) - Get MyPlex Account
* [GetResizedPhoto](#getresizedphoto) - Get a Resized Photo
* [GetServerList](#getserverlist) - Get Server List
## GetServerCapabilities
Server Capabilities
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Server.GetServerCapabilitiesAsync();
// handle response
```
### Response
**[GetServerCapabilitiesResponse](../../Models/Requests/GetServerCapabilitiesResponse.md)**
## GetServerPreferences
Get Server Preferences
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Server.GetServerPreferencesAsync();
// handle response
```
### Response
**[GetServerPreferencesResponse](../../Models/Requests/GetServerPreferencesResponse.md)**
## GetAvailableClients
Get Available Clients
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Server.GetAvailableClientsAsync();
// handle response
```
### Response
**[GetAvailableClientsResponse](../../Models/Requests/GetAvailableClientsResponse.md)**
## GetDevices
Get Devices
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Server.GetDevicesAsync();
// handle response
```
### Response
**[GetDevicesResponse](../../Models/Requests/GetDevicesResponse.md)**
## GetServerIdentity
Get Server Identity
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Server.GetServerIdentityAsync();
// handle response
```
### Response
**[GetServerIdentityResponse](../../Models/Requests/GetServerIdentityResponse.md)**
## GetMyPlexAccount
Returns MyPlex Account Information
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Server.GetMyPlexAccountAsync();
// handle response
```
### Response
**[GetMyPlexAccountResponse](../../Models/Requests/GetMyPlexAccountResponse.md)**
## GetResizedPhoto
Plex's Photo transcoder is used throughout the service to serve images at specified sizes.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
GetResizedPhotoRequest req = new GetResizedPhotoRequest() {
Width = 110D,
Height = 165D,
Opacity = 643869,
Blur = 4000D,
MinSize = MinSize.Zero,
Upscale = Upscale.Zero,
Url = "/library/metadata/49564/thumb/1654258204",
};
var res = await sdk.Server.GetResizedPhotoAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `request` | [GetResizedPhotoRequest](../../Models/Requests/GetResizedPhotoRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[GetResizedPhotoResponse](../../Models/Requests/GetResizedPhotoResponse.md)**
## GetServerList
Get Server List
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Server.GetServerListAsync();
// handle response
```
### Response
**[GetServerListResponse](../../Models/Requests/GetServerListResponse.md)**

View File

@@ -0,0 +1,125 @@
# Sessions
(*Sessions*)
## Overview
API Calls that perform search operations with Plex Media Server Sessions
### Available Operations
* [GetSessions](#getsessions) - Get Active Sessions
* [GetSessionHistory](#getsessionhistory) - Get Session History
* [GetTranscodeSessions](#gettranscodesessions) - Get Transcode Sessions
* [StopTranscodeSession](#stoptranscodesession) - Stop a Transcode Session
## GetSessions
This will retrieve the "Now Playing" Information of the PMS.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Sessions.GetSessionsAsync();
// handle response
```
### Response
**[GetSessionsResponse](../../Models/Requests/GetSessionsResponse.md)**
## GetSessionHistory
This will Retrieve a listing of all history views.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Sessions.GetSessionHistoryAsync();
// handle response
```
### Response
**[GetSessionHistoryResponse](../../Models/Requests/GetSessionHistoryResponse.md)**
## GetTranscodeSessions
Get Transcode Sessions
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Sessions.GetTranscodeSessionsAsync();
// handle response
```
### Response
**[GetTranscodeSessionsResponse](../../Models/Requests/GetTranscodeSessionsResponse.md)**
## StopTranscodeSession
Stop a Transcode Session
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Sessions.StopTranscodeSessionAsync(SessionKey: "zz7llzqlx8w9vnrsbnwhbmep");
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
| `SessionKey` | *string* | :heavy_check_mark: | the Key of the transcode session to stop | zz7llzqlx8w9vnrsbnwhbmep |
### Response
**[StopTranscodeSessionResponse](../../Models/Requests/StopTranscodeSessionResponse.md)**

108
docs/sdks/updater/README.md Normal file
View File

@@ -0,0 +1,108 @@
# 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
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Updater.GetUpdateStatusAsync();
// handle response
```
### Response
**[GetUpdateStatusResponse](../../Models/Requests/GetUpdateStatusResponse.md)**
## CheckForUpdates
Checking for updates
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Updater.CheckForUpdatesAsync(Download: Download.One);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
| `Download` | [Download](../../Models/Requests/Download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. |
### Response
**[CheckForUpdatesResponse](../../Models/Requests/CheckForUpdatesResponse.md)**
## 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
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Updater.ApplyUpdatesAsync(Tonight: Tonight.One, Skip: Skip.Zero);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Tonight` | [Tonight](../../Models/Requests/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` | [Skip](../../Models/Requests/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`. |
### Response
**[ApplyUpdatesResponse](../../Models/Requests/ApplyUpdatesResponse.md)**

99
docs/sdks/video/README.md Normal file
View File

@@ -0,0 +1,99 @@
# Video
(*Video*)
## Overview
API Calls that perform operations with Plex Media Server Videos
### Available Operations
* [StartUniversalTranscode](#startuniversaltranscode) - Start Universal Transcode
* [GetTimeline](#gettimeline) - Get the timeline for a media item
## StartUniversalTranscode
Begin a Universal Transcode Session
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
StartUniversalTranscodeRequest req = new StartUniversalTranscodeRequest() {
HasMDE = 8924.99D,
Path = "/etc/mail",
MediaIndex = 9962.95D,
PartIndex = 1232.82D,
Protocol = "string",
};
var res = await sdk.Video.StartUniversalTranscodeAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `request` | [StartUniversalTranscodeRequest](../../Models/Requests/StartUniversalTranscodeRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[StartUniversalTranscodeResponse](../../Models/Requests/StartUniversalTranscodeResponse.md)**
## GetTimeline
Get the timeline for a media item
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK(
security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
GetTimelineRequest req = new GetTimelineRequest() {
RatingKey = 716.56D,
Key = "<key>",
State = State.Paused,
HasMDE = 7574.33D,
Time = 3327.51D,
Duration = 7585.39D,
Context = "string",
PlayQueueItemID = 1406.21D,
PlayBackTime = 2699.34D,
Row = 3536.42D,
};
var res = await sdk.Video.GetTimelineAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
| `request` | [GetTimelineRequest](../../Models/Requests/GetTimelineRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[GetTimelineResponse](../../Models/Requests/GetTimelineResponse.md)**