ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.390.7

This commit is contained in:
speakeasybot
2024-09-06 00:00:16 +00:00
parent e2d3ad2f38
commit 2b03eae316
225 changed files with 3354 additions and 1125 deletions

View File

@@ -29,7 +29,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Activities.GetServerActivitiesAsync();
@@ -62,7 +62,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Activities.CancelServerActivitiesAsync(activityUUID: "25b71ed5-0f9d-461c-baa7-d404e9e10d3e");

View File

@@ -10,6 +10,7 @@ API Calls regarding authentication for Plex Media Server
* [GetTransientToken](#gettransienttoken) - Get a Transient Token.
* [GetSourceConnectionInformation](#getsourceconnectioninformation) - Get Source Connection Information
* [GetUserDetails](#getuserdetails) - Get User Data By Token
* [PostUsersSignInData](#postuserssignindata) - Get User SignIn Data
## GetTransientToken
@@ -26,7 +27,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Authentication.GetTransientTokenAsync(
@@ -71,7 +72,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Authentication.GetSourceConnectionInformationAsync(source: "server://client-identifier");
@@ -97,6 +98,46 @@ var res = await sdk.Authentication.GetSourceConnectionInformationAsync(source: "
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## GetUserDetails
Get the User data from the provided X-Plex-Token
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Requests;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Authentication.GetUserDetailsAsync(xPlexToken: "CV5xoxjTpFKUzBTShsaf");
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf |
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
### Response
**[GetUserDetailsResponse](../../Models/Requests/GetUserDetailsResponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| PlexAPI.Models.Errors.GetUserDetailsResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## PostUsersSignInData
Sign in user with username and password and return user data with Plex authentication token
@@ -108,10 +149,10 @@ using PlexAPI;
using PlexAPI.Models.Requests;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman");
var sdk = new PlexAPISDK(xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40");
var res = await sdk.Authentication.PostUsersSignInDataAsync(
xPlexClientIdentifier: "Postman",
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40",
requestBody: new PostUsersSignInDataRequestBody() {
Login = "username@email.com",
Password = "password123",
@@ -125,7 +166,7 @@ var res = await sdk.Authentication.PostUsersSignInDataAsync(
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `XPlexClientIdentifier` | *string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
| `XPlexClientIdentifier` | *string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | gcgzw5rz2xovp84b4vha3a40 |
| `RequestBody` | [PostUsersSignInDataRequestBody](../../Models/Requests/PostUsersSignInDataRequestBody.md) | :heavy_minus_sign: | Login credentials | |
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |

View File

@@ -26,7 +26,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Butler.GetButlerTasksAsync();
@@ -63,7 +63,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Butler.StartAllTasksAsync();
@@ -96,7 +96,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Butler.StopAllTasksAsync();
@@ -134,7 +134,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Butler.StartTaskAsync(taskName: PlexAPI.Models.Requests.TaskName.CleanOldBundles);
@@ -174,7 +174,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Butler.StopTaskAsync(taskName: PlexAPI.Models.Requests.PathParamTaskName.BackupDatabase);

View File

@@ -24,7 +24,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Hubs.GetGlobalHubsAsync(
@@ -68,7 +68,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Hubs.GetLibraryHubsAsync(

View File

@@ -15,8 +15,8 @@ API Calls interacting with Plex Media Server Libraries
* [DeleteLibrary](#deletelibrary) - Delete Library Section
* [GetLibraryItems](#getlibraryitems) - Get Library Items
* [GetRefreshLibraryMetadata](#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
* [SearchLibrary](#searchlibrary) - Search Library
* [GetMetadata](#getmetadata) - Get Items Metadata
* [GetSearchLibrary](#getsearchlibrary) - Search Library
* [GetMetaDataByRatingKey](#getmetadatabyratingkey) - Get Metadata by RatingKey
* [GetMetadataChildren](#getmetadatachildren) - Get Items Children
* [GetTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content
* [GetOnDeck](#getondeck) - Get On Deck
@@ -34,7 +34,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Library.GetFileHashAsync(
@@ -73,18 +73,29 @@ This endpoint will return the recently added content.
```csharp
using PlexAPI;
using PlexAPI.Models.Requests;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Library.GetRecentlyAddedAsync();
var res = await sdk.Library.GetRecentlyAddedAsync(
xPlexContainerStart: 0,
xPlexContainerSize: 50
);
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `XPlexContainerStart` | *int* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.<br/>If the number of items exceeds the limit, the response will be paginated.<br/>By default this is 0<br/> | 0 |
| `XPlexContainerSize` | *int* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.<br/>If the number of items exceeds the limit, the response will be paginated.<br/>By default this is 50<br/> | 50 |
### Response
**[GetRecentlyAddedResponse](../../Models/Requests/GetRecentlyAddedResponse.md)**
@@ -115,7 +126,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Library.GetAllLibrariesAsync();
@@ -187,11 +198,11 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Library.GetLibraryDetailsAsync(
sectionId: 15D,
sectionKey: 9518,
includeDetails: PlexAPI.Models.Requests.IncludeDetails.Zero
);
@@ -202,7 +213,7 @@ var res = await sdk.Library.GetLibraryDetailsAsync(
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `SectionId` | *double* | :heavy_check_mark: | The id of the library | 15 |
| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
| `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
@@ -230,19 +241,19 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Library.DeleteLibraryAsync(sectionId: 15D);
var res = await sdk.Library.DeleteLibraryAsync(sectionKey: 9518);
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------- | --------------------- | --------------------- | --------------------- | --------------------- |
| `SectionId` | *double* | :heavy_check_mark: | The id of the library | 15 |
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
### Response
@@ -289,25 +300,29 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Library.GetLibraryItemsAsync(
sectionId: "<value>",
tag: PlexAPI.Models.Requests.Tag.Genre,
includeGuids: 1
);
GetLibraryItemsRequest req = new GetLibraryItemsRequest() {
SectionKey = 9518,
Tag = PlexAPI.Models.Requests.Tag.Edition,
Type = PlexAPI.Models.Requests.Type.Two,
IncludeGuids = PlexAPI.Models.Requests.IncludeGuids.One,
IncludeMeta = PlexAPI.Models.Requests.IncludeMeta.One,
XPlexContainerStart = 0,
XPlexContainerSize = 50,
};
var res = await sdk.Library.GetLibraryItemsAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `SectionId` | *object* | :heavy_check_mark: | the Id of the library to query | |
| `Tag` | [Tag](../../Models/Requests/Tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | |
| `IncludeGuids` | *long* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | 1 |
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `request` | [GetLibraryItemsRequest](../../Models/Requests/GetLibraryItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
@@ -335,11 +350,11 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Library.GetRefreshLibraryMetadataAsync(
sectionId: 15D,
sectionKey: 9518,
force: PlexAPI.Models.Requests.Force.One
);
@@ -348,10 +363,10 @@ var res = await sdk.Library.GetRefreshLibraryMetadataAsync(
### Parameters
| Parameter | Type | Required | Description | Example |
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
| `SectionId` | *double* | :heavy_check_mark: | The id of the library | 15 |
| `Force` | [Force](../../Models/Requests/Force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 |
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
| `Force` | [Force](../../Models/Requests/Force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 |
### Response
@@ -365,7 +380,7 @@ var res = await sdk.Library.GetRefreshLibraryMetadataAsync(
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## SearchLibrary
## GetSearchLibrary
Search for content within a specific section of the library.
@@ -396,12 +411,12 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Library.SearchLibraryAsync(
sectionId: 933505,
type: PlexAPI.Models.Requests.Type.Four
var res = await sdk.Library.GetSearchLibraryAsync(
sectionKey: 9518,
type: PlexAPI.Models.Requests.QueryParamType.Two
);
// handle response
@@ -409,24 +424,24 @@ var res = await sdk.Library.SearchLibraryAsync(
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `SectionId` | *long* | :heavy_check_mark: | the Id of the library to query |
| `Type` | [Models.Requests.Type](../../Models/Requests/Type.md) | :heavy_check_mark: | Plex content type to search for |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
| `Type` | [QueryParamType](../../Models/Requests/QueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.<br/>1 = movie<br/>2 = show<br/>3 = season<br/>4 = episode<br/>E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/> | 2 |
### Response
**[SearchLibraryResponse](../../Models/Requests/SearchLibraryResponse.md)**
**[GetSearchLibraryResponse](../../Models/Requests/GetSearchLibraryResponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
| PlexAPI.Models.Errors.SearchLibraryResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
| Error Object | Status Code | Content Type |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| PlexAPI.Models.Errors.GetSearchLibraryResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## GetMetadata
## GetMetaDataByRatingKey
This endpoint will return the metadata of a library item specified with the ratingKey.
@@ -440,30 +455,30 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Library.GetMetadataAsync(ratingKey: 8382.31D);
var res = await sdk.Library.GetMetaDataByRatingKeyAsync(ratingKey: 9518);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `RatingKey` | *double* | :heavy_check_mark: | the id of the library item to return the children of. |
| Parameter | Type | Required | Description | Example |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `RatingKey` | *long* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 |
### Response
**[GetMetadataResponse](../../Models/Requests/GetMetadataResponse.md)**
**[GetMetaDataByRatingKeyResponse](../../Models/Requests/GetMetaDataByRatingKeyResponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
| PlexAPI.Models.Errors.GetMetadataResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
| Error Object | Status Code | Content Type |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| PlexAPI.Models.Errors.GetMetaDataByRatingKeyResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## GetMetadataChildren
@@ -480,7 +495,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Library.GetMetadataChildrenAsync(
@@ -524,11 +539,11 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Library.GetTopWatchedContentAsync(
type: 505531,
type: PlexAPI.Models.Requests.GetTopWatchedContentQueryParamType.Two,
includeGuids: 1
);
@@ -537,10 +552,10 @@ var res = await sdk.Library.GetTopWatchedContentAsync(
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
| `Type` | *long* | :heavy_check_mark: | the library type (1 - movies, 2 - shows, 3 - music) | |
| `IncludeGuids` | *long* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | 1 |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Type` | [GetTopWatchedContentQueryParamType](../../Models/Requests/GetTopWatchedContentQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.<br/>1 = movie<br/>2 = show<br/>3 = season<br/>4 = episode<br/>E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/> | 2 |
| `IncludeGuids` | *long* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | 1 |
### Response
@@ -548,9 +563,10 @@ var res = await sdk.Library.GetTopWatchedContentAsync(
### Errors
| Error Object | Status Code | Content Type |
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
| Error Object | Status Code | Content Type |
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
| PlexAPI.Models.Errors.GetTopWatchedContentResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## GetOnDeck
@@ -566,7 +582,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Library.GetOnDeckAsync();

View File

@@ -26,7 +26,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Log.LogLineAsync(
@@ -91,7 +91,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
string req = "level=4&message=Test%20message%201&source=postman
@@ -134,7 +134,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Log.EnablePaperTrailAsync();

View File

@@ -11,6 +11,8 @@ API Calls interacting with Plex Media Server Media
* [MarkPlayed](#markplayed) - Mark Media Played
* [MarkUnplayed](#markunplayed) - Mark Media Unplayed
* [UpdatePlayProgress](#updateplayprogress) - Update Media Play Progress
* [GetBannerImage](#getbannerimage) - Get Banner Image
* [GetThumbImage](#getthumbimage) - Get Thumb Image
## MarkPlayed
@@ -25,7 +27,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Media.MarkPlayedAsync(key: 59398D);
@@ -64,7 +66,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Media.MarkUnplayedAsync(key: 59398D);
@@ -104,11 +106,11 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Media.UpdatePlayProgressAsync(
key: "<value>",
key: "<key>",
time: 90000D,
state: "played"
);
@@ -134,3 +136,99 @@ var res = await sdk.Media.UpdatePlayProgressAsync(
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| PlexAPI.Models.Errors.UpdatePlayProgressResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## GetBannerImage
Gets the banner image of the media item
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Requests;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
GetBannerImageRequest req = new GetBannerImageRequest() {
RatingKey = 9518,
Width = 396,
Height = 396,
MinSize = 1,
Upscale = 1,
XPlexToken = "CV5xoxjTpFKUzBTShsaf",
};
var res = await sdk.Media.GetBannerImageAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `request` | [GetBannerImageRequest](../../Models/Requests/GetBannerImageRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[GetBannerImageResponse](../../Models/Requests/GetBannerImageResponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| PlexAPI.Models.Errors.GetBannerImageResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## GetThumbImage
Gets the thumbnail image of the media item
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Requests;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
GetThumbImageRequest req = new GetThumbImageRequest() {
RatingKey = 9518,
Width = 396,
Height = 396,
MinSize = 1,
Upscale = 1,
XPlexToken = "CV5xoxjTpFKUzBTShsaf",
};
var res = await sdk.Media.GetThumbImageAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `request` | [GetThumbImageRequest](../../Models/Requests/GetThumbImageRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[GetThumbImageResponse](../../Models/Requests/GetThumbImageResponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
| PlexAPI.Models.Errors.GetThumbImageResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |

View File

@@ -37,12 +37,12 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
CreatePlaylistRequest req = new CreatePlaylistRequest() {
Title = "<value>",
Type = PlexAPI.Models.Requests.QueryParamType.Photo,
Type = PlexAPI.Models.Requests.CreatePlaylistQueryParamType.Photo,
Smart = PlexAPI.Models.Requests.Smart.One,
Uri = "https://inborn-brochure.biz",
};
@@ -83,7 +83,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Playlists.GetPlaylistsAsync(
@@ -128,7 +128,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Playlists.GetPlaylistAsync(playlistID: 4109.48D);
@@ -168,7 +168,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Playlists.DeletePlaylistAsync(playlistID: 216.22D);
@@ -208,7 +208,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Playlists.UpdatePlaylistAsync(
@@ -257,12 +257,12 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Playlists.GetPlaylistContentsAsync(
playlistID: 5004.46D,
type: 9403.59D
type: PlexAPI.Models.Requests.GetPlaylistContentsQueryParamType.Two
);
// handle response
@@ -270,10 +270,10 @@ var res = await sdk.Playlists.GetPlaylistContentsAsync(
### 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 |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist | |
| `Type` | [GetPlaylistContentsQueryParamType](../../Models/Requests/GetPlaylistContentsQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.<br/>1 = movie<br/>2 = show<br/>3 = season<br/>4 = episode<br/>E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/> | 2 |
### Response
@@ -301,7 +301,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Playlists.ClearPlaylistContentsAsync(playlistID: 1893.18D);
@@ -342,7 +342,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Playlists.AddPlaylistContentsAsync(
@@ -388,7 +388,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Playlists.UploadPlaylistAsync(

View File

@@ -12,10 +12,9 @@ API Calls that perform operations directly against https://Plex.tv
* [GetUserFriends](#getuserfriends) - Get list of friends of the user logged in
* [GetGeoData](#getgeodata) - Get Geo Data
* [GetHomeData](#gethomedata) - Get Plex Home Data
* [GetResources](#getresources) - Get Resources
* [GetServerResources](#getserverresources) - Get Server Resources
* [GetPin](#getpin) - Get a Pin
* [GetTokenByPinId](#gettokenbypinid) - Get Access Token by PinId
* [GetUserDetails](#getuserdetails) - Get UserData By Token
## GetCompanionsData
@@ -29,7 +28,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Plex.GetCompanionsDataAsync();
@@ -67,7 +66,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Plex.GetUserFriendsAsync();
@@ -103,7 +102,7 @@ Returns the geolocation and locale data of the caller
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman");
var sdk = new PlexAPISDK(xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40");
var res = await sdk.Plex.GetGeoDataAsync();
@@ -140,7 +139,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Plex.GetHomeDataAsync();
@@ -160,9 +159,9 @@ var res = await sdk.Plex.GetHomeDataAsync();
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## GetResources
## GetServerResources
Get Resources
Get Plex server access tokens and server connections
### Example Usage
@@ -171,38 +170,40 @@ using PlexAPI;
using PlexAPI.Models.Requests;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman");
var res = await sdk.Plex.GetResourcesAsync(
xPlexClientIdentifier: "Postman",
includeHttps: PlexAPI.Models.Requests.IncludeHttps.Zero,
includeRelay: PlexAPI.Models.Requests.IncludeRelay.Zero,
includeIPv6: PlexAPI.Models.Requests.IncludeIPv6.One
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
GetServerResourcesRequest req = new GetServerResourcesRequest() {
XPlexToken = "CV5xoxjTpFKUzBTShsaf",
IncludeHttps = PlexAPI.Models.Requests.IncludeHttps.One,
IncludeRelay = PlexAPI.Models.Requests.IncludeRelay.One,
IncludeIPv6 = PlexAPI.Models.Requests.IncludeIPv6.One,
};
var res = await sdk.Plex.GetServerResourcesAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `XPlexClientIdentifier` | *string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
| `IncludeHttps` | [IncludeHttps](../../Models/Requests/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | |
| `IncludeRelay` | [IncludeRelay](../../Models/Requests/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results | |
| `IncludeIPv6` | [IncludeIPv6](../../Models/Requests/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | |
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `request` | [GetServerResourcesRequest](../../Models/Requests/GetServerResourcesRequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
### Response
**[GetResourcesResponse](../../Models/Requests/GetResourcesResponse.md)**
**[GetServerResourcesResponse](../../Models/Requests/GetServerResourcesResponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
| PlexAPI.Models.Errors.GetResourcesResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
| Error Object | Status Code | Content Type |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| PlexAPI.Models.Errors.GetServerResourcesResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## GetPin
@@ -216,12 +217,12 @@ using PlexAPI;
using PlexAPI.Models.Requests;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman");
var sdk = new PlexAPISDK(xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40");
var res = await sdk.Plex.GetPinAsync(
xPlexProduct: "Postman",
strong: false,
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40",
xPlexProduct: "Plex Web"
);
// handle response
@@ -231,9 +232,9 @@ var res = await sdk.Plex.GetPinAsync(
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `XPlexProduct` | *string* | :heavy_check_mark: | Product name of the application shown in the list of devices<br/> | Postman |
| `Strong` | *bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> | |
| `XPlexClientIdentifier` | *string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
| `XPlexClientIdentifier` | *string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | gcgzw5rz2xovp84b4vha3a40 |
| `XPlexProduct` | *string* | :heavy_minus_sign: | N/A | Plex Web |
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
### Response
@@ -259,11 +260,11 @@ using PlexAPI;
using PlexAPI.Models.Requests;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman");
var sdk = new PlexAPISDK(xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40");
var res = await sdk.Plex.GetTokenByPinIdAsync(
pinID: 408895,
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
// handle response
@@ -274,7 +275,7 @@ var res = await sdk.Plex.GetTokenByPinIdAsync(
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `PinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | |
| `XPlexClientIdentifier` | *string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
| `XPlexClientIdentifier` | *string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | gcgzw5rz2xovp84b4vha3a40 |
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
### Response
@@ -283,45 +284,8 @@ var res = await sdk.Plex.GetTokenByPinIdAsync(
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- |
| PlexAPI.Models.Errors.GetTokenByPinIdResponseBody | 404 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## GetUserDetails
Get the User data from the provided X-Plex-Token
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
);
var res = await sdk.Plex.GetUserDetailsAsync();
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
### Response
**[GetUserDetailsResponse](../../Models/Requests/GetUserDetailsResponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| PlexAPI.Models.Errors.GetUserDetailsResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
| Error Object | Status Code | Content Type |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| PlexAPI.Models.Errors.GetTokenByPinIdResponseBody | 400 | application/json |
| PlexAPI.Models.Errors.GetTokenByPinIdPlexResponseBody | 404 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |

View File

@@ -2,4 +2,4 @@
## Overview
Plex-API: An Open API Spec for interacting with Plex.tv
Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server

View File

@@ -37,12 +37,12 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Search.PerformSearchAsync(
query: "dylan",
sectionId: 1516.53D,
query: "arnold",
sectionId: 9372.7D,
limit: 5D
);
@@ -86,7 +86,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Search.PerformVoiceSearchAsync(
@@ -131,7 +131,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Search.GetSearchResultsAsync(query: "110");

View File

@@ -15,6 +15,7 @@ Operations against the Plex Media Server System.
* [GetServerIdentity](#getserveridentity) - Get Server Identity
* [GetMyPlexAccount](#getmyplexaccount) - Get MyPlex Account
* [GetResizedPhoto](#getresizedphoto) - Get a Resized Photo
* [GetMediaProviders](#getmediaproviders) - Get Media Providers
* [GetServerList](#getserverlist) - Get Server List
## GetServerCapabilities
@@ -29,7 +30,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Server.GetServerCapabilitiesAsync();
@@ -61,7 +62,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Server.GetServerPreferencesAsync();
@@ -93,7 +94,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Server.GetAvailableClientsAsync();
@@ -125,7 +126,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Server.GetDevicesAsync();
@@ -147,7 +148,7 @@ var res = await sdk.Server.GetDevicesAsync();
## GetServerIdentity
Get Server Identity
This request is useful to determine if the server is online or offline
### Example Usage
@@ -155,10 +156,7 @@ Get Server Identity
using PlexAPI;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
);
var sdk = new PlexAPISDK(xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40");
var res = await sdk.Server.GetServerIdentityAsync();
@@ -173,7 +171,7 @@ var res = await sdk.Server.GetServerIdentityAsync();
| Error Object | Status Code | Content Type |
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
| PlexAPI.Models.Errors.GetServerIdentityResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.GetServerIdentityResponseBody | 408 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
@@ -189,7 +187,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Server.GetMyPlexAccountAsync();
@@ -223,7 +221,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
GetResizedPhotoRequest req = new GetResizedPhotoRequest() {
@@ -259,6 +257,45 @@ var res = await sdk.Server.GetResizedPhotoAsync(req);
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## GetMediaProviders
Retrieves media providers and their features from the Plex server.
### Example Usage
```csharp
using PlexAPI;
using PlexAPI.Models.Requests;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Server.GetMediaProvidersAsync(xPlexToken: "CV5xoxjTpFKUzBTShsaf");
// handle response
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf |
### Response
**[GetMediaProvidersResponse](../../Models/Requests/GetMediaProvidersResponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
| PlexAPI.Models.Errors.GetMediaProvidersResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## GetServerList
Get Server List
@@ -271,7 +308,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Server.GetServerListAsync();

View File

@@ -25,7 +25,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Sessions.GetSessionsAsync();
@@ -58,13 +58,13 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Sessions.GetSessionHistoryAsync(
sort: "<value>",
accountId: 1,
filter: new Filter() {},
filter: new QueryParamFilter() {},
librarySectionID: 12
);
@@ -77,7 +77,7 @@ var res = await sdk.Sessions.GetSessionHistoryAsync(
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Sort` | *string* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)<br/> | |
| `AccountId` | *long* | :heavy_minus_sign: | Filter results by those that are related to a specific users id<br/> | 1 |
| `Filter` | [Filter](../../Models/Requests/Filter.md) | :heavy_minus_sign: | Filters content by field and direction/equality<br/>(Unknown if viewedAt is the only supported column)<br/> | {<br/>"viewed-at-greater-than": {<br/>"value": "viewedAt\u003e"<br/>},<br/>"viewed-at-greater-than-or-equal-to": {<br/>"value": "viewedAt\u003e=\u003e"<br/>},<br/>"viewed-at-less-than": {<br/>"value": "viewedAt\u003c"<br/>}<br/>} |
| `Filter` | [QueryParamFilter](../../Models/Requests/QueryParamFilter.md) | :heavy_minus_sign: | Filters content by field and direction/equality<br/>(Unknown if viewedAt is the only supported column)<br/> | {<br/>"viewed-at-greater-than": {<br/>"value": "viewedAt\u003e"<br/>},<br/>"viewed-at-greater-than-or-equal-to": {<br/>"value": "viewedAt\u003e=\u003e"<br/>},<br/>"viewed-at-less-than": {<br/>"value": "viewedAt\u003c"<br/>}<br/>} |
| `LibrarySectionID` | *long* | :heavy_minus_sign: | Filters the results based on the id of a valid library section<br/> | 12 |
### Response
@@ -104,7 +104,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Sessions.GetTranscodeSessionsAsync();
@@ -137,7 +137,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Sessions.StopTranscodeSessionAsync(sessionKey: "zz7llzqlx8w9vnrsbnwhbmep");

View File

@@ -25,7 +25,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Statistics.GetStatisticsAsync(timespan: 4);
@@ -64,7 +64,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Statistics.GetResourcesStatisticsAsync(timespan: 4);
@@ -103,7 +103,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Statistics.GetBandwidthStatisticsAsync(timespan: 4);

View File

@@ -25,7 +25,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Updater.GetUpdateStatusAsync();
@@ -58,7 +58,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Updater.CheckForUpdatesAsync(download: PlexAPI.Models.Requests.Download.One);
@@ -98,7 +98,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
var res = await sdk.Updater.ApplyUpdatesAsync(
@@ -114,7 +114,7 @@ var res = await sdk.Updater.ApplyUpdatesAsync(
| Parameter | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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 | 1 |
| `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`. | 1 |
| `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`. | 1 |
### Response

View File

@@ -24,7 +24,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
GetTimelineRequest req = new GetTimelineRequest() {
@@ -76,7 +76,7 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
StartUniversalTranscodeRequest req = new StartUniversalTranscodeRequest() {

View File

@@ -8,9 +8,9 @@ API Calls that perform operations with Plex Media Server Watchlists
### Available Operations
* [GetWatchlist](#getwatchlist) - Get User Watchlist
* [GetWatchList](#getwatchlist) - Get User Watchlist
## GetWatchlist
## GetWatchList
Get User Watchlist
@@ -23,15 +23,17 @@ using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "Postman"
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
GetWatchlistRequest req = new GetWatchlistRequest() {
Filter = PlexAPI.Models.Requests.PathParamFilter.Released,
XPlexToken = "<value>",
GetWatchListRequest req = new GetWatchListRequest() {
Filter = PlexAPI.Models.Requests.Filter.Available,
XPlexToken = "CV5xoxjTpFKUzBTShsaf",
XPlexContainerStart = 0,
XPlexContainerSize = 50,
};
var res = await sdk.Watchlist.GetWatchlistAsync(req);
var res = await sdk.Watchlist.GetWatchListAsync(req);
// handle response
```
@@ -40,16 +42,16 @@ var res = await sdk.Watchlist.GetWatchlistAsync(req);
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `request` | [GetWatchlistRequest](../../Models/Requests/GetWatchlistRequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `request` | [GetWatchListRequest](../../Models/Requests/GetWatchListRequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
### Response
**[GetWatchlistResponse](../../Models/Requests/GetWatchlistResponse.md)**
**[GetWatchListResponse](../../Models/Requests/GetWatchListResponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
| PlexAPI.Models.Errors.GetWatchlistResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.GetWatchListResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |