mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-10 04:20:57 +00:00
Regenerated SDK with small changes
This commit is contained in:
@@ -23,7 +23,9 @@ This will retrieve the "Now Playing" Information of the PMS.
|
||||
using PlexAPI;
|
||||
using PlexAPI.Models.Components;
|
||||
|
||||
var sdk = new PlexAPISDK(AccessToken: "<YOUR_API_KEY_HERE>");
|
||||
var sdk = new PlexAPISDK(
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
xPlexClientIdentifier: "Postman");
|
||||
|
||||
var res = await sdk.Sessions.GetSessionsAsync();
|
||||
|
||||
@@ -34,7 +36,12 @@ var res = await sdk.Sessions.GetSessionsAsync();
|
||||
### Response
|
||||
|
||||
**[GetSessionsResponse](../../Models/Requests/GetSessionsResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| PlexAPI.Models.Errors.GetSessionsResponseBody | 401 | application/json |
|
||||
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
## GetSessionHistory
|
||||
|
||||
@@ -45,19 +52,40 @@ This will Retrieve a listing of all history views.
|
||||
```csharp
|
||||
using PlexAPI;
|
||||
using PlexAPI.Models.Components;
|
||||
using PlexAPI.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPISDK(AccessToken: "<YOUR_API_KEY_HERE>");
|
||||
var sdk = new PlexAPISDK(
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
xPlexClientIdentifier: "Postman");
|
||||
|
||||
var res = await sdk.Sessions.GetSessionHistoryAsync();
|
||||
var res = await sdk.Sessions.GetSessionHistoryAsync(
|
||||
sort: "<value>",
|
||||
accountId: 1,
|
||||
filter: new Filter() {},
|
||||
librarySectionID: 12);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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/>} |
|
||||
| `LibrarySectionID` | *long* | :heavy_minus_sign: | Filters the results based on the id of a valid library section<br/> | 12 |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[GetSessionHistoryResponse](../../Models/Requests/GetSessionHistoryResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
|
||||
| PlexAPI.Models.Errors.GetSessionHistoryResponseBody | 401 | application/json |
|
||||
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
## GetTranscodeSessions
|
||||
|
||||
@@ -69,7 +97,9 @@ Get Transcode Sessions
|
||||
using PlexAPI;
|
||||
using PlexAPI.Models.Components;
|
||||
|
||||
var sdk = new PlexAPISDK(AccessToken: "<YOUR_API_KEY_HERE>");
|
||||
var sdk = new PlexAPISDK(
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
xPlexClientIdentifier: "Postman");
|
||||
|
||||
var res = await sdk.Sessions.GetTranscodeSessionsAsync();
|
||||
|
||||
@@ -80,7 +110,12 @@ var res = await sdk.Sessions.GetTranscodeSessionsAsync();
|
||||
### Response
|
||||
|
||||
**[GetTranscodeSessionsResponse](../../Models/Requests/GetTranscodeSessionsResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
|
||||
| PlexAPI.Models.Errors.GetTranscodeSessionsResponseBody | 401 | application/json |
|
||||
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
## StopTranscodeSession
|
||||
|
||||
@@ -93,7 +128,9 @@ using PlexAPI;
|
||||
using PlexAPI.Models.Components;
|
||||
using PlexAPI.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPISDK(AccessToken: "<YOUR_API_KEY_HERE>");
|
||||
var sdk = new PlexAPISDK(
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
xPlexClientIdentifier: "Postman");
|
||||
|
||||
var res = await sdk.Sessions.StopTranscodeSessionAsync(sessionKey: "zz7llzqlx8w9vnrsbnwhbmep");
|
||||
|
||||
@@ -110,4 +147,9 @@ var res = await sdk.Sessions.StopTranscodeSessionAsync(sessionKey: "zz7llzqlx8w9
|
||||
### Response
|
||||
|
||||
**[StopTranscodeSessionResponse](../../Models/Requests/StopTranscodeSessionResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
|
||||
| PlexAPI.Models.Errors.StopTranscodeSessionResponseBody | 401 | application/json |
|
||||
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
Reference in New Issue
Block a user