ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2

This commit is contained in:
speakeasybot
2024-09-21 00:25:44 +00:00
parent f3780ae807
commit 3499fe6d12
190 changed files with 4636 additions and 5690 deletions

File diff suppressed because one or more lines are too long

View File

@@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
java:
version: 0.3.6
version: 0.4.0
additionalDependencies: []
additionalPlugins: []
artifactID: plexapi

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.399.2
speakeasyVersion: 1.401.2
sources:
my-source:
sourceNamespace: my-source
@@ -8,8 +8,8 @@ sources:
- latest
plexapi:
sourceNamespace: plexapi
sourceRevisionDigest: sha256:31e943dab53dd0133fcd12a24e04d511637bd7f37b78fd71efded53c650bf729
sourceBlobDigest: sha256:a652fa39754f0c22a1454f628fe84983b34662ee8a153a3461d50b833f8bc5c2
sourceRevisionDigest: sha256:5aa71ad96ca6de91143ee513c9880e08e555e7748fb4b5f8d069c6ab0c8f3069
sourceBlobDigest: sha256:1cbef844e2856c2eabba4bd6d677d96c572fed13b27978d0d953aa06b224c02f
tags:
- latest
- main
@@ -17,10 +17,10 @@ targets:
plexjava:
source: plexapi
sourceNamespace: plexapi
sourceRevisionDigest: sha256:31e943dab53dd0133fcd12a24e04d511637bd7f37b78fd71efded53c650bf729
sourceBlobDigest: sha256:a652fa39754f0c22a1454f628fe84983b34662ee8a153a3461d50b833f8bc5c2
sourceRevisionDigest: sha256:5aa71ad96ca6de91143ee513c9880e08e555e7748fb4b5f8d069c6ab0c8f3069
sourceBlobDigest: sha256:1cbef844e2856c2eabba4bd6d677d96c572fed13b27978d0d953aa06b224c02f
codeSamplesNamespace: code-samples-java-plexjava
codeSamplesRevisionDigest: sha256:573447c09306bdcc7cfddf7a74130c0bc1d3596050a8108ad85819c2afd5efb6
codeSamplesRevisionDigest: sha256:e98bd3fd8e811e5368343de5de5c1f0c7d154bf8ab1b56532fe72b65bc70297c
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest

235
README.md
View File

