Regenerated SDK with small changes

This commit is contained in:
Luke Hagar
2024-06-27 14:39:09 +00:00
parent 367dc248c3
commit 7585dd0b5c
845 changed files with 12822 additions and 4844 deletions

View File

@@ -8,9 +8,40 @@ API Calls that perform operations directly against https://Plex.tv
### Available Operations
* [GetHomeData](#gethomedata) - Get Plex Home Data
* [GetPin](#getpin) - Get a Pin
* [GetToken](#gettoken) - Get Access Token
## GetHomeData
Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status.
### 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.GetHomeDataAsync();
// handle response
```
### Response
**[GetHomeDataResponse](../../Models/Requests/GetHomeDataResponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
| PlexAPI.Models.Errors.GetHomeDataResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## GetPin
Retrieve a Pin from Plex.tv for authentication flows
@@ -22,28 +53,35 @@ using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK();
var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman");
var res = await sdk.Plex.GetPinAsync(
xPlexClientIdentifier: "<value>",
strong: false);
xPlexProduct: "Postman",
strong: false,
xPlexClientIdentifier: "Postman");
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `XPlexClientIdentifier` | *string* | :heavy_check_mark: | 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/> |
| `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/> |
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
| 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 |
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
### Response
**[GetPinResponse](../../Models/Requests/GetPinResponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
| PlexAPI.Models.Errors.GetPinResponseBody | 400 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
## GetToken
@@ -56,25 +94,30 @@ using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK();
var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman");
var res = await sdk.Plex.GetTokenAsync(
pinID: "<value>",
xPlexClientIdentifier: "<value>");
xPlexClientIdentifier: "Postman");
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `PinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for |
| `XPlexClientIdentifier` | *string* | :heavy_check_mark: | 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/> |
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `PinID` | *string* | :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 |
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
### Response
**[GetTokenResponse](../../Models/Requests/GetTokenResponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
| PlexAPI.Models.Errors.GetTokenResponseBody | 400 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |