mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 04:20:46 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.377.3
This commit is contained in:
@@ -8,9 +8,123 @@ API Calls that perform operations directly against https://Plex.tv
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetCompanionsData](#getcompanionsdata) - Get Companions Data
|
||||
* [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
|
||||
* [GetPin](#getpin) - Get a Pin
|
||||
* [GetToken](#gettoken) - Get Access Token
|
||||
* [GetTokenByPinId](#gettokenbypinid) - Get Access Token by PinId
|
||||
* [GetUserDetails](#getuserdetails) - Get UserData By Token
|
||||
|
||||
## GetCompanionsData
|
||||
|
||||
Get Companions Data
|
||||
|
||||
### 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.GetCompanionsDataAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetCompanionsDataResponse](../../Models/Requests/GetCompanionsDataResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
|
||||
| PlexAPI.Models.Errors.GetCompanionsDataResponseBody | 401 | application/json |
|
||||
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## GetUserFriends
|
||||
|
||||
Get friends of provided auth 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.GetUserFriendsAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetUserFriendsResponse](../../Models/Requests/GetUserFriendsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| PlexAPI.Models.Errors.GetUserFriendsResponseBody | 401 | application/json |
|
||||
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## GetGeoData
|
||||
|
||||
Returns the geolocation and locale data of the caller
|
||||
|
||||
### Example Usage
|
||||
|
||||
```csharp
|
||||
using PlexAPI;
|
||||
using PlexAPI.Models.Components;
|
||||
|
||||
var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman");
|
||||
|
||||
var res = await sdk.Plex.GetGeoDataAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetGeoDataResponse](../../Models/Requests/GetGeoDataResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
|
||||
| PlexAPI.Models.Errors.GetGeoDataResponseBody | 401 | application/json |
|
||||
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## GetHomeData
|
||||
|
||||
@@ -31,10 +145,10 @@ var res = await sdk.Plex.GetHomeDataAsync();
|
||||
// handle response
|
||||
```
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[GetHomeDataResponse](../../Models/Requests/GetHomeDataResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -42,6 +156,51 @@ var res = await sdk.Plex.GetHomeDataAsync();
|
||||
| PlexAPI.Models.Errors.GetHomeDataResponseBody | 401 | application/json |
|
||||
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## GetResources
|
||||
|
||||
Get Resources
|
||||
|
||||
### Example Usage
|
||||
|
||||
```csharp
|
||||
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);
|
||||
|
||||
// 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 |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetResourcesResponse](../../Models/Requests/GetResourcesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
|
||||
| PlexAPI.Models.Errors.GetResourcesResponseBody | 401 | application/json |
|
||||
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## GetPin
|
||||
|
||||
Retrieve a Pin from Plex.tv for authentication flows
|
||||
@@ -50,8 +209,8 @@ Retrieve a Pin from Plex.tv for authentication flows
|
||||
|
||||
```csharp
|
||||
using PlexAPI;
|
||||
using PlexAPI.Models.Components;
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Models.Components;
|
||||
|
||||
var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman");
|
||||
|
||||
@@ -72,10 +231,10 @@ var res = await sdk.Plex.GetPinAsync(
|
||||
| `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 |
|
||||
@@ -83,21 +242,22 @@ var res = await sdk.Plex.GetPinAsync(
|
||||
| PlexAPI.Models.Errors.GetPinResponseBody | 400 | application/json |
|
||||
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
## GetToken
|
||||
|
||||
Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
|
||||
## GetTokenByPinId
|
||||
|
||||
Retrieve an Access Token from Plex.tv after the Pin has been authenticated
|
||||
|
||||
### Example Usage
|
||||
|
||||
```csharp
|
||||
using PlexAPI;
|
||||
using PlexAPI.Models.Components;
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Models.Components;
|
||||
|
||||
var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman");
|
||||
|
||||
var res = await sdk.Plex.GetTokenAsync(
|
||||
pinID: "<value>",
|
||||
var res = await sdk.Plex.GetTokenByPinIdAsync(
|
||||
pinID: 408895,
|
||||
xPlexClientIdentifier: "Postman");
|
||||
|
||||
// handle response
|
||||
@@ -107,17 +267,54 @@ var res = await sdk.Plex.GetTokenAsync(
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `PinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for | |
|
||||
| `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 |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetTokenByPinIdResponse](../../Models/Requests/GetTokenByPinIdResponse.md)**
|
||||
|
||||
### 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
|
||||
|
||||
**[GetTokenResponse](../../Models/Requests/GetTokenResponse.md)**
|
||||
**[GetUserDetailsResponse](../../Models/Requests/GetUserDetailsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
|
||||
| PlexAPI.Models.Errors.GetTokenResponseBody | 400 | application/json |
|
||||
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| PlexAPI.Models.Errors.GetUserDetailsResponseBody | 401 | application/json |
|
||||
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
Reference in New Issue
Block a user