mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-07 04:20:49 +00:00
regerated and working on publishing
This commit is contained in:
@@ -22,19 +22,10 @@ This will retrieve the "Now Playing" Information of the PMS.
|
||||
```java
|
||||
package hello.world;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.PlexAPI;
|
||||
import lukehagar.plexapi.plexapi.models.operations.*;
|
||||
import lukehagar.plexapi.plexapi.models.shared.*;
|
||||
import lukehagar.plexapi.plexapi.models.shared.Security;
|
||||
import lukehagar.plexapi.plexapi.utils.EventStream;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import static java.util.Map.entry;
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.GetSessionsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
@@ -42,7 +33,7 @@ public class Application {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("Postman")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
|
||||
GetSessionsResponse res = sdk.sessions().getSessions()
|
||||
@@ -51,10 +42,10 @@ public class Application {
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (lukehagar.plexapi.plexapi.models.errors.GetSessionsResponseBody e) {
|
||||
} catch (dev.plexapi.sdk.models.errors.GetSessionsResponseBody e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (lukehagar.plexapi.plexapi.models.errors.SDKError e) {
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
@@ -66,10 +57,10 @@ public class Application {
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[lukehagar.plexapi.plexapi.models.operations.GetSessionsResponse](../../models/operations/GetSessionsResponse.md)**
|
||||
**[GetSessionsResponse](../../models/operations/GetSessionsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -77,6 +68,7 @@ public class Application {
|
||||
| models/errors/GetSessionsResponseBody | 401 | application/json |
|
||||
| models/errors/SDKError | 4xx-5xx | \*\/* |
|
||||
|
||||
|
||||
## getSessionHistory
|
||||
|
||||
This will Retrieve a listing of all history views.
|
||||
@@ -86,19 +78,11 @@ This will Retrieve a listing of all history views.
|
||||
```java
|
||||
package hello.world;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.PlexAPI;
|
||||
import lukehagar.plexapi.plexapi.models.operations.*;
|
||||
import lukehagar.plexapi.plexapi.models.shared.*;
|
||||
import lukehagar.plexapi.plexapi.models.shared.Security;
|
||||
import lukehagar.plexapi.plexapi.utils.EventStream;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import static java.util.Map.entry;
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.GetSessionHistoryResponse;
|
||||
import dev.plexapi.sdk.models.operations.QueryParamFilter;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
@@ -106,13 +90,13 @@ public class Application {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("Postman")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
|
||||
GetSessionHistoryResponse res = sdk.sessions().getSessionHistory()
|
||||
.sort("<value>")
|
||||
.accountId(1L)
|
||||
.filter(Filter.builder()
|
||||
.filter(QueryParamFilter.builder()
|
||||
.build())
|
||||
.librarySectionID(12L)
|
||||
.call();
|
||||
@@ -120,10 +104,10 @@ public class Application {
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (lukehagar.plexapi.plexapi.models.errors.GetSessionHistoryResponseBody e) {
|
||||
} catch (dev.plexapi.sdk.models.errors.GetSessionHistoryResponseBody e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (lukehagar.plexapi.plexapi.models.errors.SDKError e) {
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
@@ -139,15 +123,15 @@ public class Application {
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `sort` | *Optional<? extends String>* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)<br/> | |
|
||||
| `accountId` | *Optional<? extends Long>* | :heavy_minus_sign: | Filter results by those that are related to a specific users id<br/> | 1 |
|
||||
| `filter` | [Optional<? extends lukehagar.plexapi.plexapi.models.operations.Filter>](../../models/operations/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` | *Optional<? extends Long>* | :heavy_minus_sign: | Filters the results based on the id of a valid library section<br/> | 12 |
|
||||
|
||||
| `sort` | *Optional<String>* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)<br/> | |
|
||||
| `accountId` | *Optional<Long>* | :heavy_minus_sign: | Filter results by those that are related to a specific users id<br/> | 1 |
|
||||
| `filter` | [Optional<QueryParamFilter>](../../models/operations/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` | *Optional<Long>* | :heavy_minus_sign: | Filters the results based on the id of a valid library section<br/> | 12 |
|
||||
|
||||
### Response
|
||||
|
||||
**[lukehagar.plexapi.plexapi.models.operations.GetSessionHistoryResponse](../../models/operations/GetSessionHistoryResponse.md)**
|
||||
**[GetSessionHistoryResponse](../../models/operations/GetSessionHistoryResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -155,6 +139,7 @@ public class Application {
|
||||
| models/errors/GetSessionHistoryResponseBody | 401 | application/json |
|
||||
| models/errors/SDKError | 4xx-5xx | \*\/* |
|
||||
|
||||
|
||||
## getTranscodeSessions
|
||||
|
||||
Get Transcode Sessions
|
||||
@@ -164,19 +149,10 @@ Get Transcode Sessions
|
||||
```java
|
||||
package hello.world;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.PlexAPI;
|
||||
import lukehagar.plexapi.plexapi.models.operations.*;
|
||||
import lukehagar.plexapi.plexapi.models.shared.*;
|
||||
import lukehagar.plexapi.plexapi.models.shared.Security;
|
||||
import lukehagar.plexapi.plexapi.utils.EventStream;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import static java.util.Map.entry;
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.GetTranscodeSessionsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
@@ -184,7 +160,7 @@ public class Application {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("Postman")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
|
||||
GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions()
|
||||
@@ -193,10 +169,10 @@ public class Application {
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (lukehagar.plexapi.plexapi.models.errors.GetTranscodeSessionsResponseBody e) {
|
||||
} catch (dev.plexapi.sdk.models.errors.GetTranscodeSessionsResponseBody e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (lukehagar.plexapi.plexapi.models.errors.SDKError e) {
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
@@ -208,10 +184,10 @@ public class Application {
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[lukehagar.plexapi.plexapi.models.operations.GetTranscodeSessionsResponse](../../models/operations/GetTranscodeSessionsResponse.md)**
|
||||
**[GetTranscodeSessionsResponse](../../models/operations/GetTranscodeSessionsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -219,6 +195,7 @@ public class Application {
|
||||
| models/errors/GetTranscodeSessionsResponseBody | 401 | application/json |
|
||||
| models/errors/SDKError | 4xx-5xx | \*\/* |
|
||||
|
||||
|
||||
## stopTranscodeSession
|
||||
|
||||
Stop a Transcode Session
|
||||
@@ -228,19 +205,10 @@ Stop a Transcode Session
|
||||
```java
|
||||
package hello.world;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import lukehagar.plexapi.plexapi.PlexAPI;
|
||||
import lukehagar.plexapi.plexapi.models.operations.*;
|
||||
import lukehagar.plexapi.plexapi.models.shared.*;
|
||||
import lukehagar.plexapi.plexapi.models.shared.Security;
|
||||
import lukehagar.plexapi.plexapi.utils.EventStream;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import static java.util.Map.entry;
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.StopTranscodeSessionResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
@@ -248,7 +216,7 @@ public class Application {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("Postman")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
|
||||
StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession()
|
||||
@@ -256,10 +224,10 @@ public class Application {
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (lukehagar.plexapi.plexapi.models.errors.StopTranscodeSessionResponseBody e) {
|
||||
} catch (dev.plexapi.sdk.models.errors.StopTranscodeSessionResponseBody e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (lukehagar.plexapi.plexapi.models.errors.SDKError e) {
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
@@ -277,10 +245,10 @@ public class Application {
|
||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||
| `sessionKey` | *String* | :heavy_check_mark: | the Key of the transcode session to stop | zz7llzqlx8w9vnrsbnwhbmep |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[lukehagar.plexapi.plexapi.models.operations.StopTranscodeSessionResponse](../../models/operations/StopTranscodeSessionResponse.md)**
|
||||
**[StopTranscodeSessionResponse](../../models/operations/StopTranscodeSessionResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
|
||||
Reference in New Issue
Block a user