@@ -37,7 +37,7 @@ The samples below show how a published SDK artifact is used:
Gradle:
```groovy
implementation 'dev.plexapi:plexapi:0.3.6'
implementation 'dev.plexapi:plexapi:0.4.0'
```
Maven:
@@ -45,7 +45,7 @@ Maven:
<dependency>
<groupId>dev.plexapi</groupId>
<artifactId>plexapi</artifactId>
<version>0.3.6</version>
<version>0.4.0</version>
</dependency>
```
@@ -73,43 +73,30 @@ gradlew.bat publishToMavenLocal -Pskip.signing
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -252,7 +239,7 @@ public class Application {
Certain parameters are configured globally. These parameters may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, These global values will be used as defaults on the operations that use them. When such operations are called, there is a place in each to override the global value, if needed.
For example, you can set `ClientID` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getServerResources`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
For example, you can set `ClientID` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
### Available Globals
@@ -277,50 +264,33 @@ This is used to track the client application and its usage
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.operations.GetServerResourcesResponse;
import dev.plexapi.sdk.models.operations.IncludeHttps;
import dev.plexapi.sdk.models.operations.IncludeIPv6;
import dev.plexapi.sdk.models.operations.IncludeRelay;
import dev.plexapi.sdk.models.errors.GetPinBadRequest;
import dev.plexapi.sdk.models.operations.GetPinRequest;
import dev.plexapi.sdk.models.operations.GetPinResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
public static void main(String[] args) throws GetPinBadRequest, Exception {
PlexAPI sdk = PlexAPI.builder()
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
GetPinRequest req = GetPinRequest.builder()
.build();
GetServerResourcesResponse res = sdk.plex().getServerResources()
.clientID("gcgzw5rz2xovp84b4vha3a40")
.includeHttps(IncludeHttps.ONE)
.includeRelay(IncludeRelay.ONE)
.includeIPv6(IncludeIPv6.ONE)
GetPinResponse res = sdk.plex().getPin()
.request(req)
.call();
if (res.plexDevices().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.authPinContainer().isPresent()) {
// handle response
}
}
}
```
@@ -343,43 +313,30 @@ Handling errors in this SDK should largely match your expectations. All operati
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -402,15 +359,16 @@ You can override the default server globally by passing a server index to the `s
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.serverIndex(0)
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
@@ -418,28 +376,14 @@ public class Application {
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -458,15 +402,16 @@ The default server can also be overridden globally by passing a URL to the `serv
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.serverURL("{protocol}://{ip}:{port}")
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
@@ -474,28 +419,14 @@ public class Application {
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -507,44 +438,31 @@ The server URL can also be overridden on a per-operation basis, provided a serve
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest;
import dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized;
import dev.plexapi.sdk.models.operations.GetCompanionsDataResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetCompanionsDataBadRequest, GetCompanionsDataUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetCompanionsDataResponse res = sdk.plex().getCompanionsData()
GetCompanionsDataResponse res = sdk.plex().getCompanionsData()
.serverURL("https://plex.tv/api/v2/")
.call();
if (res.responseBodies().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.responseBodies().isPresent()) {
// handle response
}
}
}
```
@@ -566,43 +484,30 @@ To authenticate with the API the `accessToken` parameter must be set when initia
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```

View File

@@ -69,3 +69,13 @@ Based on:
- [java v0.3.6] .
### Releases
- [Maven Central v0.3.6] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.3.6 - .
## 2024-09-21 00:24:14
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.401.2 (2.421.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.4.0] .
### Releases
- [Maven Central v0.4.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.4.0 - .

View File

@@ -3,43 +3,30 @@
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```

View File

@@ -63,7 +63,7 @@ tasks.withType(Javadoc) {
}
group = "dev.plexapi"
version = "0.3.6"
version = "0.4.0"
sourcesJar {
archiveBaseName = "plexapi"
@@ -101,7 +101,7 @@ publishing {
maven(MavenPublication) {
groupId = 'dev.plexapi'
artifactId = 'plexapi'
version = '0.3.6'
version = '0.4.0'
from components.java

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@ The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign aud
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -3,12 +3,12 @@
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `protocol` | *String* | :heavy_check_mark: | N/A |
| `address` | *String* | :heavy_check_mark: | N/A |
| `port` | *double* | :heavy_check_mark: | N/A |
| `uri` | *String* | :heavy_check_mark: | N/A |
| `local` | *boolean* | :heavy_check_mark: | N/A |
| `relay` | *boolean* | :heavy_check_mark: | N/A |
| `iPv6` | *boolean* | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
| `protocol` | [Protocol](../../models/operations/Protocol.md) | :heavy_check_mark: | The protocol used for the connection (http, https, etc) |
| `address` | *String* | :heavy_check_mark: | The (ip) address or domain name used for the connection |
| `port` | *int* | :heavy_check_mark: | The port used for the connection |
| `uri` | *String* | :heavy_check_mark: | The full URI of the connection |
| `local` | *boolean* | :heavy_check_mark: | If the connection is local address |
| `relay` | *boolean* | :heavy_check_mark: | If the connection is relayed through plex.direct |
| `iPv6` | *boolean* | :heavy_check_mark: | If the connection is using IPv6 |

View File

@@ -1,11 +1,11 @@
# DefaultSubtitleAccessibility
The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -5,7 +5,7 @@ The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -5,24 +5,24 @@
| Field | Type | Required | Description | Example |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `allowSync` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
| `art` | *Optional<String>* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
| `composite` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 |
| `filters` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
| `refreshing` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | false |
| `thumb` | *Optional<String>* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
| `key` | *Optional<String>* | :heavy_minus_sign: | N/A | 1 |
| `type` | *Optional<String>* | :heavy_minus_sign: | N/A | movie |
| `title` | *Optional<String>* | :heavy_minus_sign: | N/A | Movies |
| `agent` | *Optional<String>* | :heavy_minus_sign: | N/A | tv.plex.agents.movie |
| `scanner` | *Optional<String>* | :heavy_minus_sign: | N/A | Plex Movie |
| `language` | *Optional<String>* | :heavy_minus_sign: | N/A | en-US |
| `uuid` | *Optional<String>* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
| `updatedAt` | *Optional<Long>* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 |
| `createdAt` | *Optional<Long>* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 |
| `scannedAt` | *Optional<Long>* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 |
| `content` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
| `directory` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
| `contentChangedAt` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 3192854 |
| `hidden` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 0 |
| `location` | List<[Location](../../models/operations/Location.md)> | :heavy_minus_sign: | N/A | |
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | true |
| `art` | *String* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg |
| `composite` | *String* | :heavy_check_mark: | N/A | /library/sections/1/composite/1705615584 |
| `filters` | *boolean* | :heavy_check_mark: | N/A | true |
| `refreshing` | *boolean* | :heavy_check_mark: | N/A | false |
| `thumb` | *String* | :heavy_check_mark: | N/A | /:/resources/movie.png |
| `key` | *String* | :heavy_check_mark: | N/A | 1 |
| `type` | *String* | :heavy_check_mark: | N/A | movie |
| `title` | *String* | :heavy_check_mark: | N/A | Movies |
| `agent` | *String* | :heavy_check_mark: | N/A | tv.plex.agents.movie |
| `scanner` | *String* | :heavy_check_mark: | N/A | Plex Movie |
| `language` | *String* | :heavy_check_mark: | N/A | en-US |
| `uuid` | *String* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
| `updatedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `createdAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `scannedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `content` | *boolean* | :heavy_check_mark: | N/A | true |
| `directory` | *boolean* | :heavy_check_mark: | N/A | true |
| `contentChangedAt` | *int* | :heavy_check_mark: | N/A | 3192854 |
| `hidden` | *int* | :heavy_check_mark: | N/A | 0 |
| `location` | List<[Location](../../models/operations/Location.md)> | :heavy_check_mark: | N/A | |

View File

@@ -8,4 +8,4 @@
| `size` | *int* | :heavy_check_mark: | N/A | 5 |
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | false |
| `title1` | *String* | :heavy_check_mark: | N/A | Plex Library |
| `directory` | List<[GetAllLibrariesDirectory](../../models/operations/GetAllLibrariesDirectory.md)> | :heavy_minus_sign: | N/A | |
| `directory` | List<[GetAllLibrariesDirectory](../../models/operations/GetAllLibrariesDirectory.md)> | :heavy_check_mark: | N/A | |

View File

@@ -5,6 +5,6 @@ The libraries available on the Server
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `mediaContainer` | [Optional<GetAllLibrariesMediaContainer>](../../models/operations/GetAllLibrariesMediaContainer.md) | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `mediaContainer` | [GetAllLibrariesMediaContainer](../../models/operations/GetAllLibrariesMediaContainer.md) | :heavy_check_mark: | N/A |

View File

@@ -0,0 +1,11 @@
# GetLibraryItemsField
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `key` | *String* | :heavy_check_mark: | N/A | show.title |
| `title` | *String* | :heavy_check_mark: | N/A | Show Title |
| `type` | *String* | :heavy_check_mark: | N/A | string |
| `subType` | *Optional<String>* | :heavy_minus_sign: | N/A | rating |

View File

@@ -0,0 +1,9 @@
# GetLibraryItemsFieldType
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `type` | *String* | :heavy_check_mark: | N/A | tag |
| `operator` | List<[GetLibraryItemsOperator](../../models/operations/GetLibraryItemsOperator.md)> | :heavy_check_mark: | N/A | |

View File

@@ -0,0 +1,12 @@
# GetLibraryItemsFilter
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
| `filter` | *String* | :heavy_check_mark: | N/A | genre |
| `filterType` | *String* | :heavy_check_mark: | N/A | string |
| `key` | *String* | :heavy_check_mark: | N/A | /library/sections/2/genre?type=2 |
| `title` | *String* | :heavy_check_mark: | N/A | Genre |
| `type` | *String* | :heavy_check_mark: | N/A | filter |

View File

@@ -3,21 +3,22 @@
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `size` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 70 |
| `allowSync` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
| `art` | *Optional<String>* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
| `identifier` | *Optional<String>* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
| `librarySectionID` | [Optional<LibrarySectionID>](../../models/operations/LibrarySectionID.md) | :heavy_minus_sign: | N/A | |
| `librarySectionTitle` | *Optional<String>* | :heavy_minus_sign: | N/A | Movies |
| `librarySectionUUID` | *Optional<String>* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
| `mediaTagPrefix` | *Optional<String>* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ |
| `mediaTagVersion` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1701731894 |
| `thumb` | *Optional<String>* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
| `title1` | *Optional<String>* | :heavy_minus_sign: | N/A | Movies |
| `title2` | *Optional<String>* | :heavy_minus_sign: | N/A | Recently Released |
| `viewGroup` | *Optional<String>* | :heavy_minus_sign: | N/A | movie |
| `viewMode` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 65592 |
| `mixedParents` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
| `metadata` | List<[GetLibraryItemsMetadata](../../models/operations/GetLibraryItemsMetadata.md)> | :heavy_minus_sign: | N/A | |
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `size` | *int* | :heavy_check_mark: | N/A | 70 |
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | true |
| `art` | *String* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg |
| `identifier` | *String* | :heavy_check_mark: | N/A | com.plexapp.plugins.library |
| `librarySectionID` | [LibrarySectionID](../../models/operations/LibrarySectionID.md) | :heavy_check_mark: | N/A | |
| `librarySectionTitle` | *String* | :heavy_check_mark: | N/A | Movies |
| `librarySectionUUID` | *String* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
| `mediaTagPrefix` | *String* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ |
| `mediaTagVersion` | *int* | :heavy_check_mark: | N/A | 1701731894 |
| `thumb` | *String* | :heavy_check_mark: | N/A | /:/resources/movie.png |
| `title1` | *String* | :heavy_check_mark: | N/A | Movies |
| `title2` | *String* | :heavy_check_mark: | N/A | Recently Released |
| `viewGroup` | *String* | :heavy_check_mark: | N/A | movie |
| `viewMode` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 65592 |
| `mixedParents` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
| `metadata` | List<[GetLibraryItemsMetadata](../../models/operations/GetLibraryItemsMetadata.md)> | :heavy_minus_sign: | N/A | |
| `meta` | [Optional<Meta>](../../models/operations/Meta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/> | |

View File

@@ -5,21 +5,21 @@
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ratingKey` | *Optional<String>* | :heavy_minus_sign: | N/A | 58683 |
| `key` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683 |
| `guid` | *Optional<String>* | :heavy_minus_sign: | N/A | plex://movie/5d7768ba96b655001fdc0408 |
| `ratingKey` | *String* | :heavy_check_mark: | N/A | 58683 |
| `key` | *String* | :heavy_check_mark: | N/A | /library/metadata/58683 |
| `guid` | *String* | :heavy_check_mark: | N/A | plex://movie/5d7768ba96b655001fdc0408 |
| `studio` | *Optional<String>* | :heavy_minus_sign: | N/A | 20th Century Studios |
| `type` | *Optional<String>* | :heavy_minus_sign: | N/A | movie |
| `title` | *Optional<String>* | :heavy_minus_sign: | N/A | Avatar: The Way of Water |
| `type` | *String* | :heavy_check_mark: | N/A | movie |
| `title` | *String* | :heavy_check_mark: | N/A | Avatar: The Way of Water |
| `contentRating` | *Optional<String>* | :heavy_minus_sign: | N/A | PG-13 |
| `summary` | *Optional<String>* | :heavy_minus_sign: | N/A | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home. |
| `rating` | *Optional<Double>* | :heavy_minus_sign: | N/A | 7.6 |
| `audienceRating` | *Optional<Double>* | :heavy_minus_sign: | N/A | 9.2 |
| `year` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 2022 |
| `year` | *int* | :heavy_check_mark: | N/A | 2022 |
| `tagline` | *Optional<String>* | :heavy_minus_sign: | N/A | Return to Pandora. |
| `thumb` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
| `art` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
| `duration` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 11558112 |
| `duration` | *int* | :heavy_check_mark: | N/A | 11558112 |
| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC |
| `addedAt` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1680457607 |
| `updatedAt` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1703239236 |
@@ -34,12 +34,13 @@
| `grandparentThumb` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 |
| `grandparentArt` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 |
| `grandparentTheme` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |
| `media` | List<[GetLibraryItemsMedia](../../models/operations/GetLibraryItemsMedia.md)> | :heavy_minus_sign: | N/A | |
| `media` | List<[GetLibraryItemsMedia](../../models/operations/GetLibraryItemsMedia.md)> | :heavy_check_mark: | N/A | |
| `genre` | List<[GetLibraryItemsGenre](../../models/operations/GetLibraryItemsGenre.md)> | :heavy_minus_sign: | N/A | |
| `country` | List<[GetLibraryItemsCountry](../../models/operations/GetLibraryItemsCountry.md)> | :heavy_minus_sign: | N/A | |
| `director` | List<[GetLibraryItemsDirector](../../models/operations/GetLibraryItemsDirector.md)> | :heavy_minus_sign: | N/A | |
| `writer` | List<[GetLibraryItemsWriter](../../models/operations/GetLibraryItemsWriter.md)> | :heavy_minus_sign: | N/A | |
| `role` | List<[GetLibraryItemsRole](../../models/operations/GetLibraryItemsRole.md)> | :heavy_minus_sign: | N/A | |
| `mediaGuid` | List<[MediaGuid](../../models/operations/MediaGuid.md)> | :heavy_minus_sign: | The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.<br/> | |
| `titleSort` | *Optional<String>* | :heavy_minus_sign: | N/A | Whale |
| `viewCount` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1 |
| `lastViewedAt` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1682752242 |

View File

@@ -0,0 +1,9 @@
# GetLibraryItemsOperator
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `key` | *String* | :heavy_check_mark: | N/A | = |
| `title` | *String* | :heavy_check_mark: | N/A | is |

View File

@@ -0,0 +1,13 @@
# GetLibraryItemsSort
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- |
| `default_` | *Optional<String>* | :heavy_minus_sign: | N/A | asc |
| `defaultDirection` | *String* | :heavy_check_mark: | N/A | asc |
| `descKey` | *Optional<String>* | :heavy_minus_sign: | N/A | titleSort:desc |
| `firstCharacterKey` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/sections/2/firstCharacter |
| `key` | *String* | :heavy_check_mark: | N/A | titleSort |
| `title` | *String* | :heavy_check_mark: | N/A | Title |

View File

@@ -0,0 +1,14 @@
# GetLibraryItemsType
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `key` | *String* | :heavy_check_mark: | N/A | /library/sections/2/all?type=2 |
| `type` | *String* | :heavy_check_mark: | N/A | show |
| `title` | *String* | :heavy_check_mark: | N/A | TV Shows |
| `active` | *boolean* | :heavy_check_mark: | N/A | false |
| `filter` | List<[GetLibraryItemsFilter](../../models/operations/GetLibraryItemsFilter.md)> | :heavy_minus_sign: | N/A | |
| `sort` | List<[GetLibraryItemsSort](../../models/operations/GetLibraryItemsSort.md)> | :heavy_minus_sign: | N/A | |
| `field` | List<[GetLibraryItemsField](../../models/operations/GetLibraryItemsField.md)> | :heavy_minus_sign: | N/A | |

View File

@@ -3,11 +3,10 @@
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `strong` | *Optional<Boolean>* | :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/> | |
| `clientID` | *Optional<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 |
| `clientName` | *Optional<String>* | :heavy_minus_sign: | N/A | Plex Web |
| `deviceName` | *Optional<String>* | :heavy_minus_sign: | N/A | Linux |
| `clientVersion` | *Optional<String>* | :heavy_minus_sign: | N/A | 4.133.0 |
| `clientPlatform` | *Optional<String>* | :heavy_minus_sign: | N/A | Chrome |
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `strong` | *Optional<Boolean>* | :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/> | |
| `clientName` | *Optional<String>* | :heavy_minus_sign: | N/A | Plex Web |
| `deviceName` | *Optional<String>* | :heavy_minus_sign: | N/A | Linux |
| `clientVersion` | *Optional<String>* | :heavy_minus_sign: | N/A | 4.133.0 |
| `clientPlatform` | *Optional<String>* | :heavy_minus_sign: | N/A | Chrome |

View File

@@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season
## Values
| Name | Value |
| ------- | ------- |
| `ONE` | 1 |
| `TWO` | 2 |
| `THREE` | 3 |
| `FOUR` | 4 |
| Name | Value |
| --------- | --------- |
| `Movie` | 1 |
| `Show` | 2 |
| `Season` | 3 |
| `Episode` | 4 |

View File

@@ -3,9 +3,8 @@
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `clientID` | *Optional<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 |
| `includeHttps` | [Optional<IncludeHttps>](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
| `includeRelay` | [Optional<IncludeRelay>](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
| `includeIPv6` | [Optional<IncludeIPv6>](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `includeHttps` | [Optional<IncludeHttps>](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
| `includeRelay` | [Optional<IncludeRelay>](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
| `includeIPv6` | [Optional<IncludeIPv6>](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |

View File

@@ -3,7 +3,6 @@
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `clientID` | *Optional<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 |
| `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | |
| Field | Type | Required | Description |
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
| `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for |

View File

@@ -26,7 +26,7 @@ Logged in user details
| `homeAdmin` | *Optional<Boolean>* | :heavy_minus_sign: | If the account is the Plex Home admin | |
| `homeSize` | *int* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 |
| `id` | *int* | :heavy_check_mark: | The Plex account ID | 13692262 |
| `joinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 1556281940 |
| `joinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `locale` | *Optional<String>* | :heavy_check_mark: | The account locale | |
| `mailingListActive` | *Optional<Boolean>* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | |
| `mailingListStatus` | [MailingListStatus](../../models/operations/MailingListStatus.md) | :heavy_check_mark: | Your current mailing list status | |
@@ -34,7 +34,7 @@ Logged in user details
| ~~`pin`~~ | *Optional<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>[Might be removed] The hashed Plex Home PIN | |
| `profile` | [UserProfile](../../models/operations/UserProfile.md) | :heavy_check_mark: | N/A | |
| `protected_` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | |
| `rememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 1556281940 |
| `rememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `restricted` | *Optional<Boolean>* | :heavy_minus_sign: | If the account is a Plex Home managed user | |
| `roles` | List<*String*> | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | |
| `scrobbleTypes` | *String* | :heavy_check_mark: | Unknown | |

View File

@@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season
## Values
| Name | Value |
| ------- | ------- |
| `ONE` | 1 |
| `TWO` | 2 |
| `THREE` | 3 |
| `FOUR` | 4 |
| Name | Value |
| --------- | --------- |
| `Movie` | 1 |
| `Show` | 2 |
| `Season` | 3 |
| `Episode` | 4 |

View File

@@ -6,7 +6,7 @@ Adds the Guids object to the response
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -5,7 +5,7 @@ Include Https entries in the results
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -5,7 +5,7 @@ Include IPv6 entries in the results
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -6,7 +6,7 @@ Adds the Meta object to the response
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -7,7 +7,7 @@ E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -3,7 +3,7 @@
## Fields
| Field | Type | Required | Description | Example |
| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
| `id` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1 |
| `path` | *Optional<String>* | :heavy_minus_sign: | N/A | /movies |
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `id` | *int* | :heavy_check_mark: | N/A | 1 |
| `path` | *String* | :heavy_check_mark: | N/A | /movies |

View File

@@ -0,0 +1,8 @@
# MediaGuid
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `id` | *String* | :heavy_check_mark: | Can be one of the following formats:<br/>imdb://tt13015952, tmdb://2434012, tvdb://7945991<br/> | imdb://tt13015952 |

View File

@@ -1,9 +1,11 @@
# MediaReviewsVisibility
Whether or not the account has media reviews visibility enabled
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -0,0 +1,12 @@
# Meta
The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `type` | List<[GetLibraryItemsType](../../models/operations/GetLibraryItemsType.md)> | :heavy_minus_sign: | N/A |
| `fieldType` | List<[GetLibraryItemsFieldType](../../models/operations/GetLibraryItemsFieldType.md)> | :heavy_minus_sign: | N/A |

View File

@@ -3,29 +3,29 @@
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `name` | *String* | :heavy_check_mark: | N/A |
| `product` | *String* | :heavy_check_mark: | N/A |
| `productVersion` | *String* | :heavy_check_mark: | N/A |
| `platform` | *Optional<String>* | :heavy_check_mark: | N/A |
| `platformVersion` | *Optional<String>* | :heavy_check_mark: | N/A |
| `device` | *Optional<String>* | :heavy_check_mark: | N/A |
| `clientIdentifier` | *String* | :heavy_check_mark: | N/A |
| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A |
| `lastSeenAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A |
| `provides` | *String* | :heavy_check_mark: | N/A |
| `ownerId` | *Optional<Long>* | :heavy_check_mark: | ownerId is null when the device is owned by the token used to send the request |
| `sourceTitle` | *Optional<String>* | :heavy_check_mark: | N/A |
| `publicAddress` | *String* | :heavy_check_mark: | N/A |
| `accessToken` | *String* | :heavy_check_mark: | N/A |
| `owned` | *boolean* | :heavy_check_mark: | N/A |
| `home` | *boolean* | :heavy_check_mark: | N/A |
| `synced` | *boolean* | :heavy_check_mark: | N/A |
| `relay` | *boolean* | :heavy_check_mark: | N/A |
| `presence` | *boolean* | :heavy_check_mark: | N/A |
| `httpsRequired` | *boolean* | :heavy_check_mark: | N/A |
| `publicAddressMatches` | *boolean* | :heavy_check_mark: | N/A |
| `dnsRebindingProtection` | *boolean* | :heavy_check_mark: | N/A |
| `natLoopbackSupported` | *boolean* | :heavy_check_mark: | N/A |
| `connections` | List<[Connections](../../models/operations/Connections.md)> | :heavy_check_mark: | N/A |
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `name` | *String* | :heavy_check_mark: | N/A | |
| `product` | *String* | :heavy_check_mark: | N/A | |
| `productVersion` | *String* | :heavy_check_mark: | N/A | |
| `platform` | *Optional<String>* | :heavy_check_mark: | N/A | |
| `platformVersion` | *Optional<String>* | :heavy_check_mark: | N/A | |
| `device` | *Optional<String>* | :heavy_check_mark: | N/A | |
| `clientIdentifier` | *String* | :heavy_check_mark: | N/A | |
| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2019-06-24T11:38:02Z |
| `lastSeenAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2019-06-24T11:38:02Z |
| `provides` | *String* | :heavy_check_mark: | N/A | |
| `ownerId` | *Optional<Long>* | :heavy_check_mark: | ownerId is null when the device is owned by the token used to send the request | |
| `sourceTitle` | *Optional<String>* | :heavy_check_mark: | N/A | |
| `publicAddress` | *String* | :heavy_check_mark: | N/A | |
| `accessToken` | *String* | :heavy_check_mark: | N/A | |
| `owned` | *boolean* | :heavy_check_mark: | N/A | |
| `home` | *boolean* | :heavy_check_mark: | N/A | |
| `synced` | *boolean* | :heavy_check_mark: | N/A | |
| `relay` | *boolean* | :heavy_check_mark: | N/A | |
| `presence` | *boolean* | :heavy_check_mark: | N/A | |
| `httpsRequired` | *boolean* | :heavy_check_mark: | N/A | |
| `publicAddressMatches` | *boolean* | :heavy_check_mark: | N/A | |
| `dnsRebindingProtection` | *boolean* | :heavy_check_mark: | N/A | |
| `natLoopbackSupported` | *boolean* | :heavy_check_mark: | N/A | |
| `connections` | List<[Connections](../../models/operations/Connections.md)> | :heavy_check_mark: | N/A | |

View File

@@ -5,7 +5,7 @@ The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign aud
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -1,11 +1,11 @@
# PostUsersSignInDataDefaultSubtitleAccessibility
The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -5,7 +5,7 @@ The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -1,9 +1,11 @@
# PostUsersSignInDataMediaReviewsVisibility
Whether or not the account has media reviews visibility enabled
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -1,9 +0,0 @@
# PostUsersSignInDataRequest
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `clientID` | *Optional<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` | [Optional<PostUsersSignInDataRequestBody>](../../models/operations/PostUsersSignInDataRequestBody.md) | :heavy_minus_sign: | Login credentials | |

View File

@@ -26,7 +26,7 @@ Returns the user account data with a valid auth token
| `homeAdmin` | *Optional<Boolean>* | :heavy_minus_sign: | If the account is the Plex Home admin | |
| `homeSize` | *int* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 |
| `id` | *int* | :heavy_check_mark: | The Plex account ID | 13692262 |
| `joinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 1556281940 |
| `joinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `locale` | *Optional<String>* | :heavy_check_mark: | The account locale | |
| `mailingListActive` | *Optional<Boolean>* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | |
| `mailingListStatus` | [PostUsersSignInDataMailingListStatus](../../models/operations/PostUsersSignInDataMailingListStatus.md) | :heavy_check_mark: | Your current mailing list status | |
@@ -34,7 +34,7 @@ Returns the user account data with a valid auth token
| ~~`pin`~~ | *Optional<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>[Might be removed] The hashed Plex Home PIN | |
| `profile` | [PostUsersSignInDataUserProfile](../../models/operations/PostUsersSignInDataUserProfile.md) | :heavy_check_mark: | N/A | |
| `protected_` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | |
| `rememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 1556281940 |
| `rememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `restricted` | *Optional<Boolean>* | :heavy_minus_sign: | If the account is a Plex Home managed user | |
| `roles` | List<*String*> | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | |
| `scrobbleTypes` | *String* | :heavy_check_mark: | Unknown | |

View File

@@ -3,13 +3,13 @@
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `autoSelectAudio` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true |
| `defaultAudioLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred audio language for the account | ja |
| `defaultSubtitleLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred subtitle language for the account | en |
| `autoSelectSubtitle` | [Optional<PostUsersSignInDataAutoSelectSubtitle>](../../models/operations/PostUsersSignInDataAutoSelectSubtitle.md) | :heavy_minus_sign: | The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) | 1 |
| `defaultSubtitleAccessibility` | [Optional<PostUsersSignInDataDefaultSubtitleAccessibility>](../../models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.md) | :heavy_minus_sign: | The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) | 1 |
| `defaultSubtitleForced` | [Optional<PostUsersSignInDataDefaultSubtitleForced>](../../models/operations/PostUsersSignInDataDefaultSubtitleForced.md) | :heavy_minus_sign: | The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) | 0 |
| `watchedIndicator` | [Optional<PostUsersSignInDataWatchedIndicator>](../../models/operations/PostUsersSignInDataWatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 |
| `mediaReviewsVisibility` | [Optional<PostUsersSignInDataMediaReviewsVisibility>](../../models/operations/PostUsersSignInDataMediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 0 |
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `autoSelectAudio` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true |
| `defaultAudioLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred audio language for the account | ja |
| `defaultSubtitleLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred subtitle language for the account | en |
| `autoSelectSubtitle` | [Optional<PostUsersSignInDataAutoSelectSubtitle>](../../models/operations/PostUsersSignInDataAutoSelectSubtitle.md) | :heavy_minus_sign: | N/A | 1 |
| `defaultSubtitleAccessibility` | [Optional<PostUsersSignInDataDefaultSubtitleAccessibility>](../../models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.md) | :heavy_minus_sign: | N/A | 1 |
| `defaultSubtitleForced` | [Optional<PostUsersSignInDataDefaultSubtitleForced>](../../models/operations/PostUsersSignInDataDefaultSubtitleForced.md) | :heavy_minus_sign: | N/A | 1 |
| `watchedIndicator` | [Optional<PostUsersSignInDataWatchedIndicator>](../../models/operations/PostUsersSignInDataWatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 |
| `mediaReviewsVisibility` | [Optional<PostUsersSignInDataMediaReviewsVisibility>](../../models/operations/PostUsersSignInDataMediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 1 |

View File

@@ -1,9 +1,11 @@
# PostUsersSignInDataWatchedIndicator
Whether or not media watched indicators are enabled (little orange dot on media)
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -0,0 +1,11 @@
# Protocol
The protocol used for the connection (http, https, etc)
## Values
| Name | Value |
| ------- | ------- |
| `HTTP` | http |
| `HTTPS` | https |

View File

@@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season
## Values
| Name | Value |
| ------- | ------- |
| `ONE` | 1 |
| `TWO` | 2 |
| `THREE` | 3 |
| `FOUR` | 4 |
| Name | Value |
| --------- | --------- |
| `Movie` | 1 |
| `Show` | 2 |
| `Season` | 3 |
| `Episode` | 4 |

View File

@@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season
## Values
| Name | Value |
| ------- | ------- |
| `ONE` | 1 |
| `TWO` | 2 |
| `THREE` | 3 |
| `FOUR` | 4 |
| Name | Value |
| --------- | --------- |
| `Movie` | 1 |
| `Show` | 2 |
| `Season` | 3 |
| `Episode` | 4 |

View File

@@ -7,3 +7,4 @@
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
| `force` | [QueryParamForce](../../models/operations/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
| `sectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |

View File

@@ -3,13 +3,13 @@
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `autoSelectAudio` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true |
| `defaultAudioLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred audio language for the account | ja |
| `defaultSubtitleLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred subtitle language for the account | en |
| `autoSelectSubtitle` | [Optional<AutoSelectSubtitle>](../../models/operations/AutoSelectSubtitle.md) | :heavy_minus_sign: | The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) | 1 |
| `defaultSubtitleAccessibility` | [Optional<DefaultSubtitleAccessibility>](../../models/operations/DefaultSubtitleAccessibility.md) | :heavy_minus_sign: | The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) | 1 |
| `defaultSubtitleForced` | [Optional<DefaultSubtitleForced>](../../models/operations/DefaultSubtitleForced.md) | :heavy_minus_sign: | The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) | 0 |
| `watchedIndicator` | [Optional<WatchedIndicator>](../../models/operations/WatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 |
| `mediaReviewsVisibility` | [Optional<MediaReviewsVisibility>](../../models/operations/MediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 0 |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `autoSelectAudio` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true |
| `defaultAudioLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred audio language for the account | ja |
| `defaultSubtitleLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred subtitle language for the account | en |
| `autoSelectSubtitle` | [Optional<AutoSelectSubtitle>](../../models/operations/AutoSelectSubtitle.md) | :heavy_minus_sign: | N/A | 1 |
| `defaultSubtitleAccessibility` | [Optional<DefaultSubtitleAccessibility>](../../models/operations/DefaultSubtitleAccessibility.md) | :heavy_minus_sign: | N/A | 1 |
| `defaultSubtitleForced` | [Optional<DefaultSubtitleForced>](../../models/operations/DefaultSubtitleForced.md) | :heavy_minus_sign: | N/A | 1 |
| `watchedIndicator` | [Optional<WatchedIndicator>](../../models/operations/WatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 |
| `mediaReviewsVisibility` | [Optional<MediaReviewsVisibility>](../../models/operations/MediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 1 |

View File

@@ -1,9 +1,11 @@
# WatchedIndicator
Whether or not media watched indicators are enabled (little orange dot on media)
## Values
| Name | Value |
| ------ | ------ |
| `ZERO` | 0 |
| `ONE` | 1 |
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -27,43 +27,30 @@ Get Server Activities
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerActivitiesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerActivitiesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerActivitiesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerActivitiesBadRequest, GetServerActivitiesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerActivitiesResponse res = sdk.activities().getServerActivities()
GetServerActivitiesResponse res = sdk.activities().getServerActivities()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerActivitiesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerActivitiesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -91,42 +78,29 @@ Cancel Server Activities
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.CancelServerActivitiesBadRequest;
import dev.plexapi.sdk.models.errors.CancelServerActivitiesUnauthorized;
import dev.plexapi.sdk.models.operations.CancelServerActivitiesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws CancelServerActivitiesBadRequest, CancelServerActivitiesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
CancelServerActivitiesResponse res = sdk.activities().cancelServerActivities()
CancelServerActivitiesResponse res = sdk.activities().cancelServerActivities()
.activityUUID("25b71ed5-0f9d-461c-baa7-d404e9e10d3e")
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.CancelServerActivitiesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.CancelServerActivitiesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```

View File

@@ -24,7 +24,8 @@ This endpoint provides the caller with a temporary token with the same access le
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetTransientTokenBadRequest;
import dev.plexapi.sdk.models.errors.GetTransientTokenUnauthorized;
import dev.plexapi.sdk.models.operations.GetTransientTokenQueryParamType;
import dev.plexapi.sdk.models.operations.GetTransientTokenResponse;
import dev.plexapi.sdk.models.operations.Scope;
@@ -32,37 +33,23 @@ import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetTransientTokenBadRequest, GetTransientTokenUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetTransientTokenResponse res = sdk.authentication().getTransientToken()
GetTransientTokenResponse res = sdk.authentication().getTransientToken()
.type(GetTransientTokenQueryParamType.DELEGATION)
.scope(Scope.ALL)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.GetTransientTokenBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetTransientTokenUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -99,42 +86,29 @@ Note: requires Plex Media Server >= 1.15.4.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationBadRequest;
import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationUnauthorized;
import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetSourceConnectionInformationBadRequest, GetSourceConnectionInformationUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation()
.source("server://client-identifier")
GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation()
.source("provider://provider-identifier")
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.GetSourceConnectionInformationBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetSourceConnectionInformationUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -168,43 +142,30 @@ Get the User data from the provided X-Plex-Token
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetTokenDetailsBadRequest;
import dev.plexapi.sdk.models.errors.GetTokenDetailsUnauthorized;
import dev.plexapi.sdk.models.operations.GetTokenDetailsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetTokenDetailsBadRequest, GetTokenDetailsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetTokenDetailsResponse res = sdk.authentication().getTokenDetails()
GetTokenDetailsResponse res = sdk.authentication().getTokenDetails()
.call();
if (res.userPlexAccount().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetTokenDetailsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetTokenDetailsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.userPlexAccount().isPresent()) {
// handle response
}
}
}
```
@@ -238,60 +199,47 @@ Sign in user with username and password and return user data with Plex authentic
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.PostUsersSignInDataBadRequest;
import dev.plexapi.sdk.models.errors.PostUsersSignInDataUnauthorized;
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody;
import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws PostUsersSignInDataBadRequest, PostUsersSignInDataUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
PostUsersSignInDataRequestBody req = PostUsersSignInDataRequestBody.builder()
.login("username@email.com")
.password("password123")
.verificationCode("123456")
.build();
PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData()
.clientID("gcgzw5rz2xovp84b4vha3a40")
.requestBody(PostUsersSignInDataRequestBody.builder()
.login("username@email.com")
.password("password123")
.verificationCode("123456")
.build())
PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData()
.request(req)
.call();
if (res.userPlexAccount().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.PostUsersSignInDataBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.PostUsersSignInDataUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.userPlexAccount().isPresent()) {
// handle response
}
}
}
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `clientID` | *Optional<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` | [Optional<PostUsersSignInDataRequestBody>](../../models/operations/PostUsersSignInDataRequestBody.md) | :heavy_minus_sign: | Login credentials | |
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `request` | [PostUsersSignInDataRequestBody](../../models/operations/PostUsersSignInDataRequestBody.md) | :heavy_check_mark: | The request object to use for the request. |
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. |
### Response

View File

@@ -24,43 +24,30 @@ Returns a list of butler tasks
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetButlerTasksBadRequest;
import dev.plexapi.sdk.models.errors.GetButlerTasksUnauthorized;
import dev.plexapi.sdk.models.operations.GetButlerTasksResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetButlerTasksBadRequest, GetButlerTasksUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetButlerTasksResponse res = sdk.butler().getButlerTasks()
GetButlerTasksResponse res = sdk.butler().getButlerTasks()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetButlerTasksBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetButlerTasksUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -93,41 +80,28 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.StartAllTasksBadRequest;
import dev.plexapi.sdk.models.errors.StartAllTasksUnauthorized;
import dev.plexapi.sdk.models.operations.StartAllTasksResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws StartAllTasksBadRequest, StartAllTasksUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
StartAllTasksResponse res = sdk.butler().startAllTasks()
StartAllTasksResponse res = sdk.butler().startAllTasks()
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.StartAllTasksBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.StartAllTasksUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -156,41 +130,28 @@ This endpoint will stop all currently running tasks and remove any scheduled tas
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.StopAllTasksBadRequest;
import dev.plexapi.sdk.models.errors.StopAllTasksUnauthorized;
import dev.plexapi.sdk.models.operations.StopAllTasksResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws StopAllTasksBadRequest, StopAllTasksUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
StopAllTasksResponse res = sdk.butler().stopAllTasks()
StopAllTasksResponse res = sdk.butler().stopAllTasks()
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.StopAllTasksBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.StopAllTasksUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -223,43 +184,30 @@ This endpoint will attempt to start a single Butler task that is enabled in the
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.StartTaskBadRequest;
import dev.plexapi.sdk.models.errors.StartTaskUnauthorized;
import dev.plexapi.sdk.models.operations.StartTaskResponse;
import dev.plexapi.sdk.models.operations.TaskName;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws StartTaskBadRequest, StartTaskUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
StartTaskResponse res = sdk.butler().startTask()
StartTaskResponse res = sdk.butler().startTask()
.taskName(TaskName.CLEAN_OLD_BUNDLES)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.StartTaskBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.StartTaskUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -294,43 +242,30 @@ This endpoint will stop a currently running task by name, or remove it from the
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.StopTaskBadRequest;
import dev.plexapi.sdk.models.errors.StopTaskUnauthorized;
import dev.plexapi.sdk.models.operations.PathParamTaskName;
import dev.plexapi.sdk.models.operations.StopTaskResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws StopTaskBadRequest, StopTaskUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
StopTaskResponse res = sdk.butler().stopTask()
StopTaskResponse res = sdk.butler().stopTask()
.taskName(PathParamTaskName.BACKUP_DATABASE)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.StopTaskBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.StopTaskUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```

View File

@@ -21,46 +21,33 @@ Get Global Hubs filtered by the parameters provided.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest;
import dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized;
import dev.plexapi.sdk.models.operations.GetGlobalHubsResponse;
import dev.plexapi.sdk.models.operations.OnlyTransient;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetGlobalHubsBadRequest, GetGlobalHubsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs()
GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs()
.count(1262.49d)
.onlyTransient(OnlyTransient.ONE)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -96,47 +83,34 @@ This endpoint will return a list of library specific hubs
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetLibraryHubsBadRequest;
import dev.plexapi.sdk.models.errors.GetLibraryHubsUnauthorized;
import dev.plexapi.sdk.models.operations.GetLibraryHubsResponse;
import dev.plexapi.sdk.models.operations.QueryParamOnlyTransient;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetLibraryHubsBadRequest, GetLibraryHubsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs()
GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs()
.sectionId(6728.76d)
.count(9010.22d)
.onlyTransient(QueryParamOnlyTransient.ZERO)
.count(639.24d)
.onlyTransient(QueryParamOnlyTransient.ONE)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetLibraryHubsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetLibraryHubsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```

View File

@@ -31,43 +31,30 @@ This resource returns hash values for local files
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetFileHashBadRequest;
import dev.plexapi.sdk.models.errors.GetFileHashUnauthorized;
import dev.plexapi.sdk.models.operations.GetFileHashResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetFileHashBadRequest, GetFileHashUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetFileHashResponse res = sdk.library().getFileHash()
GetFileHashResponse res = sdk.library().getFileHash()
.url("file://C:\Image.png&type=13")
.type(4462.17d)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.GetFileHashBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetFileHashUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -103,45 +90,32 @@ This endpoint will return the recently added content.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetRecentlyAddedBadRequest;
import dev.plexapi.sdk.models.errors.GetRecentlyAddedUnauthorized;
import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetRecentlyAddedBadRequest, GetRecentlyAddedUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetRecentlyAddedResponse res = sdk.library().getRecentlyAdded()
GetRecentlyAddedResponse res = sdk.library().getRecentlyAdded()
.xPlexContainerStart(0)
.xPlexContainerSize(50)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetRecentlyAddedBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetRecentlyAddedUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -182,43 +156,30 @@ This allows a client to provide a rich interface around the media (e.g. allow so
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetAllLibrariesBadRequest;
import dev.plexapi.sdk.models.errors.GetAllLibrariesUnauthorized;
import dev.plexapi.sdk.models.operations.GetAllLibrariesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetAllLibrariesBadRequest, GetAllLibrariesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetAllLibrariesResponse res = sdk.library().getAllLibraries()
GetAllLibrariesResponse res = sdk.library().getAllLibraries()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetAllLibrariesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetAllLibrariesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -285,46 +246,33 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest;
import dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized;
import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse;
import dev.plexapi.sdk.models.operations.IncludeDetails;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetLibraryDetailsBadRequest, GetLibraryDetailsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetLibraryDetailsResponse res = sdk.library().getLibraryDetails()
GetLibraryDetailsResponse res = sdk.library().getLibraryDetails()
.sectionKey(9518)
.includeDetails(IncludeDetails.ZERO)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -359,42 +307,29 @@ Delete a library using a specific section id
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.DeleteLibraryBadRequest;
import dev.plexapi.sdk.models.errors.DeleteLibraryUnauthorized;
import dev.plexapi.sdk.models.operations.DeleteLibraryResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws DeleteLibraryBadRequest, DeleteLibraryUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
DeleteLibraryResponse res = sdk.library().deleteLibrary()
DeleteLibraryResponse res = sdk.library().deleteLibrary()
.sectionKey(9518)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.DeleteLibraryBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.DeleteLibraryUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -448,7 +383,8 @@ Fetches details from a specific section of the library identified by a section k
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetLibraryItemsBadRequest;
import dev.plexapi.sdk.models.errors.GetLibraryItemsUnauthorized;
import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest;
import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse;
import dev.plexapi.sdk.models.operations.IncludeGuids;
@@ -459,48 +395,34 @@ import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetLibraryItemsBadRequest, GetLibraryItemsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetLibraryItemsRequest req = GetLibraryItemsRequest.builder()
GetLibraryItemsRequest req = GetLibraryItemsRequest.builder()
.sectionKey(9518)
.tag(Tag.EDITION)
.type(Type.TWO)
.includeGuids(IncludeGuids.ONE)
.includeMeta(IncludeMeta.ONE)
.type(Type.Show)
.includeGuids(IncludeGuids.Enable)
.includeMeta(IncludeMeta.Enable)
.xPlexContainerStart(0)
.xPlexContainerSize(50)
.build();
GetLibraryItemsResponse res = sdk.library().getLibraryItems()
GetLibraryItemsResponse res = sdk.library().getLibraryItems()
.request(req)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetLibraryItemsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetLibraryItemsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -535,44 +457,31 @@ This endpoint Refreshes all the Metadata of the library.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataBadRequest;
import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataUnauthorized;
import dev.plexapi.sdk.models.operations.Force;
import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetRefreshLibraryMetadataBadRequest, GetRefreshLibraryMetadataUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetRefreshLibraryMetadataResponse res = sdk.library().getRefreshLibraryMetadata()
GetRefreshLibraryMetadataResponse res = sdk.library().getRefreshLibraryMetadata()
.sectionKey(9518)
.force(Force.ONE)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -625,46 +534,33 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetSearchLibraryBadRequest;
import dev.plexapi.sdk.models.errors.GetSearchLibraryUnauthorized;
import dev.plexapi.sdk.models.operations.GetSearchLibraryResponse;
import dev.plexapi.sdk.models.operations.QueryParamType;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetSearchLibraryBadRequest, GetSearchLibraryUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetSearchLibraryResponse res = sdk.library().getSearchLibrary()
GetSearchLibraryResponse res = sdk.library().getSearchLibrary()
.sectionKey(9518)
.type(QueryParamType.TWO)
.type(QueryParamType.Show)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetSearchLibraryBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetSearchLibraryUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -700,44 +596,31 @@ This endpoint will return the metadata of a library item specified with the rati
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyBadRequest;
import dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyUnauthorized;
import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetMetaDataByRatingKeyBadRequest, GetMetaDataByRatingKeyUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetMetaDataByRatingKeyResponse res = sdk.library().getMetaDataByRatingKey()
GetMetaDataByRatingKeyResponse res = sdk.library().getMetaDataByRatingKey()
.ratingKey(9518L)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -772,45 +655,32 @@ This endpoint will return the children of of a library item specified with the r
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetMetadataChildrenBadRequest;
import dev.plexapi.sdk.models.errors.GetMetadataChildrenUnauthorized;
import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetMetadataChildrenBadRequest, GetMetadataChildrenUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetMetadataChildrenResponse res = sdk.library().getMetadataChildren()
.ratingKey(1539.14d)
GetMetadataChildrenResponse res = sdk.library().getMetadataChildren()
.ratingKey(1539.15d)
.includeElements("<value>")
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetMetadataChildrenBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetMetadataChildrenUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -846,46 +716,33 @@ This endpoint will return the top watched content from libraries of a certain ty
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetTopWatchedContentBadRequest;
import dev.plexapi.sdk.models.errors.GetTopWatchedContentUnauthorized;
import dev.plexapi.sdk.models.operations.GetTopWatchedContentQueryParamType;
import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetTopWatchedContentBadRequest, GetTopWatchedContentUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent()
.type(GetTopWatchedContentQueryParamType.TWO)
GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent()
.type(GetTopWatchedContentQueryParamType.Show)
.includeGuids(1L)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetTopWatchedContentBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetTopWatchedContentUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -921,43 +778,30 @@ This endpoint will return the on deck content.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetOnDeckBadRequest;
import dev.plexapi.sdk.models.errors.GetOnDeckUnauthorized;
import dev.plexapi.sdk.models.operations.GetOnDeckResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetOnDeckBadRequest, GetOnDeckUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetOnDeckResponse res = sdk.library().getOnDeck()
GetOnDeckResponse res = sdk.library().getOnDeck()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetOnDeckBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetOnDeckUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```

View File

@@ -23,45 +23,32 @@ This endpoint will write a single-line log message, including a level and source
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.LogLineBadRequest;
import dev.plexapi.sdk.models.errors.LogLineUnauthorized;
import dev.plexapi.sdk.models.operations.Level;
import dev.plexapi.sdk.models.operations.LogLineResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws LogLineBadRequest, LogLineUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
LogLineResponse res = sdk.log().logLine()
LogLineResponse res = sdk.log().logLine()
.level(Level.THREE)
.message("Test log message")
.source("Postman")
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.LogLineBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.LogLineUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -118,46 +105,33 @@ Ensure each parameter is properly URL-encoded to avoid interpretation issues.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.LogMultiLineBadRequest;
import dev.plexapi.sdk.models.errors.LogMultiLineUnauthorized;
import dev.plexapi.sdk.models.operations.LogMultiLineResponse;
import java.lang.Exception;
import java.lang.String;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws LogMultiLineBadRequest, LogMultiLineUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
String req = "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman
String req = "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman
level=1&message=Test%20message%203&source=postman";
LogMultiLineResponse res = sdk.log().logMultiLine()
LogMultiLineResponse res = sdk.log().logMultiLine()
.request(req)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.LogMultiLineBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.LogMultiLineUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -192,41 +166,28 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.EnablePaperTrailBadRequest;
import dev.plexapi.sdk.models.errors.EnablePaperTrailUnauthorized;
import dev.plexapi.sdk.models.operations.EnablePaperTrailResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws EnablePaperTrailBadRequest, EnablePaperTrailUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
EnablePaperTrailResponse res = sdk.log().enablePaperTrail()
EnablePaperTrailResponse res = sdk.log().enablePaperTrail()
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.EnablePaperTrailBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.EnablePaperTrailUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```

View File

@@ -24,42 +24,29 @@ This will mark the provided media key as Played.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.MarkPlayedBadRequest;
import dev.plexapi.sdk.models.errors.MarkPlayedUnauthorized;
import dev.plexapi.sdk.models.operations.MarkPlayedResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws MarkPlayedBadRequest, MarkPlayedUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
MarkPlayedResponse res = sdk.media().markPlayed()
MarkPlayedResponse res = sdk.media().markPlayed()
.key(59398d)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.MarkPlayedBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.MarkPlayedUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -93,42 +80,29 @@ This will mark the provided media key as Unplayed.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.MarkUnplayedBadRequest;
import dev.plexapi.sdk.models.errors.MarkUnplayedUnauthorized;
import dev.plexapi.sdk.models.operations.MarkUnplayedResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws MarkUnplayedBadRequest, MarkUnplayedUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
MarkUnplayedResponse res = sdk.media().markUnplayed()
MarkUnplayedResponse res = sdk.media().markUnplayed()
.key(59398d)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.MarkUnplayedBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.MarkUnplayedUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -163,44 +137,31 @@ This API command can be used to update the play progress of a media item.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.UpdatePlayProgressBadRequest;
import dev.plexapi.sdk.models.errors.UpdatePlayProgressUnauthorized;
import dev.plexapi.sdk.models.operations.UpdatePlayProgressResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws UpdatePlayProgressBadRequest, UpdatePlayProgressUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
UpdatePlayProgressResponse res = sdk.media().updatePlayProgress()
UpdatePlayProgressResponse res = sdk.media().updatePlayProgress()
.key("<key>")
.time(90000d)
.state("played")
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.UpdatePlayProgressBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.UpdatePlayProgressUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -236,25 +197,26 @@ Gets the banner image of the media item
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetBannerImageBadRequest;
import dev.plexapi.sdk.models.errors.GetBannerImageUnauthorized;
import dev.plexapi.sdk.models.operations.GetBannerImageRequest;
import dev.plexapi.sdk.models.operations.GetBannerImageResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetBannerImageBadRequest, GetBannerImageUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetBannerImageRequest req = GetBannerImageRequest.builder()
GetBannerImageRequest req = GetBannerImageRequest.builder()
.ratingKey(9518L)
.width(396L)
.height(396L)
@@ -263,27 +225,13 @@ public class Application {
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
.build();
GetBannerImageResponse res = sdk.media().getBannerImage()
GetBannerImageResponse res = sdk.media().getBannerImage()
.request(req)
.call();
if (res.responseStream().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetBannerImageBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetBannerImageUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.responseStream().isPresent()) {
// handle response
}
}
}
```
@@ -317,25 +265,26 @@ Gets the thumbnail image of the media item
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetThumbImageBadRequest;
import dev.plexapi.sdk.models.errors.GetThumbImageUnauthorized;
import dev.plexapi.sdk.models.operations.GetThumbImageRequest;
import dev.plexapi.sdk.models.operations.GetThumbImageResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetThumbImageBadRequest, GetThumbImageUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetThumbImageRequest req = GetThumbImageRequest.builder()
GetThumbImageRequest req = GetThumbImageRequest.builder()
.ratingKey(9518L)
.width(396L)
.height(396L)
@@ -344,27 +293,13 @@ public class Application {
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
.build();
GetThumbImageResponse res = sdk.media().getThumbImage()
GetThumbImageResponse res = sdk.media().getThumbImage()
.request(req)
.call();
if (res.responseStream().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetThumbImageBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetThumbImageUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.responseStream().isPresent()) {
// handle response
}
}
}
```

View File

@@ -34,7 +34,8 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.CreatePlaylistBadRequest;
import dev.plexapi.sdk.models.errors.CreatePlaylistUnauthorized;
import dev.plexapi.sdk.models.operations.CreatePlaylistQueryParamType;
import dev.plexapi.sdk.models.operations.CreatePlaylistRequest;
import dev.plexapi.sdk.models.operations.CreatePlaylistResponse;
@@ -43,45 +44,31 @@ import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws CreatePlaylistBadRequest, CreatePlaylistUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
CreatePlaylistRequest req = CreatePlaylistRequest.builder()
CreatePlaylistRequest req = CreatePlaylistRequest.builder()
.title("<value>")
.type(CreatePlaylistQueryParamType.PHOTO)
.smart(Smart.ONE)
.uri("https://inborn-brochure.biz")
.uri("https://hoarse-testing.info/")
.build();
CreatePlaylistResponse res = sdk.playlists().createPlaylist()
CreatePlaylistResponse res = sdk.playlists().createPlaylist()
.request(req)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.CreatePlaylistBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.CreatePlaylistUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -115,7 +102,8 @@ Get All Playlists given the specified filters.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetPlaylistsBadRequest;
import dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized;
import dev.plexapi.sdk.models.operations.GetPlaylistsResponse;
import dev.plexapi.sdk.models.operations.PlaylistType;
import dev.plexapi.sdk.models.operations.QueryParamSmart;
@@ -123,39 +111,25 @@ import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetPlaylistsBadRequest, GetPlaylistsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetPlaylistsResponse res = sdk.playlists().getPlaylists()
GetPlaylistsResponse res = sdk.playlists().getPlaylists()
.playlistType(PlaylistType.AUDIO)
.smart(QueryParamSmart.ZERO)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetPlaylistsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -192,44 +166,31 @@ Smart playlist details contain the `content` attribute. This is the content URI
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetPlaylistBadRequest;
import dev.plexapi.sdk.models.errors.GetPlaylistUnauthorized;
import dev.plexapi.sdk.models.operations.GetPlaylistResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetPlaylistBadRequest, GetPlaylistUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetPlaylistResponse res = sdk.playlists().getPlaylist()
GetPlaylistResponse res = sdk.playlists().getPlaylist()
.playlistID(4109.48d)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetPlaylistBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetPlaylistUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -264,42 +225,29 @@ This endpoint will delete a playlist
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.DeletePlaylistBadRequest;
import dev.plexapi.sdk.models.errors.DeletePlaylistUnauthorized;
import dev.plexapi.sdk.models.operations.DeletePlaylistResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws DeletePlaylistBadRequest, DeletePlaylistUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
DeletePlaylistResponse res = sdk.playlists().deletePlaylist()
DeletePlaylistResponse res = sdk.playlists().deletePlaylist()
.playlistID(216.22d)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.DeletePlaylistBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.DeletePlaylistUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -334,44 +282,31 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.UpdatePlaylistBadRequest;
import dev.plexapi.sdk.models.errors.UpdatePlaylistUnauthorized;
import dev.plexapi.sdk.models.operations.UpdatePlaylistResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws UpdatePlaylistBadRequest, UpdatePlaylistUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
UpdatePlaylistResponse res = sdk.playlists().updatePlaylist()
.playlistID(3915d)
UpdatePlaylistResponse res = sdk.playlists().updatePlaylist()
.playlistID(3915.00d)
.title("<value>")
.summary("<value>")
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.UpdatePlaylistBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.UpdatePlaylistUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -411,46 +346,33 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetPlaylistContentsBadRequest;
import dev.plexapi.sdk.models.errors.GetPlaylistContentsUnauthorized;
import dev.plexapi.sdk.models.operations.GetPlaylistContentsQueryParamType;
import dev.plexapi.sdk.models.operations.GetPlaylistContentsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetPlaylistContentsBadRequest, GetPlaylistContentsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents()
GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents()
.playlistID(5004.46d)
.type(GetPlaylistContentsQueryParamType.TWO)
.type(GetPlaylistContentsQueryParamType.Show)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetPlaylistContentsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetPlaylistContentsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -486,42 +408,29 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.ClearPlaylistContentsBadRequest;
import dev.plexapi.sdk.models.errors.ClearPlaylistContentsUnauthorized;
import dev.plexapi.sdk.models.operations.ClearPlaylistContentsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws ClearPlaylistContentsBadRequest, ClearPlaylistContentsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents()
ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents()
.playlistID(1893.18d)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.ClearPlaylistContentsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.ClearPlaylistContentsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -557,46 +466,33 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.AddPlaylistContentsBadRequest;
import dev.plexapi.sdk.models.errors.AddPlaylistContentsUnauthorized;
import dev.plexapi.sdk.models.operations.AddPlaylistContentsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws AddPlaylistContentsBadRequest, AddPlaylistContentsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents()
.playlistID(8502.01d)
AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents()
.playlistID(8502.00d)
.uri("server://12345/com.plexapp.plugins.library/library/metadata/1")
.playQueueID(123d)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.AddPlaylistContentsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.AddPlaylistContentsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -633,44 +529,32 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.UploadPlaylistBadRequest;
import dev.plexapi.sdk.models.errors.UploadPlaylistUnauthorized;
import dev.plexapi.sdk.models.operations.QueryParamForce;
import dev.plexapi.sdk.models.operations.UploadPlaylistResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws UploadPlaylistBadRequest, UploadPlaylistUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
UploadPlaylistResponse res = sdk.playlists().uploadPlaylist()
UploadPlaylistResponse res = sdk.playlists().uploadPlaylist()
.path("/home/barkley/playlist.m3u")
.force(QueryParamForce.ZERO)
.sectionID(1L)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.UploadPlaylistBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.UploadPlaylistUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -681,6 +565,7 @@ public class Application {
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
| `force` | [QueryParamForce](../../models/operations/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
| `sectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
### Response

View File

@@ -26,43 +26,30 @@ Get Companions Data
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest;
import dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized;
import dev.plexapi.sdk.models.operations.GetCompanionsDataResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetCompanionsDataBadRequest, GetCompanionsDataUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetCompanionsDataResponse res = sdk.plex().getCompanionsData()
GetCompanionsDataResponse res = sdk.plex().getCompanionsData()
.call();
if (res.responseBodies().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.responseBodies().isPresent()) {
// handle response
}
}
}
```
@@ -96,43 +83,30 @@ Get friends of provided auth token.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetUserFriendsBadRequest;
import dev.plexapi.sdk.models.errors.GetUserFriendsUnauthorized;
import dev.plexapi.sdk.models.operations.GetUserFriendsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetUserFriendsBadRequest, GetUserFriendsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetUserFriendsResponse res = sdk.plex().getUserFriends()
GetUserFriendsResponse res = sdk.plex().getUserFriends()
.call();
if (res.friends().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetUserFriendsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetUserFriendsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.friends().isPresent()) {
// handle response
}
}
}
```
@@ -166,42 +140,29 @@ Returns the geolocation and locale data of the caller
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetGeoDataBadRequest;
import dev.plexapi.sdk.models.errors.GetGeoDataUnauthorized;
import dev.plexapi.sdk.models.operations.GetGeoDataResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetGeoDataBadRequest, GetGeoDataUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetGeoDataResponse res = sdk.plex().getGeoData()
GetGeoDataResponse res = sdk.plex().getGeoData()
.call();
if (res.geoData().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetGeoDataBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetGeoDataUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.geoData().isPresent()) {
// handle response
}
}
}
```
@@ -235,43 +196,30 @@ Retrieves the home data for the authenticated user, including details like home
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetHomeDataBadRequest;
import dev.plexapi.sdk.models.errors.GetHomeDataUnauthorized;
import dev.plexapi.sdk.models.operations.GetHomeDataResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetHomeDataBadRequest, GetHomeDataUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetHomeDataResponse res = sdk.plex().getHomeData()
GetHomeDataResponse res = sdk.plex().getHomeData()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetHomeDataBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetHomeDataUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -299,7 +247,8 @@ Get Plex server access tokens and server connections
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerResourcesResponse;
import dev.plexapi.sdk.models.operations.IncludeHttps;
import dev.plexapi.sdk.models.operations.IncludeIPv6;
@@ -308,54 +257,38 @@ import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerResourcesBadRequest, GetServerResourcesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerResourcesResponse res = sdk.plex().getServerResources()
.clientID("gcgzw5rz2xovp84b4vha3a40")
.includeHttps(IncludeHttps.ONE)
.includeRelay(IncludeRelay.ONE)
.includeIPv6(IncludeIPv6.ONE)
GetServerResourcesResponse res = sdk.plex().getServerResources()
.includeHttps(IncludeHttps.Enable)
.includeRelay(IncludeRelay.Enable)
.includeIPv6(IncludeIPv6.Enable)
.call();
if (res.plexDevices().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.plexDevices().isPresent()) {
// handle response
}
}
}
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `clientID` | *Optional<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 |
| `includeHttps` | [Optional<IncludeHttps>](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
| `includeRelay` | [Optional<IncludeRelay>](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
| `includeIPv6` | [Optional<IncludeIPv6>](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `includeHttps` | [Optional<IncludeHttps>](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
| `includeRelay` | [Optional<IncludeRelay>](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
| `includeIPv6` | [Optional<IncludeIPv6>](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
### Response
@@ -380,44 +313,33 @@ Retrieve a Pin ID from Plex.tv to use for authentication flows
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetPinBadRequest;
import dev.plexapi.sdk.models.operations.GetPinRequest;
import dev.plexapi.sdk.models.operations.GetPinResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetPinBadRequest, Exception {
PlexAPI sdk = PlexAPI.builder()
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
GetPinRequest req = GetPinRequest.builder()
.build();
GetPinRequest req = GetPinRequest.builder()
.build();
GetPinResponse res = sdk.plex().getPin()
GetPinResponse res = sdk.plex().getPin()
.request(req)
.call();
if (res.authPinContainer().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetPinBadRequest e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.authPinContainer().isPresent()) {
// handle response
}
}
}
```
@@ -451,55 +373,40 @@ Retrieve an Access Token from Plex.tv after the Pin has been authenticated
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetTokenByPinIdBadRequest;
import dev.plexapi.sdk.models.errors.GetTokenByPinIdResponseBody;
import dev.plexapi.sdk.models.operations.GetTokenByPinIdResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetTokenByPinIdBadRequest, GetTokenByPinIdResponseBody, Exception {
PlexAPI sdk = PlexAPI.builder()
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId()
.clientID("gcgzw5rz2xovp84b4vha3a40")
GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId()
.pinID(408895L)
.call();
if (res.authPinContainer().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetTokenByPinIdBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetTokenByPinIdResponseBody e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.authPinContainer().isPresent()) {
// handle response
}
}
}
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `clientID` | *Optional<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 |
| `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | |
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
| Parameter | Type | Required | Description |
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
| `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for |
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. |
### Response

View File

@@ -34,44 +34,31 @@ This request is intended to be very fast, and called as the user types.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.PerformSearchBadRequest;
import dev.plexapi.sdk.models.errors.PerformSearchUnauthorized;
import dev.plexapi.sdk.models.operations.PerformSearchResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws PerformSearchBadRequest, PerformSearchUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
PerformSearchResponse res = sdk.search().performSearch()
.query("arnold")
.sectionId(9372.7d)
PerformSearchResponse res = sdk.search().performSearch()
.query("dylan")
.sectionId(5838.67d)
.limit(5d)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.PerformSearchBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.PerformSearchUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -111,44 +98,31 @@ Results, as well as their containing per-type hubs, contain a `distance` attribu
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.PerformVoiceSearchBadRequest;
import dev.plexapi.sdk.models.errors.PerformVoiceSearchUnauthorized;
import dev.plexapi.sdk.models.operations.PerformVoiceSearchResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws PerformVoiceSearchBadRequest, PerformVoiceSearchUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
PerformVoiceSearchResponse res = sdk.search().performVoiceSearch()
PerformVoiceSearchResponse res = sdk.search().performVoiceSearch()
.query("dead+poop")
.sectionId(4094.8d)
.sectionId(4094.80d)
.limit(5d)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.PerformVoiceSearchBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.PerformVoiceSearchUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -184,44 +158,31 @@ This will search the database for the string provided.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetSearchResultsBadRequest;
import dev.plexapi.sdk.models.errors.GetSearchResultsUnauthorized;
import dev.plexapi.sdk.models.operations.GetSearchResultsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetSearchResultsBadRequest, GetSearchResultsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetSearchResultsResponse res = sdk.search().getSearchResults()
GetSearchResultsResponse res = sdk.search().getSearchResults()
.query("110")
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetSearchResultsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetSearchResultsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```

View File

@@ -28,43 +28,30 @@ Get Server Capabilities
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -92,43 +79,30 @@ Get Server Preferences
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerPreferencesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerPreferencesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerPreferencesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerPreferencesBadRequest, GetServerPreferencesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerPreferencesResponse res = sdk.server().getServerPreferences()
GetServerPreferencesResponse res = sdk.server().getServerPreferences()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerPreferencesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerPreferencesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -156,43 +130,30 @@ Get Available Clients
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest;
import dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized;
import dev.plexapi.sdk.models.operations.GetAvailableClientsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetAvailableClientsBadRequest, GetAvailableClientsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetAvailableClientsResponse res = sdk.server().getAvailableClients()
GetAvailableClientsResponse res = sdk.server().getAvailableClients()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -220,43 +181,30 @@ Get Devices
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetDevicesBadRequest;
import dev.plexapi.sdk.models.errors.GetDevicesUnauthorized;
import dev.plexapi.sdk.models.operations.GetDevicesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetDevicesBadRequest, GetDevicesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetDevicesResponse res = sdk.server().getDevices()
GetDevicesResponse res = sdk.server().getDevices()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetDevicesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetDevicesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -284,39 +232,28 @@ This request is useful to determine if the server is online or offline
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerIdentityRequestTimeout;
import dev.plexapi.sdk.models.operations.GetServerIdentityResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerIdentityRequestTimeout, Exception {
PlexAPI sdk = PlexAPI.builder()
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerIdentityResponse res = sdk.server().getServerIdentity()
GetServerIdentityResponse res = sdk.server().getServerIdentity()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerIdentityRequestTimeout e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -343,43 +280,30 @@ Returns MyPlex Account Information
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest;
import dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized;
import dev.plexapi.sdk.models.operations.GetMyPlexAccountResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetMyPlexAccountBadRequest, GetMyPlexAccountUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount()
GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -408,7 +332,8 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest;
import dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized;
import dev.plexapi.sdk.models.operations.GetResizedPhotoRequest;
import dev.plexapi.sdk.models.operations.GetResizedPhotoResponse;
import dev.plexapi.sdk.models.operations.MinSize;
@@ -417,46 +342,32 @@ import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetResizedPhotoBadRequest, GetResizedPhotoUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetResizedPhotoRequest req = GetResizedPhotoRequest.builder()
GetResizedPhotoRequest req = GetResizedPhotoRequest.builder()
.width(110d)
.height(165d)
.opacity(100L)
.blur(4000d)
.minSize(MinSize.ZERO)
.upscale(Upscale.ZERO)
.blur(0d)
.minSize(MinSize.ONE)
.upscale(Upscale.ONE)
.url("/library/metadata/49564/thumb/1654258204")
.build();
GetResizedPhotoResponse res = sdk.server().getResizedPhoto()
GetResizedPhotoResponse res = sdk.server().getResizedPhoto()
.request(req)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -490,44 +401,31 @@ Retrieves media providers and their features from the Plex server.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetMediaProvidersBadRequest;
import dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized;
import dev.plexapi.sdk.models.operations.GetMediaProvidersResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetMediaProvidersBadRequest, GetMediaProvidersUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetMediaProvidersResponse res = sdk.server().getMediaProviders()
GetMediaProvidersResponse res = sdk.server().getMediaProviders()
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetMediaProvidersBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -561,43 +459,30 @@ Get Server List
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerListBadRequest;
import dev.plexapi.sdk.models.errors.GetServerListUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerListResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerListBadRequest, GetServerListUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerListResponse res = sdk.server().getServerList()
GetServerListResponse res = sdk.server().getServerList()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerListBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerListUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```

View File

@@ -23,43 +23,30 @@ This will retrieve the "Now Playing" Information of the PMS.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetSessionsBadRequest;
import dev.plexapi.sdk.models.errors.GetSessionsUnauthorized;
import dev.plexapi.sdk.models.operations.GetSessionsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetSessionsBadRequest, GetSessionsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetSessionsResponse res = sdk.sessions().getSessions()
GetSessionsResponse res = sdk.sessions().getSessions()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetSessionsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetSessionsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -87,25 +74,26 @@ This will Retrieve a listing of all history views.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetSessionHistoryBadRequest;
import dev.plexapi.sdk.models.errors.GetSessionHistoryUnauthorized;
import dev.plexapi.sdk.models.operations.GetSessionHistoryResponse;
import dev.plexapi.sdk.models.operations.QueryParamFilter;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetSessionHistoryBadRequest, GetSessionHistoryUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetSessionHistoryResponse res = sdk.sessions().getSessionHistory()
GetSessionHistoryResponse res = sdk.sessions().getSessionHistory()
.sort("<value>")
.accountId(1L)
.filter(QueryParamFilter.builder()
@@ -113,23 +101,9 @@ public class Application {
.librarySectionID(12L)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetSessionHistoryBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetSessionHistoryUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -166,43 +140,30 @@ Get Transcode Sessions
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetTranscodeSessionsBadRequest;
import dev.plexapi.sdk.models.errors.GetTranscodeSessionsUnauthorized;
import dev.plexapi.sdk.models.operations.GetTranscodeSessionsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetTranscodeSessionsBadRequest, GetTranscodeSessionsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions()
GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetTranscodeSessionsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetTranscodeSessionsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -230,42 +191,29 @@ Stop a Transcode Session
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.StopTranscodeSessionBadRequest;
import dev.plexapi.sdk.models.errors.StopTranscodeSessionUnauthorized;
import dev.plexapi.sdk.models.operations.StopTranscodeSessionResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws StopTranscodeSessionBadRequest, StopTranscodeSessionUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession()
StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession()
.sessionKey("zz7llzqlx8w9vnrsbnwhbmep")
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.StopTranscodeSessionBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.StopTranscodeSessionUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```

View File

@@ -22,44 +22,31 @@ This will return the media statistics for the server
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetStatisticsBadRequest;
import dev.plexapi.sdk.models.errors.GetStatisticsUnauthorized;
import dev.plexapi.sdk.models.operations.GetStatisticsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetStatisticsBadRequest, GetStatisticsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetStatisticsResponse res = sdk.statistics().getStatistics()
GetStatisticsResponse res = sdk.statistics().getStatistics()
.timespan(4L)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetStatisticsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetStatisticsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -93,44 +80,31 @@ This will return the resources for the server
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetResourcesStatisticsBadRequest;
import dev.plexapi.sdk.models.errors.GetResourcesStatisticsUnauthorized;
import dev.plexapi.sdk.models.operations.GetResourcesStatisticsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetResourcesStatisticsBadRequest, GetResourcesStatisticsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetResourcesStatisticsResponse res = sdk.statistics().getResourcesStatistics()
GetResourcesStatisticsResponse res = sdk.statistics().getResourcesStatistics()
.timespan(4L)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetResourcesStatisticsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetResourcesStatisticsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -164,44 +138,31 @@ This will return the bandwidth statistics for the server
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsBadRequest;
import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsUnauthorized;
import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetBandwidthStatisticsBadRequest, GetBandwidthStatisticsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetBandwidthStatisticsResponse res = sdk.statistics().getBandwidthStatistics()
GetBandwidthStatisticsResponse res = sdk.statistics().getBandwidthStatistics()
.timespan(4L)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetBandwidthStatisticsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetBandwidthStatisticsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```

View File

@@ -23,43 +23,30 @@ Querying status of updates
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetUpdateStatusBadRequest;
import dev.plexapi.sdk.models.errors.GetUpdateStatusUnauthorized;
import dev.plexapi.sdk.models.operations.GetUpdateStatusResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetUpdateStatusBadRequest, GetUpdateStatusUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetUpdateStatusResponse res = sdk.updater().getUpdateStatus()
GetUpdateStatusResponse res = sdk.updater().getUpdateStatus()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetUpdateStatusBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetUpdateStatusUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -87,43 +74,30 @@ Checking for updates
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.CheckForUpdatesBadRequest;
import dev.plexapi.sdk.models.errors.CheckForUpdatesUnauthorized;
import dev.plexapi.sdk.models.operations.CheckForUpdatesResponse;
import dev.plexapi.sdk.models.operations.Download;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws CheckForUpdatesBadRequest, CheckForUpdatesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
CheckForUpdatesResponse res = sdk.updater().checkForUpdates()
CheckForUpdatesResponse res = sdk.updater().checkForUpdates()
.download(Download.ONE)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.CheckForUpdatesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.CheckForUpdatesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -158,7 +132,8 @@ Note that these two parameters are effectively mutually exclusive. The `tonight`
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.ApplyUpdatesBadRequest;
import dev.plexapi.sdk.models.errors.ApplyUpdatesUnauthorized;
import dev.plexapi.sdk.models.operations.ApplyUpdatesResponse;
import dev.plexapi.sdk.models.operations.Skip;
import dev.plexapi.sdk.models.operations.Tonight;
@@ -166,37 +141,23 @@ import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws ApplyUpdatesBadRequest, ApplyUpdatesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
ApplyUpdatesResponse res = sdk.updater().applyUpdates()
ApplyUpdatesResponse res = sdk.updater().applyUpdates()
.tonight(Tonight.ONE)
.skip(Skip.ONE)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.ApplyUpdatesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.ApplyUpdatesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```

View File

@@ -21,7 +21,8 @@ Get the timeline for a media item
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetTimelineBadRequest;
import dev.plexapi.sdk.models.errors.GetTimelineUnauthorized;
import dev.plexapi.sdk.models.operations.GetTimelineRequest;
import dev.plexapi.sdk.models.operations.GetTimelineResponse;
import dev.plexapi.sdk.models.operations.State;
@@ -29,18 +30,18 @@ import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetTimelineBadRequest, GetTimelineUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetTimelineRequest req = GetTimelineRequest.builder()
GetTimelineRequest req = GetTimelineRequest.builder()
.ratingKey(23409d)
.key("/library/metadata/23409")
.state(State.PLAYING)
@@ -53,25 +54,11 @@ public class Application {
.row(1d)
.build();
GetTimelineResponse res = sdk.video().getTimeline()
GetTimelineResponse res = sdk.video().getTimeline()
.request(req)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.GetTimelineBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetTimelineUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -105,25 +92,26 @@ Begin a Universal Transcode Session
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.StartUniversalTranscodeBadRequest;
import dev.plexapi.sdk.models.errors.StartUniversalTranscodeUnauthorized;
import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequest;
import dev.plexapi.sdk.models.operations.StartUniversalTranscodeResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws StartUniversalTranscodeBadRequest, StartUniversalTranscodeUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder()
StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder()
.hasMDE(1d)
.path("/library/metadata/23409")
.mediaIndex(0d)
@@ -142,25 +130,11 @@ public class Application {
.autoAdjustQuality(0d)
.build();
StartUniversalTranscodeResponse res = sdk.video().startUniversalTranscode()
StartUniversalTranscodeResponse res = sdk.video().startUniversalTranscode()
.request(req)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.StartUniversalTranscodeBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.StartUniversalTranscodeUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```

View File

@@ -20,7 +20,8 @@ Get User Watchlist
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetWatchListBadRequest;
import dev.plexapi.sdk.models.errors.GetWatchListUnauthorized;
import dev.plexapi.sdk.models.operations.Filter;
import dev.plexapi.sdk.models.operations.GetWatchListRequest;
import dev.plexapi.sdk.models.operations.GetWatchListResponse;
@@ -28,45 +29,31 @@ import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetWatchListBadRequest, GetWatchListUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetWatchListRequest req = GetWatchListRequest.builder()
GetWatchListRequest req = GetWatchListRequest.builder()
.filter(Filter.AVAILABLE)
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
.xPlexContainerStart(0)
.xPlexContainerSize(50)
.build();
GetWatchListResponse res = sdk.watchlist().getWatchList()
GetWatchListResponse res = sdk.watchlist().getWatchList()
.request(req)
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetWatchListBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetWatchListUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```

View File

@@ -77,7 +77,7 @@ public class Activities implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -234,7 +234,7 @@ public class Activities implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());

View File

@@ -24,7 +24,6 @@ import dev.plexapi.sdk.models.operations.GetTransientTokenQueryParamType;
import dev.plexapi.sdk.models.operations.GetTransientTokenRequest;
import dev.plexapi.sdk.models.operations.GetTransientTokenRequestBuilder;
import dev.plexapi.sdk.models.operations.GetTransientTokenResponse;
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequest;
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody;
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBuilder;
import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse;
@@ -118,7 +117,7 @@ public class Authentication implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetTransientTokenRequest.class,
@@ -271,7 +270,7 @@ public class Authentication implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetSourceConnectionInformationRequest.class,
@@ -426,7 +425,7 @@ public class Authentication implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -564,32 +563,20 @@ public class Authentication implements
* @throws Exception if the API call fails
*/
public PostUsersSignInDataResponse postUsersSignInDataDirect() throws Exception {
return postUsersSignInData(Optional.empty(), Optional.empty(), Optional.empty());
return postUsersSignInData(Optional.empty(), Optional.empty());
}
/**
* Get User Sign In Data
* Sign in user with username and password and return user data with Plex authentication token
* @param clientID The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
* @param requestBody Login credentials
* @param request The request object containing all of the parameters for the API call.
* @param serverURL Overrides the server URL.
* @return The response from the API call
* @throws Exception if the API call fails
*/
public PostUsersSignInDataResponse postUsersSignInData(
Optional<String> clientID,
Optional<? extends PostUsersSignInDataRequestBody> requestBody,
Optional<? extends PostUsersSignInDataRequestBody> request,
Optional<String> serverURL) throws Exception {
PostUsersSignInDataRequest request =
PostUsersSignInDataRequest
.builder()
.clientID(clientID)
.requestBody(requestBody)
.build();
String _baseUrl = Utils.templateUrl(POST_USERS_SIGN_IN_DATA_SERVERS[0], new HashMap<String, String>());
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
_baseUrl = serverURL.get();
@@ -602,21 +589,16 @@ public class Authentication implements
Object _convertedRequest = Utils.convertToShape(
request,
JsonShape.DEFAULT,
new TypeReference<Object>() {});
new TypeReference<Optional<? extends PostUsersSignInDataRequestBody>>() {});
SerializedBody _serializedRequestBody = Utils.serializeRequestBody(
_convertedRequest,
"requestBody",
"request",
"form",
false);
_req.setBody(Optional.ofNullable(_serializedRequestBody));
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
_req.addQueryParams(Utils.getQueryParams(
PostUsersSignInDataRequest.class,
request,
this.sdkConfiguration.globals));
SDKConfiguration.USER_AGENT);
HTTPClient _client = this.sdkConfiguration.defaultClient;
HttpRequest _r =

View File

@@ -89,7 +89,7 @@ public class Butler implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -246,7 +246,7 @@ public class Butler implements
HTTPRequest _req = new HTTPRequest(_url, "POST");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -384,7 +384,7 @@ public class Butler implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -540,7 +540,7 @@ public class Butler implements
HTTPRequest _req = new HTTPRequest(_url, "POST");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -688,7 +688,7 @@ public class Butler implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());

View File

@@ -97,7 +97,7 @@ public class Hubs implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetGlobalHubsRequest.class,
@@ -280,7 +280,7 @@ public class Hubs implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetLibraryHubsRequest.class,

View File

@@ -168,7 +168,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetFileHashRequest.class,
@@ -339,7 +339,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetRecentlyAddedRequest.class,
@@ -503,7 +503,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -798,7 +798,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetLibraryDetailsRequest.class,
@@ -962,7 +962,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -1142,7 +1142,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetLibraryItemsRequest.class,
@@ -1326,7 +1326,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetRefreshLibraryMetadataRequest.class,
@@ -1524,7 +1524,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetSearchLibraryRequest.class,
@@ -1688,7 +1688,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -1864,7 +1864,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetMetadataChildrenRequest.class,
@@ -2055,7 +2055,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetTopWatchedContentRequest.class,
@@ -2209,7 +2209,7 @@ public class Library implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());

View File

@@ -101,7 +101,7 @@ public class Log implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
LogLineRequest.class,
@@ -299,7 +299,7 @@ public class Log implements
_req.setBody(Optional.ofNullable(_serializedRequestBody));
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -437,7 +437,7 @@ public class Log implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());

View File

@@ -97,7 +97,7 @@ public class Media implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
MarkPlayedRequest.class,
@@ -246,7 +246,7 @@ public class Media implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
MarkUnplayedRequest.class,
@@ -403,7 +403,7 @@ public class Media implements
HTTPRequest _req = new HTTPRequest(_url, "POST");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
UpdatePlayProgressRequest.class,
@@ -548,7 +548,7 @@ public class Media implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "image/jpeg")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetBannerImageRequest.class,
@@ -704,7 +704,7 @@ public class Media implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "image/jpeg")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetThumbImageRequest.class,

View File

@@ -134,7 +134,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "POST");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
CreatePlaylistRequest.class,
@@ -307,7 +307,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetPlaylistsRequest.class,
@@ -473,7 +473,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -632,7 +632,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -799,7 +799,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "PUT");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
UpdatePlaylistRequest.class,
@@ -967,7 +967,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetPlaylistContentsRequest.class,
@@ -1131,7 +1131,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -1303,7 +1303,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "PUT");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
AddPlaylistContentsRequest.class,
@@ -1456,17 +1456,20 @@ public class Playlists implements
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
* @param sectionID Possibly the section ID to upload the playlist to, we are not certain.
* @return The response from the API call
* @throws Exception if the API call fails
*/
public UploadPlaylistResponse uploadPlaylist(
String path,
QueryParamForce force) throws Exception {
QueryParamForce force,
long sectionID) throws Exception {
UploadPlaylistRequest request =
UploadPlaylistRequest
.builder()
.path(path)
.force(force)
.sectionID(sectionID)
.build();
String _baseUrl = Utils.templateUrl(
@@ -1478,7 +1481,7 @@ public class Playlists implements
HTTPRequest _req = new HTTPRequest(_url, "POST");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
UploadPlaylistRequest.class,

View File

@@ -163,7 +163,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -324,7 +324,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -485,7 +485,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
HTTPClient _client = this.sdkConfiguration.defaultClient;
HttpRequest _r =
@@ -629,7 +629,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -767,16 +767,12 @@ public class Plex implements
* @throws Exception if the API call fails
*/
public GetServerResourcesResponse getServerResourcesDirect() throws Exception {
return getServerResources(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
return getServerResources(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
/**
* Get Server Resources
* Get Plex server access tokens and server connections
* @param clientID The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
* @param includeHttps Include Https entries in the results
* @param includeRelay Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
@@ -787,7 +783,6 @@ public class Plex implements
* @throws Exception if the API call fails
*/
public GetServerResourcesResponse getServerResources(
Optional<String> clientID,
Optional<? extends IncludeHttps> includeHttps,
Optional<? extends IncludeRelay> includeRelay,
Optional<? extends IncludeIPv6> includeIPv6,
@@ -795,7 +790,6 @@ public class Plex implements
GetServerResourcesRequest request =
GetServerResourcesRequest
.builder()
.clientID(clientID)
.includeHttps(includeHttps)
.includeRelay(includeRelay)
.includeIPv6(includeIPv6)
@@ -812,7 +806,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetServerResourcesRequest.class,
@@ -982,7 +976,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "POST");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetPinRequest.class,
@@ -1108,29 +1102,23 @@ public class Plex implements
*/
public GetTokenByPinIdResponse getTokenByPinId(
long pinID) throws Exception {
return getTokenByPinId(Optional.empty(), pinID, Optional.empty());
return getTokenByPinId(pinID, Optional.empty());
}
/**
* Get Access Token by PinId
* Retrieve an Access Token from Plex.tv after the Pin has been authenticated
* @param clientID The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
* @param pinID The PinID to retrieve an access token for
* @param serverURL Overrides the server URL.
* @return The response from the API call
* @throws Exception if the API call fails
*/
public GetTokenByPinIdResponse getTokenByPinId(
Optional<String> clientID,
long pinID,
Optional<String> serverURL) throws Exception {
GetTokenByPinIdRequest request =
GetTokenByPinIdRequest
.builder()
.clientID(clientID)
.pinID(pinID)
.build();
@@ -1147,12 +1135,7 @@ public class Plex implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
_req.addQueryParams(Utils.getQueryParams(
GetTokenByPinIdRequest.class,
request,
this.sdkConfiguration.globals));
SDKConfiguration.USER_AGENT);
HTTPClient _client = this.sdkConfiguration.defaultClient;
HttpRequest _r =

View File

@@ -9,6 +9,7 @@ import dev.plexapi.sdk.models.operations.SDKMethodInterfaces.*;
import dev.plexapi.sdk.utils.HTTPClient;
import dev.plexapi.sdk.utils.RetryConfig;
import dev.plexapi.sdk.utils.SpeakeasyHTTPClient;
import dev.plexapi.sdk.utils.Utils;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
@@ -337,7 +338,7 @@ public class PlexAPI {
* @return The builder instance.
*/
public Builder serverURL(String serverUrl, Map<String, String> params) {
this.sdkConfiguration.serverUrl = dev.plexapi.sdk.utils.Utils.templateUrl(serverUrl, params);
this.sdkConfiguration.serverUrl = Utils.templateUrl(serverUrl, params);
return this;
}

View File

@@ -34,11 +34,14 @@ class SDKConfiguration {
put("port", "32400");
} });
} };
public String language = "java";
public String openapiDocVersion = "0.0.3";
public String sdkVersion = "0.3.6";
public String genVersion = "2.416.6";
public String userAgent = "speakeasy-sdk/java 0.3.6 2.416.6 0.0.3 dev.plexapi.sdk";
private static final String LANGUAGE = "java";
public static final String OPENAPI_DOC_VERSION = "0.0.3";
public static final String SDK_VERSION = "0.4.0";
public static final String GEN_VERSION = "2.421.3";
private static final String BASE_PACKAGE = "dev.plexapi.sdk";
public static final String USER_AGENT =
String.format("speakeasy-sdk/%s %s %s %s %s",
LANGUAGE, SDK_VERSION, GEN_VERSION, OPENAPI_DOC_VERSION, BASE_PACKAGE);
private Hooks _hooks = createHooks();

View File

@@ -141,7 +141,7 @@ public class Search implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
PerformSearchRequest.class,
@@ -320,7 +320,7 @@ public class Search implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
PerformVoiceSearchRequest.class,
@@ -469,7 +469,7 @@ public class Search implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetSearchResultsRequest.class,

View File

@@ -113,7 +113,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -260,7 +260,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -407,7 +407,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -554,7 +554,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -701,7 +701,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
HTTPClient _client = this.sdkConfiguration.defaultClient;
HttpRequest _r =
@@ -829,7 +829,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -980,7 +980,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetResizedPhotoRequest.class,
@@ -1129,7 +1129,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetMediaProvidersRequest.class,
@@ -1281,7 +1281,7 @@ public class Server implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());

View File

@@ -86,7 +86,7 @@ public class Sessions implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -265,7 +265,7 @@ public class Sessions implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetSessionHistoryRequest.class,
@@ -417,7 +417,7 @@ public class Sessions implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -574,7 +574,7 @@ public class Sessions implements
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());

View File

@@ -101,7 +101,7 @@ public class Statistics implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetStatisticsRequest.class,
@@ -273,7 +273,7 @@ public class Statistics implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetResourcesStatisticsRequest.class,
@@ -445,7 +445,7 @@ public class Statistics implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetBandwidthStatisticsRequest.class,

View File

@@ -81,7 +81,7 @@ public class Updater implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
@@ -246,7 +246,7 @@ public class Updater implements
HTTPRequest _req = new HTTPRequest(_url, "PUT");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
CheckForUpdatesRequest.class,
@@ -411,7 +411,7 @@ public class Updater implements
HTTPRequest _req = new HTTPRequest(_url, "PUT");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
ApplyUpdatesRequest.class,

View File

@@ -73,7 +73,7 @@ public class Video implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetTimelineRequest.class,
@@ -216,7 +216,7 @@ public class Video implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
StartUniversalTranscodeRequest.class,

View File

@@ -97,7 +97,7 @@ public class Watchlist implements
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
this.sdkConfiguration.userAgent);
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetWatchListRequest.class,

View File

@@ -26,7 +26,7 @@ public class AddPlaylistContentsRequestBuilder {
return this;
}
public AddPlaylistContentsRequestBuilder uri(java.lang.String uri) {
public AddPlaylistContentsRequestBuilder uri(String uri) {
Utils.checkNotNull(uri, "uri");
this.uri = uri;
return this;
@@ -38,7 +38,7 @@ public class AddPlaylistContentsRequestBuilder {
return this;
}
public AddPlaylistContentsRequestBuilder playQueueID(java.util.Optional<java.lang.Double> playQueueID) {
public AddPlaylistContentsRequestBuilder playQueueID(Optional<Double> playQueueID) {
Utils.checkNotNull(playQueueID, "playQueueID");
this.playQueueID = playQueueID;
return this;

View File

@@ -17,25 +17,25 @@ public class ApplyUpdatesRequestBuilder {
this.sdk = sdk;
}
public ApplyUpdatesRequestBuilder tonight(dev.plexapi.sdk.models.operations.Tonight tonight) {
public ApplyUpdatesRequestBuilder tonight(Tonight tonight) {
Utils.checkNotNull(tonight, "tonight");
this.tonight = Optional.of(tonight);
return this;
}
public ApplyUpdatesRequestBuilder tonight(java.util.Optional<? extends dev.plexapi.sdk.models.operations.Tonight> tonight) {
public ApplyUpdatesRequestBuilder tonight(Optional<? extends Tonight> tonight) {
Utils.checkNotNull(tonight, "tonight");
this.tonight = tonight;
return this;
}
public ApplyUpdatesRequestBuilder skip(dev.plexapi.sdk.models.operations.Skip skip) {
public ApplyUpdatesRequestBuilder skip(Skip skip) {
Utils.checkNotNull(skip, "skip");
this.skip = Optional.of(skip);
return this;
}
public ApplyUpdatesRequestBuilder skip(java.util.Optional<? extends dev.plexapi.sdk.models.operations.Skip> skip) {
public ApplyUpdatesRequestBuilder skip(Optional<? extends Skip> skip) {
Utils.checkNotNull(skip, "skip");
this.skip = skip;
return this;

View File

@@ -5,23 +5,22 @@
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
/**
* AutoSelectSubtitle - The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
*/
public enum AutoSelectSubtitle {
ZERO("0"),
ONE("1");
Disable(0),
Enable(1);
@JsonValue
private final String value;
private final int value;
private AutoSelectSubtitle(String value) {
private AutoSelectSubtitle(int value) {
this.value = value;
}
public String value() {
public int value() {
return value;
}
}

View File

@@ -16,7 +16,7 @@ public class CancelServerActivitiesRequestBuilder {
this.sdk = sdk;
}
public CancelServerActivitiesRequestBuilder activityUUID(java.lang.String activityUUID) {
public CancelServerActivitiesRequestBuilder activityUUID(String activityUUID) {
Utils.checkNotNull(activityUUID, "activityUUID");
this.activityUUID = activityUUID;
return this;

View File

@@ -16,13 +16,13 @@ public class CheckForUpdatesRequestBuilder {
this.sdk = sdk;
}
public CheckForUpdatesRequestBuilder download(dev.plexapi.sdk.models.operations.Download download) {
public CheckForUpdatesRequestBuilder download(Download download) {
Utils.checkNotNull(download, "download");
this.download = Optional.of(download);
return this;
}
public CheckForUpdatesRequestBuilder download(java.util.Optional<? extends dev.plexapi.sdk.models.operations.Download> download) {
public CheckForUpdatesRequestBuilder download(Optional<? extends Download> download) {
Utils.checkNotNull(download, "download");
this.download = download;
return this;

View File

@@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -18,32 +18,53 @@ import java.util.Objects;
public class Connections {
/**
* The protocol used for the connection (http, https, etc)
*/
@JsonProperty("protocol")
private String protocol;
private Protocol protocol;
/**
* The (ip) address or domain name used for the connection
*/
@JsonProperty("address")
private String address;
/**
* The port used for the connection
*/
@JsonProperty("port")
private double port;
private int port;
/**
* The full URI of the connection
*/
@JsonProperty("uri")
private String uri;
/**
* If the connection is local address
*/
@JsonProperty("local")
private boolean local;
/**
* If the connection is relayed through plex.direct
*/
@JsonProperty("relay")
private boolean relay;
/**
* If the connection is using IPv6
*/
@JsonProperty("IPv6")
private boolean iPv6;
@JsonCreator
public Connections(
@JsonProperty("protocol") String protocol,
@JsonProperty("protocol") Protocol protocol,
@JsonProperty("address") String address,
@JsonProperty("port") double port,
@JsonProperty("port") int port,
@JsonProperty("uri") String uri,
@JsonProperty("local") boolean local,
@JsonProperty("relay") boolean relay,
@@ -64,36 +85,57 @@ public class Connections {
this.iPv6 = iPv6;
}
/**
* The protocol used for the connection (http, https, etc)
*/
@JsonIgnore
public String protocol() {
public Protocol protocol() {
return protocol;
}
/**
* The (ip) address or domain name used for the connection
*/
@JsonIgnore
public String address() {
return address;
}
/**
* The port used for the connection
*/
@JsonIgnore
public double port() {
public int port() {
return port;
}
/**
* The full URI of the connection
*/
@JsonIgnore
public String uri() {
return uri;
}
/**
* If the connection is local address
*/
@JsonIgnore
public boolean local() {
return local;
}
/**
* If the connection is relayed through plex.direct
*/
@JsonIgnore
public boolean relay() {
return relay;
}
/**
* If the connection is using IPv6
*/
@JsonIgnore
public boolean iPv6() {
return iPv6;
@@ -103,42 +145,63 @@ public class Connections {
return new Builder();
}
public Connections withProtocol(String protocol) {
/**
* The protocol used for the connection (http, https, etc)
*/
public Connections withProtocol(Protocol protocol) {
Utils.checkNotNull(protocol, "protocol");
this.protocol = protocol;
return this;
}
/**
* The (ip) address or domain name used for the connection
*/
public Connections withAddress(String address) {
Utils.checkNotNull(address, "address");
this.address = address;
return this;
}
public Connections withPort(double port) {
/**
* The port used for the connection
*/
public Connections withPort(int port) {
Utils.checkNotNull(port, "port");
this.port = port;
return this;
}
/**
* The full URI of the connection
*/
public Connections withUri(String uri) {
Utils.checkNotNull(uri, "uri");
this.uri = uri;
return this;
}
/**
* If the connection is local address
*/
public Connections withLocal(boolean local) {
Utils.checkNotNull(local, "local");
this.local = local;
return this;
}
/**
* If the connection is relayed through plex.direct
*/
public Connections withRelay(boolean relay) {
Utils.checkNotNull(relay, "relay");
this.relay = relay;
return this;
}
/**
* If the connection is using IPv6
*/
public Connections withIPv6(boolean iPv6) {
Utils.checkNotNull(iPv6, "iPv6");
this.iPv6 = iPv6;
@@ -190,11 +253,11 @@ public class Connections {
public final static class Builder {
private String protocol;
private Protocol protocol;
private String address;
private Double port;
private Integer port;
private String uri;
@@ -208,42 +271,63 @@ public class Connections {
// force use of static builder() method
}
public Builder protocol(String protocol) {
/**
* The protocol used for the connection (http, https, etc)
*/
public Builder protocol(Protocol protocol) {
Utils.checkNotNull(protocol, "protocol");
this.protocol = protocol;
return this;
}
/**
* The (ip) address or domain name used for the connection
*/
public Builder address(String address) {
Utils.checkNotNull(address, "address");
this.address = address;
return this;
}
public Builder port(double port) {
/**
* The port used for the connection
*/
public Builder port(int port) {
Utils.checkNotNull(port, "port");
this.port = port;
return this;
}
/**
* The full URI of the connection
*/
public Builder uri(String uri) {
Utils.checkNotNull(uri, "uri");
this.uri = uri;
return this;
}
/**
* If the connection is local address
*/
public Builder local(boolean local) {
Utils.checkNotNull(local, "local");
this.local = local;
return this;
}
/**
* If the connection is relayed through plex.direct
*/
public Builder relay(boolean relay) {
Utils.checkNotNull(relay, "relay");
this.relay = relay;
return this;
}
/**
* If the connection is using IPv6
*/
public Builder iPv6(boolean iPv6) {
Utils.checkNotNull(iPv6, "iPv6");
this.iPv6 = iPv6;

View File

@@ -15,7 +15,7 @@ public class CreatePlaylistRequestBuilder {
this.sdk = sdk;
}
public CreatePlaylistRequestBuilder request(dev.plexapi.sdk.models.operations.CreatePlaylistRequest request) {
public CreatePlaylistRequestBuilder request(CreatePlaylistRequest request) {
Utils.checkNotNull(request, "request");
this.request = request;
return this;

View File

@@ -5,23 +5,22 @@
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
/**
* DefaultSubtitleAccessibility - The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
* DefaultSubtitleAccessibility - The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
*/
public enum DefaultSubtitleAccessibility {
ZERO("0"),
ONE("1");
Disable(0),
Enable(1);
@JsonValue
private final String value;
private final int value;
private DefaultSubtitleAccessibility(String value) {
private DefaultSubtitleAccessibility(int value) {
this.value = value;
}
public String value() {
public int value() {
return value;
}
}

View File

@@ -5,23 +5,22 @@
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
/**
* DefaultSubtitleForced - The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
*/
public enum DefaultSubtitleForced {
ZERO("0"),
ONE("1");
Disable(0),
Enable(1);
@JsonValue
private final String value;
private final int value;
private DefaultSubtitleForced(String value) {
private DefaultSubtitleForced(int value) {
this.value = value;
}
public String value() {
public int value() {
return value;
}
}

View File

@@ -7,8 +7,6 @@ package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
@@ -16,130 +14,107 @@ import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
public class GetAllLibrariesDirectory {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("allowSync")
private Optional<Boolean> allowSync;
private boolean allowSync;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("art")
private Optional<String> art;
private String art;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("composite")
private Optional<String> composite;
private String composite;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("filters")
private Optional<Boolean> filters;
private boolean filters;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("refreshing")
private Optional<Boolean> refreshing;
private boolean refreshing;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("thumb")
private Optional<String> thumb;
private String thumb;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("key")
private Optional<String> key;
private String key;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("type")
private Optional<String> type;
private String type;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("title")
private Optional<String> title;
private String title;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("agent")
private Optional<String> agent;
private String agent;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("scanner")
private Optional<String> scanner;
private String scanner;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("language")
private Optional<String> language;
private String language;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("uuid")
private Optional<String> uuid;
private String uuid;
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("updatedAt")
private Optional<Long> updatedAt;
private long updatedAt;
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("createdAt")
private Optional<Long> createdAt;
private long createdAt;
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("scannedAt")
private Optional<Long> scannedAt;
private long scannedAt;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("content")
private Optional<Boolean> content;
private boolean content;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("directory")
private Optional<Boolean> directory;
private boolean directory;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("contentChangedAt")
private Optional<Integer> contentChangedAt;
private int contentChangedAt;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("hidden")
private Optional<Integer> hidden;
private int hidden;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Location")
private Optional<? extends List<Location>> location;
private List<Location> location;
@JsonCreator
public GetAllLibrariesDirectory(
@JsonProperty("allowSync") Optional<Boolean> allowSync,
@JsonProperty("art") Optional<String> art,
@JsonProperty("composite") Optional<String> composite,
@JsonProperty("filters") Optional<Boolean> filters,
@JsonProperty("refreshing") Optional<Boolean> refreshing,
@JsonProperty("thumb") Optional<String> thumb,
@JsonProperty("key") Optional<String> key,
@JsonProperty("type") Optional<String> type,
@JsonProperty("title") Optional<String> title,
@JsonProperty("agent") Optional<String> agent,
@JsonProperty("scanner") Optional<String> scanner,
@JsonProperty("language") Optional<String> language,
@JsonProperty("uuid") Optional<String> uuid,
@JsonProperty("updatedAt") Optional<Long> updatedAt,
@JsonProperty("createdAt") Optional<Long> createdAt,
@JsonProperty("scannedAt") Optional<Long> scannedAt,
@JsonProperty("content") Optional<Boolean> content,
@JsonProperty("directory") Optional<Boolean> directory,
@JsonProperty("contentChangedAt") Optional<Integer> contentChangedAt,
@JsonProperty("hidden") Optional<Integer> hidden,
@JsonProperty("Location") Optional<? extends List<Location>> location) {
@JsonProperty("allowSync") boolean allowSync,
@JsonProperty("art") String art,
@JsonProperty("composite") String composite,
@JsonProperty("filters") boolean filters,
@JsonProperty("refreshing") boolean refreshing,
@JsonProperty("thumb") String thumb,
@JsonProperty("key") String key,
@JsonProperty("type") String type,
@JsonProperty("title") String title,
@JsonProperty("agent") String agent,
@JsonProperty("scanner") String scanner,
@JsonProperty("language") String language,
@JsonProperty("uuid") String uuid,
@JsonProperty("updatedAt") long updatedAt,
@JsonProperty("createdAt") long createdAt,
@JsonProperty("scannedAt") long scannedAt,
@JsonProperty("content") boolean content,
@JsonProperty("directory") boolean directory,
@JsonProperty("contentChangedAt") int contentChangedAt,
@JsonProperty("hidden") int hidden,
@JsonProperty("Location") List<Location> location) {
Utils.checkNotNull(allowSync, "allowSync");
Utils.checkNotNull(art, "art");
Utils.checkNotNull(composite, "composite");
@@ -184,123 +159,118 @@ public class GetAllLibrariesDirectory {
this.location = location;
}
public GetAllLibrariesDirectory() {
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Boolean> allowSync() {
public boolean allowSync() {
return allowSync;
}
@JsonIgnore
public Optional<String> art() {
public String art() {
return art;
}
@JsonIgnore
public Optional<String> composite() {
public String composite() {
return composite;
}
@JsonIgnore
public Optional<Boolean> filters() {
public boolean filters() {
return filters;
}
@JsonIgnore
public Optional<Boolean> refreshing() {
public boolean refreshing() {
return refreshing;
}
@JsonIgnore
public Optional<String> thumb() {
public String thumb() {
return thumb;
}
@JsonIgnore
public Optional<String> key() {
public String key() {
return key;
}
@JsonIgnore
public Optional<String> type() {
public String type() {
return type;
}
@JsonIgnore
public Optional<String> title() {
public String title() {
return title;
}
@JsonIgnore
public Optional<String> agent() {
public String agent() {
return agent;
}
@JsonIgnore
public Optional<String> scanner() {
public String scanner() {
return scanner;
}
@JsonIgnore
public Optional<String> language() {
public String language() {
return language;
}
@JsonIgnore
public Optional<String> uuid() {
public String uuid() {
return uuid;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonIgnore
public Optional<Long> updatedAt() {
public long updatedAt() {
return updatedAt;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonIgnore
public Optional<Long> createdAt() {
public long createdAt() {
return createdAt;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
@JsonIgnore
public Optional<Long> scannedAt() {
public long scannedAt() {
return scannedAt;
}
@JsonIgnore
public Optional<Boolean> content() {
public boolean content() {
return content;
}
@JsonIgnore
public Optional<Boolean> directory() {
public boolean directory() {
return directory;
}
@JsonIgnore
public Optional<Integer> contentChangedAt() {
public int contentChangedAt() {
return contentChangedAt;
}
@JsonIgnore
public Optional<Integer> hidden() {
public int hidden() {
return hidden;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<Location>> location() {
return (Optional<List<Location>>) location;
public List<Location> location() {
return location;
}
public final static Builder builder() {
@@ -308,270 +278,135 @@ public class GetAllLibrariesDirectory {
}
public GetAllLibrariesDirectory withAllowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = Optional.ofNullable(allowSync);
return this;
}
public GetAllLibrariesDirectory withAllowSync(Optional<Boolean> allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
public GetAllLibrariesDirectory withArt(String art) {
Utils.checkNotNull(art, "art");
this.art = Optional.ofNullable(art);
return this;
}
public GetAllLibrariesDirectory withArt(Optional<String> art) {
Utils.checkNotNull(art, "art");
this.art = art;
return this;
}
public GetAllLibrariesDirectory withComposite(String composite) {
Utils.checkNotNull(composite, "composite");
this.composite = Optional.ofNullable(composite);
return this;
}
public GetAllLibrariesDirectory withComposite(Optional<String> composite) {
Utils.checkNotNull(composite, "composite");
this.composite = composite;
return this;
}
public GetAllLibrariesDirectory withFilters(boolean filters) {
Utils.checkNotNull(filters, "filters");
this.filters = Optional.ofNullable(filters);
return this;
}
public GetAllLibrariesDirectory withFilters(Optional<Boolean> filters) {
Utils.checkNotNull(filters, "filters");
this.filters = filters;
return this;
}
public GetAllLibrariesDirectory withRefreshing(boolean refreshing) {
Utils.checkNotNull(refreshing, "refreshing");
this.refreshing = Optional.ofNullable(refreshing);
return this;
}
public GetAllLibrariesDirectory withRefreshing(Optional<Boolean> refreshing) {
Utils.checkNotNull(refreshing, "refreshing");
this.refreshing = refreshing;
return this;
}
public GetAllLibrariesDirectory withThumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = Optional.ofNullable(thumb);
return this;
}
public GetAllLibrariesDirectory withThumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
public GetAllLibrariesDirectory withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = Optional.ofNullable(key);
return this;
}
public GetAllLibrariesDirectory withKey(Optional<String> key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetAllLibrariesDirectory withType(String type) {
Utils.checkNotNull(type, "type");
this.type = Optional.ofNullable(type);
return this;
}
public GetAllLibrariesDirectory withType(Optional<String> type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public GetAllLibrariesDirectory withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = Optional.ofNullable(title);
return this;
}
public GetAllLibrariesDirectory withTitle(Optional<String> title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public GetAllLibrariesDirectory withAgent(String agent) {
Utils.checkNotNull(agent, "agent");
this.agent = Optional.ofNullable(agent);
return this;
}
public GetAllLibrariesDirectory withAgent(Optional<String> agent) {
Utils.checkNotNull(agent, "agent");
this.agent = agent;
return this;
}
public GetAllLibrariesDirectory withScanner(String scanner) {
Utils.checkNotNull(scanner, "scanner");
this.scanner = Optional.ofNullable(scanner);
return this;
}
public GetAllLibrariesDirectory withScanner(Optional<String> scanner) {
Utils.checkNotNull(scanner, "scanner");
this.scanner = scanner;
return this;
}
public GetAllLibrariesDirectory withLanguage(String language) {
Utils.checkNotNull(language, "language");
this.language = Optional.ofNullable(language);
return this;
}
public GetAllLibrariesDirectory withLanguage(Optional<String> language) {
Utils.checkNotNull(language, "language");
this.language = language;
return this;
}
public GetAllLibrariesDirectory withUuid(String uuid) {
Utils.checkNotNull(uuid, "uuid");
this.uuid = Optional.ofNullable(uuid);
return this;
}
public GetAllLibrariesDirectory withUuid(Optional<String> uuid) {
Utils.checkNotNull(uuid, "uuid");
this.uuid = uuid;
return this;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public GetAllLibrariesDirectory withUpdatedAt(long updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = Optional.ofNullable(updatedAt);
return this;
}
/**
* Unix epoch datetime
*/
public GetAllLibrariesDirectory withUpdatedAt(Optional<Long> updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = updatedAt;
return this;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public GetAllLibrariesDirectory withCreatedAt(long createdAt) {
Utils.checkNotNull(createdAt, "createdAt");
this.createdAt = Optional.ofNullable(createdAt);
return this;
}
/**
* Unix epoch datetime
*/
public GetAllLibrariesDirectory withCreatedAt(Optional<Long> createdAt) {
Utils.checkNotNull(createdAt, "createdAt");
this.createdAt = createdAt;
return this;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public GetAllLibrariesDirectory withScannedAt(long scannedAt) {
Utils.checkNotNull(scannedAt, "scannedAt");
this.scannedAt = Optional.ofNullable(scannedAt);
return this;
}
/**
* Unix epoch datetime
*/
public GetAllLibrariesDirectory withScannedAt(Optional<Long> scannedAt) {
Utils.checkNotNull(scannedAt, "scannedAt");
this.scannedAt = scannedAt;
return this;
}
public GetAllLibrariesDirectory withContent(boolean content) {
Utils.checkNotNull(content, "content");
this.content = Optional.ofNullable(content);
return this;
}
public GetAllLibrariesDirectory withContent(Optional<Boolean> content) {
Utils.checkNotNull(content, "content");
this.content = content;
return this;
}
public GetAllLibrariesDirectory withDirectory(boolean directory) {
Utils.checkNotNull(directory, "directory");
this.directory = Optional.ofNullable(directory);
return this;
}
public GetAllLibrariesDirectory withDirectory(Optional<Boolean> directory) {
Utils.checkNotNull(directory, "directory");
this.directory = directory;
return this;
}
public GetAllLibrariesDirectory withContentChangedAt(int contentChangedAt) {
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
this.contentChangedAt = Optional.ofNullable(contentChangedAt);
return this;
}
public GetAllLibrariesDirectory withContentChangedAt(Optional<Integer> contentChangedAt) {
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
this.contentChangedAt = contentChangedAt;
return this;
}
public GetAllLibrariesDirectory withHidden(int hidden) {
Utils.checkNotNull(hidden, "hidden");
this.hidden = Optional.ofNullable(hidden);
return this;
}
public GetAllLibrariesDirectory withHidden(Optional<Integer> hidden) {
Utils.checkNotNull(hidden, "hidden");
this.hidden = hidden;
return this;
}
public GetAllLibrariesDirectory withLocation(List<Location> location) {
Utils.checkNotNull(location, "location");
this.location = Optional.ofNullable(location);
return this;
}
public GetAllLibrariesDirectory withLocation(Optional<? extends List<Location>> location) {
Utils.checkNotNull(location, "location");
this.location = location;
return this;
@@ -664,317 +499,182 @@ public class GetAllLibrariesDirectory {
public final static class Builder {
private Optional<Boolean> allowSync = Optional.empty();
private Boolean allowSync;
private Optional<String> art = Optional.empty();
private String art;
private Optional<String> composite = Optional.empty();
private String composite;
private Optional<Boolean> filters = Optional.empty();
private Boolean filters;
private Optional<Boolean> refreshing = Optional.empty();
private Boolean refreshing;
private Optional<String> thumb = Optional.empty();
private String thumb;
private Optional<String> key = Optional.empty();
private String key;
private Optional<String> type = Optional.empty();
private String type;
private Optional<String> title = Optional.empty();
private String title;
private Optional<String> agent = Optional.empty();
private String agent;
private Optional<String> scanner = Optional.empty();
private String scanner;
private Optional<String> language = Optional.empty();
private String language;
private Optional<String> uuid = Optional.empty();
private String uuid;
private Optional<Long> updatedAt = Optional.empty();
private Long updatedAt;
private Optional<Long> createdAt = Optional.empty();
private Long createdAt;
private Optional<Long> scannedAt = Optional.empty();
private Long scannedAt;
private Optional<Boolean> content = Optional.empty();
private Boolean content;
private Optional<Boolean> directory = Optional.empty();
private Boolean directory;
private Optional<Integer> contentChangedAt = Optional.empty();
private Integer contentChangedAt;
private Optional<Integer> hidden = Optional.empty();
private Integer hidden;
private Optional<? extends List<Location>> location = Optional.empty();
private List<Location> location;
private Builder() {
// force use of static builder() method
}
public Builder allowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = Optional.ofNullable(allowSync);
return this;
}
public Builder allowSync(Optional<Boolean> allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
public Builder art(String art) {
Utils.checkNotNull(art, "art");
this.art = Optional.ofNullable(art);
return this;
}
public Builder art(Optional<String> art) {
Utils.checkNotNull(art, "art");
this.art = art;
return this;
}
public Builder composite(String composite) {
Utils.checkNotNull(composite, "composite");
this.composite = Optional.ofNullable(composite);
return this;
}
public Builder composite(Optional<String> composite) {
Utils.checkNotNull(composite, "composite");
this.composite = composite;
return this;
}
public Builder filters(boolean filters) {
Utils.checkNotNull(filters, "filters");
this.filters = Optional.ofNullable(filters);
return this;
}
public Builder filters(Optional<Boolean> filters) {
Utils.checkNotNull(filters, "filters");
this.filters = filters;
return this;
}
public Builder refreshing(boolean refreshing) {
Utils.checkNotNull(refreshing, "refreshing");
this.refreshing = Optional.ofNullable(refreshing);
return this;
}
public Builder refreshing(Optional<Boolean> refreshing) {
Utils.checkNotNull(refreshing, "refreshing");
this.refreshing = refreshing;
return this;
}
public Builder thumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = Optional.ofNullable(thumb);
return this;
}
public Builder thumb(Optional<String> thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
public Builder key(String key) {
Utils.checkNotNull(key, "key");
this.key = Optional.ofNullable(key);
return this;
}
public Builder key(Optional<String> key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public Builder type(String type) {
Utils.checkNotNull(type, "type");
this.type = Optional.ofNullable(type);
return this;
}
public Builder type(Optional<String> type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public Builder title(String title) {
Utils.checkNotNull(title, "title");
this.title = Optional.ofNullable(title);
return this;
}
public Builder title(Optional<String> title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public Builder agent(String agent) {
Utils.checkNotNull(agent, "agent");
this.agent = Optional.ofNullable(agent);
return this;
}
public Builder agent(Optional<String> agent) {
Utils.checkNotNull(agent, "agent");
this.agent = agent;
return this;
}
public Builder scanner(String scanner) {
Utils.checkNotNull(scanner, "scanner");
this.scanner = Optional.ofNullable(scanner);
return this;
}
public Builder scanner(Optional<String> scanner) {
Utils.checkNotNull(scanner, "scanner");
this.scanner = scanner;
return this;
}
public Builder language(String language) {
Utils.checkNotNull(language, "language");
this.language = Optional.ofNullable(language);
return this;
}
public Builder language(Optional<String> language) {
Utils.checkNotNull(language, "language");
this.language = language;
return this;
}
public Builder uuid(String uuid) {
Utils.checkNotNull(uuid, "uuid");
this.uuid = Optional.ofNullable(uuid);
return this;
}
public Builder uuid(Optional<String> uuid) {
Utils.checkNotNull(uuid, "uuid");
this.uuid = uuid;
return this;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public Builder updatedAt(long updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = Optional.ofNullable(updatedAt);
return this;
}
/**
* Unix epoch datetime
*/
public Builder updatedAt(Optional<Long> updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = updatedAt;
return this;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public Builder createdAt(long createdAt) {
Utils.checkNotNull(createdAt, "createdAt");
this.createdAt = Optional.ofNullable(createdAt);
return this;
}
/**
* Unix epoch datetime
*/
public Builder createdAt(Optional<Long> createdAt) {
Utils.checkNotNull(createdAt, "createdAt");
this.createdAt = createdAt;
return this;
}
/**
* Unix epoch datetime
* Unix epoch datetime in seconds
*/
public Builder scannedAt(long scannedAt) {
Utils.checkNotNull(scannedAt, "scannedAt");
this.scannedAt = Optional.ofNullable(scannedAt);
return this;
}
/**
* Unix epoch datetime
*/
public Builder scannedAt(Optional<Long> scannedAt) {
Utils.checkNotNull(scannedAt, "scannedAt");
this.scannedAt = scannedAt;
return this;
}
public Builder content(boolean content) {
Utils.checkNotNull(content, "content");
this.content = Optional.ofNullable(content);
return this;
}
public Builder content(Optional<Boolean> content) {
Utils.checkNotNull(content, "content");
this.content = content;
return this;
}
public Builder directory(boolean directory) {
Utils.checkNotNull(directory, "directory");
this.directory = Optional.ofNullable(directory);
return this;
}
public Builder directory(Optional<Boolean> directory) {
Utils.checkNotNull(directory, "directory");
this.directory = directory;
return this;
}
public Builder contentChangedAt(int contentChangedAt) {
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
this.contentChangedAt = Optional.ofNullable(contentChangedAt);
return this;
}
public Builder contentChangedAt(Optional<Integer> contentChangedAt) {
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
this.contentChangedAt = contentChangedAt;
return this;
}
public Builder hidden(int hidden) {
Utils.checkNotNull(hidden, "hidden");
this.hidden = Optional.ofNullable(hidden);
return this;
}
public Builder hidden(Optional<Integer> hidden) {
Utils.checkNotNull(hidden, "hidden");
this.hidden = hidden;
return this;
}
public Builder location(List<Location> location) {
Utils.checkNotNull(location, "location");
this.location = Optional.ofNullable(location);
return this;
}
public Builder location(Optional<? extends List<Location>> location) {
Utils.checkNotNull(location, "location");
this.location = location;
return this;

View File

@@ -7,18 +7,14 @@ package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
public class GetAllLibrariesMediaContainer {
@@ -32,16 +28,15 @@ public class GetAllLibrariesMediaContainer {
@JsonProperty("title1")
private String title1;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Directory")
private Optional<? extends List<GetAllLibrariesDirectory>> directory;
private List<GetAllLibrariesDirectory> directory;
@JsonCreator
public GetAllLibrariesMediaContainer(
@JsonProperty("size") int size,
@JsonProperty("allowSync") boolean allowSync,
@JsonProperty("title1") String title1,
@JsonProperty("Directory") Optional<? extends List<GetAllLibrariesDirectory>> directory) {
@JsonProperty("Directory") List<GetAllLibrariesDirectory> directory) {
Utils.checkNotNull(size, "size");
Utils.checkNotNull(allowSync, "allowSync");
Utils.checkNotNull(title1, "title1");
@@ -52,13 +47,6 @@ public class GetAllLibrariesMediaContainer {
this.directory = directory;
}
public GetAllLibrariesMediaContainer(
int size,
boolean allowSync,
String title1) {
this(size, allowSync, title1, Optional.empty());
}
@JsonIgnore
public int size() {
return size;
@@ -74,10 +62,9 @@ public class GetAllLibrariesMediaContainer {
return title1;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetAllLibrariesDirectory>> directory() {
return (Optional<List<GetAllLibrariesDirectory>>) directory;
public List<GetAllLibrariesDirectory> directory() {
return directory;
}
public final static Builder builder() {
@@ -103,12 +90,6 @@ public class GetAllLibrariesMediaContainer {
}
public GetAllLibrariesMediaContainer withDirectory(List<GetAllLibrariesDirectory> directory) {
Utils.checkNotNull(directory, "directory");
this.directory = Optional.ofNullable(directory);
return this;
}
public GetAllLibrariesMediaContainer withDirectory(Optional<? extends List<GetAllLibrariesDirectory>> directory) {
Utils.checkNotNull(directory, "directory");
this.directory = directory;
return this;
@@ -156,7 +137,7 @@ public class GetAllLibrariesMediaContainer {
private String title1;
private Optional<? extends List<GetAllLibrariesDirectory>> directory = Optional.empty();
private List<GetAllLibrariesDirectory> directory;
private Builder() {
// force use of static builder() method
@@ -181,12 +162,6 @@ public class GetAllLibrariesMediaContainer {
}
public Builder directory(List<GetAllLibrariesDirectory> directory) {
Utils.checkNotNull(directory, "directory");
this.directory = Optional.ofNullable(directory);
return this;
}
public Builder directory(Optional<? extends List<GetAllLibrariesDirectory>> directory) {
Utils.checkNotNull(directory, "directory");
this.directory = directory;
return this;

View File

@@ -7,15 +7,11 @@ package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Objects;
import java.util.Optional;
/**
* GetAllLibrariesResponseBody - The libraries available on the Server
@@ -23,25 +19,19 @@ import java.util.Optional;
public class GetAllLibrariesResponseBody {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("MediaContainer")
private Optional<? extends GetAllLibrariesMediaContainer> mediaContainer;
private GetAllLibrariesMediaContainer mediaContainer;
@JsonCreator
public GetAllLibrariesResponseBody(
@JsonProperty("MediaContainer") Optional<? extends GetAllLibrariesMediaContainer> mediaContainer) {
@JsonProperty("MediaContainer") GetAllLibrariesMediaContainer mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = mediaContainer;
}
public GetAllLibrariesResponseBody() {
this(Optional.empty());
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetAllLibrariesMediaContainer> mediaContainer() {
return (Optional<GetAllLibrariesMediaContainer>) mediaContainer;
public GetAllLibrariesMediaContainer mediaContainer() {
return mediaContainer;
}
public final static Builder builder() {
@@ -49,12 +39,6 @@ public class GetAllLibrariesResponseBody {
}
public GetAllLibrariesResponseBody withMediaContainer(GetAllLibrariesMediaContainer mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = Optional.ofNullable(mediaContainer);
return this;
}
public GetAllLibrariesResponseBody withMediaContainer(Optional<? extends GetAllLibrariesMediaContainer> mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = mediaContainer;
return this;
@@ -87,19 +71,13 @@ public class GetAllLibrariesResponseBody {
public final static class Builder {
private Optional<? extends GetAllLibrariesMediaContainer> mediaContainer = Optional.empty();
private GetAllLibrariesMediaContainer mediaContainer;
private Builder() {
// force use of static builder() method
}
public Builder mediaContainer(GetAllLibrariesMediaContainer mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = Optional.ofNullable(mediaContainer);
return this;
}
public Builder mediaContainer(Optional<? extends GetAllLibrariesMediaContainer> mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = mediaContainer;
return this;

View File

@@ -23,7 +23,7 @@ public class GetBandwidthStatisticsRequestBuilder {
return this;
}
public GetBandwidthStatisticsRequestBuilder timespan(java.util.Optional<java.lang.Long> timespan) {
public GetBandwidthStatisticsRequestBuilder timespan(Optional<Long> timespan) {
Utils.checkNotNull(timespan, "timespan");
this.timespan = timespan;
return this;

Some files were not shown because too many files have changed in this diff Show More