mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-06 20:47:45 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3499fe6d12 | ||
|
|
f3780ae807 |
File diff suppressed because one or more lines are too long
@@ -12,7 +12,7 @@ generation:
|
|||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: true
|
oAuth2ClientCredentialsEnabled: true
|
||||||
java:
|
java:
|
||||||
version: 0.3.5
|
version: 0.4.0
|
||||||
additionalDependencies: []
|
additionalDependencies: []
|
||||||
additionalPlugins: []
|
additionalPlugins: []
|
||||||
artifactID: plexapi
|
artifactID: plexapi
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
speakeasyVersion: 1.397.3
|
speakeasyVersion: 1.401.2
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
my-source:
|
||||||
sourceNamespace: my-source
|
sourceNamespace: my-source
|
||||||
@@ -8,8 +8,8 @@ sources:
|
|||||||
- latest
|
- latest
|
||||||
plexapi:
|
plexapi:
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:533fe97486e3fe2d84e890b7bbcdba4543d415e45181386154e011861f6da36f
|
sourceRevisionDigest: sha256:5aa71ad96ca6de91143ee513c9880e08e555e7748fb4b5f8d069c6ab0c8f3069
|
||||||
sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9
|
sourceBlobDigest: sha256:1cbef844e2856c2eabba4bd6d677d96c572fed13b27978d0d953aa06b224c02f
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- main
|
- main
|
||||||
@@ -17,10 +17,10 @@ targets:
|
|||||||
plexjava:
|
plexjava:
|
||||||
source: plexapi
|
source: plexapi
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:533fe97486e3fe2d84e890b7bbcdba4543d415e45181386154e011861f6da36f
|
sourceRevisionDigest: sha256:5aa71ad96ca6de91143ee513c9880e08e555e7748fb4b5f8d069c6ab0c8f3069
|
||||||
sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9
|
sourceBlobDigest: sha256:1cbef844e2856c2eabba4bd6d677d96c572fed13b27978d0d953aa06b224c02f
|
||||||
codeSamplesNamespace: code-samples-java-plexjava
|
codeSamplesNamespace: code-samples-java-plexjava
|
||||||
codeSamplesRevisionDigest: sha256:03bbcd874f602bc3c4399006b5786cf79cc602609d21aeb38a332f69e03fde9e
|
codeSamplesRevisionDigest: sha256:e98bd3fd8e811e5368343de5de5c1f0c7d154bf8ab1b56532fe72b65bc70297c
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: latest
|
speakeasyVersion: latest
|
||||||
|
|||||||
295
README.md
295
README.md
@@ -37,7 +37,7 @@ The samples below show how a published SDK artifact is used:
|
|||||||
|
|
||||||
Gradle:
|
Gradle:
|
||||||
```groovy
|
```groovy
|
||||||
implementation 'dev.plexapi:plexapi:0.3.5'
|
implementation 'dev.plexapi:plexapi:0.4.0'
|
||||||
```
|
```
|
||||||
|
|
||||||
Maven:
|
Maven:
|
||||||
@@ -45,7 +45,7 @@ Maven:
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>dev.plexapi</groupId>
|
<groupId>dev.plexapi</groupId>
|
||||||
<artifactId>plexapi</artifactId>
|
<artifactId>plexapi</artifactId>
|
||||||
<version>0.3.5</version>
|
<version>0.4.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -73,39 +73,30 @@ gradlew.bat publishToMavenLocal -Pskip.signing
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -246,21 +237,25 @@ public class Application {
|
|||||||
<!-- Start Global Parameters [global-parameters] -->
|
<!-- Start Global Parameters [global-parameters] -->
|
||||||
## Global Parameters
|
## Global Parameters
|
||||||
|
|
||||||
A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
|
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 `X-Plex-Client-Identifier` 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
|
### Available Globals
|
||||||
|
|
||||||
The following global parameter is available.
|
The following global parameters are available.
|
||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
| ---- | ---- |:--------:| ----------- |
|
| ---- | ---- |:--------:| ----------- |
|
||||||
| xPlexClientIdentifier | java.lang.String | | The unique identifier for the client application
|
| clientID | java.lang.String | | The unique identifier for the client application
|
||||||
This is used to track the client application and its usage
|
This is used to track the client application and its usage
|
||||||
(UUID, serial number, or other number unique per device)
|
(UUID, serial number, or other number unique per device)
|
||||||
|
|
|
|
||||||
|
| clientName | java.lang.String | | The clientName parameter. |
|
||||||
|
| clientVersion | java.lang.String | | The clientVersion parameter. |
|
||||||
|
| clientPlatform | java.lang.String | | The clientPlatform parameter. |
|
||||||
|
| deviceName | java.lang.String | | The deviceName parameter. |
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
@@ -269,46 +264,33 @@ This is used to track the client application and its usage
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetServerResourcesResponse;
|
import dev.plexapi.sdk.models.operations.GetPinRequest;
|
||||||
import dev.plexapi.sdk.models.operations.IncludeHttps;
|
import dev.plexapi.sdk.models.operations.GetPinResponse;
|
||||||
import dev.plexapi.sdk.models.operations.IncludeIPv6;
|
|
||||||
import dev.plexapi.sdk.models.operations.IncludeRelay;
|
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetPinBadRequest, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetPinRequest req = GetPinRequest.builder()
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
GetServerResourcesResponse res = sdk.plex().getServerResources()
|
GetPinResponse res = sdk.plex().getPin()
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
.request(req)
|
||||||
.includeHttps(IncludeHttps.ONE)
|
|
||||||
.includeRelay(IncludeRelay.ONE)
|
|
||||||
.includeIPv6(IncludeIPv6.ONE)
|
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.plexDevices().isPresent()) {
|
if (res.authPinContainer().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -331,39 +313,30 @@ Handling errors in this SDK should largely match your expectations. All operati
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -386,40 +359,31 @@ You can override the default server globally by passing a server index to the `s
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
.serverIndex(0)
|
.serverIndex(0)
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
.build();
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -438,40 +402,31 @@ The default server can also be overridden globally by passing a URL to the `serv
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
.serverURL("{protocol}://{ip}:{port}")
|
.serverURL("{protocol}://{ip}:{port}")
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
.build();
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -483,40 +438,31 @@ The server URL can also be overridden on a per-operation basis, provided a serve
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetCompanionsDataResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetCompanionsDataBadRequest, GetCompanionsDataUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetCompanionsDataResponse res = sdk.plex().getCompanionsData()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetCompanionsDataResponse res = sdk.plex().getCompanionsData()
|
||||||
.serverURL("https://plex.tv/api/v2/")
|
.serverURL("https://plex.tv/api/v2/")
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.responseBodies().isPresent()) {
|
if (res.responseBodies().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -538,39 +484,30 @@ To authenticate with the API the `accessToken` parameter must be set when initia
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
20
RELEASES.md
20
RELEASES.md
@@ -59,3 +59,23 @@ Based on:
|
|||||||
- [java v0.3.5] .
|
- [java v0.3.5] .
|
||||||
### Releases
|
### Releases
|
||||||
- [Maven Central v0.3.5] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.3.5 - .
|
- [Maven Central v0.3.5] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.3.5 - .
|
||||||
|
|
||||||
|
## 2024-09-19 00:24:42
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.399.2 (2.416.6) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [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 - .
|
||||||
39
USAGE.md
39
USAGE.md
@@ -3,39 +3,30 @@
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ tasks.withType(Javadoc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "dev.plexapi"
|
group = "dev.plexapi"
|
||||||
version = "0.3.5"
|
version = "0.4.0"
|
||||||
|
|
||||||
sourcesJar {
|
sourcesJar {
|
||||||
archiveBaseName = "plexapi"
|
archiveBaseName = "plexapi"
|
||||||
@@ -101,7 +101,7 @@ publishing {
|
|||||||
maven(MavenPublication) {
|
maven(MavenPublication) {
|
||||||
groupId = 'dev.plexapi'
|
groupId = 'dev.plexapi'
|
||||||
artifactId = 'plexapi'
|
artifactId = 'plexapi'
|
||||||
version = '0.3.5'
|
version = '0.4.0'
|
||||||
|
|
||||||
from components.java
|
from components.java
|
||||||
|
|
||||||
|
|||||||
2894
codeSamples.yaml
2894
codeSamples.yaml
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign aud
|
|||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
@@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description |
|
||||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
|
||||||
| `protocol` | *String* | :heavy_check_mark: | N/A |
|
| `protocol` | [Protocol](../../models/operations/Protocol.md) | :heavy_check_mark: | The protocol used for the connection (http, https, etc) |
|
||||||
| `address` | *String* | :heavy_check_mark: | N/A |
|
| `address` | *String* | :heavy_check_mark: | The (ip) address or domain name used for the connection |
|
||||||
| `port` | *double* | :heavy_check_mark: | N/A |
|
| `port` | *int* | :heavy_check_mark: | The port used for the connection |
|
||||||
| `uri` | *String* | :heavy_check_mark: | N/A |
|
| `uri` | *String* | :heavy_check_mark: | The full URI of the connection |
|
||||||
| `local` | *boolean* | :heavy_check_mark: | N/A |
|
| `local` | *boolean* | :heavy_check_mark: | If the connection is local address |
|
||||||
| `relay` | *boolean* | :heavy_check_mark: | N/A |
|
| `relay` | *boolean* | :heavy_check_mark: | If the connection is relayed through plex.direct |
|
||||||
| `iPv6` | *boolean* | :heavy_check_mark: | N/A |
|
| `iPv6` | *boolean* | :heavy_check_mark: | If the connection is using IPv6 |
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
# DefaultSubtitleAccessibility
|
# 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
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
@@ -5,7 +5,7 @@ The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer
|
|||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
@@ -13,7 +13,7 @@ Geo location data
|
|||||||
| `city` | *String* | :heavy_check_mark: | The name of the city. | Amsterdam |
|
| `city` | *String* | :heavy_check_mark: | The name of the city. | Amsterdam |
|
||||||
| `europeanUnionMember` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true |
|
| `europeanUnionMember` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true |
|
||||||
| `timeZone` | *String* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas |
|
| `timeZone` | *String* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas |
|
||||||
| `postalCode` | *long* | :heavy_check_mark: | The postal code of the location. | 802 |
|
| `postalCode` | *String* | :heavy_check_mark: | The postal code of the location. | 802 |
|
||||||
| `inPrivacyRestrictedCountry` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true |
|
| `inPrivacyRestrictedCountry` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true |
|
||||||
| `inPrivacyRestrictedRegion` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true |
|
| `inPrivacyRestrictedRegion` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true |
|
||||||
| `subdivisions` | *String* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas |
|
| `subdivisions` | *String* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas |
|
||||||
|
|||||||
@@ -5,24 +5,24 @@
|
|||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
||||||
| `allowSync` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | true |
|
||||||
| `art` | *Optional<String>* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
| `art` | *String* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg |
|
||||||
| `composite` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 |
|
| `composite` | *String* | :heavy_check_mark: | N/A | /library/sections/1/composite/1705615584 |
|
||||||
| `filters` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
| `filters` | *boolean* | :heavy_check_mark: | N/A | true |
|
||||||
| `refreshing` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | false |
|
| `refreshing` | *boolean* | :heavy_check_mark: | N/A | false |
|
||||||
| `thumb` | *Optional<String>* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
|
| `thumb` | *String* | :heavy_check_mark: | N/A | /:/resources/movie.png |
|
||||||
| `key` | *Optional<String>* | :heavy_minus_sign: | N/A | 1 |
|
| `key` | *String* | :heavy_check_mark: | N/A | 1 |
|
||||||
| `type` | *Optional<String>* | :heavy_minus_sign: | N/A | movie |
|
| `type` | *String* | :heavy_check_mark: | N/A | movie |
|
||||||
| `title` | *Optional<String>* | :heavy_minus_sign: | N/A | Movies |
|
| `title` | *String* | :heavy_check_mark: | N/A | Movies |
|
||||||
| `agent` | *Optional<String>* | :heavy_minus_sign: | N/A | tv.plex.agents.movie |
|
| `agent` | *String* | :heavy_check_mark: | N/A | tv.plex.agents.movie |
|
||||||
| `scanner` | *Optional<String>* | :heavy_minus_sign: | N/A | Plex Movie |
|
| `scanner` | *String* | :heavy_check_mark: | N/A | Plex Movie |
|
||||||
| `language` | *Optional<String>* | :heavy_minus_sign: | N/A | en-US |
|
| `language` | *String* | :heavy_check_mark: | N/A | en-US |
|
||||||
| `uuid` | *Optional<String>* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
| `uuid` | *String* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
||||||
| `updatedAt` | *Optional<Long>* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 |
|
| `updatedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||||
| `createdAt` | *Optional<Long>* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 |
|
| `createdAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||||
| `scannedAt` | *Optional<Long>* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 |
|
| `scannedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||||
| `content` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
| `content` | *boolean* | :heavy_check_mark: | N/A | true |
|
||||||
| `directory` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
| `directory` | *boolean* | :heavy_check_mark: | N/A | true |
|
||||||
| `contentChangedAt` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 3192854 |
|
| `contentChangedAt` | *int* | :heavy_check_mark: | N/A | 3192854 |
|
||||||
| `hidden` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 0 |
|
| `hidden` | *int* | :heavy_check_mark: | N/A | 0 |
|
||||||
| `location` | List<[Location](../../models/operations/Location.md)> | :heavy_minus_sign: | N/A | |
|
| `location` | List<[Location](../../models/operations/Location.md)> | :heavy_check_mark: | N/A | |
|
||||||
@@ -8,4 +8,4 @@
|
|||||||
| `size` | *int* | :heavy_check_mark: | N/A | 5 |
|
| `size` | *int* | :heavy_check_mark: | N/A | 5 |
|
||||||
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | false |
|
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | false |
|
||||||
| `title1` | *String* | :heavy_check_mark: | N/A | Plex Library |
|
| `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 | |
|
||||||
@@ -5,6 +5,6 @@ The libraries available on the Server
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description |
|
||||||
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||||
| `mediaContainer` | [Optional<GetAllLibrariesMediaContainer>](../../models/operations/GetAllLibrariesMediaContainer.md) | :heavy_minus_sign: | N/A |
|
| `mediaContainer` | [GetAllLibrariesMediaContainer](../../models/operations/GetAllLibrariesMediaContainer.md) | :heavy_check_mark: | N/A |
|
||||||
@@ -13,7 +13,7 @@ Geo location data
|
|||||||
| `city` | *String* | :heavy_check_mark: | The name of the city. | Amsterdam |
|
| `city` | *String* | :heavy_check_mark: | The name of the city. | Amsterdam |
|
||||||
| `europeanUnionMember` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true |
|
| `europeanUnionMember` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true |
|
||||||
| `timeZone` | *String* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas |
|
| `timeZone` | *String* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas |
|
||||||
| `postalCode` | *long* | :heavy_check_mark: | The postal code of the location. | 802 |
|
| `postalCode` | *String* | :heavy_check_mark: | The postal code of the location. | 802 |
|
||||||
| `inPrivacyRestrictedCountry` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true |
|
| `inPrivacyRestrictedCountry` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true |
|
||||||
| `inPrivacyRestrictedRegion` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true |
|
| `inPrivacyRestrictedRegion` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true |
|
||||||
| `subdivisions` | *String* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas |
|
| `subdivisions` | *String* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas |
|
||||||
|
|||||||
11
docs/models/operations/GetLibraryItemsField.md
Normal file
11
docs/models/operations/GetLibraryItemsField.md
Normal 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 |
|
||||||
9
docs/models/operations/GetLibraryItemsFieldType.md
Normal file
9
docs/models/operations/GetLibraryItemsFieldType.md
Normal 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 | |
|
||||||
12
docs/models/operations/GetLibraryItemsFilter.md
Normal file
12
docs/models/operations/GetLibraryItemsFilter.md
Normal 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 |
|
||||||
@@ -3,21 +3,22 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
||||||
| `size` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 70 |
|
| `size` | *int* | :heavy_check_mark: | N/A | 70 |
|
||||||
| `allowSync` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | true |
|
||||||
| `art` | *Optional<String>* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
| `art` | *String* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg |
|
||||||
| `identifier` | *Optional<String>* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
|
| `identifier` | *String* | :heavy_check_mark: | N/A | com.plexapp.plugins.library |
|
||||||
| `librarySectionID` | [Optional<LibrarySectionID>](../../models/operations/LibrarySectionID.md) | :heavy_minus_sign: | N/A | |
|
| `librarySectionID` | [LibrarySectionID](../../models/operations/LibrarySectionID.md) | :heavy_check_mark: | N/A | |
|
||||||
| `librarySectionTitle` | *Optional<String>* | :heavy_minus_sign: | N/A | Movies |
|
| `librarySectionTitle` | *String* | :heavy_check_mark: | N/A | Movies |
|
||||||
| `librarySectionUUID` | *Optional<String>* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
| `librarySectionUUID` | *String* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
||||||
| `mediaTagPrefix` | *Optional<String>* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ |
|
| `mediaTagPrefix` | *String* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ |
|
||||||
| `mediaTagVersion` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1701731894 |
|
| `mediaTagVersion` | *int* | :heavy_check_mark: | N/A | 1701731894 |
|
||||||
| `thumb` | *Optional<String>* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
|
| `thumb` | *String* | :heavy_check_mark: | N/A | /:/resources/movie.png |
|
||||||
| `title1` | *Optional<String>* | :heavy_minus_sign: | N/A | Movies |
|
| `title1` | *String* | :heavy_check_mark: | N/A | Movies |
|
||||||
| `title2` | *Optional<String>* | :heavy_minus_sign: | N/A | Recently Released |
|
| `title2` | *String* | :heavy_check_mark: | N/A | Recently Released |
|
||||||
| `viewGroup` | *Optional<String>* | :heavy_minus_sign: | N/A | movie |
|
| `viewGroup` | *String* | :heavy_check_mark: | N/A | movie |
|
||||||
| `viewMode` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 65592 |
|
| `viewMode` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 65592 |
|
||||||
| `mixedParents` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
| `mixedParents` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||||
| `metadata` | List<[GetLibraryItemsMetadata](../../models/operations/GetLibraryItemsMetadata.md)> | :heavy_minus_sign: | N/A | |
|
| `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/> | |
|
||||||
@@ -5,21 +5,21 @@
|
|||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `ratingKey` | *Optional<String>* | :heavy_minus_sign: | N/A | 58683 |
|
| `ratingKey` | *String* | :heavy_check_mark: | N/A | 58683 |
|
||||||
| `key` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683 |
|
| `key` | *String* | :heavy_check_mark: | N/A | /library/metadata/58683 |
|
||||||
| `guid` | *Optional<String>* | :heavy_minus_sign: | N/A | plex://movie/5d7768ba96b655001fdc0408 |
|
| `guid` | *String* | :heavy_check_mark: | N/A | plex://movie/5d7768ba96b655001fdc0408 |
|
||||||
| `studio` | *Optional<String>* | :heavy_minus_sign: | N/A | 20th Century Studios |
|
| `studio` | *Optional<String>* | :heavy_minus_sign: | N/A | 20th Century Studios |
|
||||||
| `type` | *Optional<String>* | :heavy_minus_sign: | N/A | movie |
|
| `type` | *String* | :heavy_check_mark: | N/A | movie |
|
||||||
| `title` | *Optional<String>* | :heavy_minus_sign: | N/A | Avatar: The Way of Water |
|
| `title` | *String* | :heavy_check_mark: | N/A | Avatar: The Way of Water |
|
||||||
| `contentRating` | *Optional<String>* | :heavy_minus_sign: | N/A | PG-13 |
|
| `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. |
|
| `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 |
|
| `rating` | *Optional<Double>* | :heavy_minus_sign: | N/A | 7.6 |
|
||||||
| `audienceRating` | *Optional<Double>* | :heavy_minus_sign: | N/A | 9.2 |
|
| `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. |
|
| `tagline` | *Optional<String>* | :heavy_minus_sign: | N/A | Return to Pandora. |
|
||||||
| `thumb` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `addedAt` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1680457607 |
|
||||||
| `updatedAt` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1703239236 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `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 | |
|
| `genre` | List<[GetLibraryItemsGenre](../../models/operations/GetLibraryItemsGenre.md)> | :heavy_minus_sign: | N/A | |
|
||||||
| `country` | List<[GetLibraryItemsCountry](../../models/operations/GetLibraryItemsCountry.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 | |
|
| `director` | List<[GetLibraryItemsDirector](../../models/operations/GetLibraryItemsDirector.md)> | :heavy_minus_sign: | N/A | |
|
||||||
| `writer` | List<[GetLibraryItemsWriter](../../models/operations/GetLibraryItemsWriter.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 | |
|
| `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 |
|
| `titleSort` | *Optional<String>* | :heavy_minus_sign: | N/A | Whale |
|
||||||
| `viewCount` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1 |
|
| `viewCount` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1 |
|
||||||
| `lastViewedAt` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1682752242 |
|
| `lastViewedAt` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1682752242 |
|
||||||
|
|||||||
9
docs/models/operations/GetLibraryItemsOperator.md
Normal file
9
docs/models/operations/GetLibraryItemsOperator.md
Normal 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 |
|
||||||
13
docs/models/operations/GetLibraryItemsSort.md
Normal file
13
docs/models/operations/GetLibraryItemsSort.md
Normal 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 |
|
||||||
14
docs/models/operations/GetLibraryItemsType.md
Normal file
14
docs/models/operations/GetLibraryItemsType.md
Normal 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 | |
|
||||||
@@ -9,13 +9,13 @@ Requests a new pin id used in the authentication flow
|
|||||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `id` | *long* | :heavy_check_mark: | N/A | 308667304 |
|
| `id` | *long* | :heavy_check_mark: | N/A | 308667304 |
|
||||||
| `code` | *String* | :heavy_check_mark: | N/A | 7RQZ |
|
| `code` | *String* | :heavy_check_mark: | N/A | 7RQZ |
|
||||||
| `product` | *String* | :heavy_check_mark: | N/A | 0 |
|
| `product` | *String* | :heavy_check_mark: | N/A | Tautulli |
|
||||||
| `trusted` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | |
|
| `trusted` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | |
|
||||||
| `qr` | *String* | :heavy_check_mark: | N/A | https://plex.tv/api/v2/pins/qr/7RQZ |
|
| `qr` | *String* | :heavy_check_mark: | N/A | https://plex.tv/api/v2/pins/qr/7RQZ |
|
||||||
| `clientIdentifier` | *String* | :heavy_check_mark: | The X-Client-Identifier used in the request | |
|
| `clientIdentifier` | *String* | :heavy_check_mark: | The X-Client-Identifier used in the request | Tautulli |
|
||||||
| `location` | [GeoData](../../models/operations/GeoData.md) | :heavy_check_mark: | Geo location data | {<br/>"code": "VI",<br/>"continent_code": "NA",<br/>"country": "United States Virgin Islands",<br/>"city": "Amsterdam",<br/>"european_union_member": true,<br/>"time_zone": "America/St_Thomas",<br/>"postal_code": 802,<br/>"in_privacy_restricted_country": true,<br/>"in_privacy_restricted_region": true,<br/>"subdivisions": "Saint Thomas",<br/>"coordinates": "18.3381, -64.8941"<br/>} |
|
| `location` | [GeoData](../../models/operations/GeoData.md) | :heavy_check_mark: | Geo location data | {<br/>"code": "VI",<br/>"continent_code": "NA",<br/>"country": "United States Virgin Islands",<br/>"city": "Amsterdam",<br/>"european_union_member": true,<br/>"time_zone": "America/St_Thomas",<br/>"postal_code": 802,<br/>"in_privacy_restricted_country": true,<br/>"in_privacy_restricted_region": true,<br/>"subdivisions": "Saint Thomas",<br/>"coordinates": "18.3381, -64.8941"<br/>} |
|
||||||
| `expiresIn` | *Optional<Long>* | :heavy_minus_sign: | The number of seconds this pin expires, by default 900 seconds | 876 |
|
| `expiresIn` | *Optional<Long>* | :heavy_minus_sign: | The number of seconds this pin expires, by default 900 seconds | 876 |
|
||||||
| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:03:05Z |
|
| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:03:05Z |
|
||||||
| `expiresAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:18:05Z |
|
| `expiresAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:18:05Z |
|
||||||
| `authToken` | *JsonNullable<Object>* | :heavy_minus_sign: | N/A | |
|
| `authToken` | *JsonNullable<String>* | :heavy_minus_sign: | N/A | gcgzw5rz2xovp84b4vha3a40 |
|
||||||
| `newRegistration` | *JsonNullable<Object>* | :heavy_minus_sign: | N/A | |
|
| `newRegistration` | *JsonNullable<Object>* | :heavy_minus_sign: | N/A | |
|
||||||
@@ -3,8 +3,10 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `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/> | |
|
||||||
| `xPlexClientIdentifier` | *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 |
|
||||||
| `xPlexProduct` | *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 |
|
||||||
@@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season
|
|||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------- | ------- |
|
| --------- | --------- |
|
||||||
| `ONE` | 1 |
|
| `Movie` | 1 |
|
||||||
| `TWO` | 2 |
|
| `Show` | 2 |
|
||||||
| `THREE` | 3 |
|
| `Season` | 3 |
|
||||||
| `FOUR` | 4 |
|
| `Episode` | 4 |
|
||||||
@@ -3,9 +3,8 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `xPlexClientIdentifier` | *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 |
|
||||||
| `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 |
|
||||||
| `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 |
|
||||||
| `includeIPv6` | [Optional<IncludeIPv6>](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
|
|
||||||
@@ -9,13 +9,13 @@ The Pin with a non-null authToken when it has been verified by the user
|
|||||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `id` | *long* | :heavy_check_mark: | N/A | 308667304 |
|
| `id` | *long* | :heavy_check_mark: | N/A | 308667304 |
|
||||||
| `code` | *String* | :heavy_check_mark: | N/A | 7RQZ |
|
| `code` | *String* | :heavy_check_mark: | N/A | 7RQZ |
|
||||||
| `product` | *String* | :heavy_check_mark: | N/A | 0 |
|
| `product` | *String* | :heavy_check_mark: | N/A | Tautulli |
|
||||||
| `trusted` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | |
|
| `trusted` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | |
|
||||||
| `qr` | *String* | :heavy_check_mark: | N/A | https://plex.tv/api/v2/pins/qr/7RQZ |
|
| `qr` | *String* | :heavy_check_mark: | N/A | https://plex.tv/api/v2/pins/qr/7RQZ |
|
||||||
| `clientIdentifier` | *String* | :heavy_check_mark: | The X-Client-Identifier used in the request | |
|
| `clientIdentifier` | *String* | :heavy_check_mark: | The X-Client-Identifier used in the request | Tautulli |
|
||||||
| `location` | [GetTokenByPinIdGeoData](../../models/operations/GetTokenByPinIdGeoData.md) | :heavy_check_mark: | Geo location data | {<br/>"code": "VI",<br/>"continent_code": "NA",<br/>"country": "United States Virgin Islands",<br/>"city": "Amsterdam",<br/>"european_union_member": true,<br/>"time_zone": "America/St_Thomas",<br/>"postal_code": 802,<br/>"in_privacy_restricted_country": true,<br/>"in_privacy_restricted_region": true,<br/>"subdivisions": "Saint Thomas",<br/>"coordinates": "18.3381, -64.8941"<br/>} |
|
| `location` | [GetTokenByPinIdGeoData](../../models/operations/GetTokenByPinIdGeoData.md) | :heavy_check_mark: | Geo location data | {<br/>"code": "VI",<br/>"continent_code": "NA",<br/>"country": "United States Virgin Islands",<br/>"city": "Amsterdam",<br/>"european_union_member": true,<br/>"time_zone": "America/St_Thomas",<br/>"postal_code": 802,<br/>"in_privacy_restricted_country": true,<br/>"in_privacy_restricted_region": true,<br/>"subdivisions": "Saint Thomas",<br/>"coordinates": "18.3381, -64.8941"<br/>} |
|
||||||
| `expiresIn` | *Optional<Long>* | :heavy_minus_sign: | The number of seconds this pin expires, by default 900 seconds | 876 |
|
| `expiresIn` | *Optional<Long>* | :heavy_minus_sign: | The number of seconds this pin expires, by default 900 seconds | 876 |
|
||||||
| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:03:05Z |
|
| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:03:05Z |
|
||||||
| `expiresAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:18:05Z |
|
| `expiresAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:18:05Z |
|
||||||
| `authToken` | *JsonNullable<Object>* | :heavy_minus_sign: | N/A | |
|
| `authToken` | *JsonNullable<String>* | :heavy_minus_sign: | N/A | gcgzw5rz2xovp84b4vha3a40 |
|
||||||
| `newRegistration` | *JsonNullable<Object>* | :heavy_minus_sign: | N/A | |
|
| `newRegistration` | *JsonNullable<Object>* | :heavy_minus_sign: | N/A | |
|
||||||
@@ -13,7 +13,7 @@ Geo location data
|
|||||||
| `city` | *String* | :heavy_check_mark: | The name of the city. | Amsterdam |
|
| `city` | *String* | :heavy_check_mark: | The name of the city. | Amsterdam |
|
||||||
| `europeanUnionMember` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true |
|
| `europeanUnionMember` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true |
|
||||||
| `timeZone` | *String* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas |
|
| `timeZone` | *String* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas |
|
||||||
| `postalCode` | *long* | :heavy_check_mark: | The postal code of the location. | 802 |
|
| `postalCode` | *String* | :heavy_check_mark: | The postal code of the location. | 802 |
|
||||||
| `inPrivacyRestrictedCountry` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true |
|
| `inPrivacyRestrictedCountry` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true |
|
||||||
| `inPrivacyRestrictedRegion` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true |
|
| `inPrivacyRestrictedRegion` | *Optional<Boolean>* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true |
|
||||||
| `subdivisions` | *String* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas |
|
| `subdivisions` | *String* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas |
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
||||||
| `xPlexClientIdentifier` | *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 |
|
||||||
| `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | |
|
|
||||||
@@ -26,7 +26,7 @@ Logged in user details
|
|||||||
| `homeAdmin` | *Optional<Boolean>* | :heavy_minus_sign: | If the account is the Plex Home admin | |
|
| `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 |
|
| `homeSize` | *int* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 |
|
||||||
| `id` | *int* | :heavy_check_mark: | The Plex account ID | 13692262 |
|
| `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 | |
|
| `locale` | *Optional<String>* | :heavy_check_mark: | The account locale | |
|
||||||
| `mailingListActive` | *Optional<Boolean>* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | |
|
| `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 | |
|
| `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 | |
|
| ~~`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 | |
|
| `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 | |
|
| `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 | |
|
| `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 | |
|
| `roles` | List<*String*> | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | |
|
||||||
| `scrobbleTypes` | *String* | :heavy_check_mark: | Unknown | |
|
| `scrobbleTypes` | *String* | :heavy_check_mark: | Unknown | |
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season
|
|||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------- | ------- |
|
| --------- | --------- |
|
||||||
| `ONE` | 1 |
|
| `Movie` | 1 |
|
||||||
| `TWO` | 2 |
|
| `Show` | 2 |
|
||||||
| `THREE` | 3 |
|
| `Season` | 3 |
|
||||||
| `FOUR` | 4 |
|
| `Episode` | 4 |
|
||||||
@@ -6,7 +6,7 @@ Adds the Guids object to the response
|
|||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
@@ -5,7 +5,7 @@ Include Https entries in the results
|
|||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
@@ -5,7 +5,7 @@ Include IPv6 entries in the results
|
|||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
@@ -6,7 +6,7 @@ Adds the Meta object to the response
|
|||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
@@ -7,7 +7,7 @@ E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
|
|||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
|
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||||
| `id` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1 |
|
| `id` | *int* | :heavy_check_mark: | N/A | 1 |
|
||||||
| `path` | *Optional<String>* | :heavy_minus_sign: | N/A | /movies |
|
| `path` | *String* | :heavy_check_mark: | N/A | /movies |
|
||||||
8
docs/models/operations/MediaGuid.md
Normal file
8
docs/models/operations/MediaGuid.md
Normal 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 |
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
# MediaReviewsVisibility
|
# MediaReviewsVisibility
|
||||||
|
|
||||||
|
Whether or not the account has media reviews visibility enabled
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
12
docs/models/operations/Meta.md
Normal file
12
docs/models/operations/Meta.md
Normal 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 |
|
||||||
@@ -3,29 +3,29 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||||
| `name` | *String* | :heavy_check_mark: | N/A |
|
| `name` | *String* | :heavy_check_mark: | N/A | |
|
||||||
| `product` | *String* | :heavy_check_mark: | N/A |
|
| `product` | *String* | :heavy_check_mark: | N/A | |
|
||||||
| `productVersion` | *String* | :heavy_check_mark: | N/A |
|
| `productVersion` | *String* | :heavy_check_mark: | N/A | |
|
||||||
| `platform` | *Optional<String>* | :heavy_check_mark: | N/A |
|
| `platform` | *Optional<String>* | :heavy_check_mark: | N/A | |
|
||||||
| `platformVersion` | *Optional<String>* | :heavy_check_mark: | N/A |
|
| `platformVersion` | *Optional<String>* | :heavy_check_mark: | N/A | |
|
||||||
| `device` | *Optional<String>* | :heavy_check_mark: | N/A |
|
| `device` | *Optional<String>* | :heavy_check_mark: | N/A | |
|
||||||
| `clientIdentifier` | *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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `sourceTitle` | *Optional<String>* | :heavy_check_mark: | N/A | |
|
||||||
| `publicAddress` | *String* | :heavy_check_mark: | N/A |
|
| `publicAddress` | *String* | :heavy_check_mark: | N/A | |
|
||||||
| `accessToken` | *String* | :heavy_check_mark: | N/A |
|
| `accessToken` | *String* | :heavy_check_mark: | N/A | |
|
||||||
| `owned` | *boolean* | :heavy_check_mark: | N/A |
|
| `owned` | *boolean* | :heavy_check_mark: | N/A | |
|
||||||
| `home` | *boolean* | :heavy_check_mark: | N/A |
|
| `home` | *boolean* | :heavy_check_mark: | N/A | |
|
||||||
| `synced` | *boolean* | :heavy_check_mark: | N/A |
|
| `synced` | *boolean* | :heavy_check_mark: | N/A | |
|
||||||
| `relay` | *boolean* | :heavy_check_mark: | N/A |
|
| `relay` | *boolean* | :heavy_check_mark: | N/A | |
|
||||||
| `presence` | *boolean* | :heavy_check_mark: | N/A |
|
| `presence` | *boolean* | :heavy_check_mark: | N/A | |
|
||||||
| `httpsRequired` | *boolean* | :heavy_check_mark: | N/A |
|
| `httpsRequired` | *boolean* | :heavy_check_mark: | N/A | |
|
||||||
| `publicAddressMatches` | *boolean* | :heavy_check_mark: | N/A |
|
| `publicAddressMatches` | *boolean* | :heavy_check_mark: | N/A | |
|
||||||
| `dnsRebindingProtection` | *boolean* | :heavy_check_mark: | N/A |
|
| `dnsRebindingProtection` | *boolean* | :heavy_check_mark: | N/A | |
|
||||||
| `natLoopbackSupported` | *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 |
|
| `connections` | List<[Connections](../../models/operations/Connections.md)> | :heavy_check_mark: | N/A | |
|
||||||
@@ -5,7 +5,7 @@ The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign aud
|
|||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
# PostUsersSignInDataDefaultSubtitleAccessibility
|
# 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
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
@@ -5,7 +5,7 @@ The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer
|
|||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
# PostUsersSignInDataMediaReviewsVisibility
|
# PostUsersSignInDataMediaReviewsVisibility
|
||||||
|
|
||||||
|
Whether or not the account has media reviews visibility enabled
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# PostUsersSignInDataRequest
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| `xPlexClientIdentifier` | *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 | |
|
|
||||||
@@ -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 | |
|
| `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 |
|
| `homeSize` | *int* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 |
|
||||||
| `id` | *int* | :heavy_check_mark: | The Plex account ID | 13692262 |
|
| `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 | |
|
| `locale` | *Optional<String>* | :heavy_check_mark: | The account locale | |
|
||||||
| `mailingListActive` | *Optional<Boolean>* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | |
|
| `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 | |
|
| `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 | |
|
| ~~`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 | |
|
| `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 | |
|
| `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 | |
|
| `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 | |
|
| `roles` | List<*String*> | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | |
|
||||||
| `scrobbleTypes` | *String* | :heavy_check_mark: | Unknown | |
|
| `scrobbleTypes` | *String* | :heavy_check_mark: | Unknown | |
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `autoSelectAudio` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `autoSelectSubtitle` | [Optional<PostUsersSignInDataAutoSelectSubtitle>](../../models/operations/PostUsersSignInDataAutoSelectSubtitle.md) | :heavy_minus_sign: | N/A | 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 |
|
| `defaultSubtitleAccessibility` | [Optional<PostUsersSignInDataDefaultSubtitleAccessibility>](../../models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.md) | :heavy_minus_sign: | N/A | 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 |
|
| `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 |
|
| `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 |
|
| `mediaReviewsVisibility` | [Optional<PostUsersSignInDataMediaReviewsVisibility>](../../models/operations/PostUsersSignInDataMediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 1 |
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
# PostUsersSignInDataWatchedIndicator
|
# PostUsersSignInDataWatchedIndicator
|
||||||
|
|
||||||
|
Whether or not media watched indicators are enabled (little orange dot on media)
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
11
docs/models/operations/Protocol.md
Normal file
11
docs/models/operations/Protocol.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Protocol
|
||||||
|
|
||||||
|
The protocol used for the connection (http, https, etc)
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------- | ------- |
|
||||||
|
| `HTTP` | http |
|
||||||
|
| `HTTPS` | https |
|
||||||
@@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season
|
|||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------- | ------- |
|
| --------- | --------- |
|
||||||
| `ONE` | 1 |
|
| `Movie` | 1 |
|
||||||
| `TWO` | 2 |
|
| `Show` | 2 |
|
||||||
| `THREE` | 3 |
|
| `Season` | 3 |
|
||||||
| `FOUR` | 4 |
|
| `Episode` | 4 |
|
||||||
@@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season
|
|||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------- | ------- |
|
| --------- | --------- |
|
||||||
| `ONE` | 1 |
|
| `Movie` | 1 |
|
||||||
| `TWO` | 2 |
|
| `Show` | 2 |
|
||||||
| `THREE` | 3 |
|
| `Season` | 3 |
|
||||||
| `FOUR` | 4 |
|
| `Episode` | 4 |
|
||||||
@@ -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 |
|
| `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/> | |
|
| `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 |
|
||||||
@@ -3,13 +3,13 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
||||||
| `autoSelectAudio` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `autoSelectSubtitle` | [Optional<AutoSelectSubtitle>](../../models/operations/AutoSelectSubtitle.md) | :heavy_minus_sign: | N/A | 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 |
|
| `defaultSubtitleAccessibility` | [Optional<DefaultSubtitleAccessibility>](../../models/operations/DefaultSubtitleAccessibility.md) | :heavy_minus_sign: | N/A | 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 |
|
| `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 |
|
| `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 |
|
| `mediaReviewsVisibility` | [Optional<MediaReviewsVisibility>](../../models/operations/MediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 1 |
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
# WatchedIndicator
|
# WatchedIndicator
|
||||||
|
|
||||||
|
Whether or not media watched indicators are enabled (little orange dot on media)
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| ------ | ------ |
|
| --------- | --------- |
|
||||||
| `ZERO` | 0 |
|
| `Disable` | 0 |
|
||||||
| `ONE` | 1 |
|
| `Enable` | 1 |
|
||||||
@@ -27,39 +27,30 @@ Get Server Activities
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetServerActivitiesResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetServerActivitiesBadRequest, GetServerActivitiesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetServerActivitiesResponse res = sdk.activities().getServerActivities()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetServerActivitiesResponse res = sdk.activities().getServerActivities()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -87,38 +78,29 @@ Cancel Server Activities
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.CancelServerActivitiesResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws CancelServerActivitiesBadRequest, CancelServerActivitiesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
CancelServerActivitiesResponse res = sdk.activities().cancelServerActivities()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
CancelServerActivitiesResponse res = sdk.activities().cancelServerActivities()
|
||||||
.activityUUID("25b71ed5-0f9d-461c-baa7-d404e9e10d3e")
|
.activityUUID("25b71ed5-0f9d-461c-baa7-d404e9e10d3e")
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ This endpoint provides the caller with a temporary token with the same access le
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetTransientTokenQueryParamType;
|
||||||
import dev.plexapi.sdk.models.operations.GetTransientTokenResponse;
|
import dev.plexapi.sdk.models.operations.GetTransientTokenResponse;
|
||||||
import dev.plexapi.sdk.models.operations.Scope;
|
import dev.plexapi.sdk.models.operations.Scope;
|
||||||
@@ -32,33 +33,23 @@ import java.lang.Exception;
|
|||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetTransientTokenBadRequest, GetTransientTokenUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetTransientTokenResponse res = sdk.authentication().getTransientToken()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetTransientTokenResponse res = sdk.authentication().getTransientToken()
|
||||||
.type(GetTransientTokenQueryParamType.DELEGATION)
|
.type(GetTransientTokenQueryParamType.DELEGATION)
|
||||||
.scope(Scope.ALL)
|
.scope(Scope.ALL)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -95,38 +86,29 @@ Note: requires Plex Media Server >= 1.15.4.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetSourceConnectionInformationBadRequest, GetSourceConnectionInformationUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
.source("server://client-identifier")
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation()
|
||||||
|
.source("provider://provider-identifier")
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -160,39 +142,30 @@ Get the User data from the provided X-Plex-Token
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetTokenDetailsResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetTokenDetailsBadRequest, GetTokenDetailsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetTokenDetailsResponse res = sdk.authentication().getTokenDetails()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetTokenDetailsResponse res = sdk.authentication().getTokenDetails()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.userPlexAccount().isPresent()) {
|
if (res.userPlexAccount().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -226,56 +199,47 @@ Sign in user with username and password and return user data with Plex authentic
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.PostUsersSignInDataRequestBody;
|
||||||
import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse;
|
import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws PostUsersSignInDataBadRequest, PostUsersSignInDataUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
.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();
|
.build();
|
||||||
|
|
||||||
PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData()
|
PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData()
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
.request(req)
|
||||||
.requestBody(PostUsersSignInDataRequestBody.builder()
|
|
||||||
.login("username@email.com")
|
|
||||||
.password("password123")
|
|
||||||
.verificationCode("123456")
|
|
||||||
.build())
|
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.userPlexAccount().isPresent()) {
|
if (res.userPlexAccount().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
||||||
| `xPlexClientIdentifier` | *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 |
|
| `request` | [PostUsersSignInDataRequestBody](../../models/operations/PostUsersSignInDataRequestBody.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||||
| `requestBody` | [Optional<PostUsersSignInDataRequestBody>](../../models/operations/PostUsersSignInDataRequestBody.md) | :heavy_minus_sign: | Login credentials | |
|
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. |
|
||||||
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
|
|||||||
@@ -24,39 +24,30 @@ Returns a list of butler tasks
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetButlerTasksResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetButlerTasksBadRequest, GetButlerTasksUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetButlerTasksResponse res = sdk.butler().getButlerTasks()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetButlerTasksResponse res = sdk.butler().getButlerTasks()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -89,37 +80,28 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.StartAllTasksResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws StartAllTasksBadRequest, StartAllTasksUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
StartAllTasksResponse res = sdk.butler().startAllTasks()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
StartAllTasksResponse res = sdk.butler().startAllTasks()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -148,37 +130,28 @@ This endpoint will stop all currently running tasks and remove any scheduled tas
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.StopAllTasksResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws StopAllTasksBadRequest, StopAllTasksUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
StopAllTasksResponse res = sdk.butler().stopAllTasks()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
StopAllTasksResponse res = sdk.butler().stopAllTasks()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -211,39 +184,30 @@ This endpoint will attempt to start a single Butler task that is enabled in the
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.StartTaskResponse;
|
||||||
import dev.plexapi.sdk.models.operations.TaskName;
|
import dev.plexapi.sdk.models.operations.TaskName;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws StartTaskBadRequest, StartTaskUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
StartTaskResponse res = sdk.butler().startTask()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
StartTaskResponse res = sdk.butler().startTask()
|
||||||
.taskName(TaskName.CLEAN_OLD_BUNDLES)
|
.taskName(TaskName.CLEAN_OLD_BUNDLES)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -278,39 +242,30 @@ This endpoint will stop a currently running task by name, or remove it from the
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.PathParamTaskName;
|
||||||
import dev.plexapi.sdk.models.operations.StopTaskResponse;
|
import dev.plexapi.sdk.models.operations.StopTaskResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws StopTaskBadRequest, StopTaskUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
StopTaskResponse res = sdk.butler().stopTask()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
StopTaskResponse res = sdk.butler().stopTask()
|
||||||
.taskName(PathParamTaskName.BACKUP_DATABASE)
|
.taskName(PathParamTaskName.BACKUP_DATABASE)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -21,42 +21,33 @@ Get Global Hubs filtered by the parameters provided.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetGlobalHubsResponse;
|
||||||
import dev.plexapi.sdk.models.operations.OnlyTransient;
|
import dev.plexapi.sdk.models.operations.OnlyTransient;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetGlobalHubsBadRequest, GetGlobalHubsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs()
|
||||||
.count(1262.49d)
|
.count(1262.49d)
|
||||||
.onlyTransient(OnlyTransient.ONE)
|
.onlyTransient(OnlyTransient.ONE)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -92,43 +83,34 @@ This endpoint will return a list of library specific hubs
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetLibraryHubsResponse;
|
||||||
import dev.plexapi.sdk.models.operations.QueryParamOnlyTransient;
|
import dev.plexapi.sdk.models.operations.QueryParamOnlyTransient;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetLibraryHubsBadRequest, GetLibraryHubsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs()
|
||||||
.sectionId(6728.76d)
|
.sectionId(6728.76d)
|
||||||
.count(9010.22d)
|
.count(639.24d)
|
||||||
.onlyTransient(QueryParamOnlyTransient.ZERO)
|
.onlyTransient(QueryParamOnlyTransient.ONE)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -31,39 +31,30 @@ This resource returns hash values for local files
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetFileHashResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetFileHashBadRequest, GetFileHashUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetFileHashResponse res = sdk.library().getFileHash()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetFileHashResponse res = sdk.library().getFileHash()
|
||||||
.url("file://C:\Image.png&type=13")
|
.url("file://C:\Image.png&type=13")
|
||||||
.type(4462.17d)
|
.type(4462.17d)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -99,41 +90,32 @@ This endpoint will return the recently added content.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetRecentlyAddedResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetRecentlyAddedBadRequest, GetRecentlyAddedUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetRecentlyAddedResponse res = sdk.library().getRecentlyAdded()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetRecentlyAddedResponse res = sdk.library().getRecentlyAdded()
|
||||||
.xPlexContainerStart(0)
|
.xPlexContainerStart(0)
|
||||||
.xPlexContainerSize(50)
|
.xPlexContainerSize(50)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -174,39 +156,30 @@ This allows a client to provide a rich interface around the media (e.g. allow so
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetAllLibrariesResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetAllLibrariesBadRequest, GetAllLibrariesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetAllLibrariesResponse res = sdk.library().getAllLibraries()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetAllLibrariesResponse res = sdk.library().getAllLibraries()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -273,42 +246,33 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetLibraryDetailsResponse;
|
||||||
import dev.plexapi.sdk.models.operations.IncludeDetails;
|
import dev.plexapi.sdk.models.operations.IncludeDetails;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetLibraryDetailsBadRequest, GetLibraryDetailsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetLibraryDetailsResponse res = sdk.library().getLibraryDetails()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetLibraryDetailsResponse res = sdk.library().getLibraryDetails()
|
||||||
.sectionKey(9518)
|
.sectionKey(9518)
|
||||||
.includeDetails(IncludeDetails.ZERO)
|
.includeDetails(IncludeDetails.ZERO)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -343,38 +307,29 @@ Delete a library using a specific section id
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.DeleteLibraryResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws DeleteLibraryBadRequest, DeleteLibraryUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
DeleteLibraryResponse res = sdk.library().deleteLibrary()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
DeleteLibraryResponse res = sdk.library().deleteLibrary()
|
||||||
.sectionKey(9518)
|
.sectionKey(9518)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -428,7 +383,8 @@ Fetches details from a specific section of the library identified by a section k
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetLibraryItemsRequest;
|
||||||
import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse;
|
import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse;
|
||||||
import dev.plexapi.sdk.models.operations.IncludeGuids;
|
import dev.plexapi.sdk.models.operations.IncludeGuids;
|
||||||
@@ -439,44 +395,34 @@ import java.lang.Exception;
|
|||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetLibraryItemsBadRequest, GetLibraryItemsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetLibraryItemsRequest req = GetLibraryItemsRequest.builder()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetLibraryItemsRequest req = GetLibraryItemsRequest.builder()
|
||||||
.sectionKey(9518)
|
.sectionKey(9518)
|
||||||
.tag(Tag.EDITION)
|
.tag(Tag.EDITION)
|
||||||
.type(Type.TWO)
|
.type(Type.Show)
|
||||||
.includeGuids(IncludeGuids.ONE)
|
.includeGuids(IncludeGuids.Enable)
|
||||||
.includeMeta(IncludeMeta.ONE)
|
.includeMeta(IncludeMeta.Enable)
|
||||||
.xPlexContainerStart(0)
|
.xPlexContainerStart(0)
|
||||||
.xPlexContainerSize(50)
|
.xPlexContainerSize(50)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
GetLibraryItemsResponse res = sdk.library().getLibraryItems()
|
GetLibraryItemsResponse res = sdk.library().getLibraryItems()
|
||||||
.request(req)
|
.request(req)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -511,40 +457,31 @@ This endpoint Refreshes all the Metadata of the library.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.Force;
|
||||||
import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataResponse;
|
import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetRefreshLibraryMetadataBadRequest, GetRefreshLibraryMetadataUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetRefreshLibraryMetadataResponse res = sdk.library().getRefreshLibraryMetadata()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetRefreshLibraryMetadataResponse res = sdk.library().getRefreshLibraryMetadata()
|
||||||
.sectionKey(9518)
|
.sectionKey(9518)
|
||||||
.force(Force.ONE)
|
.force(Force.ONE)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -597,42 +534,33 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetSearchLibraryResponse;
|
||||||
import dev.plexapi.sdk.models.operations.QueryParamType;
|
import dev.plexapi.sdk.models.operations.QueryParamType;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetSearchLibraryBadRequest, GetSearchLibraryUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetSearchLibraryResponse res = sdk.library().getSearchLibrary()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetSearchLibraryResponse res = sdk.library().getSearchLibrary()
|
||||||
.sectionKey(9518)
|
.sectionKey(9518)
|
||||||
.type(QueryParamType.TWO)
|
.type(QueryParamType.Show)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -668,40 +596,31 @@ This endpoint will return the metadata of a library item specified with the rati
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetMetaDataByRatingKeyBadRequest, GetMetaDataByRatingKeyUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetMetaDataByRatingKeyResponse res = sdk.library().getMetaDataByRatingKey()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetMetaDataByRatingKeyResponse res = sdk.library().getMetaDataByRatingKey()
|
||||||
.ratingKey(9518L)
|
.ratingKey(9518L)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -736,41 +655,32 @@ This endpoint will return the children of of a library item specified with the r
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetMetadataChildrenResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetMetadataChildrenBadRequest, GetMetadataChildrenUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetMetadataChildrenResponse res = sdk.library().getMetadataChildren()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
.ratingKey(1539.14d)
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetMetadataChildrenResponse res = sdk.library().getMetadataChildren()
|
||||||
|
.ratingKey(1539.15d)
|
||||||
.includeElements("<value>")
|
.includeElements("<value>")
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -806,42 +716,33 @@ This endpoint will return the top watched content from libraries of a certain ty
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetTopWatchedContentQueryParamType;
|
||||||
import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponse;
|
import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetTopWatchedContentBadRequest, GetTopWatchedContentUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
.type(GetTopWatchedContentQueryParamType.TWO)
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent()
|
||||||
|
.type(GetTopWatchedContentQueryParamType.Show)
|
||||||
.includeGuids(1L)
|
.includeGuids(1L)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -877,39 +778,30 @@ This endpoint will return the on deck content.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetOnDeckResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetOnDeckBadRequest, GetOnDeckUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetOnDeckResponse res = sdk.library().getOnDeck()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetOnDeckResponse res = sdk.library().getOnDeck()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -23,41 +23,32 @@ This endpoint will write a single-line log message, including a level and source
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.Level;
|
||||||
import dev.plexapi.sdk.models.operations.LogLineResponse;
|
import dev.plexapi.sdk.models.operations.LogLineResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws LogLineBadRequest, LogLineUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
LogLineResponse res = sdk.log().logLine()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
LogLineResponse res = sdk.log().logLine()
|
||||||
.level(Level.THREE)
|
.level(Level.THREE)
|
||||||
.message("Test log message")
|
.message("Test log message")
|
||||||
.source("Postman")
|
.source("Postman")
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -114,42 +105,33 @@ Ensure each parameter is properly URL-encoded to avoid interpretation issues.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.LogMultiLineResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws LogMultiLineBadRequest, LogMultiLineUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
String req = "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
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";
|
level=1&message=Test%20message%203&source=postman";
|
||||||
|
|
||||||
LogMultiLineResponse res = sdk.log().logMultiLine()
|
LogMultiLineResponse res = sdk.log().logMultiLine()
|
||||||
.request(req)
|
.request(req)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -184,37 +166,28 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.EnablePaperTrailResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws EnablePaperTrailBadRequest, EnablePaperTrailUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
EnablePaperTrailResponse res = sdk.log().enablePaperTrail()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
EnablePaperTrailResponse res = sdk.log().enablePaperTrail()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -24,38 +24,29 @@ This will mark the provided media key as Played.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.MarkPlayedResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws MarkPlayedBadRequest, MarkPlayedUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
MarkPlayedResponse res = sdk.media().markPlayed()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
MarkPlayedResponse res = sdk.media().markPlayed()
|
||||||
.key(59398d)
|
.key(59398d)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -89,38 +80,29 @@ This will mark the provided media key as Unplayed.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.MarkUnplayedResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws MarkUnplayedBadRequest, MarkUnplayedUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
MarkUnplayedResponse res = sdk.media().markUnplayed()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
MarkUnplayedResponse res = sdk.media().markUnplayed()
|
||||||
.key(59398d)
|
.key(59398d)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -155,40 +137,31 @@ This API command can be used to update the play progress of a media item.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.UpdatePlayProgressResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws UpdatePlayProgressBadRequest, UpdatePlayProgressUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
UpdatePlayProgressResponse res = sdk.media().updatePlayProgress()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
UpdatePlayProgressResponse res = sdk.media().updatePlayProgress()
|
||||||
.key("<key>")
|
.key("<key>")
|
||||||
.time(90000d)
|
.time(90000d)
|
||||||
.state("played")
|
.state("played")
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -224,21 +197,26 @@ Gets the banner image of the media item
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetBannerImageRequest;
|
||||||
import dev.plexapi.sdk.models.operations.GetBannerImageResponse;
|
import dev.plexapi.sdk.models.operations.GetBannerImageResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetBannerImageBadRequest, GetBannerImageUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetBannerImageRequest req = GetBannerImageRequest.builder()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetBannerImageRequest req = GetBannerImageRequest.builder()
|
||||||
.ratingKey(9518L)
|
.ratingKey(9518L)
|
||||||
.width(396L)
|
.width(396L)
|
||||||
.height(396L)
|
.height(396L)
|
||||||
@@ -247,27 +225,13 @@ public class Application {
|
|||||||
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
GetBannerImageResponse res = sdk.media().getBannerImage()
|
GetBannerImageResponse res = sdk.media().getBannerImage()
|
||||||
.request(req)
|
.request(req)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.responseStream().isPresent()) {
|
if (res.responseStream().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -301,21 +265,26 @@ Gets the thumbnail image of the media item
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetThumbImageRequest;
|
||||||
import dev.plexapi.sdk.models.operations.GetThumbImageResponse;
|
import dev.plexapi.sdk.models.operations.GetThumbImageResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetThumbImageBadRequest, GetThumbImageUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetThumbImageRequest req = GetThumbImageRequest.builder()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetThumbImageRequest req = GetThumbImageRequest.builder()
|
||||||
.ratingKey(9518L)
|
.ratingKey(9518L)
|
||||||
.width(396L)
|
.width(396L)
|
||||||
.height(396L)
|
.height(396L)
|
||||||
@@ -324,27 +293,13 @@ public class Application {
|
|||||||
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
GetThumbImageResponse res = sdk.media().getThumbImage()
|
GetThumbImageResponse res = sdk.media().getThumbImage()
|
||||||
.request(req)
|
.request(req)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.responseStream().isPresent()) {
|
if (res.responseStream().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.CreatePlaylistQueryParamType;
|
||||||
import dev.plexapi.sdk.models.operations.CreatePlaylistRequest;
|
import dev.plexapi.sdk.models.operations.CreatePlaylistRequest;
|
||||||
import dev.plexapi.sdk.models.operations.CreatePlaylistResponse;
|
import dev.plexapi.sdk.models.operations.CreatePlaylistResponse;
|
||||||
@@ -43,41 +44,31 @@ import java.lang.Exception;
|
|||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws CreatePlaylistBadRequest, CreatePlaylistUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
CreatePlaylistRequest req = CreatePlaylistRequest.builder()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
CreatePlaylistRequest req = CreatePlaylistRequest.builder()
|
||||||
.title("<value>")
|
.title("<value>")
|
||||||
.type(CreatePlaylistQueryParamType.PHOTO)
|
.type(CreatePlaylistQueryParamType.PHOTO)
|
||||||
.smart(Smart.ONE)
|
.smart(Smart.ONE)
|
||||||
.uri("https://inborn-brochure.biz")
|
.uri("https://hoarse-testing.info/")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
CreatePlaylistResponse res = sdk.playlists().createPlaylist()
|
CreatePlaylistResponse res = sdk.playlists().createPlaylist()
|
||||||
.request(req)
|
.request(req)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -111,7 +102,8 @@ Get All Playlists given the specified filters.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetPlaylistsResponse;
|
||||||
import dev.plexapi.sdk.models.operations.PlaylistType;
|
import dev.plexapi.sdk.models.operations.PlaylistType;
|
||||||
import dev.plexapi.sdk.models.operations.QueryParamSmart;
|
import dev.plexapi.sdk.models.operations.QueryParamSmart;
|
||||||
@@ -119,35 +111,25 @@ import java.lang.Exception;
|
|||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetPlaylistsBadRequest, GetPlaylistsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetPlaylistsResponse res = sdk.playlists().getPlaylists()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetPlaylistsResponse res = sdk.playlists().getPlaylists()
|
||||||
.playlistType(PlaylistType.AUDIO)
|
.playlistType(PlaylistType.AUDIO)
|
||||||
.smart(QueryParamSmart.ZERO)
|
.smart(QueryParamSmart.ZERO)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -184,40 +166,31 @@ Smart playlist details contain the `content` attribute. This is the content URI
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetPlaylistResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetPlaylistBadRequest, GetPlaylistUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetPlaylistResponse res = sdk.playlists().getPlaylist()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetPlaylistResponse res = sdk.playlists().getPlaylist()
|
||||||
.playlistID(4109.48d)
|
.playlistID(4109.48d)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -252,38 +225,29 @@ This endpoint will delete a playlist
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.DeletePlaylistResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws DeletePlaylistBadRequest, DeletePlaylistUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
DeletePlaylistResponse res = sdk.playlists().deletePlaylist()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
DeletePlaylistResponse res = sdk.playlists().deletePlaylist()
|
||||||
.playlistID(216.22d)
|
.playlistID(216.22d)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -318,40 +282,31 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.UpdatePlaylistResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws UpdatePlaylistBadRequest, UpdatePlaylistUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
UpdatePlaylistResponse res = sdk.playlists().updatePlaylist()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
.playlistID(3915d)
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
UpdatePlaylistResponse res = sdk.playlists().updatePlaylist()
|
||||||
|
.playlistID(3915.00d)
|
||||||
.title("<value>")
|
.title("<value>")
|
||||||
.summary("<value>")
|
.summary("<value>")
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -391,42 +346,33 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetPlaylistContentsQueryParamType;
|
||||||
import dev.plexapi.sdk.models.operations.GetPlaylistContentsResponse;
|
import dev.plexapi.sdk.models.operations.GetPlaylistContentsResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetPlaylistContentsBadRequest, GetPlaylistContentsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents()
|
||||||
.playlistID(5004.46d)
|
.playlistID(5004.46d)
|
||||||
.type(GetPlaylistContentsQueryParamType.TWO)
|
.type(GetPlaylistContentsQueryParamType.Show)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -462,38 +408,29 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.ClearPlaylistContentsResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws ClearPlaylistContentsBadRequest, ClearPlaylistContentsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents()
|
||||||
.playlistID(1893.18d)
|
.playlistID(1893.18d)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -529,42 +466,33 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.AddPlaylistContentsResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws AddPlaylistContentsBadRequest, AddPlaylistContentsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
.playlistID(8502.01d)
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents()
|
||||||
|
.playlistID(8502.00d)
|
||||||
.uri("server://12345/com.plexapp.plugins.library/library/metadata/1")
|
.uri("server://12345/com.plexapp.plugins.library/library/metadata/1")
|
||||||
.playQueueID(123d)
|
.playQueueID(123d)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -601,40 +529,32 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.QueryParamForce;
|
||||||
import dev.plexapi.sdk.models.operations.UploadPlaylistResponse;
|
import dev.plexapi.sdk.models.operations.UploadPlaylistResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws UploadPlaylistBadRequest, UploadPlaylistUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
UploadPlaylistResponse res = sdk.playlists().uploadPlaylist()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
UploadPlaylistResponse res = sdk.playlists().uploadPlaylist()
|
||||||
.path("/home/barkley/playlist.m3u")
|
.path("/home/barkley/playlist.m3u")
|
||||||
.force(QueryParamForce.ZERO)
|
.force(QueryParamForce.ZERO)
|
||||||
|
.sectionID(1L)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -645,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 |
|
| `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/> | |
|
| `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
|
### Response
|
||||||
|
|
||||||
|
|||||||
@@ -26,39 +26,30 @@ Get Companions Data
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetCompanionsDataResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetCompanionsDataBadRequest, GetCompanionsDataUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetCompanionsDataResponse res = sdk.plex().getCompanionsData()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetCompanionsDataResponse res = sdk.plex().getCompanionsData()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.responseBodies().isPresent()) {
|
if (res.responseBodies().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -92,39 +83,30 @@ Get friends of provided auth token.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetUserFriendsResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetUserFriendsBadRequest, GetUserFriendsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetUserFriendsResponse res = sdk.plex().getUserFriends()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetUserFriendsResponse res = sdk.plex().getUserFriends()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.friends().isPresent()) {
|
if (res.friends().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -158,38 +140,29 @@ Returns the geolocation and locale data of the caller
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetGeoDataResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetGeoDataBadRequest, GetGeoDataUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetGeoDataResponse res = sdk.plex().getGeoData()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetGeoDataResponse res = sdk.plex().getGeoData()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.geoData().isPresent()) {
|
if (res.geoData().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -223,39 +196,30 @@ Retrieves the home data for the authenticated user, including details like home
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetHomeDataResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetHomeDataBadRequest, GetHomeDataUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetHomeDataResponse res = sdk.plex().getHomeData()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetHomeDataResponse res = sdk.plex().getHomeData()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -283,7 +247,8 @@ Get Plex server access tokens and server connections
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetServerResourcesResponse;
|
||||||
import dev.plexapi.sdk.models.operations.IncludeHttps;
|
import dev.plexapi.sdk.models.operations.IncludeHttps;
|
||||||
import dev.plexapi.sdk.models.operations.IncludeIPv6;
|
import dev.plexapi.sdk.models.operations.IncludeIPv6;
|
||||||
@@ -292,50 +257,38 @@ import java.lang.Exception;
|
|||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetServerResourcesBadRequest, GetServerResourcesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetServerResourcesResponse res = sdk.plex().getServerResources()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
.includeHttps(IncludeHttps.ONE)
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
.includeRelay(IncludeRelay.ONE)
|
.clientName("Plex Web")
|
||||||
.includeIPv6(IncludeIPv6.ONE)
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetServerResourcesResponse res = sdk.plex().getServerResources()
|
||||||
|
.includeHttps(IncludeHttps.Enable)
|
||||||
|
.includeRelay(IncludeRelay.Enable)
|
||||||
|
.includeIPv6(IncludeIPv6.Enable)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.plexDevices().isPresent()) {
|
if (res.plexDevices().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `xPlexClientIdentifier` | *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 |
|
||||||
| `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 |
|
||||||
| `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 |
|
||||||
| `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 |
|
||||||
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
@@ -352,7 +305,7 @@ public class Application {
|
|||||||
|
|
||||||
## getPin
|
## getPin
|
||||||
|
|
||||||
Retrieve a Pin from Plex.tv for authentication flows
|
Retrieve a Pin ID from Plex.tv to use for authentication flows
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -360,50 +313,43 @@ Retrieve a Pin from Plex.tv for authentication flows
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetPinResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetPinBadRequest, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetPinRequest req = GetPinRequest.builder()
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
GetPinResponse res = sdk.plex().getPin()
|
GetPinResponse res = sdk.plex().getPin()
|
||||||
.strong(false)
|
.request(req)
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.xPlexProduct("Plex Web")
|
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.authPinContainer().isPresent()) {
|
if (res.authPinContainer().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
|
||||||
| `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/> | |
|
| `request` | [GetPinRequest](../../models/operations/GetPinRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||||
| `xPlexClientIdentifier` | *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 |
|
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. |
|
||||||
| `xPlexProduct` | *Optional<String>* | :heavy_minus_sign: | N/A | Plex Web |
|
|
||||||
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
@@ -427,51 +373,40 @@ Retrieve an Access Token from Plex.tv after the Pin has been authenticated
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetTokenByPinIdResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetTokenByPinIdBadRequest, GetTokenByPinIdResponseBody, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId()
|
||||||
.pinID(408895L)
|
.pinID(408895L)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.authPinContainer().isPresent()) {
|
if (res.authPinContainer().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
||||||
| `xPlexClientIdentifier` | *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 |
|
||||||
| `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | |
|
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. |
|
||||||
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
|
|||||||
@@ -34,40 +34,31 @@ This request is intended to be very fast, and called as the user types.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.PerformSearchResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws PerformSearchBadRequest, PerformSearchUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
PerformSearchResponse res = sdk.search().performSearch()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
.query("arnold")
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
.sectionId(9372.7d)
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
PerformSearchResponse res = sdk.search().performSearch()
|
||||||
|
.query("dylan")
|
||||||
|
.sectionId(5838.67d)
|
||||||
.limit(5d)
|
.limit(5d)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -107,40 +98,31 @@ Results, as well as their containing per-type hubs, contain a `distance` attribu
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.PerformVoiceSearchResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws PerformVoiceSearchBadRequest, PerformVoiceSearchUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
PerformVoiceSearchResponse res = sdk.search().performVoiceSearch()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
PerformVoiceSearchResponse res = sdk.search().performVoiceSearch()
|
||||||
.query("dead+poop")
|
.query("dead+poop")
|
||||||
.sectionId(4094.8d)
|
.sectionId(4094.80d)
|
||||||
.limit(5d)
|
.limit(5d)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -176,40 +158,31 @@ This will search the database for the string provided.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetSearchResultsResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetSearchResultsBadRequest, GetSearchResultsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetSearchResultsResponse res = sdk.search().getSearchResults()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetSearchResultsResponse res = sdk.search().getSearchResults()
|
||||||
.query("110")
|
.query("110")
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -28,39 +28,30 @@ Get Server Capabilities
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -88,39 +79,30 @@ Get Server Preferences
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetServerPreferencesResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetServerPreferencesBadRequest, GetServerPreferencesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetServerPreferencesResponse res = sdk.server().getServerPreferences()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetServerPreferencesResponse res = sdk.server().getServerPreferences()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -148,39 +130,30 @@ Get Available Clients
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetAvailableClientsResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetAvailableClientsBadRequest, GetAvailableClientsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetAvailableClientsResponse res = sdk.server().getAvailableClients()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetAvailableClientsResponse res = sdk.server().getAvailableClients()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -208,39 +181,30 @@ Get Devices
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetDevicesResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetDevicesBadRequest, GetDevicesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetDevicesResponse res = sdk.server().getDevices()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetDevicesResponse res = sdk.server().getDevices()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -268,35 +232,28 @@ This request is useful to determine if the server is online or offline
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetServerIdentityResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetServerIdentityRequestTimeout, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetServerIdentityResponse res = sdk.server().getServerIdentity()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetServerIdentityResponse res = sdk.server().getServerIdentity()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -323,39 +280,30 @@ Returns MyPlex Account Information
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetMyPlexAccountResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetMyPlexAccountBadRequest, GetMyPlexAccountUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -384,7 +332,8 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetResizedPhotoRequest;
|
||||||
import dev.plexapi.sdk.models.operations.GetResizedPhotoResponse;
|
import dev.plexapi.sdk.models.operations.GetResizedPhotoResponse;
|
||||||
import dev.plexapi.sdk.models.operations.MinSize;
|
import dev.plexapi.sdk.models.operations.MinSize;
|
||||||
@@ -393,42 +342,32 @@ import java.lang.Exception;
|
|||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetResizedPhotoBadRequest, GetResizedPhotoUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetResizedPhotoRequest req = GetResizedPhotoRequest.builder()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetResizedPhotoRequest req = GetResizedPhotoRequest.builder()
|
||||||
.width(110d)
|
.width(110d)
|
||||||
.height(165d)
|
.height(165d)
|
||||||
.opacity(100L)
|
.opacity(100L)
|
||||||
.blur(4000d)
|
.blur(0d)
|
||||||
.minSize(MinSize.ZERO)
|
.minSize(MinSize.ONE)
|
||||||
.upscale(Upscale.ZERO)
|
.upscale(Upscale.ONE)
|
||||||
.url("/library/metadata/49564/thumb/1654258204")
|
.url("/library/metadata/49564/thumb/1654258204")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
GetResizedPhotoResponse res = sdk.server().getResizedPhoto()
|
GetResizedPhotoResponse res = sdk.server().getResizedPhoto()
|
||||||
.request(req)
|
.request(req)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -462,40 +401,31 @@ Retrieves media providers and their features from the Plex server.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetMediaProvidersResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetMediaProvidersBadRequest, GetMediaProvidersUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetMediaProvidersResponse res = sdk.server().getMediaProviders()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetMediaProvidersResponse res = sdk.server().getMediaProviders()
|
||||||
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -529,39 +459,30 @@ Get Server List
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetServerListResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetServerListBadRequest, GetServerListUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetServerListResponse res = sdk.server().getServerList()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetServerListResponse res = sdk.server().getServerList()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -23,39 +23,30 @@ This will retrieve the "Now Playing" Information of the PMS.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetSessionsResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetSessionsBadRequest, GetSessionsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetSessionsResponse res = sdk.sessions().getSessions()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetSessionsResponse res = sdk.sessions().getSessions()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -83,21 +74,26 @@ This will Retrieve a listing of all history views.
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetSessionHistoryResponse;
|
||||||
import dev.plexapi.sdk.models.operations.QueryParamFilter;
|
import dev.plexapi.sdk.models.operations.QueryParamFilter;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetSessionHistoryBadRequest, GetSessionHistoryUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetSessionHistoryResponse res = sdk.sessions().getSessionHistory()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetSessionHistoryResponse res = sdk.sessions().getSessionHistory()
|
||||||
.sort("<value>")
|
.sort("<value>")
|
||||||
.accountId(1L)
|
.accountId(1L)
|
||||||
.filter(QueryParamFilter.builder()
|
.filter(QueryParamFilter.builder()
|
||||||
@@ -105,23 +101,9 @@ public class Application {
|
|||||||
.librarySectionID(12L)
|
.librarySectionID(12L)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -158,39 +140,30 @@ Get Transcode Sessions
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetTranscodeSessionsResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetTranscodeSessionsBadRequest, GetTranscodeSessionsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -218,38 +191,29 @@ Stop a Transcode Session
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.StopTranscodeSessionResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws StopTranscodeSessionBadRequest, StopTranscodeSessionUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession()
|
||||||
.sessionKey("zz7llzqlx8w9vnrsbnwhbmep")
|
.sessionKey("zz7llzqlx8w9vnrsbnwhbmep")
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -22,40 +22,31 @@ This will return the media statistics for the server
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetStatisticsResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetStatisticsBadRequest, GetStatisticsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetStatisticsResponse res = sdk.statistics().getStatistics()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetStatisticsResponse res = sdk.statistics().getStatistics()
|
||||||
.timespan(4L)
|
.timespan(4L)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -89,40 +80,31 @@ This will return the resources for the server
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetResourcesStatisticsResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetResourcesStatisticsBadRequest, GetResourcesStatisticsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetResourcesStatisticsResponse res = sdk.statistics().getResourcesStatistics()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetResourcesStatisticsResponse res = sdk.statistics().getResourcesStatistics()
|
||||||
.timespan(4L)
|
.timespan(4L)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -156,40 +138,31 @@ This will return the bandwidth statistics for the server
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetBandwidthStatisticsResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetBandwidthStatisticsBadRequest, GetBandwidthStatisticsUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetBandwidthStatisticsResponse res = sdk.statistics().getBandwidthStatistics()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetBandwidthStatisticsResponse res = sdk.statistics().getBandwidthStatistics()
|
||||||
.timespan(4L)
|
.timespan(4L)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -23,39 +23,30 @@ Querying status of updates
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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 dev.plexapi.sdk.models.operations.GetUpdateStatusResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetUpdateStatusBadRequest, GetUpdateStatusUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetUpdateStatusResponse res = sdk.updater().getUpdateStatus()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetUpdateStatusResponse res = sdk.updater().getUpdateStatus()
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -83,39 +74,30 @@ Checking for updates
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.CheckForUpdatesResponse;
|
||||||
import dev.plexapi.sdk.models.operations.Download;
|
import dev.plexapi.sdk.models.operations.Download;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws CheckForUpdatesBadRequest, CheckForUpdatesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
CheckForUpdatesResponse res = sdk.updater().checkForUpdates()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
CheckForUpdatesResponse res = sdk.updater().checkForUpdates()
|
||||||
.download(Download.ONE)
|
.download(Download.ONE)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -150,7 +132,8 @@ Note that these two parameters are effectively mutually exclusive. The `tonight`
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.ApplyUpdatesResponse;
|
||||||
import dev.plexapi.sdk.models.operations.Skip;
|
import dev.plexapi.sdk.models.operations.Skip;
|
||||||
import dev.plexapi.sdk.models.operations.Tonight;
|
import dev.plexapi.sdk.models.operations.Tonight;
|
||||||
@@ -158,33 +141,23 @@ import java.lang.Exception;
|
|||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws ApplyUpdatesBadRequest, ApplyUpdatesUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
ApplyUpdatesResponse res = sdk.updater().applyUpdates()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
ApplyUpdatesResponse res = sdk.updater().applyUpdates()
|
||||||
.tonight(Tonight.ONE)
|
.tonight(Tonight.ONE)
|
||||||
.skip(Skip.ONE)
|
.skip(Skip.ONE)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ Get the timeline for a media item
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.GetTimelineRequest;
|
||||||
import dev.plexapi.sdk.models.operations.GetTimelineResponse;
|
import dev.plexapi.sdk.models.operations.GetTimelineResponse;
|
||||||
import dev.plexapi.sdk.models.operations.State;
|
import dev.plexapi.sdk.models.operations.State;
|
||||||
@@ -29,14 +30,18 @@ import java.lang.Exception;
|
|||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetTimelineBadRequest, GetTimelineUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetTimelineRequest req = GetTimelineRequest.builder()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetTimelineRequest req = GetTimelineRequest.builder()
|
||||||
.ratingKey(23409d)
|
.ratingKey(23409d)
|
||||||
.key("/library/metadata/23409")
|
.key("/library/metadata/23409")
|
||||||
.state(State.PLAYING)
|
.state(State.PLAYING)
|
||||||
@@ -49,25 +54,11 @@ public class Application {
|
|||||||
.row(1d)
|
.row(1d)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
GetTimelineResponse res = sdk.video().getTimeline()
|
GetTimelineResponse res = sdk.video().getTimeline()
|
||||||
.request(req)
|
.request(req)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -101,21 +92,26 @@ Begin a Universal Transcode Session
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.StartUniversalTranscodeRequest;
|
||||||
import dev.plexapi.sdk.models.operations.StartUniversalTranscodeResponse;
|
import dev.plexapi.sdk.models.operations.StartUniversalTranscodeResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws StartUniversalTranscodeBadRequest, StartUniversalTranscodeUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder()
|
||||||
.hasMDE(1d)
|
.hasMDE(1d)
|
||||||
.path("/library/metadata/23409")
|
.path("/library/metadata/23409")
|
||||||
.mediaIndex(0d)
|
.mediaIndex(0d)
|
||||||
@@ -134,25 +130,11 @@ public class Application {
|
|||||||
.autoAdjustQuality(0d)
|
.autoAdjustQuality(0d)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
StartUniversalTranscodeResponse res = sdk.video().startUniversalTranscode()
|
StartUniversalTranscodeResponse res = sdk.video().startUniversalTranscode()
|
||||||
.request(req)
|
.request(req)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ Get User Watchlist
|
|||||||
package hello.world;
|
package hello.world;
|
||||||
|
|
||||||
import dev.plexapi.sdk.PlexAPI;
|
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.Filter;
|
||||||
import dev.plexapi.sdk.models.operations.GetWatchListRequest;
|
import dev.plexapi.sdk.models.operations.GetWatchListRequest;
|
||||||
import dev.plexapi.sdk.models.operations.GetWatchListResponse;
|
import dev.plexapi.sdk.models.operations.GetWatchListResponse;
|
||||||
@@ -28,41 +29,31 @@ import java.lang.Exception;
|
|||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws GetWatchListBadRequest, GetWatchListUnauthorized, Exception {
|
||||||
try {
|
|
||||||
PlexAPI sdk = PlexAPI.builder()
|
|
||||||
.accessToken("<YOUR_API_KEY_HERE>")
|
|
||||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
GetWatchListRequest req = GetWatchListRequest.builder()
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||||
|
.clientName("Plex Web")
|
||||||
|
.clientVersion("4.133.0")
|
||||||
|
.clientPlatform("Chrome")
|
||||||
|
.deviceName("Linux")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetWatchListRequest req = GetWatchListRequest.builder()
|
||||||
.filter(Filter.AVAILABLE)
|
.filter(Filter.AVAILABLE)
|
||||||
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
||||||
.xPlexContainerStart(0)
|
.xPlexContainerStart(0)
|
||||||
.xPlexContainerSize(50)
|
.xPlexContainerSize(50)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
GetWatchListResponse res = sdk.watchlist().getWatchList()
|
GetWatchListResponse res = sdk.watchlist().getWatchList()
|
||||||
.request(req)
|
.request(req)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
// handle response
|
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public class Activities implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -234,7 +234,7 @@ public class Activities implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import dev.plexapi.sdk.models.operations.GetTransientTokenQueryParamType;
|
|||||||
import dev.plexapi.sdk.models.operations.GetTransientTokenRequest;
|
import dev.plexapi.sdk.models.operations.GetTransientTokenRequest;
|
||||||
import dev.plexapi.sdk.models.operations.GetTransientTokenRequestBuilder;
|
import dev.plexapi.sdk.models.operations.GetTransientTokenRequestBuilder;
|
||||||
import dev.plexapi.sdk.models.operations.GetTransientTokenResponse;
|
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.PostUsersSignInDataRequestBody;
|
||||||
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBuilder;
|
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBuilder;
|
||||||
import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse;
|
import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse;
|
||||||
@@ -118,7 +117,7 @@ public class Authentication implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetTransientTokenRequest.class,
|
GetTransientTokenRequest.class,
|
||||||
@@ -271,7 +270,7 @@ public class Authentication implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetSourceConnectionInformationRequest.class,
|
GetSourceConnectionInformationRequest.class,
|
||||||
@@ -426,7 +425,7 @@ public class Authentication implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -564,32 +563,20 @@ public class Authentication implements
|
|||||||
* @throws Exception if the API call fails
|
* @throws Exception if the API call fails
|
||||||
*/
|
*/
|
||||||
public PostUsersSignInDataResponse postUsersSignInDataDirect() throws Exception {
|
public PostUsersSignInDataResponse postUsersSignInDataDirect() throws Exception {
|
||||||
return postUsersSignInData(Optional.empty(), Optional.empty(), Optional.empty());
|
return postUsersSignInData(Optional.empty(), Optional.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get User Sign In Data
|
* Get User Sign In Data
|
||||||
* Sign in user with username and password and return user data with Plex authentication token
|
* Sign in user with username and password and return user data with Plex authentication token
|
||||||
* @param xPlexClientIdentifier The unique identifier for the client application
|
* @param request The request object containing all of the parameters for the API call.
|
||||||
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 serverURL Overrides the server URL.
|
* @param serverURL Overrides the server URL.
|
||||||
* @return The response from the API call
|
* @return The response from the API call
|
||||||
* @throws Exception if the API call fails
|
* @throws Exception if the API call fails
|
||||||
*/
|
*/
|
||||||
public PostUsersSignInDataResponse postUsersSignInData(
|
public PostUsersSignInDataResponse postUsersSignInData(
|
||||||
Optional<String> xPlexClientIdentifier,
|
Optional<? extends PostUsersSignInDataRequestBody> request,
|
||||||
Optional<? extends PostUsersSignInDataRequestBody> requestBody,
|
|
||||||
Optional<String> serverURL) throws Exception {
|
Optional<String> serverURL) throws Exception {
|
||||||
PostUsersSignInDataRequest request =
|
|
||||||
PostUsersSignInDataRequest
|
|
||||||
.builder()
|
|
||||||
.xPlexClientIdentifier(xPlexClientIdentifier)
|
|
||||||
.requestBody(requestBody)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
String _baseUrl = Utils.templateUrl(POST_USERS_SIGN_IN_DATA_SERVERS[0], new HashMap<String, String>());
|
String _baseUrl = Utils.templateUrl(POST_USERS_SIGN_IN_DATA_SERVERS[0], new HashMap<String, String>());
|
||||||
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
|
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
|
||||||
_baseUrl = serverURL.get();
|
_baseUrl = serverURL.get();
|
||||||
@@ -602,21 +589,16 @@ public class Authentication implements
|
|||||||
Object _convertedRequest = Utils.convertToShape(
|
Object _convertedRequest = Utils.convertToShape(
|
||||||
request,
|
request,
|
||||||
JsonShape.DEFAULT,
|
JsonShape.DEFAULT,
|
||||||
new TypeReference<Object>() {});
|
new TypeReference<Optional<? extends PostUsersSignInDataRequestBody>>() {});
|
||||||
SerializedBody _serializedRequestBody = Utils.serializeRequestBody(
|
SerializedBody _serializedRequestBody = Utils.serializeRequestBody(
|
||||||
_convertedRequest,
|
_convertedRequest,
|
||||||
"requestBody",
|
"request",
|
||||||
"form",
|
"form",
|
||||||
false);
|
false);
|
||||||
_req.setBody(Optional.ofNullable(_serializedRequestBody));
|
_req.setBody(Optional.ofNullable(_serializedRequestBody));
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
|
||||||
PostUsersSignInDataRequest.class,
|
|
||||||
request,
|
|
||||||
this.sdkConfiguration.globals));
|
|
||||||
|
|
||||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||||
HttpRequest _r =
|
HttpRequest _r =
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public class Butler implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -246,7 +246,7 @@ public class Butler implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -384,7 +384,7 @@ public class Butler implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -540,7 +540,7 @@ public class Butler implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -688,7 +688,7 @@ public class Butler implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class Hubs implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetGlobalHubsRequest.class,
|
GetGlobalHubsRequest.class,
|
||||||
@@ -280,7 +280,7 @@ public class Hubs implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetLibraryHubsRequest.class,
|
GetLibraryHubsRequest.class,
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ public class Library implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetFileHashRequest.class,
|
GetFileHashRequest.class,
|
||||||
@@ -339,7 +339,7 @@ public class Library implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetRecentlyAddedRequest.class,
|
GetRecentlyAddedRequest.class,
|
||||||
@@ -503,7 +503,7 @@ public class Library implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -798,7 +798,7 @@ public class Library implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetLibraryDetailsRequest.class,
|
GetLibraryDetailsRequest.class,
|
||||||
@@ -962,7 +962,7 @@ public class Library implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -1142,7 +1142,7 @@ public class Library implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetLibraryItemsRequest.class,
|
GetLibraryItemsRequest.class,
|
||||||
@@ -1326,7 +1326,7 @@ public class Library implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetRefreshLibraryMetadataRequest.class,
|
GetRefreshLibraryMetadataRequest.class,
|
||||||
@@ -1524,7 +1524,7 @@ public class Library implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetSearchLibraryRequest.class,
|
GetSearchLibraryRequest.class,
|
||||||
@@ -1688,7 +1688,7 @@ public class Library implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -1864,7 +1864,7 @@ public class Library implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetMetadataChildrenRequest.class,
|
GetMetadataChildrenRequest.class,
|
||||||
@@ -2055,7 +2055,7 @@ public class Library implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetTopWatchedContentRequest.class,
|
GetTopWatchedContentRequest.class,
|
||||||
@@ -2209,7 +2209,7 @@ public class Library implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public class Log implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
LogLineRequest.class,
|
LogLineRequest.class,
|
||||||
@@ -299,7 +299,7 @@ public class Log implements
|
|||||||
_req.setBody(Optional.ofNullable(_serializedRequestBody));
|
_req.setBody(Optional.ofNullable(_serializedRequestBody));
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -437,7 +437,7 @@ public class Log implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class Media implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
MarkPlayedRequest.class,
|
MarkPlayedRequest.class,
|
||||||
@@ -246,7 +246,7 @@ public class Media implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
MarkUnplayedRequest.class,
|
MarkUnplayedRequest.class,
|
||||||
@@ -403,7 +403,7 @@ public class Media implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
UpdatePlayProgressRequest.class,
|
UpdatePlayProgressRequest.class,
|
||||||
@@ -548,7 +548,7 @@ public class Media implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "image/jpeg")
|
_req.addHeader("Accept", "image/jpeg")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetBannerImageRequest.class,
|
GetBannerImageRequest.class,
|
||||||
@@ -704,7 +704,7 @@ public class Media implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "image/jpeg")
|
_req.addHeader("Accept", "image/jpeg")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetThumbImageRequest.class,
|
GetThumbImageRequest.class,
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public class Playlists implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
CreatePlaylistRequest.class,
|
CreatePlaylistRequest.class,
|
||||||
@@ -307,7 +307,7 @@ public class Playlists implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetPlaylistsRequest.class,
|
GetPlaylistsRequest.class,
|
||||||
@@ -473,7 +473,7 @@ public class Playlists implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -632,7 +632,7 @@ public class Playlists implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -799,7 +799,7 @@ public class Playlists implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
UpdatePlaylistRequest.class,
|
UpdatePlaylistRequest.class,
|
||||||
@@ -967,7 +967,7 @@ public class Playlists implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetPlaylistContentsRequest.class,
|
GetPlaylistContentsRequest.class,
|
||||||
@@ -1131,7 +1131,7 @@ public class Playlists implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -1303,7 +1303,7 @@ public class Playlists implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
AddPlaylistContentsRequest.class,
|
AddPlaylistContentsRequest.class,
|
||||||
@@ -1456,17 +1456,20 @@ public class Playlists implements
|
|||||||
The `force` argument is used to disable overwriting.
|
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.
|
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
|
* @return The response from the API call
|
||||||
* @throws Exception if the API call fails
|
* @throws Exception if the API call fails
|
||||||
*/
|
*/
|
||||||
public UploadPlaylistResponse uploadPlaylist(
|
public UploadPlaylistResponse uploadPlaylist(
|
||||||
String path,
|
String path,
|
||||||
QueryParamForce force) throws Exception {
|
QueryParamForce force,
|
||||||
|
long sectionID) throws Exception {
|
||||||
UploadPlaylistRequest request =
|
UploadPlaylistRequest request =
|
||||||
UploadPlaylistRequest
|
UploadPlaylistRequest
|
||||||
.builder()
|
.builder()
|
||||||
.path(path)
|
.path(path)
|
||||||
.force(force)
|
.force(force)
|
||||||
|
.sectionID(sectionID)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
String _baseUrl = Utils.templateUrl(
|
String _baseUrl = Utils.templateUrl(
|
||||||
@@ -1478,7 +1481,7 @@ public class Playlists implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
UploadPlaylistRequest.class,
|
UploadPlaylistRequest.class,
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl;
|
|||||||
import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl;
|
import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl;
|
||||||
import dev.plexapi.sdk.utils.Utils;
|
import dev.plexapi.sdk.utils.Utils;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.lang.Boolean;
|
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
import java.net.http.HttpRequest;
|
import java.net.http.HttpRequest;
|
||||||
@@ -164,7 +163,7 @@ public class Plex implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -325,7 +324,7 @@ public class Plex implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -486,7 +485,7 @@ public class Plex implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||||
HttpRequest _r =
|
HttpRequest _r =
|
||||||
@@ -630,7 +629,7 @@ public class Plex implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -768,16 +767,12 @@ public class Plex implements
|
|||||||
* @throws Exception if the API call fails
|
* @throws Exception if the API call fails
|
||||||
*/
|
*/
|
||||||
public GetServerResourcesResponse getServerResourcesDirect() throws Exception {
|
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 Server Resources
|
||||||
* Get Plex server access tokens and server connections
|
* Get Plex server access tokens and server connections
|
||||||
* @param xPlexClientIdentifier 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 includeHttps Include Https entries in the results
|
||||||
* @param includeRelay Include Relay addresses in the results
|
* @param includeRelay Include Relay addresses in the results
|
||||||
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
|
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
|
||||||
@@ -788,7 +783,6 @@ public class Plex implements
|
|||||||
* @throws Exception if the API call fails
|
* @throws Exception if the API call fails
|
||||||
*/
|
*/
|
||||||
public GetServerResourcesResponse getServerResources(
|
public GetServerResourcesResponse getServerResources(
|
||||||
Optional<String> xPlexClientIdentifier,
|
|
||||||
Optional<? extends IncludeHttps> includeHttps,
|
Optional<? extends IncludeHttps> includeHttps,
|
||||||
Optional<? extends IncludeRelay> includeRelay,
|
Optional<? extends IncludeRelay> includeRelay,
|
||||||
Optional<? extends IncludeIPv6> includeIPv6,
|
Optional<? extends IncludeIPv6> includeIPv6,
|
||||||
@@ -796,7 +790,6 @@ public class Plex implements
|
|||||||
GetServerResourcesRequest request =
|
GetServerResourcesRequest request =
|
||||||
GetServerResourcesRequest
|
GetServerResourcesRequest
|
||||||
.builder()
|
.builder()
|
||||||
.xPlexClientIdentifier(xPlexClientIdentifier)
|
|
||||||
.includeHttps(includeHttps)
|
.includeHttps(includeHttps)
|
||||||
.includeRelay(includeRelay)
|
.includeRelay(includeRelay)
|
||||||
.includeIPv6(includeIPv6)
|
.includeIPv6(includeIPv6)
|
||||||
@@ -813,7 +806,7 @@ public class Plex implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetServerResourcesRequest.class,
|
GetServerResourcesRequest.class,
|
||||||
@@ -942,7 +935,7 @@ public class Plex implements
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a Pin
|
* Get a Pin
|
||||||
* Retrieve a Pin from Plex.tv for authentication flows
|
* Retrieve a Pin ID from Plex.tv to use for authentication flows
|
||||||
* @return The call builder
|
* @return The call builder
|
||||||
*/
|
*/
|
||||||
public GetPinRequestBuilder getPin() {
|
public GetPinRequestBuilder getPin() {
|
||||||
@@ -951,43 +944,27 @@ public class Plex implements
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a Pin
|
* Get a Pin
|
||||||
* Retrieve a Pin from Plex.tv for authentication flows
|
* Retrieve a Pin ID from Plex.tv to use for authentication flows
|
||||||
|
* @param request The request object containing all of the parameters for the API call.
|
||||||
* @return The response from the API call
|
* @return The response from the API call
|
||||||
* @throws Exception if the API call fails
|
* @throws Exception if the API call fails
|
||||||
*/
|
*/
|
||||||
public GetPinResponse getPinDirect() throws Exception {
|
public GetPinResponse getPin(
|
||||||
return getPin(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
GetPinRequest request) throws Exception {
|
||||||
|
return getPin(request, Optional.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a Pin
|
* Get a Pin
|
||||||
* Retrieve a Pin from Plex.tv for authentication flows
|
* Retrieve a Pin ID from Plex.tv to use for authentication flows
|
||||||
* @param strong Determines the kind of code returned by the API call
|
* @param request The request object containing all of the parameters for the API call.
|
||||||
Strong codes are used for Pin authentication flows
|
|
||||||
Non-Strong codes are used for `Plex.tv/link`
|
|
||||||
|
|
||||||
* @param xPlexClientIdentifier 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 xPlexProduct
|
|
||||||
* @param serverURL Overrides the server URL.
|
* @param serverURL Overrides the server URL.
|
||||||
* @return The response from the API call
|
* @return The response from the API call
|
||||||
* @throws Exception if the API call fails
|
* @throws Exception if the API call fails
|
||||||
*/
|
*/
|
||||||
public GetPinResponse getPin(
|
public GetPinResponse getPin(
|
||||||
Optional<Boolean> strong,
|
GetPinRequest request,
|
||||||
Optional<String> xPlexClientIdentifier,
|
|
||||||
Optional<String> xPlexProduct,
|
|
||||||
Optional<String> serverURL) throws Exception {
|
Optional<String> serverURL) throws Exception {
|
||||||
GetPinRequest request =
|
|
||||||
GetPinRequest
|
|
||||||
.builder()
|
|
||||||
.strong(strong)
|
|
||||||
.xPlexClientIdentifier(xPlexClientIdentifier)
|
|
||||||
.xPlexProduct(xPlexProduct)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
String _baseUrl = Utils.templateUrl(GET_PIN_SERVERS[0], new HashMap<String, String>());
|
String _baseUrl = Utils.templateUrl(GET_PIN_SERVERS[0], new HashMap<String, String>());
|
||||||
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
|
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
|
||||||
_baseUrl = serverURL.get();
|
_baseUrl = serverURL.get();
|
||||||
@@ -999,7 +976,7 @@ public class Plex implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetPinRequest.class,
|
GetPinRequest.class,
|
||||||
@@ -1059,7 +1036,7 @@ public class Plex implements
|
|||||||
|
|
||||||
GetPinResponse _res = _resBuilder.build();
|
GetPinResponse _res = _resBuilder.build();
|
||||||
|
|
||||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) {
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "201")) {
|
||||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||||
GetPinAuthPinContainer _out = Utils.mapper().readValue(
|
GetPinAuthPinContainer _out = Utils.mapper().readValue(
|
||||||
Utils.toUtf8AndClose(_httpRes.body()),
|
Utils.toUtf8AndClose(_httpRes.body()),
|
||||||
@@ -1125,29 +1102,23 @@ public class Plex implements
|
|||||||
*/
|
*/
|
||||||
public GetTokenByPinIdResponse getTokenByPinId(
|
public GetTokenByPinIdResponse getTokenByPinId(
|
||||||
long pinID) throws Exception {
|
long pinID) throws Exception {
|
||||||
return getTokenByPinId(Optional.empty(), pinID, Optional.empty());
|
return getTokenByPinId(pinID, Optional.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Access Token by PinId
|
* Get Access Token by PinId
|
||||||
* Retrieve an Access Token from Plex.tv after the Pin has been authenticated
|
* Retrieve an Access Token from Plex.tv after the Pin has been authenticated
|
||||||
* @param xPlexClientIdentifier 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 pinID The PinID to retrieve an access token for
|
||||||
* @param serverURL Overrides the server URL.
|
* @param serverURL Overrides the server URL.
|
||||||
* @return The response from the API call
|
* @return The response from the API call
|
||||||
* @throws Exception if the API call fails
|
* @throws Exception if the API call fails
|
||||||
*/
|
*/
|
||||||
public GetTokenByPinIdResponse getTokenByPinId(
|
public GetTokenByPinIdResponse getTokenByPinId(
|
||||||
Optional<String> xPlexClientIdentifier,
|
|
||||||
long pinID,
|
long pinID,
|
||||||
Optional<String> serverURL) throws Exception {
|
Optional<String> serverURL) throws Exception {
|
||||||
GetTokenByPinIdRequest request =
|
GetTokenByPinIdRequest request =
|
||||||
GetTokenByPinIdRequest
|
GetTokenByPinIdRequest
|
||||||
.builder()
|
.builder()
|
||||||
.xPlexClientIdentifier(xPlexClientIdentifier)
|
|
||||||
.pinID(pinID)
|
.pinID(pinID)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
@@ -1164,12 +1135,7 @@ public class Plex implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
|
||||||
GetTokenByPinIdRequest.class,
|
|
||||||
request,
|
|
||||||
this.sdkConfiguration.globals));
|
|
||||||
|
|
||||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||||
HttpRequest _r =
|
HttpRequest _r =
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import dev.plexapi.sdk.models.operations.SDKMethodInterfaces.*;
|
|||||||
import dev.plexapi.sdk.utils.HTTPClient;
|
import dev.plexapi.sdk.utils.HTTPClient;
|
||||||
import dev.plexapi.sdk.utils.RetryConfig;
|
import dev.plexapi.sdk.utils.RetryConfig;
|
||||||
import dev.plexapi.sdk.utils.SpeakeasyHTTPClient;
|
import dev.plexapi.sdk.utils.SpeakeasyHTTPClient;
|
||||||
|
import dev.plexapi.sdk.utils.Utils;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@@ -337,7 +338,7 @@ public class PlexAPI {
|
|||||||
* @return The builder instance.
|
* @return The builder instance.
|
||||||
*/
|
*/
|
||||||
public Builder serverURL(String serverUrl, Map<String, String> params) {
|
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;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -433,17 +434,81 @@ public class PlexAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows setting the xPlexClientIdentifier parameter for all supported operations.
|
* Allows setting the clientID parameter for all supported operations.
|
||||||
*
|
*
|
||||||
* @param xPlexClientIdentifier The value to set.
|
* @param clientID The value to set.
|
||||||
* @return The builder instance.
|
* @return The builder instance.
|
||||||
*/
|
*/
|
||||||
public Builder xPlexClientIdentifier(String xPlexClientIdentifier) {
|
public Builder clientID(String clientID) {
|
||||||
if (!this.sdkConfiguration.globals.get("parameters").containsKey("queryParam")) {
|
if (!this.sdkConfiguration.globals.get("parameters").containsKey("queryParam")) {
|
||||||
this.sdkConfiguration.globals.get("parameters").put("queryParam", new java.util.HashMap<>());
|
this.sdkConfiguration.globals.get("parameters").put("queryParam", new java.util.HashMap<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sdkConfiguration.globals.get("parameters").get("queryParam").put("xPlexClientIdentifier", xPlexClientIdentifier);
|
this.sdkConfiguration.globals.get("parameters").get("queryParam").put("clientID", clientID);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allows setting the clientName parameter for all supported operations.
|
||||||
|
*
|
||||||
|
* @param clientName The value to set.
|
||||||
|
* @return The builder instance.
|
||||||
|
*/
|
||||||
|
public Builder clientName(String clientName) {
|
||||||
|
if (!this.sdkConfiguration.globals.get("parameters").containsKey("queryParam")) {
|
||||||
|
this.sdkConfiguration.globals.get("parameters").put("queryParam", new java.util.HashMap<>());
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sdkConfiguration.globals.get("parameters").get("queryParam").put("clientName", clientName);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allows setting the clientVersion parameter for all supported operations.
|
||||||
|
*
|
||||||
|
* @param clientVersion The value to set.
|
||||||
|
* @return The builder instance.
|
||||||
|
*/
|
||||||
|
public Builder clientVersion(String clientVersion) {
|
||||||
|
if (!this.sdkConfiguration.globals.get("parameters").containsKey("queryParam")) {
|
||||||
|
this.sdkConfiguration.globals.get("parameters").put("queryParam", new java.util.HashMap<>());
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sdkConfiguration.globals.get("parameters").get("queryParam").put("clientVersion", clientVersion);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allows setting the clientPlatform parameter for all supported operations.
|
||||||
|
*
|
||||||
|
* @param clientPlatform The value to set.
|
||||||
|
* @return The builder instance.
|
||||||
|
*/
|
||||||
|
public Builder clientPlatform(String clientPlatform) {
|
||||||
|
if (!this.sdkConfiguration.globals.get("parameters").containsKey("queryParam")) {
|
||||||
|
this.sdkConfiguration.globals.get("parameters").put("queryParam", new java.util.HashMap<>());
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sdkConfiguration.globals.get("parameters").get("queryParam").put("clientPlatform", clientPlatform);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allows setting the deviceName parameter for all supported operations.
|
||||||
|
*
|
||||||
|
* @param deviceName The value to set.
|
||||||
|
* @return The builder instance.
|
||||||
|
*/
|
||||||
|
public Builder deviceName(String deviceName) {
|
||||||
|
if (!this.sdkConfiguration.globals.get("parameters").containsKey("queryParam")) {
|
||||||
|
this.sdkConfiguration.globals.get("parameters").put("queryParam", new java.util.HashMap<>());
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sdkConfiguration.globals.get("parameters").get("queryParam").put("deviceName", deviceName);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,11 +34,14 @@ class SDKConfiguration {
|
|||||||
put("port", "32400");
|
put("port", "32400");
|
||||||
} });
|
} });
|
||||||
} };
|
} };
|
||||||
public String language = "java";
|
private static final String LANGUAGE = "java";
|
||||||
public String openapiDocVersion = "0.0.3";
|
public static final String OPENAPI_DOC_VERSION = "0.0.3";
|
||||||
public String sdkVersion = "0.3.5";
|
public static final String SDK_VERSION = "0.4.0";
|
||||||
public String genVersion = "2.415.8";
|
public static final String GEN_VERSION = "2.421.3";
|
||||||
public String userAgent = "speakeasy-sdk/java 0.3.5 2.415.8 0.0.3 dev.plexapi.sdk";
|
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();
|
private Hooks _hooks = createHooks();
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ public class Search implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
PerformSearchRequest.class,
|
PerformSearchRequest.class,
|
||||||
@@ -320,7 +320,7 @@ public class Search implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
PerformVoiceSearchRequest.class,
|
PerformVoiceSearchRequest.class,
|
||||||
@@ -469,7 +469,7 @@ public class Search implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetSearchResultsRequest.class,
|
GetSearchResultsRequest.class,
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public class Server implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -260,7 +260,7 @@ public class Server implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -407,7 +407,7 @@ public class Server implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -554,7 +554,7 @@ public class Server implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -701,7 +701,7 @@ public class Server implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||||
HttpRequest _r =
|
HttpRequest _r =
|
||||||
@@ -829,7 +829,7 @@ public class Server implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -980,7 +980,7 @@ public class Server implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetResizedPhotoRequest.class,
|
GetResizedPhotoRequest.class,
|
||||||
@@ -1129,7 +1129,7 @@ public class Server implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetMediaProvidersRequest.class,
|
GetMediaProvidersRequest.class,
|
||||||
@@ -1281,7 +1281,7 @@ public class Server implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class Sessions implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -265,7 +265,7 @@ public class Sessions implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetSessionHistoryRequest.class,
|
GetSessionHistoryRequest.class,
|
||||||
@@ -417,7 +417,7 @@ public class Sessions implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -574,7 +574,7 @@ public class Sessions implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public class Statistics implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetStatisticsRequest.class,
|
GetStatisticsRequest.class,
|
||||||
@@ -273,7 +273,7 @@ public class Statistics implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetResourcesStatisticsRequest.class,
|
GetResourcesStatisticsRequest.class,
|
||||||
@@ -445,7 +445,7 @@ public class Statistics implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetBandwidthStatisticsRequest.class,
|
GetBandwidthStatisticsRequest.class,
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ public class Updater implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
Utils.configureSecurity(_req,
|
Utils.configureSecurity(_req,
|
||||||
this.sdkConfiguration.securitySource.getSecurity());
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
@@ -246,7 +246,7 @@ public class Updater implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
CheckForUpdatesRequest.class,
|
CheckForUpdatesRequest.class,
|
||||||
@@ -411,7 +411,7 @@ public class Updater implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
ApplyUpdatesRequest.class,
|
ApplyUpdatesRequest.class,
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class Video implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetTimelineRequest.class,
|
GetTimelineRequest.class,
|
||||||
@@ -216,7 +216,7 @@ public class Video implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
StartUniversalTranscodeRequest.class,
|
StartUniversalTranscodeRequest.class,
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class Watchlist implements
|
|||||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
_req.addHeader("Accept", "application/json")
|
_req.addHeader("Accept", "application/json")
|
||||||
.addHeader("user-agent",
|
.addHeader("user-agent",
|
||||||
this.sdkConfiguration.userAgent);
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
_req.addQueryParams(Utils.getQueryParams(
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
GetWatchListRequest.class,
|
GetWatchListRequest.class,
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public class AddPlaylistContentsRequestBuilder {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AddPlaylistContentsRequestBuilder uri(java.lang.String uri) {
|
public AddPlaylistContentsRequestBuilder uri(String uri) {
|
||||||
Utils.checkNotNull(uri, "uri");
|
Utils.checkNotNull(uri, "uri");
|
||||||
this.uri = uri;
|
this.uri = uri;
|
||||||
return this;
|
return this;
|
||||||
@@ -38,7 +38,7 @@ public class AddPlaylistContentsRequestBuilder {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AddPlaylistContentsRequestBuilder playQueueID(java.util.Optional<java.lang.Double> playQueueID) {
|
public AddPlaylistContentsRequestBuilder playQueueID(Optional<Double> playQueueID) {
|
||||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||||
this.playQueueID = playQueueID;
|
this.playQueueID = playQueueID;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -17,25 +17,25 @@ public class ApplyUpdatesRequestBuilder {
|
|||||||
this.sdk = sdk;
|
this.sdk = sdk;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApplyUpdatesRequestBuilder tonight(dev.plexapi.sdk.models.operations.Tonight tonight) {
|
public ApplyUpdatesRequestBuilder tonight(Tonight tonight) {
|
||||||
Utils.checkNotNull(tonight, "tonight");
|
Utils.checkNotNull(tonight, "tonight");
|
||||||
this.tonight = Optional.of(tonight);
|
this.tonight = Optional.of(tonight);
|
||||||
return this;
|
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");
|
Utils.checkNotNull(tonight, "tonight");
|
||||||
this.tonight = tonight;
|
this.tonight = tonight;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApplyUpdatesRequestBuilder skip(dev.plexapi.sdk.models.operations.Skip skip) {
|
public ApplyUpdatesRequestBuilder skip(Skip skip) {
|
||||||
Utils.checkNotNull(skip, "skip");
|
Utils.checkNotNull(skip, "skip");
|
||||||
this.skip = Optional.of(skip);
|
this.skip = Optional.of(skip);
|
||||||
return this;
|
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");
|
Utils.checkNotNull(skip, "skip");
|
||||||
this.skip = skip;
|
this.skip = skip;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -5,23 +5,22 @@
|
|||||||
package dev.plexapi.sdk.models.operations;
|
package dev.plexapi.sdk.models.operations;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
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)
|
* AutoSelectSubtitle - The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
||||||
*/
|
*/
|
||||||
public enum AutoSelectSubtitle {
|
public enum AutoSelectSubtitle {
|
||||||
ZERO("0"),
|
Disable(0),
|
||||||
ONE("1");
|
Enable(1);
|
||||||
|
|
||||||
@JsonValue
|
@JsonValue
|
||||||
private final String value;
|
private final int value;
|
||||||
|
|
||||||
private AutoSelectSubtitle(String value) {
|
private AutoSelectSubtitle(int value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String value() {
|
public int value() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class CancelServerActivitiesRequestBuilder {
|
|||||||
this.sdk = sdk;
|
this.sdk = sdk;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CancelServerActivitiesRequestBuilder activityUUID(java.lang.String activityUUID) {
|
public CancelServerActivitiesRequestBuilder activityUUID(String activityUUID) {
|
||||||
Utils.checkNotNull(activityUUID, "activityUUID");
|
Utils.checkNotNull(activityUUID, "activityUUID");
|
||||||
this.activityUUID = activityUUID;
|
this.activityUUID = activityUUID;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ public class CheckForUpdatesRequestBuilder {
|
|||||||
this.sdk = sdk;
|
this.sdk = sdk;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CheckForUpdatesRequestBuilder download(dev.plexapi.sdk.models.operations.Download download) {
|
public CheckForUpdatesRequestBuilder download(Download download) {
|
||||||
Utils.checkNotNull(download, "download");
|
Utils.checkNotNull(download, "download");
|
||||||
this.download = Optional.of(download);
|
this.download = Optional.of(download);
|
||||||
return this;
|
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");
|
Utils.checkNotNull(download, "download");
|
||||||
this.download = download;
|
this.download = download;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import dev.plexapi.sdk.utils.Utils;
|
import dev.plexapi.sdk.utils.Utils;
|
||||||
import java.lang.Boolean;
|
import java.lang.Boolean;
|
||||||
import java.lang.Double;
|
import java.lang.Integer;
|
||||||
import java.lang.Override;
|
import java.lang.Override;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -18,32 +18,53 @@ import java.util.Objects;
|
|||||||
|
|
||||||
public class Connections {
|
public class Connections {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The protocol used for the connection (http, https, etc)
|
||||||
|
*/
|
||||||
@JsonProperty("protocol")
|
@JsonProperty("protocol")
|
||||||
private String protocol;
|
private Protocol protocol;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The (ip) address or domain name used for the connection
|
||||||
|
*/
|
||||||
@JsonProperty("address")
|
@JsonProperty("address")
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The port used for the connection
|
||||||
|
*/
|
||||||
@JsonProperty("port")
|
@JsonProperty("port")
|
||||||
private double port;
|
private int port;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The full URI of the connection
|
||||||
|
*/
|
||||||
@JsonProperty("uri")
|
@JsonProperty("uri")
|
||||||
private String uri;
|
private String uri;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the connection is local address
|
||||||
|
*/
|
||||||
@JsonProperty("local")
|
@JsonProperty("local")
|
||||||
private boolean local;
|
private boolean local;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the connection is relayed through plex.direct
|
||||||
|
*/
|
||||||
@JsonProperty("relay")
|
@JsonProperty("relay")
|
||||||
private boolean relay;
|
private boolean relay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the connection is using IPv6
|
||||||
|
*/
|
||||||
@JsonProperty("IPv6")
|
@JsonProperty("IPv6")
|
||||||
private boolean iPv6;
|
private boolean iPv6;
|
||||||
|
|
||||||
@JsonCreator
|
@JsonCreator
|
||||||
public Connections(
|
public Connections(
|
||||||
@JsonProperty("protocol") String protocol,
|
@JsonProperty("protocol") Protocol protocol,
|
||||||
@JsonProperty("address") String address,
|
@JsonProperty("address") String address,
|
||||||
@JsonProperty("port") double port,
|
@JsonProperty("port") int port,
|
||||||
@JsonProperty("uri") String uri,
|
@JsonProperty("uri") String uri,
|
||||||
@JsonProperty("local") boolean local,
|
@JsonProperty("local") boolean local,
|
||||||
@JsonProperty("relay") boolean relay,
|
@JsonProperty("relay") boolean relay,
|
||||||
@@ -64,36 +85,57 @@ public class Connections {
|
|||||||
this.iPv6 = iPv6;
|
this.iPv6 = iPv6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The protocol used for the connection (http, https, etc)
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String protocol() {
|
public Protocol protocol() {
|
||||||
return protocol;
|
return protocol;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The (ip) address or domain name used for the connection
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String address() {
|
public String address() {
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The port used for the connection
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public double port() {
|
public int port() {
|
||||||
return port;
|
return port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The full URI of the connection
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String uri() {
|
public String uri() {
|
||||||
return uri;
|
return uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the connection is local address
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public boolean local() {
|
public boolean local() {
|
||||||
return local;
|
return local;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the connection is relayed through plex.direct
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public boolean relay() {
|
public boolean relay() {
|
||||||
return relay;
|
return relay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the connection is using IPv6
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public boolean iPv6() {
|
public boolean iPv6() {
|
||||||
return iPv6;
|
return iPv6;
|
||||||
@@ -103,42 +145,63 @@ public class Connections {
|
|||||||
return new Builder();
|
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");
|
Utils.checkNotNull(protocol, "protocol");
|
||||||
this.protocol = protocol;
|
this.protocol = protocol;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The (ip) address or domain name used for the connection
|
||||||
|
*/
|
||||||
public Connections withAddress(String address) {
|
public Connections withAddress(String address) {
|
||||||
Utils.checkNotNull(address, "address");
|
Utils.checkNotNull(address, "address");
|
||||||
this.address = address;
|
this.address = address;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Connections withPort(double port) {
|
/**
|
||||||
|
* The port used for the connection
|
||||||
|
*/
|
||||||
|
public Connections withPort(int port) {
|
||||||
Utils.checkNotNull(port, "port");
|
Utils.checkNotNull(port, "port");
|
||||||
this.port = port;
|
this.port = port;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The full URI of the connection
|
||||||
|
*/
|
||||||
public Connections withUri(String uri) {
|
public Connections withUri(String uri) {
|
||||||
Utils.checkNotNull(uri, "uri");
|
Utils.checkNotNull(uri, "uri");
|
||||||
this.uri = uri;
|
this.uri = uri;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the connection is local address
|
||||||
|
*/
|
||||||
public Connections withLocal(boolean local) {
|
public Connections withLocal(boolean local) {
|
||||||
Utils.checkNotNull(local, "local");
|
Utils.checkNotNull(local, "local");
|
||||||
this.local = local;
|
this.local = local;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the connection is relayed through plex.direct
|
||||||
|
*/
|
||||||
public Connections withRelay(boolean relay) {
|
public Connections withRelay(boolean relay) {
|
||||||
Utils.checkNotNull(relay, "relay");
|
Utils.checkNotNull(relay, "relay");
|
||||||
this.relay = relay;
|
this.relay = relay;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the connection is using IPv6
|
||||||
|
*/
|
||||||
public Connections withIPv6(boolean iPv6) {
|
public Connections withIPv6(boolean iPv6) {
|
||||||
Utils.checkNotNull(iPv6, "iPv6");
|
Utils.checkNotNull(iPv6, "iPv6");
|
||||||
this.iPv6 = iPv6;
|
this.iPv6 = iPv6;
|
||||||
@@ -190,11 +253,11 @@ public class Connections {
|
|||||||
|
|
||||||
public final static class Builder {
|
public final static class Builder {
|
||||||
|
|
||||||
private String protocol;
|
private Protocol protocol;
|
||||||
|
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
private Double port;
|
private Integer port;
|
||||||
|
|
||||||
private String uri;
|
private String uri;
|
||||||
|
|
||||||
@@ -208,42 +271,63 @@ public class Connections {
|
|||||||
// force use of static builder() method
|
// 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");
|
Utils.checkNotNull(protocol, "protocol");
|
||||||
this.protocol = protocol;
|
this.protocol = protocol;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The (ip) address or domain name used for the connection
|
||||||
|
*/
|
||||||
public Builder address(String address) {
|
public Builder address(String address) {
|
||||||
Utils.checkNotNull(address, "address");
|
Utils.checkNotNull(address, "address");
|
||||||
this.address = address;
|
this.address = address;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder port(double port) {
|
/**
|
||||||
|
* The port used for the connection
|
||||||
|
*/
|
||||||
|
public Builder port(int port) {
|
||||||
Utils.checkNotNull(port, "port");
|
Utils.checkNotNull(port, "port");
|
||||||
this.port = port;
|
this.port = port;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The full URI of the connection
|
||||||
|
*/
|
||||||
public Builder uri(String uri) {
|
public Builder uri(String uri) {
|
||||||
Utils.checkNotNull(uri, "uri");
|
Utils.checkNotNull(uri, "uri");
|
||||||
this.uri = uri;
|
this.uri = uri;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the connection is local address
|
||||||
|
*/
|
||||||
public Builder local(boolean local) {
|
public Builder local(boolean local) {
|
||||||
Utils.checkNotNull(local, "local");
|
Utils.checkNotNull(local, "local");
|
||||||
this.local = local;
|
this.local = local;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the connection is relayed through plex.direct
|
||||||
|
*/
|
||||||
public Builder relay(boolean relay) {
|
public Builder relay(boolean relay) {
|
||||||
Utils.checkNotNull(relay, "relay");
|
Utils.checkNotNull(relay, "relay");
|
||||||
this.relay = relay;
|
this.relay = relay;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the connection is using IPv6
|
||||||
|
*/
|
||||||
public Builder iPv6(boolean iPv6) {
|
public Builder iPv6(boolean iPv6) {
|
||||||
Utils.checkNotNull(iPv6, "iPv6");
|
Utils.checkNotNull(iPv6, "iPv6");
|
||||||
this.iPv6 = iPv6;
|
this.iPv6 = iPv6;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class CreatePlaylistRequestBuilder {
|
|||||||
this.sdk = sdk;
|
this.sdk = sdk;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CreatePlaylistRequestBuilder request(dev.plexapi.sdk.models.operations.CreatePlaylistRequest request) {
|
public CreatePlaylistRequestBuilder request(CreatePlaylistRequest request) {
|
||||||
Utils.checkNotNull(request, "request");
|
Utils.checkNotNull(request, "request");
|
||||||
this.request = request;
|
this.request = request;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -5,23 +5,22 @@
|
|||||||
package dev.plexapi.sdk.models.operations;
|
package dev.plexapi.sdk.models.operations;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
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 {
|
public enum DefaultSubtitleAccessibility {
|
||||||
ZERO("0"),
|
Disable(0),
|
||||||
ONE("1");
|
Enable(1);
|
||||||
|
|
||||||
@JsonValue
|
@JsonValue
|
||||||
private final String value;
|
private final int value;
|
||||||
|
|
||||||
private DefaultSubtitleAccessibility(String value) {
|
private DefaultSubtitleAccessibility(int value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String value() {
|
public int value() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user