mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-06 12:37:47 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3499fe6d12 | ||
|
|
f3780ae807 | ||
|
|
ce09c0c9f6 | ||
|
|
d17be8f8fa | ||
|
|
2e07625687 | ||
|
|
258203517f | ||
|
|
af70af8aee | ||
|
|
ee80753a6b | ||
|
|
0bcb23bc24 | ||
|
|
bb34cb3d87 | ||
|
|
fe1cd8c7e4 | ||
|
|
9b00b9305f |
5
.github/workflows/sdk_generation.yaml
vendored
5
.github/workflows/sdk_generation.yaml
vendored
@@ -26,7 +26,8 @@ jobs:
|
||||
speakeasy_version: latest
|
||||
secrets:
|
||||
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
java_gpg_passphrase: ${{ secrets.JAVA_GPG_PASSPHRASE }}
|
||||
java_gpg_secret_key: ${{ secrets.JAVA_GPG_SECRET_KEY }}
|
||||
java_gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
java_gpg_secret_key: ${{ secrets.GPG_SECRET_KEY }}
|
||||
ossrh_username: ${{ secrets.OSSRH_USERNAME }}
|
||||
ossrh_password: ${{ secrets.OSSRH_PASSWORD }}
|
||||
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
|
||||
|
||||
4
.github/workflows/sdk_publish.yaml
vendored
4
.github/workflows/sdk_publish.yaml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
|
||||
secrets:
|
||||
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
java_gpg_passphrase: ${{ secrets.JAVA_GPG_PASSPHRASE }}
|
||||
java_gpg_secret_key: ${{ secrets.JAVA_GPG_SECRET_KEY }}
|
||||
java_gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
java_gpg_secret_key: ${{ secrets.GPG_SECRET_KEY }}
|
||||
ossrh_password: ${{ secrets.OSSRH_PASSWORD }}
|
||||
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -12,7 +12,7 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
java:
|
||||
version: 0.3.1
|
||||
version: 0.4.0
|
||||
additionalDependencies: []
|
||||
additionalPlugins: []
|
||||
artifactID: plexapi
|
||||
@@ -37,7 +37,6 @@ java:
|
||||
shortName: MIT
|
||||
url: https://mit-license.org/
|
||||
maxMethodParams: 4
|
||||
ossrhURL: https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
|
||||
outputModelSuffix: output
|
||||
packageName: dev.plexapi.sdk
|
||||
projectName: plexapi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
speakeasyVersion: 1.392.1
|
||||
speakeasyVersion: 1.401.2
|
||||
sources:
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
@@ -6,33 +6,39 @@ sources:
|
||||
sourceBlobDigest: sha256:f689cdc9c740f4e5120422720722d2d256d56ceb62bc13370713ec1661a433df
|
||||
tags:
|
||||
- latest
|
||||
plexapi:
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:5aa71ad96ca6de91143ee513c9880e08e555e7748fb4b5f8d069c6ab0c8f3069
|
||||
sourceBlobDigest: sha256:1cbef844e2856c2eabba4bd6d677d96c572fed13b27978d0d953aa06b224c02f
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
targets:
|
||||
plexjava:
|
||||
source: my-source
|
||||
sourceNamespace: my-source
|
||||
sourceRevisionDigest: sha256:893baf00932f1b8e49b2e60af272be6a9a62934af6eb3a2f96dd9f2302ef69c5
|
||||
sourceBlobDigest: sha256:f689cdc9c740f4e5120422720722d2d256d56ceb62bc13370713ec1661a433df
|
||||
source: plexapi
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:5aa71ad96ca6de91143ee513c9880e08e555e7748fb4b5f8d069c6ab0c8f3069
|
||||
sourceBlobDigest: sha256:1cbef844e2856c2eabba4bd6d677d96c572fed13b27978d0d953aa06b224c02f
|
||||
codeSamplesNamespace: code-samples-java-plexjava
|
||||
codeSamplesRevisionDigest: sha256:433262f0bd16ad4072c5c38628e30fd0ee2dcfbdb3547262f0f4d328a6960ede
|
||||
outLocation: /home/luke/github/plexjava
|
||||
codeSamplesRevisionDigest: sha256:e98bd3fd8e811e5368343de5de5c1f0c7d154bf8ab1b56532fe72b65bc70297c
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
sources:
|
||||
my-source:
|
||||
plexapi:
|
||||
inputs:
|
||||
- location: registry.speakeasyapi.dev/lukehagar/lukehagar/plex-api:main
|
||||
- location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main
|
||||
targets:
|
||||
plexjava:
|
||||
target: java
|
||||
source: my-source
|
||||
source: plexapi
|
||||
publish:
|
||||
java:
|
||||
ossrhUsername: J4dlHj0l
|
||||
ossrhUsername: $ossrh_username
|
||||
ossrhPassword: $ossrh_password
|
||||
gpgSecretKey: $java_gpg_secret_key
|
||||
gpgPassPhrase: $java_gpg_passphrase
|
||||
codeSamples:
|
||||
output: codeSamples.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/code-samples-java-plexjava
|
||||
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-java-plexjava
|
||||
|
||||
@@ -10,7 +10,7 @@ targets:
|
||||
source: plexapi
|
||||
publish:
|
||||
java:
|
||||
ossrhUsername: J4dlHj0l
|
||||
ossrhUsername: $ossrh_username
|
||||
ossrhPassword: $ossrh_password
|
||||
gpgSecretKey: $java_gpg_secret_key
|
||||
gpgPassPhrase: $java_gpg_passphrase
|
||||
|
||||
295
README.md
295
README.md
@@ -37,7 +37,7 @@ The samples below show how a published SDK artifact is used:
|
||||
|
||||
Gradle:
|
||||
```groovy
|
||||
implementation 'dev.plexapi:plexapi:0.3.1'
|
||||
implementation 'dev.plexapi:plexapi:0.4.0'
|
||||
```
|
||||
|
||||
Maven:
|
||||
@@ -45,7 +45,7 @@ Maven:
|
||||
<dependency>
|
||||
<groupId>dev.plexapi</groupId>
|
||||
<artifactId>plexapi</artifactId>
|
||||
<version>0.3.1</version>
|
||||
<version>0.4.0</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
@@ -73,39 +73,30 @@ gradlew.bat publishToMavenLocal -Pskip.signing
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -246,21 +237,25 @@ public class Application {
|
||||
<!-- Start 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
|
||||
|
||||
The following global parameter is available.
|
||||
The following global parameters are available.
|
||||
|
||||
| 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
|
||||
(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
|
||||
@@ -269,46 +264,33 @@ This is used to track the client application and its usage
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.GetServerResourcesResponse;
|
||||
import dev.plexapi.sdk.models.operations.IncludeHttps;
|
||||
import dev.plexapi.sdk.models.operations.IncludeIPv6;
|
||||
import dev.plexapi.sdk.models.operations.IncludeRelay;
|
||||
import dev.plexapi.sdk.models.errors.GetPinBadRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetPinRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetPinResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
public static void main(String[] args) throws GetPinBadRequest, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||
.clientName("Plex Web")
|
||||
.clientVersion("4.133.0")
|
||||
.clientPlatform("Chrome")
|
||||
.deviceName("Linux")
|
||||
.build();
|
||||
|
||||
GetPinRequest req = GetPinRequest.builder()
|
||||
.build();
|
||||
|
||||
GetServerResourcesResponse res = sdk.plex().getServerResources()
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.includeHttps(IncludeHttps.ONE)
|
||||
.includeRelay(IncludeRelay.ONE)
|
||||
.includeIPv6(IncludeIPv6.ONE)
|
||||
GetPinResponse res = sdk.plex().getPin()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
if (res.plexDevices().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.authPinContainer().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -331,39 +313,30 @@ Handling errors in this SDK should largely match your expectations. All operati
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -386,40 +359,31 @@ You can override the default server globally by passing a server index to the `s
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.serverIndex(0)
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||
.clientName("Plex Web")
|
||||
.clientVersion("4.133.0")
|
||||
.clientPlatform("Chrome")
|
||||
.deviceName("Linux")
|
||||
.build();
|
||||
|
||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -438,40 +402,31 @@ The default server can also be overridden globally by passing a URL to the `serv
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.serverURL("{protocol}://{ip}:{port}")
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||
.clientName("Plex Web")
|
||||
.clientVersion("4.133.0")
|
||||
.clientPlatform("Chrome")
|
||||
.deviceName("Linux")
|
||||
.build();
|
||||
|
||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -483,40 +438,31 @@ The server URL can also be overridden on a per-operation basis, provided a serve
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetCompanionsDataResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetCompanionsDataBadRequest, GetCompanionsDataUnauthorized, Exception {
|
||||
|
||||
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/")
|
||||
.call();
|
||||
|
||||
if (res.responseBodies().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.responseBodies().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -538,39 +484,30 @@ To authenticate with the API the `accessToken` parameter must be set when initia
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
60
RELEASES.md
60
RELEASES.md
@@ -19,3 +19,63 @@ Based on:
|
||||
- [java v0.3.1] .
|
||||
### Releases
|
||||
- [Maven Central v0.3.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.3.1 - .
|
||||
|
||||
## 2024-09-16 18:32:47
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.397.2 (2.415.8) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [java v0.3.2] .
|
||||
### Releases
|
||||
- [Maven Central v0.3.2] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.3.2 - .
|
||||
|
||||
## 2024-09-16 18:54:58
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.397.2 (2.415.8) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [java v0.3.3] .
|
||||
### Releases
|
||||
- [Maven Central v0.3.3] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.3.3 - .
|
||||
|
||||
## 2024-09-16 19:14:13
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.397.3 (2.415.8) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [java v0.3.4] .
|
||||
### Releases
|
||||
- [Maven Central v0.3.4] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.3.4 - .
|
||||
|
||||
## 2024-09-16 19:32:27
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.397.3 (2.415.8) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [java v0.3.5] .
|
||||
### Releases
|
||||
- [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;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
37
build.gradle
37
build.gradle
@@ -14,6 +14,7 @@ plugins {
|
||||
id 'java-library'
|
||||
id 'maven-publish'
|
||||
id 'signing'
|
||||
id 'cl.franciscosolis.sonatype-central-upload' version '1.0.3'
|
||||
}
|
||||
|
||||
compileJava.options.encoding = "UTF-8"
|
||||
@@ -40,6 +41,7 @@ model {
|
||||
|
||||
jar {
|
||||
dependsOn(":generatePomFileForMavenPublication")
|
||||
archiveBaseName = "plexapi"
|
||||
|
||||
into("META-INF/maven/dev.plexapi/plexapi") {
|
||||
from("$buildDir/pom.xml")
|
||||
@@ -61,7 +63,7 @@ tasks.withType(Javadoc) {
|
||||
}
|
||||
|
||||
group = "dev.plexapi"
|
||||
version = "0.3.1"
|
||||
version = "0.4.0"
|
||||
|
||||
sourcesJar {
|
||||
archiveBaseName = "plexapi"
|
||||
@@ -70,25 +72,36 @@ sourcesJar {
|
||||
javadocJar {
|
||||
archiveBaseName = "plexapi"
|
||||
}
|
||||
sonatypeCentralUpload {
|
||||
// This is your Sonatype generated username
|
||||
username = System.getenv("SONATYPE_USERNAME")
|
||||
// This is your sonatype generated password
|
||||
password = System.getenv("SONATYPE_PASSWORD")
|
||||
|
||||
// This is a list of files to upload. Ideally you would point to your jar file, source and javadoc jar (required by central)
|
||||
archives = files(
|
||||
"$buildDir/libs/plexapi-${version}.jar",
|
||||
"$buildDir/libs/plexapi-${version}-sources.jar",
|
||||
"$buildDir/libs/plexapi-${version}-javadoc.jar"
|
||||
)
|
||||
|
||||
// This is the pom file to upload. This is required by central
|
||||
pom = file("$buildDir/pom.xml")
|
||||
|
||||
// This is your PGP private key. This is required to sign your files
|
||||
signingKey = System.getenv("SONATYPE_SIGNING_KEY")
|
||||
// This is your PGP private key passphrase to decrypt your private key
|
||||
signingKeyPassphrase = System.getenv("SIGNING_KEY_PASSPHRASE")
|
||||
}
|
||||
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "OSSRH"
|
||||
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||
credentials {
|
||||
username = System.getenv("MAVEN_USERNAME")
|
||||
password = System.getenv("MAVEN_PASSWORD")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
groupId = 'dev.plexapi'
|
||||
artifactId = 'plexapi'
|
||||
version = '0.3.1'
|
||||
version = '0.4.0'
|
||||
|
||||
from components.java
|
||||
|
||||
|
||||
2690
codeSamples.yaml
2690
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
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `protocol` | *String* | :heavy_check_mark: | N/A |
|
||||
| `address` | *String* | :heavy_check_mark: | N/A |
|
||||
| `port` | *double* | :heavy_check_mark: | N/A |
|
||||
| `uri` | *String* | :heavy_check_mark: | N/A |
|
||||
| `local` | *boolean* | :heavy_check_mark: | N/A |
|
||||
| `relay` | *boolean* | :heavy_check_mark: | N/A |
|
||||
| `iPv6` | *boolean* | :heavy_check_mark: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| `protocol` | [Protocol](../../models/operations/Protocol.md) | :heavy_check_mark: | The protocol used for the connection (http, https, etc) |
|
||||
| `address` | *String* | :heavy_check_mark: | The (ip) address or domain name used for the connection |
|
||||
| `port` | *int* | :heavy_check_mark: | The port used for the connection |
|
||||
| `uri` | *String* | :heavy_check_mark: | The full URI of the connection |
|
||||
| `local` | *boolean* | :heavy_check_mark: | If the connection is local address |
|
||||
| `relay` | *boolean* | :heavy_check_mark: | If the connection is relayed through plex.direct |
|
||||
| `iPv6` | *boolean* | :heavy_check_mark: | If the connection is using IPv6 |
|
||||
@@ -1,11 +1,11 @@
|
||||
# DefaultSubtitleAccessibility
|
||||
|
||||
The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
|
||||
The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
@@ -5,7 +5,7 @@ The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
@@ -13,7 +13,7 @@ Geo location data
|
||||
| `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 |
|
||||
| `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 |
|
||||
| `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 |
|
||||
|
||||
@@ -5,24 +5,24 @@
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `allowSync` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `art` | *Optional<String>* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
||||
| `composite` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 |
|
||||
| `filters` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `refreshing` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | false |
|
||||
| `thumb` | *Optional<String>* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
|
||||
| `key` | *Optional<String>* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `type` | *Optional<String>* | :heavy_minus_sign: | N/A | movie |
|
||||
| `title` | *Optional<String>* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `agent` | *Optional<String>* | :heavy_minus_sign: | N/A | tv.plex.agents.movie |
|
||||
| `scanner` | *Optional<String>* | :heavy_minus_sign: | N/A | Plex Movie |
|
||||
| `language` | *Optional<String>* | :heavy_minus_sign: | N/A | en-US |
|
||||
| `uuid` | *Optional<String>* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
||||
| `updatedAt` | *Optional<Long>* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 |
|
||||
| `createdAt` | *Optional<Long>* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 |
|
||||
| `scannedAt` | *Optional<Long>* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 |
|
||||
| `content` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `directory` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `contentChangedAt` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 3192854 |
|
||||
| `hidden` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 0 |
|
||||
| `location` | List<[Location](../../models/operations/Location.md)> | :heavy_minus_sign: | N/A | |
|
||||
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | true |
|
||||
| `art` | *String* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg |
|
||||
| `composite` | *String* | :heavy_check_mark: | N/A | /library/sections/1/composite/1705615584 |
|
||||
| `filters` | *boolean* | :heavy_check_mark: | N/A | true |
|
||||
| `refreshing` | *boolean* | :heavy_check_mark: | N/A | false |
|
||||
| `thumb` | *String* | :heavy_check_mark: | N/A | /:/resources/movie.png |
|
||||
| `key` | *String* | :heavy_check_mark: | N/A | 1 |
|
||||
| `type` | *String* | :heavy_check_mark: | N/A | movie |
|
||||
| `title` | *String* | :heavy_check_mark: | N/A | Movies |
|
||||
| `agent` | *String* | :heavy_check_mark: | N/A | tv.plex.agents.movie |
|
||||
| `scanner` | *String* | :heavy_check_mark: | N/A | Plex Movie |
|
||||
| `language` | *String* | :heavy_check_mark: | N/A | en-US |
|
||||
| `uuid` | *String* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
||||
| `updatedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||
| `createdAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||
| `scannedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||
| `content` | *boolean* | :heavy_check_mark: | N/A | true |
|
||||
| `directory` | *boolean* | :heavy_check_mark: | N/A | true |
|
||||
| `contentChangedAt` | *int* | :heavy_check_mark: | N/A | 3192854 |
|
||||
| `hidden` | *int* | :heavy_check_mark: | N/A | 0 |
|
||||
| `location` | List<[Location](../../models/operations/Location.md)> | :heavy_check_mark: | N/A | |
|
||||
@@ -8,4 +8,4 @@
|
||||
| `size` | *int* | :heavy_check_mark: | N/A | 5 |
|
||||
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | false |
|
||||
| `title1` | *String* | :heavy_check_mark: | N/A | Plex Library |
|
||||
| `directory` | List<[GetAllLibrariesDirectory](../../models/operations/GetAllLibrariesDirectory.md)> | :heavy_minus_sign: | N/A | |
|
||||
| `directory` | List<[GetAllLibrariesDirectory](../../models/operations/GetAllLibrariesDirectory.md)> | :heavy_check_mark: | N/A | |
|
||||
@@ -5,6 +5,6 @@ The libraries available on the Server
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
||||
| `mediaContainer` | [Optional<GetAllLibrariesMediaContainer>](../../models/operations/GetAllLibrariesMediaContainer.md) | :heavy_minus_sign: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `mediaContainer` | [GetAllLibrariesMediaContainer](../../models/operations/GetAllLibrariesMediaContainer.md) | :heavy_check_mark: | N/A |
|
||||
@@ -13,7 +13,7 @@ Geo location data
|
||||
| `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 |
|
||||
| `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 |
|
||||
| `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 |
|
||||
|
||||
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
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
||||
| `size` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 70 |
|
||||
| `allowSync` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `art` | *Optional<String>* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
||||
| `identifier` | *Optional<String>* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
|
||||
| `librarySectionID` | [Optional<LibrarySectionID>](../../models/operations/LibrarySectionID.md) | :heavy_minus_sign: | N/A | |
|
||||
| `librarySectionTitle` | *Optional<String>* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `librarySectionUUID` | *Optional<String>* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
||||
| `mediaTagPrefix` | *Optional<String>* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ |
|
||||
| `mediaTagVersion` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1701731894 |
|
||||
| `thumb` | *Optional<String>* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
|
||||
| `title1` | *Optional<String>* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `title2` | *Optional<String>* | :heavy_minus_sign: | N/A | Recently Released |
|
||||
| `viewGroup` | *Optional<String>* | :heavy_minus_sign: | N/A | movie |
|
||||
| `viewMode` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 65592 |
|
||||
| `mixedParents` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `metadata` | List<[GetLibraryItemsMetadata](../../models/operations/GetLibraryItemsMetadata.md)> | :heavy_minus_sign: | N/A | |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
||||
| `size` | *int* | :heavy_check_mark: | N/A | 70 |
|
||||
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | true |
|
||||
| `art` | *String* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg |
|
||||
| `identifier` | *String* | :heavy_check_mark: | N/A | com.plexapp.plugins.library |
|
||||
| `librarySectionID` | [LibrarySectionID](../../models/operations/LibrarySectionID.md) | :heavy_check_mark: | N/A | |
|
||||
| `librarySectionTitle` | *String* | :heavy_check_mark: | N/A | Movies |
|
||||
| `librarySectionUUID` | *String* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
||||
| `mediaTagPrefix` | *String* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ |
|
||||
| `mediaTagVersion` | *int* | :heavy_check_mark: | N/A | 1701731894 |
|
||||
| `thumb` | *String* | :heavy_check_mark: | N/A | /:/resources/movie.png |
|
||||
| `title1` | *String* | :heavy_check_mark: | N/A | Movies |
|
||||
| `title2` | *String* | :heavy_check_mark: | N/A | Recently Released |
|
||||
| `viewGroup` | *String* | :heavy_check_mark: | N/A | movie |
|
||||
| `viewMode` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 65592 |
|
||||
| `mixedParents` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `metadata` | List<[GetLibraryItemsMetadata](../../models/operations/GetLibraryItemsMetadata.md)> | :heavy_minus_sign: | N/A | |
|
||||
| `meta` | [Optional<Meta>](../../models/operations/Meta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/> | |
|
||||
@@ -5,21 +5,21 @@
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `ratingKey` | *Optional<String>* | :heavy_minus_sign: | N/A | 58683 |
|
||||
| `key` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683 |
|
||||
| `guid` | *Optional<String>* | :heavy_minus_sign: | N/A | plex://movie/5d7768ba96b655001fdc0408 |
|
||||
| `ratingKey` | *String* | :heavy_check_mark: | N/A | 58683 |
|
||||
| `key` | *String* | :heavy_check_mark: | N/A | /library/metadata/58683 |
|
||||
| `guid` | *String* | :heavy_check_mark: | N/A | plex://movie/5d7768ba96b655001fdc0408 |
|
||||
| `studio` | *Optional<String>* | :heavy_minus_sign: | N/A | 20th Century Studios |
|
||||
| `type` | *Optional<String>* | :heavy_minus_sign: | N/A | movie |
|
||||
| `title` | *Optional<String>* | :heavy_minus_sign: | N/A | Avatar: The Way of Water |
|
||||
| `type` | *String* | :heavy_check_mark: | N/A | movie |
|
||||
| `title` | *String* | :heavy_check_mark: | N/A | Avatar: The Way of Water |
|
||||
| `contentRating` | *Optional<String>* | :heavy_minus_sign: | N/A | PG-13 |
|
||||
| `summary` | *Optional<String>* | :heavy_minus_sign: | N/A | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home. |
|
||||
| `rating` | *Optional<Double>* | :heavy_minus_sign: | N/A | 7.6 |
|
||||
| `audienceRating` | *Optional<Double>* | :heavy_minus_sign: | N/A | 9.2 |
|
||||
| `year` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 2022 |
|
||||
| `year` | *int* | :heavy_check_mark: | N/A | 2022 |
|
||||
| `tagline` | *Optional<String>* | :heavy_minus_sign: | N/A | Return to Pandora. |
|
||||
| `thumb` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
|
||||
| `art` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
|
||||
| `duration` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 11558112 |
|
||||
| `duration` | *int* | :heavy_check_mark: | N/A | 11558112 |
|
||||
| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC |
|
||||
| `addedAt` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1680457607 |
|
||||
| `updatedAt` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1703239236 |
|
||||
@@ -34,12 +34,13 @@
|
||||
| `grandparentThumb` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 |
|
||||
| `grandparentArt` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 |
|
||||
| `grandparentTheme` | *Optional<String>* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |
|
||||
| `media` | List<[GetLibraryItemsMedia](../../models/operations/GetLibraryItemsMedia.md)> | :heavy_minus_sign: | N/A | |
|
||||
| `media` | List<[GetLibraryItemsMedia](../../models/operations/GetLibraryItemsMedia.md)> | :heavy_check_mark: | N/A | |
|
||||
| `genre` | List<[GetLibraryItemsGenre](../../models/operations/GetLibraryItemsGenre.md)> | :heavy_minus_sign: | N/A | |
|
||||
| `country` | List<[GetLibraryItemsCountry](../../models/operations/GetLibraryItemsCountry.md)> | :heavy_minus_sign: | N/A | |
|
||||
| `director` | List<[GetLibraryItemsDirector](../../models/operations/GetLibraryItemsDirector.md)> | :heavy_minus_sign: | N/A | |
|
||||
| `writer` | List<[GetLibraryItemsWriter](../../models/operations/GetLibraryItemsWriter.md)> | :heavy_minus_sign: | N/A | |
|
||||
| `role` | List<[GetLibraryItemsRole](../../models/operations/GetLibraryItemsRole.md)> | :heavy_minus_sign: | N/A | |
|
||||
| `mediaGuid` | List<[MediaGuid](../../models/operations/MediaGuid.md)> | :heavy_minus_sign: | The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.<br/> | |
|
||||
| `titleSort` | *Optional<String>* | :heavy_minus_sign: | N/A | Whale |
|
||||
| `viewCount` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `lastViewedAt` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1682752242 |
|
||||
|
||||
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 |
|
||||
| `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 | |
|
||||
| `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/>} |
|
||||
| `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 |
|
||||
| `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 | |
|
||||
@@ -3,8 +3,10 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `strong` | *Optional<Boolean>* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> | |
|
||||
| `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 |
|
||||
| `xPlexProduct` | *Optional<String>* | :heavy_minus_sign: | N/A | Plex Web |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `strong` | *Optional<Boolean>* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> | |
|
||||
| `clientName` | *Optional<String>* | :heavy_minus_sign: | N/A | Plex Web |
|
||||
| `deviceName` | *Optional<String>* | :heavy_minus_sign: | N/A | Linux |
|
||||
| `clientVersion` | *Optional<String>* | :heavy_minus_sign: | N/A | 4.133.0 |
|
||||
| `clientPlatform` | *Optional<String>* | :heavy_minus_sign: | N/A | Chrome |
|
||||
@@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------- | ------- |
|
||||
| `ONE` | 1 |
|
||||
| `TWO` | 2 |
|
||||
| `THREE` | 3 |
|
||||
| `FOUR` | 4 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Movie` | 1 |
|
||||
| `Show` | 2 |
|
||||
| `Season` | 3 |
|
||||
| `Episode` | 4 |
|
||||
@@ -3,9 +3,8 @@
|
||||
|
||||
## 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 |
|
||||
| `includeHttps` | [Optional<IncludeHttps>](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
|
||||
| `includeRelay` | [Optional<IncludeRelay>](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
|
||||
| `includeIPv6` | [Optional<IncludeIPv6>](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
|
||||
| `includeHttps` | [Optional<IncludeHttps>](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
|
||||
| `includeRelay` | [Optional<IncludeRelay>](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
|
||||
| `includeIPv6` | [Optional<IncludeIPv6>](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
|
||||
@@ -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 |
|
||||
| `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 | |
|
||||
| `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/>} |
|
||||
| `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 |
|
||||
| `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 | |
|
||||
@@ -13,7 +13,7 @@ Geo location data
|
||||
| `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 |
|
||||
| `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 |
|
||||
| `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 |
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
## 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 |
|
||||
| `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | |
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
||||
| `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for |
|
||||
@@ -26,7 +26,7 @@ Logged in user details
|
||||
| `homeAdmin` | *Optional<Boolean>* | :heavy_minus_sign: | If the account is the Plex Home admin | |
|
||||
| `homeSize` | *int* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 |
|
||||
| `id` | *int* | :heavy_check_mark: | The Plex account ID | 13692262 |
|
||||
| `joinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 1556281940 |
|
||||
| `joinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||
| `locale` | *Optional<String>* | :heavy_check_mark: | The account locale | |
|
||||
| `mailingListActive` | *Optional<Boolean>* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | |
|
||||
| `mailingListStatus` | [MailingListStatus](../../models/operations/MailingListStatus.md) | :heavy_check_mark: | Your current mailing list status | |
|
||||
@@ -34,7 +34,7 @@ Logged in user details
|
||||
| ~~`pin`~~ | *Optional<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>[Might be removed] The hashed Plex Home PIN | |
|
||||
| `profile` | [UserProfile](../../models/operations/UserProfile.md) | :heavy_check_mark: | N/A | |
|
||||
| `protected_` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | |
|
||||
| `rememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 1556281940 |
|
||||
| `rememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||
| `restricted` | *Optional<Boolean>* | :heavy_minus_sign: | If the account is a Plex Home managed user | |
|
||||
| `roles` | List<*String*> | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | |
|
||||
| `scrobbleTypes` | *String* | :heavy_check_mark: | Unknown | |
|
||||
|
||||
@@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------- | ------- |
|
||||
| `ONE` | 1 |
|
||||
| `TWO` | 2 |
|
||||
| `THREE` | 3 |
|
||||
| `FOUR` | 4 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Movie` | 1 |
|
||||
| `Show` | 2 |
|
||||
| `Season` | 3 |
|
||||
| `Episode` | 4 |
|
||||
@@ -6,7 +6,7 @@ Adds the Guids object to the response
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
@@ -5,7 +5,7 @@ Include Https entries in the results
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
@@ -5,7 +5,7 @@ Include IPv6 entries in the results
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
@@ -6,7 +6,7 @@ Adds the Meta object to the response
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
@@ -7,7 +7,7 @@ E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
|
||||
| `id` | *Optional<Integer>* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `path` | *Optional<String>* | :heavy_minus_sign: | N/A | /movies |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `id` | *int* | :heavy_check_mark: | N/A | 1 |
|
||||
| `path` | *String* | :heavy_check_mark: | N/A | /movies |
|
||||
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
|
||||
|
||||
Whether or not the account has media reviews visibility enabled
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `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
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `name` | *String* | :heavy_check_mark: | N/A |
|
||||
| `product` | *String* | :heavy_check_mark: | N/A |
|
||||
| `productVersion` | *String* | :heavy_check_mark: | N/A |
|
||||
| `platform` | *Optional<String>* | :heavy_check_mark: | N/A |
|
||||
| `platformVersion` | *Optional<String>* | :heavy_check_mark: | N/A |
|
||||
| `device` | *Optional<String>* | :heavy_check_mark: | N/A |
|
||||
| `clientIdentifier` | *String* | :heavy_check_mark: | N/A |
|
||||
| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A |
|
||||
| `lastSeenAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A |
|
||||
| `provides` | *String* | :heavy_check_mark: | N/A |
|
||||
| `ownerId` | *Optional<Long>* | :heavy_check_mark: | ownerId is null when the device is owned by the token used to send the request |
|
||||
| `sourceTitle` | *Optional<String>* | :heavy_check_mark: | N/A |
|
||||
| `publicAddress` | *String* | :heavy_check_mark: | N/A |
|
||||
| `accessToken` | *String* | :heavy_check_mark: | N/A |
|
||||
| `owned` | *boolean* | :heavy_check_mark: | N/A |
|
||||
| `home` | *boolean* | :heavy_check_mark: | N/A |
|
||||
| `synced` | *boolean* | :heavy_check_mark: | N/A |
|
||||
| `relay` | *boolean* | :heavy_check_mark: | N/A |
|
||||
| `presence` | *boolean* | :heavy_check_mark: | N/A |
|
||||
| `httpsRequired` | *boolean* | :heavy_check_mark: | N/A |
|
||||
| `publicAddressMatches` | *boolean* | :heavy_check_mark: | N/A |
|
||||
| `dnsRebindingProtection` | *boolean* | :heavy_check_mark: | N/A |
|
||||
| `natLoopbackSupported` | *boolean* | :heavy_check_mark: | N/A |
|
||||
| `connections` | List<[Connections](../../models/operations/Connections.md)> | :heavy_check_mark: | N/A |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `name` | *String* | :heavy_check_mark: | N/A | |
|
||||
| `product` | *String* | :heavy_check_mark: | N/A | |
|
||||
| `productVersion` | *String* | :heavy_check_mark: | N/A | |
|
||||
| `platform` | *Optional<String>* | :heavy_check_mark: | N/A | |
|
||||
| `platformVersion` | *Optional<String>* | :heavy_check_mark: | N/A | |
|
||||
| `device` | *Optional<String>* | :heavy_check_mark: | N/A | |
|
||||
| `clientIdentifier` | *String* | :heavy_check_mark: | N/A | |
|
||||
| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2019-06-24T11:38:02Z |
|
||||
| `lastSeenAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2019-06-24T11:38:02Z |
|
||||
| `provides` | *String* | :heavy_check_mark: | N/A | |
|
||||
| `ownerId` | *Optional<Long>* | :heavy_check_mark: | ownerId is null when the device is owned by the token used to send the request | |
|
||||
| `sourceTitle` | *Optional<String>* | :heavy_check_mark: | N/A | |
|
||||
| `publicAddress` | *String* | :heavy_check_mark: | N/A | |
|
||||
| `accessToken` | *String* | :heavy_check_mark: | N/A | |
|
||||
| `owned` | *boolean* | :heavy_check_mark: | N/A | |
|
||||
| `home` | *boolean* | :heavy_check_mark: | N/A | |
|
||||
| `synced` | *boolean* | :heavy_check_mark: | N/A | |
|
||||
| `relay` | *boolean* | :heavy_check_mark: | N/A | |
|
||||
| `presence` | *boolean* | :heavy_check_mark: | N/A | |
|
||||
| `httpsRequired` | *boolean* | :heavy_check_mark: | N/A | |
|
||||
| `publicAddressMatches` | *boolean* | :heavy_check_mark: | N/A | |
|
||||
| `dnsRebindingProtection` | *boolean* | :heavy_check_mark: | N/A | |
|
||||
| `natLoopbackSupported` | *boolean* | :heavy_check_mark: | N/A | |
|
||||
| `connections` | List<[Connections](../../models/operations/Connections.md)> | :heavy_check_mark: | N/A | |
|
||||
@@ -5,7 +5,7 @@ The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign aud
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
@@ -1,11 +1,11 @@
|
||||
# PostUsersSignInDataDefaultSubtitleAccessibility
|
||||
|
||||
The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
|
||||
The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
@@ -5,7 +5,7 @@ The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
@@ -1,9 +1,11 @@
|
||||
# PostUsersSignInDataMediaReviewsVisibility
|
||||
|
||||
Whether or not the account has media reviews visibility enabled
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
@@ -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 | |
|
||||
| `homeSize` | *int* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 |
|
||||
| `id` | *int* | :heavy_check_mark: | The Plex account ID | 13692262 |
|
||||
| `joinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 1556281940 |
|
||||
| `joinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||
| `locale` | *Optional<String>* | :heavy_check_mark: | The account locale | |
|
||||
| `mailingListActive` | *Optional<Boolean>* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | |
|
||||
| `mailingListStatus` | [PostUsersSignInDataMailingListStatus](../../models/operations/PostUsersSignInDataMailingListStatus.md) | :heavy_check_mark: | Your current mailing list status | |
|
||||
@@ -34,7 +34,7 @@ Returns the user account data with a valid auth token
|
||||
| ~~`pin`~~ | *Optional<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>[Might be removed] The hashed Plex Home PIN | |
|
||||
| `profile` | [PostUsersSignInDataUserProfile](../../models/operations/PostUsersSignInDataUserProfile.md) | :heavy_check_mark: | N/A | |
|
||||
| `protected_` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | |
|
||||
| `rememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 1556281940 |
|
||||
| `rememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||
| `restricted` | *Optional<Boolean>* | :heavy_minus_sign: | If the account is a Plex Home managed user | |
|
||||
| `roles` | List<*String*> | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | |
|
||||
| `scrobbleTypes` | *String* | :heavy_check_mark: | Unknown | |
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `autoSelectAudio` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true |
|
||||
| `defaultAudioLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred audio language for the account | ja |
|
||||
| `defaultSubtitleLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred subtitle language for the account | en |
|
||||
| `autoSelectSubtitle` | [Optional<PostUsersSignInDataAutoSelectSubtitle>](../../models/operations/PostUsersSignInDataAutoSelectSubtitle.md) | :heavy_minus_sign: | The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) | 1 |
|
||||
| `defaultSubtitleAccessibility` | [Optional<PostUsersSignInDataDefaultSubtitleAccessibility>](../../models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.md) | :heavy_minus_sign: | The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) | 1 |
|
||||
| `defaultSubtitleForced` | [Optional<PostUsersSignInDataDefaultSubtitleForced>](../../models/operations/PostUsersSignInDataDefaultSubtitleForced.md) | :heavy_minus_sign: | The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) | 0 |
|
||||
| `watchedIndicator` | [Optional<PostUsersSignInDataWatchedIndicator>](../../models/operations/PostUsersSignInDataWatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 |
|
||||
| `mediaReviewsVisibility` | [Optional<PostUsersSignInDataMediaReviewsVisibility>](../../models/operations/PostUsersSignInDataMediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 0 |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `autoSelectAudio` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true |
|
||||
| `defaultAudioLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred audio language for the account | ja |
|
||||
| `defaultSubtitleLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred subtitle language for the account | en |
|
||||
| `autoSelectSubtitle` | [Optional<PostUsersSignInDataAutoSelectSubtitle>](../../models/operations/PostUsersSignInDataAutoSelectSubtitle.md) | :heavy_minus_sign: | N/A | 1 |
|
||||
| `defaultSubtitleAccessibility` | [Optional<PostUsersSignInDataDefaultSubtitleAccessibility>](../../models/operations/PostUsersSignInDataDefaultSubtitleAccessibility.md) | :heavy_minus_sign: | N/A | 1 |
|
||||
| `defaultSubtitleForced` | [Optional<PostUsersSignInDataDefaultSubtitleForced>](../../models/operations/PostUsersSignInDataDefaultSubtitleForced.md) | :heavy_minus_sign: | N/A | 1 |
|
||||
| `watchedIndicator` | [Optional<PostUsersSignInDataWatchedIndicator>](../../models/operations/PostUsersSignInDataWatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 |
|
||||
| `mediaReviewsVisibility` | [Optional<PostUsersSignInDataMediaReviewsVisibility>](../../models/operations/PostUsersSignInDataMediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 1 |
|
||||
@@ -1,9 +1,11 @@
|
||||
# PostUsersSignInDataWatchedIndicator
|
||||
|
||||
Whether or not media watched indicators are enabled (little orange dot on media)
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
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
|
||||
|
||||
| Name | Value |
|
||||
| ------- | ------- |
|
||||
| `ONE` | 1 |
|
||||
| `TWO` | 2 |
|
||||
| `THREE` | 3 |
|
||||
| `FOUR` | 4 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Movie` | 1 |
|
||||
| `Show` | 2 |
|
||||
| `Season` | 3 |
|
||||
| `Episode` | 4 |
|
||||
@@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------- | ------- |
|
||||
| `ONE` | 1 |
|
||||
| `TWO` | 2 |
|
||||
| `THREE` | 3 |
|
||||
| `FOUR` | 4 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Movie` | 1 |
|
||||
| `Show` | 2 |
|
||||
| `Season` | 3 |
|
||||
| `Episode` | 4 |
|
||||
@@ -7,3 +7,4 @@
|
||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
|
||||
| `force` | [QueryParamForce](../../models/operations/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
|
||||
| `sectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `autoSelectAudio` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true |
|
||||
| `defaultAudioLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred audio language for the account | ja |
|
||||
| `defaultSubtitleLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred subtitle language for the account | en |
|
||||
| `autoSelectSubtitle` | [Optional<AutoSelectSubtitle>](../../models/operations/AutoSelectSubtitle.md) | :heavy_minus_sign: | The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) | 1 |
|
||||
| `defaultSubtitleAccessibility` | [Optional<DefaultSubtitleAccessibility>](../../models/operations/DefaultSubtitleAccessibility.md) | :heavy_minus_sign: | The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) | 1 |
|
||||
| `defaultSubtitleForced` | [Optional<DefaultSubtitleForced>](../../models/operations/DefaultSubtitleForced.md) | :heavy_minus_sign: | The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) | 0 |
|
||||
| `watchedIndicator` | [Optional<WatchedIndicator>](../../models/operations/WatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 |
|
||||
| `mediaReviewsVisibility` | [Optional<MediaReviewsVisibility>](../../models/operations/MediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 0 |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| `autoSelectAudio` | *Optional<Boolean>* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true |
|
||||
| `defaultAudioLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred audio language for the account | ja |
|
||||
| `defaultSubtitleLanguage` | *Optional<String>* | :heavy_check_mark: | The preferred subtitle language for the account | en |
|
||||
| `autoSelectSubtitle` | [Optional<AutoSelectSubtitle>](../../models/operations/AutoSelectSubtitle.md) | :heavy_minus_sign: | N/A | 1 |
|
||||
| `defaultSubtitleAccessibility` | [Optional<DefaultSubtitleAccessibility>](../../models/operations/DefaultSubtitleAccessibility.md) | :heavy_minus_sign: | N/A | 1 |
|
||||
| `defaultSubtitleForced` | [Optional<DefaultSubtitleForced>](../../models/operations/DefaultSubtitleForced.md) | :heavy_minus_sign: | N/A | 1 |
|
||||
| `watchedIndicator` | [Optional<WatchedIndicator>](../../models/operations/WatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 |
|
||||
| `mediaReviewsVisibility` | [Optional<MediaReviewsVisibility>](../../models/operations/MediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 1 |
|
||||
@@ -1,9 +1,11 @@
|
||||
# WatchedIndicator
|
||||
|
||||
Whether or not media watched indicators are enabled (little orange dot on media)
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `ZERO` | 0 |
|
||||
| `ONE` | 1 |
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `Disable` | 0 |
|
||||
| `Enable` | 1 |
|
||||
@@ -27,39 +27,30 @@ Get Server Activities
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetServerActivitiesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerActivitiesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetServerActivitiesResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetServerActivitiesBadRequest, GetServerActivitiesUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerActivitiesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerActivitiesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -87,38 +78,29 @@ Cancel Server Activities
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.CancelServerActivitiesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.CancelServerActivitiesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.CancelServerActivitiesResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws CancelServerActivitiesBadRequest, CancelServerActivitiesUnauthorized, Exception {
|
||||
|
||||
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")
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.CancelServerActivitiesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.CancelServerActivitiesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -24,7 +24,8 @@ This endpoint provides the caller with a temporary token with the same access le
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetTransientTokenBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetTransientTokenUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetTransientTokenQueryParamType;
|
||||
import dev.plexapi.sdk.models.operations.GetTransientTokenResponse;
|
||||
import dev.plexapi.sdk.models.operations.Scope;
|
||||
@@ -32,33 +33,23 @@ import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetTransientTokenBadRequest, GetTransientTokenUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.scope(Scope.ALL)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.GetTransientTokenBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetTransientTokenUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -95,38 +86,29 @@ Note: requires Plex Media Server >= 1.15.4.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetSourceConnectionInformationBadRequest, GetSourceConnectionInformationUnauthorized, Exception {
|
||||
|
||||
GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation()
|
||||
.source("server://client-identifier")
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.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();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.GetSourceConnectionInformationBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetSourceConnectionInformationUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -160,39 +142,30 @@ Get the User data from the provided X-Plex-Token
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetTokenDetailsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetTokenDetailsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetTokenDetailsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetTokenDetailsBadRequest, GetTokenDetailsUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.userPlexAccount().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetTokenDetailsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetTokenDetailsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.userPlexAccount().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -226,56 +199,47 @@ Sign in user with username and password and return user data with Plex authentic
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.PostUsersSignInDataBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.PostUsersSignInDataUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody;
|
||||
import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
public static void main(String[] args) throws PostUsersSignInDataBadRequest, PostUsersSignInDataUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||
.clientName("Plex Web")
|
||||
.clientVersion("4.133.0")
|
||||
.clientPlatform("Chrome")
|
||||
.deviceName("Linux")
|
||||
.build();
|
||||
|
||||
PostUsersSignInDataRequestBody req = PostUsersSignInDataRequestBody.builder()
|
||||
.login("username@email.com")
|
||||
.password("password123")
|
||||
.verificationCode("123456")
|
||||
.build();
|
||||
|
||||
PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData()
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.requestBody(PostUsersSignInDataRequestBody.builder()
|
||||
.login("username@email.com")
|
||||
.password("password123")
|
||||
.verificationCode("123456")
|
||||
.build())
|
||||
PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
if (res.userPlexAccount().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.PostUsersSignInDataBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.PostUsersSignInDataUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.userPlexAccount().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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 | |
|
||||
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
||||
| `request` | [PostUsersSignInDataRequestBody](../../models/operations/PostUsersSignInDataRequestBody.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
|
||||
@@ -24,39 +24,30 @@ Returns a list of butler tasks
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetButlerTasksBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetButlerTasksUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetButlerTasksResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetButlerTasksBadRequest, GetButlerTasksUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetButlerTasksBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetButlerTasksUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -89,37 +80,28 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.StartAllTasksBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.StartAllTasksUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.StartAllTasksResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws StartAllTasksBadRequest, StartAllTasksUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.StartAllTasksBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.StartAllTasksUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -148,37 +130,28 @@ This endpoint will stop all currently running tasks and remove any scheduled tas
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.StopAllTasksBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.StopAllTasksUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.StopAllTasksResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws StopAllTasksBadRequest, StopAllTasksUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.StopAllTasksBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.StopAllTasksUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -211,39 +184,30 @@ This endpoint will attempt to start a single Butler task that is enabled in the
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.StartTaskBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.StartTaskUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.StartTaskResponse;
|
||||
import dev.plexapi.sdk.models.operations.TaskName;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws StartTaskBadRequest, StartTaskUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.StartTaskBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.StartTaskUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -278,39 +242,30 @@ This endpoint will stop a currently running task by name, or remove it from the
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.StopTaskBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.StopTaskUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.PathParamTaskName;
|
||||
import dev.plexapi.sdk.models.operations.StopTaskResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws StopTaskBadRequest, StopTaskUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.StopTaskBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.StopTaskUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -21,42 +21,33 @@ Get Global Hubs filtered by the parameters provided.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetGlobalHubsResponse;
|
||||
import dev.plexapi.sdk.models.operations.OnlyTransient;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetGlobalHubsBadRequest, GetGlobalHubsUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.onlyTransient(OnlyTransient.ONE)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -92,43 +83,34 @@ This endpoint will return a list of library specific hubs
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryHubsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryHubsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetLibraryHubsResponse;
|
||||
import dev.plexapi.sdk.models.operations.QueryParamOnlyTransient;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetLibraryHubsBadRequest, GetLibraryHubsUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.count(9010.22d)
|
||||
.onlyTransient(QueryParamOnlyTransient.ZERO)
|
||||
.count(639.24d)
|
||||
.onlyTransient(QueryParamOnlyTransient.ONE)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetLibraryHubsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetLibraryHubsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -31,39 +31,30 @@ This resource returns hash values for local files
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetFileHashBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetFileHashUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetFileHashResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetFileHashBadRequest, GetFileHashUnauthorized, Exception {
|
||||
|
||||
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")
|
||||
.type(4462.17d)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.GetFileHashBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetFileHashUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -99,41 +90,32 @@ This endpoint will return the recently added content.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetRecentlyAddedBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetRecentlyAddedUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetRecentlyAddedBadRequest, GetRecentlyAddedUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.xPlexContainerSize(50)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetRecentlyAddedBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetRecentlyAddedUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -174,39 +156,30 @@ This allows a client to provide a rich interface around the media (e.g. allow so
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetAllLibrariesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetAllLibrariesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetAllLibrariesResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetAllLibrariesBadRequest, GetAllLibrariesUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetAllLibrariesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetAllLibrariesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -273,42 +246,33 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse;
|
||||
import dev.plexapi.sdk.models.operations.IncludeDetails;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetLibraryDetailsBadRequest, GetLibraryDetailsUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.includeDetails(IncludeDetails.ZERO)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -343,38 +307,29 @@ Delete a library using a specific section id
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.DeleteLibraryBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.DeleteLibraryUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.DeleteLibraryResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws DeleteLibraryBadRequest, DeleteLibraryUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.DeleteLibraryBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.DeleteLibraryUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -428,7 +383,8 @@ Fetches details from a specific section of the library identified by a section k
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryItemsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryItemsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse;
|
||||
import dev.plexapi.sdk.models.operations.IncludeGuids;
|
||||
@@ -439,44 +395,34 @@ import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetLibraryItemsBadRequest, GetLibraryItemsUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.tag(Tag.EDITION)
|
||||
.type(Type.TWO)
|
||||
.includeGuids(IncludeGuids.ONE)
|
||||
.includeMeta(IncludeMeta.ONE)
|
||||
.type(Type.Show)
|
||||
.includeGuids(IncludeGuids.Enable)
|
||||
.includeMeta(IncludeMeta.Enable)
|
||||
.xPlexContainerStart(0)
|
||||
.xPlexContainerSize(50)
|
||||
.build();
|
||||
|
||||
GetLibraryItemsResponse res = sdk.library().getLibraryItems()
|
||||
GetLibraryItemsResponse res = sdk.library().getLibraryItems()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetLibraryItemsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetLibraryItemsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -511,40 +457,31 @@ This endpoint Refreshes all the Metadata of the library.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.Force;
|
||||
import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetRefreshLibraryMetadataBadRequest, GetRefreshLibraryMetadataUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.force(Force.ONE)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -597,42 +534,33 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetSearchLibraryBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetSearchLibraryUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetSearchLibraryResponse;
|
||||
import dev.plexapi.sdk.models.operations.QueryParamType;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetSearchLibraryBadRequest, GetSearchLibraryUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.type(QueryParamType.TWO)
|
||||
.type(QueryParamType.Show)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetSearchLibraryBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetSearchLibraryUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -668,40 +596,31 @@ This endpoint will return the metadata of a library item specified with the rati
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetMetaDataByRatingKeyBadRequest, GetMetaDataByRatingKeyUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -736,41 +655,32 @@ This endpoint will return the children of of a library item specified with the r
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetMetadataChildrenBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetMetadataChildrenUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetMetadataChildrenBadRequest, GetMetadataChildrenUnauthorized, Exception {
|
||||
|
||||
GetMetadataChildrenResponse res = sdk.library().getMetadataChildren()
|
||||
.ratingKey(1539.14d)
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.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>")
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetMetadataChildrenBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetMetadataChildrenUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -806,42 +716,33 @@ This endpoint will return the top watched content from libraries of a certain ty
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetTopWatchedContentBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetTopWatchedContentUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetTopWatchedContentQueryParamType;
|
||||
import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetTopWatchedContentBadRequest, GetTopWatchedContentUnauthorized, Exception {
|
||||
|
||||
GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent()
|
||||
.type(GetTopWatchedContentQueryParamType.TWO)
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.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)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetTopWatchedContentBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetTopWatchedContentUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -877,39 +778,30 @@ This endpoint will return the on deck content.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetOnDeckBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetOnDeckUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetOnDeckResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetOnDeckBadRequest, GetOnDeckUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetOnDeckBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetOnDeckUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -23,41 +23,32 @@ This endpoint will write a single-line log message, including a level and source
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.LogLineBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.LogLineUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.Level;
|
||||
import dev.plexapi.sdk.models.operations.LogLineResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws LogLineBadRequest, LogLineUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.message("Test log message")
|
||||
.source("Postman")
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.LogLineBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.LogLineUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -114,42 +105,33 @@ Ensure each parameter is properly URL-encoded to avoid interpretation issues.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.LogMultiLineBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.LogMultiLineUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.LogMultiLineResponse;
|
||||
import java.lang.Exception;
|
||||
import java.lang.String;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws LogMultiLineBadRequest, LogMultiLineUnauthorized, Exception {
|
||||
|
||||
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";
|
||||
|
||||
LogMultiLineResponse res = sdk.log().logMultiLine()
|
||||
LogMultiLineResponse res = sdk.log().logMultiLine()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.LogMultiLineBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.LogMultiLineUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -184,37 +166,28 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.EnablePaperTrailBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.EnablePaperTrailUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.EnablePaperTrailResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws EnablePaperTrailBadRequest, EnablePaperTrailUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.EnablePaperTrailBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.EnablePaperTrailUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -24,38 +24,29 @@ This will mark the provided media key as Played.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.MarkPlayedBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.MarkPlayedUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.MarkPlayedResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws MarkPlayedBadRequest, MarkPlayedUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.MarkPlayedBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.MarkPlayedUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -89,38 +80,29 @@ This will mark the provided media key as Unplayed.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.MarkUnplayedBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.MarkUnplayedUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.MarkUnplayedResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws MarkUnplayedBadRequest, MarkUnplayedUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.MarkUnplayedBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.MarkUnplayedUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -155,40 +137,31 @@ This API command can be used to update the play progress of a media item.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.UpdatePlayProgressBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.UpdatePlayProgressUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.UpdatePlayProgressResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws UpdatePlayProgressBadRequest, UpdatePlayProgressUnauthorized, Exception {
|
||||
|
||||
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>")
|
||||
.time(90000d)
|
||||
.state("played")
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.UpdatePlayProgressBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.UpdatePlayProgressUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -224,21 +197,26 @@ Gets the banner image of the media item
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetBannerImageBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetBannerImageUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetBannerImageRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetBannerImageResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetBannerImageBadRequest, GetBannerImageUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.width(396L)
|
||||
.height(396L)
|
||||
@@ -247,27 +225,13 @@ public class Application {
|
||||
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
||||
.build();
|
||||
|
||||
GetBannerImageResponse res = sdk.media().getBannerImage()
|
||||
GetBannerImageResponse res = sdk.media().getBannerImage()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
if (res.responseStream().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetBannerImageBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetBannerImageUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.responseStream().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -301,21 +265,26 @@ Gets the thumbnail image of the media item
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetThumbImageBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetThumbImageUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetThumbImageRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetThumbImageResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetThumbImageBadRequest, GetThumbImageUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.width(396L)
|
||||
.height(396L)
|
||||
@@ -324,27 +293,13 @@ public class Application {
|
||||
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
||||
.build();
|
||||
|
||||
GetThumbImageResponse res = sdk.media().getThumbImage()
|
||||
GetThumbImageResponse res = sdk.media().getThumbImage()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
if (res.responseStream().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetThumbImageBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetThumbImageUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.responseStream().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -34,7 +34,8 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.CreatePlaylistBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.CreatePlaylistUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.CreatePlaylistQueryParamType;
|
||||
import dev.plexapi.sdk.models.operations.CreatePlaylistRequest;
|
||||
import dev.plexapi.sdk.models.operations.CreatePlaylistResponse;
|
||||
@@ -43,41 +44,31 @@ import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws CreatePlaylistBadRequest, CreatePlaylistUnauthorized, Exception {
|
||||
|
||||
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>")
|
||||
.type(CreatePlaylistQueryParamType.PHOTO)
|
||||
.smart(Smart.ONE)
|
||||
.uri("https://inborn-brochure.biz")
|
||||
.uri("https://hoarse-testing.info/")
|
||||
.build();
|
||||
|
||||
CreatePlaylistResponse res = sdk.playlists().createPlaylist()
|
||||
CreatePlaylistResponse res = sdk.playlists().createPlaylist()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.CreatePlaylistBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.CreatePlaylistUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -111,7 +102,8 @@ Get All Playlists given the specified filters.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetPlaylistsResponse;
|
||||
import dev.plexapi.sdk.models.operations.PlaylistType;
|
||||
import dev.plexapi.sdk.models.operations.QueryParamSmart;
|
||||
@@ -119,35 +111,25 @@ import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetPlaylistsBadRequest, GetPlaylistsUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.smart(QueryParamSmart.ZERO)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetPlaylistsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -184,40 +166,31 @@ Smart playlist details contain the `content` attribute. This is the content URI
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetPlaylistResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetPlaylistBadRequest, GetPlaylistUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetPlaylistBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetPlaylistUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -252,38 +225,29 @@ This endpoint will delete a playlist
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.DeletePlaylistBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.DeletePlaylistUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.DeletePlaylistResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws DeletePlaylistBadRequest, DeletePlaylistUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.DeletePlaylistBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.DeletePlaylistUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -318,40 +282,31 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.UpdatePlaylistBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.UpdatePlaylistUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.UpdatePlaylistResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws UpdatePlaylistBadRequest, UpdatePlaylistUnauthorized, Exception {
|
||||
|
||||
UpdatePlaylistResponse res = sdk.playlists().updatePlaylist()
|
||||
.playlistID(3915d)
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.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>")
|
||||
.summary("<value>")
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.UpdatePlaylistBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.UpdatePlaylistUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -391,42 +346,33 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistContentsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistContentsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetPlaylistContentsQueryParamType;
|
||||
import dev.plexapi.sdk.models.operations.GetPlaylistContentsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetPlaylistContentsBadRequest, GetPlaylistContentsUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.type(GetPlaylistContentsQueryParamType.TWO)
|
||||
.type(GetPlaylistContentsQueryParamType.Show)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetPlaylistContentsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetPlaylistContentsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -462,38 +408,29 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.ClearPlaylistContentsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.ClearPlaylistContentsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.ClearPlaylistContentsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws ClearPlaylistContentsBadRequest, ClearPlaylistContentsUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.ClearPlaylistContentsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.ClearPlaylistContentsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -529,42 +466,33 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.AddPlaylistContentsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.AddPlaylistContentsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.AddPlaylistContentsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws AddPlaylistContentsBadRequest, AddPlaylistContentsUnauthorized, Exception {
|
||||
|
||||
AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents()
|
||||
.playlistID(8502.01d)
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.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")
|
||||
.playQueueID(123d)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.AddPlaylistContentsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.AddPlaylistContentsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -601,40 +529,32 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.UploadPlaylistBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.UploadPlaylistUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.QueryParamForce;
|
||||
import dev.plexapi.sdk.models.operations.UploadPlaylistResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws UploadPlaylistBadRequest, UploadPlaylistUnauthorized, Exception {
|
||||
|
||||
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")
|
||||
.force(QueryParamForce.ZERO)
|
||||
.sectionID(1L)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.UploadPlaylistBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.UploadPlaylistUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -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 |
|
||||
| `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
|
||||
|
||||
|
||||
@@ -26,39 +26,30 @@ Get Companions Data
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetCompanionsDataResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetCompanionsDataBadRequest, GetCompanionsDataUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.responseBodies().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.responseBodies().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -92,39 +83,30 @@ Get friends of provided auth token.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetUserFriendsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetUserFriendsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetUserFriendsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetUserFriendsBadRequest, GetUserFriendsUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.friends().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetUserFriendsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetUserFriendsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.friends().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -158,38 +140,29 @@ Returns the geolocation and locale data of the caller
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetGeoDataBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetGeoDataUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetGeoDataResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetGeoDataBadRequest, GetGeoDataUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.geoData().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetGeoDataBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetGeoDataUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.geoData().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -223,39 +196,30 @@ Retrieves the home data for the authenticated user, including details like home
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetHomeDataBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetHomeDataUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetHomeDataResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetHomeDataBadRequest, GetHomeDataUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetHomeDataBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetHomeDataUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -283,7 +247,8 @@ Get Plex server access tokens and server connections
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetServerResourcesResponse;
|
||||
import dev.plexapi.sdk.models.operations.IncludeHttps;
|
||||
import dev.plexapi.sdk.models.operations.IncludeIPv6;
|
||||
@@ -292,50 +257,38 @@ import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetServerResourcesBadRequest, GetServerResourcesUnauthorized, Exception {
|
||||
|
||||
GetServerResourcesResponse res = sdk.plex().getServerResources()
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.includeHttps(IncludeHttps.ONE)
|
||||
.includeRelay(IncludeRelay.ONE)
|
||||
.includeIPv6(IncludeIPv6.ONE)
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||
.clientName("Plex Web")
|
||||
.clientVersion("4.133.0")
|
||||
.clientPlatform("Chrome")
|
||||
.deviceName("Linux")
|
||||
.build();
|
||||
|
||||
GetServerResourcesResponse res = sdk.plex().getServerResources()
|
||||
.includeHttps(IncludeHttps.Enable)
|
||||
.includeRelay(IncludeRelay.Enable)
|
||||
.includeIPv6(IncludeIPv6.Enable)
|
||||
.call();
|
||||
|
||||
if (res.plexDevices().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.plexDevices().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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 |
|
||||
| `includeRelay` | [Optional<IncludeRelay>](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
|
||||
| `includeIPv6` | [Optional<IncludeIPv6>](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
|
||||
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
|
||||
| `includeHttps` | [Optional<IncludeHttps>](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
|
||||
| `includeRelay` | [Optional<IncludeRelay>](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
|
||||
| `includeIPv6` | [Optional<IncludeIPv6>](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
|
||||
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
|
||||
|
||||
### Response
|
||||
|
||||
@@ -352,7 +305,7 @@ public class Application {
|
||||
|
||||
## getPin
|
||||
|
||||
Retrieve a Pin from Plex.tv for authentication flows
|
||||
Retrieve a Pin ID from Plex.tv to use for authentication flows
|
||||
|
||||
### Example Usage
|
||||
|
||||
@@ -360,50 +313,43 @@ Retrieve a Pin from Plex.tv for authentication flows
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetPinBadRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetPinRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetPinResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
public static void main(String[] args) throws GetPinBadRequest, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||
.clientName("Plex Web")
|
||||
.clientVersion("4.133.0")
|
||||
.clientPlatform("Chrome")
|
||||
.deviceName("Linux")
|
||||
.build();
|
||||
|
||||
GetPinRequest req = GetPinRequest.builder()
|
||||
.build();
|
||||
|
||||
GetPinResponse res = sdk.plex().getPin()
|
||||
.strong(false)
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.xPlexProduct("Plex Web")
|
||||
GetPinResponse res = sdk.plex().getPin()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
if (res.authPinContainer().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetPinBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.authPinContainer().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | 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/> | |
|
||||
| `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 |
|
||||
| `xPlexProduct` | *Optional<String>* | :heavy_minus_sign: | N/A | Plex Web |
|
||||
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
|
||||
| `request` | [GetPinRequest](../../models/operations/GetPinRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
@@ -427,51 +373,40 @@ Retrieve an Access Token from Plex.tv after the Pin has been authenticated
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetTokenByPinIdBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetTokenByPinIdResponseBody;
|
||||
import dev.plexapi.sdk.models.operations.GetTokenByPinIdResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetTokenByPinIdBadRequest, GetTokenByPinIdResponseBody, Exception {
|
||||
|
||||
GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId()
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||
.clientName("Plex Web")
|
||||
.clientVersion("4.133.0")
|
||||
.clientPlatform("Chrome")
|
||||
.deviceName("Linux")
|
||||
.build();
|
||||
|
||||
GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId()
|
||||
.pinID(408895L)
|
||||
.call();
|
||||
|
||||
if (res.authPinContainer().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetTokenByPinIdBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetTokenByPinIdResponseBody e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.authPinContainer().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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 | |
|
||||
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
||||
| `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for |
|
||||
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
|
||||
@@ -34,40 +34,31 @@ This request is intended to be very fast, and called as the user types.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.PerformSearchBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.PerformSearchUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.PerformSearchResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws PerformSearchBadRequest, PerformSearchUnauthorized, Exception {
|
||||
|
||||
PerformSearchResponse res = sdk.search().performSearch()
|
||||
.query("arnold")
|
||||
.sectionId(9372.7d)
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.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)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.PerformSearchBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.PerformSearchUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -107,40 +98,31 @@ Results, as well as their containing per-type hubs, contain a `distance` attribu
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.PerformVoiceSearchBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.PerformVoiceSearchUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.PerformVoiceSearchResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws PerformVoiceSearchBadRequest, PerformVoiceSearchUnauthorized, Exception {
|
||||
|
||||
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")
|
||||
.sectionId(4094.8d)
|
||||
.sectionId(4094.80d)
|
||||
.limit(5d)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.PerformVoiceSearchBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.PerformVoiceSearchUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -176,40 +158,31 @@ This will search the database for the string provided.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetSearchResultsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetSearchResultsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetSearchResultsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetSearchResultsBadRequest, GetSearchResultsUnauthorized, Exception {
|
||||
|
||||
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")
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetSearchResultsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetSearchResultsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -28,39 +28,30 @@ Get Server Capabilities
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -88,39 +79,30 @@ Get Server Preferences
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetServerPreferencesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerPreferencesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetServerPreferencesResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetServerPreferencesBadRequest, GetServerPreferencesUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerPreferencesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerPreferencesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -148,39 +130,30 @@ Get Available Clients
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetAvailableClientsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetAvailableClientsBadRequest, GetAvailableClientsUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -208,39 +181,30 @@ Get Devices
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetDevicesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetDevicesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetDevicesResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetDevicesBadRequest, GetDevicesUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetDevicesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetDevicesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -268,35 +232,28 @@ This request is useful to determine if the server is online or offline
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetServerIdentityRequestTimeout;
|
||||
import dev.plexapi.sdk.models.operations.GetServerIdentityResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetServerIdentityRequestTimeout, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerIdentityRequestTimeout e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -323,39 +280,30 @@ Returns MyPlex Account Information
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetMyPlexAccountResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetMyPlexAccountBadRequest, GetMyPlexAccountUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -384,7 +332,8 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetResizedPhotoRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetResizedPhotoResponse;
|
||||
import dev.plexapi.sdk.models.operations.MinSize;
|
||||
@@ -393,42 +342,32 @@ import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetResizedPhotoBadRequest, GetResizedPhotoUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.height(165d)
|
||||
.opacity(100L)
|
||||
.blur(4000d)
|
||||
.minSize(MinSize.ZERO)
|
||||
.upscale(Upscale.ZERO)
|
||||
.blur(0d)
|
||||
.minSize(MinSize.ONE)
|
||||
.upscale(Upscale.ONE)
|
||||
.url("/library/metadata/49564/thumb/1654258204")
|
||||
.build();
|
||||
|
||||
GetResizedPhotoResponse res = sdk.server().getResizedPhoto()
|
||||
GetResizedPhotoResponse res = sdk.server().getResizedPhoto()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -462,40 +401,31 @@ Retrieves media providers and their features from the Plex server.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetMediaProvidersBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetMediaProvidersResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetMediaProvidersBadRequest, GetMediaProvidersUnauthorized, Exception {
|
||||
|
||||
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")
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetMediaProvidersBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -529,39 +459,30 @@ Get Server List
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetServerListBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerListUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetServerListResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetServerListBadRequest, GetServerListUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerListBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetServerListUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -23,39 +23,30 @@ This will retrieve the "Now Playing" Information of the PMS.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetSessionsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetSessionsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetSessionsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetSessionsBadRequest, GetSessionsUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetSessionsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetSessionsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -83,21 +74,26 @@ This will Retrieve a listing of all history views.
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetSessionHistoryBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetSessionHistoryUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetSessionHistoryResponse;
|
||||
import dev.plexapi.sdk.models.operations.QueryParamFilter;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetSessionHistoryBadRequest, GetSessionHistoryUnauthorized, Exception {
|
||||
|
||||
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>")
|
||||
.accountId(1L)
|
||||
.filter(QueryParamFilter.builder()
|
||||
@@ -105,23 +101,9 @@ public class Application {
|
||||
.librarySectionID(12L)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetSessionHistoryBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetSessionHistoryUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -158,39 +140,30 @@ Get Transcode Sessions
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetTranscodeSessionsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetTranscodeSessionsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetTranscodeSessionsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetTranscodeSessionsBadRequest, GetTranscodeSessionsUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetTranscodeSessionsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetTranscodeSessionsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -218,38 +191,29 @@ Stop a Transcode Session
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.StopTranscodeSessionBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.StopTranscodeSessionUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.StopTranscodeSessionResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws StopTranscodeSessionBadRequest, StopTranscodeSessionUnauthorized, Exception {
|
||||
|
||||
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")
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.StopTranscodeSessionBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.StopTranscodeSessionUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -22,40 +22,31 @@ This will return the media statistics for the server
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetStatisticsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetStatisticsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetStatisticsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetStatisticsBadRequest, GetStatisticsUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetStatisticsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetStatisticsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -89,40 +80,31 @@ This will return the resources for the server
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetResourcesStatisticsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetResourcesStatisticsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetResourcesStatisticsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetResourcesStatisticsBadRequest, GetResourcesStatisticsUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetResourcesStatisticsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetResourcesStatisticsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -156,40 +138,31 @@ This will return the bandwidth statistics for the server
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetBandwidthStatisticsBadRequest, GetBandwidthStatisticsUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetBandwidthStatisticsBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetBandwidthStatisticsUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -23,39 +23,30 @@ Querying status of updates
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetUpdateStatusBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetUpdateStatusUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetUpdateStatusResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetUpdateStatusBadRequest, GetUpdateStatusUnauthorized, Exception {
|
||||
|
||||
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();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetUpdateStatusBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetUpdateStatusUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -83,39 +74,30 @@ Checking for updates
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.CheckForUpdatesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.CheckForUpdatesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.CheckForUpdatesResponse;
|
||||
import dev.plexapi.sdk.models.operations.Download;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws CheckForUpdatesBadRequest, CheckForUpdatesUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.CheckForUpdatesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.CheckForUpdatesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -150,7 +132,8 @@ Note that these two parameters are effectively mutually exclusive. The `tonight`
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.ApplyUpdatesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.ApplyUpdatesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.ApplyUpdatesResponse;
|
||||
import dev.plexapi.sdk.models.operations.Skip;
|
||||
import dev.plexapi.sdk.models.operations.Tonight;
|
||||
@@ -158,33 +141,23 @@ import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws ApplyUpdatesBadRequest, ApplyUpdatesUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.skip(Skip.ONE)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.ApplyUpdatesBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.ApplyUpdatesUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -21,7 +21,8 @@ Get the timeline for a media item
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetTimelineBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetTimelineUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetTimelineRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetTimelineResponse;
|
||||
import dev.plexapi.sdk.models.operations.State;
|
||||
@@ -29,14 +30,18 @@ import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetTimelineBadRequest, GetTimelineUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.key("/library/metadata/23409")
|
||||
.state(State.PLAYING)
|
||||
@@ -49,25 +54,11 @@ public class Application {
|
||||
.row(1d)
|
||||
.build();
|
||||
|
||||
GetTimelineResponse res = sdk.video().getTimeline()
|
||||
GetTimelineResponse res = sdk.video().getTimeline()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.GetTimelineBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetTimelineUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -101,21 +92,26 @@ Begin a Universal Transcode Session
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.StartUniversalTranscodeBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.StartUniversalTranscodeUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequest;
|
||||
import dev.plexapi.sdk.models.operations.StartUniversalTranscodeResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws StartUniversalTranscodeBadRequest, StartUniversalTranscodeUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.path("/library/metadata/23409")
|
||||
.mediaIndex(0d)
|
||||
@@ -134,25 +130,11 @@ public class Application {
|
||||
.autoAdjustQuality(0d)
|
||||
.build();
|
||||
|
||||
StartUniversalTranscodeResponse res = sdk.video().startUniversalTranscode()
|
||||
StartUniversalTranscodeResponse res = sdk.video().startUniversalTranscode()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
} catch (dev.plexapi.sdk.models.errors.StartUniversalTranscodeBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.StartUniversalTranscodeUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -20,7 +20,8 @@ Get User Watchlist
|
||||
package hello.world;
|
||||
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.GetWatchListBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetWatchListUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.Filter;
|
||||
import dev.plexapi.sdk.models.operations.GetWatchListRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetWatchListResponse;
|
||||
@@ -28,41 +29,31 @@ import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40")
|
||||
.build();
|
||||
public static void main(String[] args) throws GetWatchListBadRequest, GetWatchListUnauthorized, Exception {
|
||||
|
||||
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)
|
||||
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
||||
.xPlexContainerStart(0)
|
||||
.xPlexContainerSize(50)
|
||||
.build();
|
||||
|
||||
GetWatchListResponse res = sdk.watchlist().getWatchList()
|
||||
GetWatchListResponse res = sdk.watchlist().getWatchList()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (dev.plexapi.sdk.models.errors.GetWatchListBadRequest e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (dev.plexapi.sdk.models.errors.GetWatchListUnauthorized e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
if (res.object().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -77,7 +77,7 @@ public class Activities implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -234,7 +234,7 @@ public class Activities implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
@@ -24,7 +24,6 @@ import dev.plexapi.sdk.models.operations.GetTransientTokenQueryParamType;
|
||||
import dev.plexapi.sdk.models.operations.GetTransientTokenRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetTransientTokenRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetTransientTokenResponse;
|
||||
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequest;
|
||||
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody;
|
||||
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse;
|
||||
@@ -118,7 +117,7 @@ public class Authentication implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetTransientTokenRequest.class,
|
||||
@@ -271,7 +270,7 @@ public class Authentication implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetSourceConnectionInformationRequest.class,
|
||||
@@ -426,7 +425,7 @@ public class Authentication implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -564,32 +563,20 @@ public class Authentication implements
|
||||
* @throws Exception if the API call fails
|
||||
*/
|
||||
public PostUsersSignInDataResponse postUsersSignInDataDirect() throws Exception {
|
||||
return postUsersSignInData(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
return postUsersSignInData(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get User Sign In Data
|
||||
* Sign in user with username and password and return user data with Plex authentication token
|
||||
* @param 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 requestBody Login credentials
|
||||
* @param request The request object containing all of the parameters for the API call.
|
||||
* @param serverURL Overrides the server URL.
|
||||
* @return The response from the API call
|
||||
* @throws Exception if the API call fails
|
||||
*/
|
||||
public PostUsersSignInDataResponse postUsersSignInData(
|
||||
Optional<String> xPlexClientIdentifier,
|
||||
Optional<? extends PostUsersSignInDataRequestBody> requestBody,
|
||||
Optional<? extends PostUsersSignInDataRequestBody> request,
|
||||
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>());
|
||||
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
|
||||
_baseUrl = serverURL.get();
|
||||
@@ -602,21 +589,16 @@ public class Authentication implements
|
||||
Object _convertedRequest = Utils.convertToShape(
|
||||
request,
|
||||
JsonShape.DEFAULT,
|
||||
new TypeReference<Object>() {});
|
||||
new TypeReference<Optional<? extends PostUsersSignInDataRequestBody>>() {});
|
||||
SerializedBody _serializedRequestBody = Utils.serializeRequestBody(
|
||||
_convertedRequest,
|
||||
"requestBody",
|
||||
"request",
|
||||
"form",
|
||||
false);
|
||||
_req.setBody(Optional.ofNullable(_serializedRequestBody));
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
PostUsersSignInDataRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
|
||||
@@ -89,7 +89,7 @@ public class Butler implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -246,7 +246,7 @@ public class Butler implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -384,7 +384,7 @@ public class Butler implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -540,7 +540,7 @@ public class Butler implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -688,7 +688,7 @@ public class Butler implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
@@ -97,7 +97,7 @@ public class Hubs implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetGlobalHubsRequest.class,
|
||||
@@ -280,7 +280,7 @@ public class Hubs implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetLibraryHubsRequest.class,
|
||||
|
||||
@@ -168,7 +168,7 @@ public class Library implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetFileHashRequest.class,
|
||||
@@ -339,7 +339,7 @@ public class Library implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetRecentlyAddedRequest.class,
|
||||
@@ -503,7 +503,7 @@ public class Library implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -798,7 +798,7 @@ public class Library implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetLibraryDetailsRequest.class,
|
||||
@@ -962,7 +962,7 @@ public class Library implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -1142,7 +1142,7 @@ public class Library implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetLibraryItemsRequest.class,
|
||||
@@ -1326,7 +1326,7 @@ public class Library implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetRefreshLibraryMetadataRequest.class,
|
||||
@@ -1524,7 +1524,7 @@ public class Library implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetSearchLibraryRequest.class,
|
||||
@@ -1688,7 +1688,7 @@ public class Library implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -1864,7 +1864,7 @@ public class Library implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetMetadataChildrenRequest.class,
|
||||
@@ -2055,7 +2055,7 @@ public class Library implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetTopWatchedContentRequest.class,
|
||||
@@ -2209,7 +2209,7 @@ public class Library implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
@@ -101,7 +101,7 @@ public class Log implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
LogLineRequest.class,
|
||||
@@ -299,7 +299,7 @@ public class Log implements
|
||||
_req.setBody(Optional.ofNullable(_serializedRequestBody));
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -437,7 +437,7 @@ public class Log implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
@@ -97,7 +97,7 @@ public class Media implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
MarkPlayedRequest.class,
|
||||
@@ -246,7 +246,7 @@ public class Media implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
MarkUnplayedRequest.class,
|
||||
@@ -403,7 +403,7 @@ public class Media implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
UpdatePlayProgressRequest.class,
|
||||
@@ -548,7 +548,7 @@ public class Media implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "image/jpeg")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetBannerImageRequest.class,
|
||||
@@ -704,7 +704,7 @@ public class Media implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "image/jpeg")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetThumbImageRequest.class,
|
||||
|
||||
@@ -134,7 +134,7 @@ public class Playlists implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
CreatePlaylistRequest.class,
|
||||
@@ -307,7 +307,7 @@ public class Playlists implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetPlaylistsRequest.class,
|
||||
@@ -473,7 +473,7 @@ public class Playlists implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -632,7 +632,7 @@ public class Playlists implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -799,7 +799,7 @@ public class Playlists implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
UpdatePlaylistRequest.class,
|
||||
@@ -967,7 +967,7 @@ public class Playlists implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetPlaylistContentsRequest.class,
|
||||
@@ -1131,7 +1131,7 @@ public class Playlists implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -1303,7 +1303,7 @@ public class Playlists implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
AddPlaylistContentsRequest.class,
|
||||
@@ -1456,17 +1456,20 @@ public class Playlists implements
|
||||
The `force` argument is used to disable overwriting.
|
||||
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
|
||||
|
||||
* @param sectionID Possibly the section ID to upload the playlist to, we are not certain.
|
||||
* @return The response from the API call
|
||||
* @throws Exception if the API call fails
|
||||
*/
|
||||
public UploadPlaylistResponse uploadPlaylist(
|
||||
String path,
|
||||
QueryParamForce force) throws Exception {
|
||||
QueryParamForce force,
|
||||
long sectionID) throws Exception {
|
||||
UploadPlaylistRequest request =
|
||||
UploadPlaylistRequest
|
||||
.builder()
|
||||
.path(path)
|
||||
.force(force)
|
||||
.sectionID(sectionID)
|
||||
.build();
|
||||
|
||||
String _baseUrl = Utils.templateUrl(
|
||||
@@ -1478,7 +1481,7 @@ public class Playlists implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
UploadPlaylistRequest.class,
|
||||
|
||||
@@ -54,7 +54,6 @@ import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl;
|
||||
import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Exception;
|
||||
import java.lang.String;
|
||||
import java.net.http.HttpRequest;
|
||||
@@ -164,7 +163,7 @@ public class Plex implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -325,7 +324,7 @@ public class Plex implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -486,7 +485,7 @@ public class Plex implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
@@ -630,7 +629,7 @@ public class Plex implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -768,16 +767,12 @@ public class Plex implements
|
||||
* @throws Exception if the API call fails
|
||||
*/
|
||||
public GetServerResourcesResponse getServerResourcesDirect() throws Exception {
|
||||
return getServerResources(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
return getServerResources(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Server Resources
|
||||
* Get Plex server access tokens and server connections
|
||||
* @param 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 includeRelay Include Relay addresses in the results
|
||||
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
|
||||
*/
|
||||
public GetServerResourcesResponse getServerResources(
|
||||
Optional<String> xPlexClientIdentifier,
|
||||
Optional<? extends IncludeHttps> includeHttps,
|
||||
Optional<? extends IncludeRelay> includeRelay,
|
||||
Optional<? extends IncludeIPv6> includeIPv6,
|
||||
@@ -796,7 +790,6 @@ public class Plex implements
|
||||
GetServerResourcesRequest request =
|
||||
GetServerResourcesRequest
|
||||
.builder()
|
||||
.xPlexClientIdentifier(xPlexClientIdentifier)
|
||||
.includeHttps(includeHttps)
|
||||
.includeRelay(includeRelay)
|
||||
.includeIPv6(includeIPv6)
|
||||
@@ -813,7 +806,7 @@ public class Plex implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetServerResourcesRequest.class,
|
||||
@@ -942,7 +935,7 @@ public class Plex implements
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public GetPinRequestBuilder getPin() {
|
||||
@@ -951,43 +944,27 @@ public class Plex implements
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @throws Exception if the API call fails
|
||||
*/
|
||||
public GetPinResponse getPinDirect() throws Exception {
|
||||
return getPin(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
public GetPinResponse getPin(
|
||||
GetPinRequest request) throws Exception {
|
||||
return getPin(request, Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Pin
|
||||
* Retrieve a Pin from Plex.tv for authentication flows
|
||||
* @param strong Determines the kind of code returned by 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
|
||||
* 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.
|
||||
* @param serverURL Overrides the server URL.
|
||||
* @return The response from the API call
|
||||
* @throws Exception if the API call fails
|
||||
*/
|
||||
public GetPinResponse getPin(
|
||||
Optional<Boolean> strong,
|
||||
Optional<String> xPlexClientIdentifier,
|
||||
Optional<String> xPlexProduct,
|
||||
GetPinRequest request,
|
||||
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>());
|
||||
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
|
||||
_baseUrl = serverURL.get();
|
||||
@@ -999,7 +976,7 @@ public class Plex implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetPinRequest.class,
|
||||
@@ -1059,7 +1036,7 @@ public class Plex implements
|
||||
|
||||
GetPinResponse _res = _resBuilder.build();
|
||||
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) {
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "201")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetPinAuthPinContainer _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
@@ -1125,29 +1102,23 @@ public class Plex implements
|
||||
*/
|
||||
public GetTokenByPinIdResponse getTokenByPinId(
|
||||
long pinID) throws Exception {
|
||||
return getTokenByPinId(Optional.empty(), pinID, Optional.empty());
|
||||
return getTokenByPinId(pinID, Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Access Token by PinId
|
||||
* Retrieve an Access Token from Plex.tv after the Pin has been authenticated
|
||||
* @param 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 serverURL Overrides the server URL.
|
||||
* @return The response from the API call
|
||||
* @throws Exception if the API call fails
|
||||
*/
|
||||
public GetTokenByPinIdResponse getTokenByPinId(
|
||||
Optional<String> xPlexClientIdentifier,
|
||||
long pinID,
|
||||
Optional<String> serverURL) throws Exception {
|
||||
GetTokenByPinIdRequest request =
|
||||
GetTokenByPinIdRequest
|
||||
.builder()
|
||||
.xPlexClientIdentifier(xPlexClientIdentifier)
|
||||
.pinID(pinID)
|
||||
.build();
|
||||
|
||||
@@ -1164,12 +1135,7 @@ public class Plex implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetTokenByPinIdRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
|
||||
@@ -9,6 +9,7 @@ import dev.plexapi.sdk.models.operations.SDKMethodInterfaces.*;
|
||||
import dev.plexapi.sdk.utils.HTTPClient;
|
||||
import dev.plexapi.sdk.utils.RetryConfig;
|
||||
import dev.plexapi.sdk.utils.SpeakeasyHTTPClient;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.String;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
@@ -337,7 +338,7 @@ public class PlexAPI {
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder serverURL(String serverUrl, Map<String, String> params) {
|
||||
this.sdkConfiguration.serverUrl = dev.plexapi.sdk.utils.Utils.templateUrl(serverUrl, params);
|
||||
this.sdkConfiguration.serverUrl = Utils.templateUrl(serverUrl, params);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
public Builder xPlexClientIdentifier(String xPlexClientIdentifier) {
|
||||
public Builder clientID(String clientID) {
|
||||
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("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;
|
||||
}
|
||||
|
||||
@@ -34,11 +34,14 @@ class SDKConfiguration {
|
||||
put("port", "32400");
|
||||
} });
|
||||
} };
|
||||
public String language = "java";
|
||||
public String openapiDocVersion = "0.0.3";
|
||||
public String sdkVersion = "0.3.1";
|
||||
public String genVersion = "2.415.8";
|
||||
public String userAgent = "speakeasy-sdk/java 0.3.1 2.415.8 0.0.3 dev.plexapi.sdk";
|
||||
private static final String LANGUAGE = "java";
|
||||
public static final String OPENAPI_DOC_VERSION = "0.0.3";
|
||||
public static final String SDK_VERSION = "0.4.0";
|
||||
public static final String GEN_VERSION = "2.421.3";
|
||||
private static final String BASE_PACKAGE = "dev.plexapi.sdk";
|
||||
public static final String USER_AGENT =
|
||||
String.format("speakeasy-sdk/%s %s %s %s %s",
|
||||
LANGUAGE, SDK_VERSION, GEN_VERSION, OPENAPI_DOC_VERSION, BASE_PACKAGE);
|
||||
|
||||
private Hooks _hooks = createHooks();
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ public class Search implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
PerformSearchRequest.class,
|
||||
@@ -320,7 +320,7 @@ public class Search implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
PerformVoiceSearchRequest.class,
|
||||
@@ -469,7 +469,7 @@ public class Search implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetSearchResultsRequest.class,
|
||||
|
||||
@@ -113,7 +113,7 @@ public class Server implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -260,7 +260,7 @@ public class Server implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -407,7 +407,7 @@ public class Server implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -554,7 +554,7 @@ public class Server implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -701,7 +701,7 @@ public class Server implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
@@ -829,7 +829,7 @@ public class Server implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -980,7 +980,7 @@ public class Server implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetResizedPhotoRequest.class,
|
||||
@@ -1129,7 +1129,7 @@ public class Server implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetMediaProvidersRequest.class,
|
||||
@@ -1281,7 +1281,7 @@ public class Server implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
@@ -86,7 +86,7 @@ public class Sessions implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -265,7 +265,7 @@ public class Sessions implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetSessionHistoryRequest.class,
|
||||
@@ -417,7 +417,7 @@ public class Sessions implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -574,7 +574,7 @@ public class Sessions implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
@@ -101,7 +101,7 @@ public class Statistics implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetStatisticsRequest.class,
|
||||
@@ -273,7 +273,7 @@ public class Statistics implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetResourcesStatisticsRequest.class,
|
||||
@@ -445,7 +445,7 @@ public class Statistics implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetBandwidthStatisticsRequest.class,
|
||||
|
||||
@@ -81,7 +81,7 @@ public class Updater implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
@@ -246,7 +246,7 @@ public class Updater implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
CheckForUpdatesRequest.class,
|
||||
@@ -411,7 +411,7 @@ public class Updater implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
ApplyUpdatesRequest.class,
|
||||
|
||||
@@ -73,7 +73,7 @@ public class Video implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetTimelineRequest.class,
|
||||
@@ -216,7 +216,7 @@ public class Video implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
StartUniversalTranscodeRequest.class,
|
||||
|
||||
@@ -97,7 +97,7 @@ public class Watchlist implements
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetWatchListRequest.class,
|
||||
|
||||
@@ -26,7 +26,7 @@ public class AddPlaylistContentsRequestBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsRequestBuilder uri(java.lang.String uri) {
|
||||
public AddPlaylistContentsRequestBuilder uri(String uri) {
|
||||
Utils.checkNotNull(uri, "uri");
|
||||
this.uri = uri;
|
||||
return this;
|
||||
@@ -38,7 +38,7 @@ public class AddPlaylistContentsRequestBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsRequestBuilder playQueueID(java.util.Optional<java.lang.Double> playQueueID) {
|
||||
public AddPlaylistContentsRequestBuilder playQueueID(Optional<Double> playQueueID) {
|
||||
Utils.checkNotNull(playQueueID, "playQueueID");
|
||||
this.playQueueID = playQueueID;
|
||||
return this;
|
||||
|
||||
@@ -17,25 +17,25 @@ public class ApplyUpdatesRequestBuilder {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public ApplyUpdatesRequestBuilder tonight(dev.plexapi.sdk.models.operations.Tonight tonight) {
|
||||
public ApplyUpdatesRequestBuilder tonight(Tonight tonight) {
|
||||
Utils.checkNotNull(tonight, "tonight");
|
||||
this.tonight = Optional.of(tonight);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesRequestBuilder tonight(java.util.Optional<? extends dev.plexapi.sdk.models.operations.Tonight> tonight) {
|
||||
public ApplyUpdatesRequestBuilder tonight(Optional<? extends Tonight> tonight) {
|
||||
Utils.checkNotNull(tonight, "tonight");
|
||||
this.tonight = tonight;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesRequestBuilder skip(dev.plexapi.sdk.models.operations.Skip skip) {
|
||||
public ApplyUpdatesRequestBuilder skip(Skip skip) {
|
||||
Utils.checkNotNull(skip, "skip");
|
||||
this.skip = Optional.of(skip);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesRequestBuilder skip(java.util.Optional<? extends dev.plexapi.sdk.models.operations.Skip> skip) {
|
||||
public ApplyUpdatesRequestBuilder skip(Optional<? extends Skip> skip) {
|
||||
Utils.checkNotNull(skip, "skip");
|
||||
this.skip = skip;
|
||||
return this;
|
||||
|
||||
@@ -5,23 +5,22 @@
|
||||
package dev.plexapi.sdk.models.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import java.lang.String;
|
||||
|
||||
/**
|
||||
* AutoSelectSubtitle - The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
||||
*/
|
||||
public enum AutoSelectSubtitle {
|
||||
ZERO("0"),
|
||||
ONE("1");
|
||||
Disable(0),
|
||||
Enable(1);
|
||||
|
||||
@JsonValue
|
||||
private final String value;
|
||||
private final int value;
|
||||
|
||||
private AutoSelectSubtitle(String value) {
|
||||
private AutoSelectSubtitle(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class CancelServerActivitiesRequestBuilder {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesRequestBuilder activityUUID(java.lang.String activityUUID) {
|
||||
public CancelServerActivitiesRequestBuilder activityUUID(String activityUUID) {
|
||||
Utils.checkNotNull(activityUUID, "activityUUID");
|
||||
this.activityUUID = activityUUID;
|
||||
return this;
|
||||
|
||||
@@ -16,13 +16,13 @@ public class CheckForUpdatesRequestBuilder {
|
||||
this.sdk = sdk;
|
||||
}
|
||||
|
||||
public CheckForUpdatesRequestBuilder download(dev.plexapi.sdk.models.operations.Download download) {
|
||||
public CheckForUpdatesRequestBuilder download(Download download) {
|
||||
Utils.checkNotNull(download, "download");
|
||||
this.download = Optional.of(download);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesRequestBuilder download(java.util.Optional<? extends dev.plexapi.sdk.models.operations.Download> download) {
|
||||
public CheckForUpdatesRequestBuilder download(Optional<? extends Download> download) {
|
||||
Utils.checkNotNull(download, "download");
|
||||
this.download = download;
|
||||
return this;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user