mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-06 04:20:46 +00:00
10688 lines
417 KiB
YAML
10688 lines
417 KiB
YAML
overlay: 1.0.0
|
|
info:
|
|
title: CodeSamples overlay for java target
|
|
version: 0.0.0
|
|
actions:
|
|
- target: $["paths"]["/"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetServerInfoRequest;
|
|
import dev.plexapi.sdk.models.operations.GetServerInfoResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetServerInfoRequest req = GetServerInfoRequest.builder()
|
|
.build();
|
|
|
|
GetServerInfoResponse res = sdk.general().getServerInfo()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithDirectory().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/eventsource/notifications"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetNotificationsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetNotificationsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetNotificationsRequest req = GetNotificationsRequest.builder()
|
|
.build();
|
|
|
|
GetNotificationsResponse res = sdk.events().getNotifications()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.responseStream().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/prefs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetAllPreferencesResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetAllPreferencesResponse res = sdk.preferences().getAllPreferences()
|
|
.call();
|
|
|
|
if (res.mediaContainerWithSettings().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
SetPreferencesRequest req = SetPreferencesRequest.builder()
|
|
.prefs(Prefs.builder()
|
|
.build())
|
|
.build();
|
|
|
|
SetPreferencesResponse res = sdk.preferences().setPreferences()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/prefs/get"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetPreferenceRequest;
|
|
import dev.plexapi.sdk.models.operations.GetPreferenceResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetPreferenceRequest req = GetPreferenceRequest.builder()
|
|
.build();
|
|
|
|
GetPreferenceResponse res = sdk.preferences().getPreference()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithSettings().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/rate"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.SetRatingRequest;
|
|
import dev.plexapi.sdk.models.operations.SetRatingResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
SetRatingRequest req = SetRatingRequest.builder()
|
|
.identifier("<value>")
|
|
.key("<key>")
|
|
.rating(8722.46)
|
|
.build();
|
|
|
|
SetRatingResponse res = sdk.rate().setRating()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/scrobble"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.MarkPlayedRequest;
|
|
import dev.plexapi.sdk.models.operations.MarkPlayedResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
MarkPlayedRequest req = MarkPlayedRequest.builder()
|
|
.identifier("<value>")
|
|
.build();
|
|
|
|
MarkPlayedResponse res = sdk.timeline().markPlayed()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/timeline"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ReportRequest req = ReportRequest.builder()
|
|
.key("/foo")
|
|
.ratingKey("xyz")
|
|
.state(State.PLAYING)
|
|
.playQueueItemID("123")
|
|
.time(0L)
|
|
.duration(10000L)
|
|
.continuing(BoolInt.ONE)
|
|
.updated(14200000L)
|
|
.offline(BoolInt.ONE)
|
|
.timeToFirstFrame(1000L)
|
|
.timeStalled(1000L)
|
|
.bandwidth(100L)
|
|
.bufferedTime(100L)
|
|
.bufferedSize(1024L)
|
|
.build();
|
|
|
|
ReportResponse res = sdk.timeline().report()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/unscrobble"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.UnscrobbleRequest;
|
|
import dev.plexapi.sdk.models.operations.UnscrobbleResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
UnscrobbleRequest req = UnscrobbleRequest.builder()
|
|
.identifier("<value>")
|
|
.build();
|
|
|
|
UnscrobbleResponse res = sdk.timeline().unscrobble()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/websocket/notifications"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ConnectWebSocketRequest;
|
|
import dev.plexapi.sdk.models.operations.ConnectWebSocketResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ConnectWebSocketRequest req = ConnectWebSocketRequest.builder()
|
|
.build();
|
|
|
|
ConnectWebSocketResponse res = sdk.events().connectWebSocket()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.responseStream().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/activities"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListActivitiesResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListActivitiesResponse res = sdk.activities().listActivities()
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/activities/{activityId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.CancelActivityRequest;
|
|
import dev.plexapi.sdk.models.operations.CancelActivityResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CancelActivityRequest req = CancelActivityRequest.builder()
|
|
.activityId("d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e")
|
|
.build();
|
|
|
|
CancelActivityResponse res = sdk.activities().cancelActivity()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/butler"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.StopTasksResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
StopTasksResponse res = sdk.butler().stopTasks()
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/butler"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetTasksResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetTasksResponse res = sdk.butler().getTasks()
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/butler"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.StartTasksResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
StartTasksResponse res = sdk.butler().startTasks()
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/butler/{task}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
StopTaskRequest req = StopTaskRequest.builder()
|
|
.task(Task.CLEAN_OLD_BUNDLES)
|
|
.build();
|
|
|
|
StopTaskResponse res = sdk.butler().stopTask()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/butler/{task}"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
StartTaskRequest req = StartTaskRequest.builder()
|
|
.task(PathParamTask.REFRESH_LOCAL_MEDIA)
|
|
.build();
|
|
|
|
StartTaskResponse res = sdk.butler().startTask()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.CreateDownloadQueueResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CreateDownloadQueueResponse res = sdk.downloadQueue().createDownloadQueue()
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetDownloadQueueRequest;
|
|
import dev.plexapi.sdk.models.operations.GetDownloadQueueResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetDownloadQueueRequest req = GetDownloadQueueRequest.builder()
|
|
.queueId(922802L)
|
|
.build();
|
|
|
|
GetDownloadQueueResponse res = sdk.downloadQueue().getDownloadQueue()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/add"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.AddDownloadQueueItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.*;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
AddDownloadQueueItemsRequest req = AddDownloadQueueItemsRequest.builder()
|
|
.queueId(984925L)
|
|
.keys(List.of(
|
|
"/library/metadata/3",
|
|
"/library/metadata/6"))
|
|
.advancedSubtitles(AdvancedSubtitles.BURN)
|
|
.audioBoost(50L)
|
|
.audioChannelCount(5L)
|
|
.autoAdjustQuality(BoolInt.ONE)
|
|
.autoAdjustSubtitle(BoolInt.ONE)
|
|
.directPlay(BoolInt.ONE)
|
|
.directStream(BoolInt.ONE)
|
|
.directStreamAudio(BoolInt.ONE)
|
|
.disableResolutionRotation(BoolInt.ONE)
|
|
.hasMDE(BoolInt.ONE)
|
|
.location(Location.WAN)
|
|
.mediaBufferSize(102400L)
|
|
.mediaIndex(0L)
|
|
.musicBitrate(5000L)
|
|
.offset(90.5)
|
|
.partIndex(0L)
|
|
.path("/library/metadata/151671")
|
|
.peakBitrate(12000L)
|
|
.photoResolution("1080x1080")
|
|
.protocol(Protocol.DASH)
|
|
.secondsPerSegment(5L)
|
|
.subtitleSize(50L)
|
|
.videoBitrate(12000L)
|
|
.videoQuality(50L)
|
|
.videoResolution("1080x1080")
|
|
.build();
|
|
|
|
AddDownloadQueueItemsResponse res = sdk.downloadQueue().addDownloadQueueItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/item/{itemId}/decision"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetItemDecisionRequest;
|
|
import dev.plexapi.sdk.models.operations.GetItemDecisionResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetItemDecisionRequest req = GetItemDecisionRequest.builder()
|
|
.queueId(231605L)
|
|
.itemId(32L)
|
|
.build();
|
|
|
|
GetItemDecisionResponse res = sdk.downloadQueue().getItemDecision()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithDecision().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/item/{itemId}/media"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetDownloadQueueMediaRequest;
|
|
import dev.plexapi.sdk.models.operations.GetDownloadQueueMediaResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetDownloadQueueMediaRequest req = GetDownloadQueueMediaRequest.builder()
|
|
.queueId(663184L)
|
|
.itemId(32L)
|
|
.build();
|
|
|
|
GetDownloadQueueMediaResponse res = sdk.downloadQueue().getDownloadQueueMedia()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.ListDownloadQueueItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListDownloadQueueItemsRequest req = ListDownloadQueueItemsRequest.builder()
|
|
.queueId(524138L)
|
|
.build();
|
|
|
|
ListDownloadQueueItemsResponse res = sdk.downloadQueue().listDownloadQueueItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.RemoveDownloadQueueItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.RemoveDownloadQueueItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
RemoveDownloadQueueItemsRequest req = RemoveDownloadQueueItemsRequest.builder()
|
|
.queueId(946275L)
|
|
.itemId(List.of(
|
|
32L,
|
|
345L,
|
|
23L))
|
|
.build();
|
|
|
|
RemoveDownloadQueueItemsResponse res = sdk.downloadQueue().removeDownloadQueueItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetDownloadQueueItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetDownloadQueueItemsRequest req = GetDownloadQueueItemsRequest.builder()
|
|
.queueId(809886L)
|
|
.itemId(List.of(
|
|
32L,
|
|
345L,
|
|
23L))
|
|
.build();
|
|
|
|
GetDownloadQueueItemsResponse res = sdk.downloadQueue().getDownloadQueueItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}/restart"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.RestartProcessingDownloadQueueItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.RestartProcessingDownloadQueueItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
RestartProcessingDownloadQueueItemsRequest req = RestartProcessingDownloadQueueItemsRequest.builder()
|
|
.queueId(713001L)
|
|
.itemId(List.of(
|
|
32L,
|
|
345L,
|
|
23L))
|
|
.build();
|
|
|
|
RestartProcessingDownloadQueueItemsResponse res = sdk.downloadQueue().restartProcessingDownloadQueueItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetAllHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetAllHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetAllHubsRequest req = GetAllHubsRequest.builder()
|
|
.onlyTransient(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetAllHubsResponse res = sdk.hubs().getAllHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/continueWatching"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetContinueWatchingRequest;
|
|
import dev.plexapi.sdk.models.operations.GetContinueWatchingResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetContinueWatchingRequest req = GetContinueWatchingRequest.builder()
|
|
.build();
|
|
|
|
GetContinueWatchingResponse res = sdk.hubs().getContinueWatching()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetHubItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetHubItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetHubItemsRequest req = GetHubItemsRequest.builder()
|
|
.identifier(List.of(
|
|
"<value 1>",
|
|
"<value 2>",
|
|
"<value 3>"))
|
|
.build();
|
|
|
|
GetHubItemsResponse res = sdk.hubs().getHubItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/metadata/{metadataId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetMetadataHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetMetadataHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetMetadataHubsRequest req = GetMetadataHubsRequest.builder()
|
|
.metadataId(605482L)
|
|
.onlyTransient(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetMetadataHubsResponse res = sdk.hubs().getMetadataHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithHubs().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/metadata/{metadataId}/postplay"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetPostplayHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetPostplayHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetPostplayHubsRequest req = GetPostplayHubsRequest.builder()
|
|
.metadataId(441419L)
|
|
.onlyTransient(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetPostplayHubsResponse res = sdk.hubs().getPostplayHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithHubs().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/metadata/{metadataId}/related"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetRelatedHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetRelatedHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetRelatedHubsRequest req = GetRelatedHubsRequest.builder()
|
|
.metadataId(8858L)
|
|
.onlyTransient(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetRelatedHubsResponse res = sdk.hubs().getRelatedHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithHubs().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/promoted"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetPromotedHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetPromotedHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetPromotedHubsRequest req = GetPromotedHubsRequest.builder()
|
|
.build();
|
|
|
|
GetPromotedHubsResponse res = sdk.hubs().getPromotedHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/search"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.SearchHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.SearchHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
SearchHubsRequest req = SearchHubsRequest.builder()
|
|
.query("<value>")
|
|
.sectionId(1L)
|
|
.build();
|
|
|
|
SearchHubsResponse res = sdk.search().searchHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/search/voice"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.VoiceSearchHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.VoiceSearchHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
VoiceSearchHubsRequest req = VoiceSearchHubsRequest.builder()
|
|
.query("<value>")
|
|
.build();
|
|
|
|
VoiceSearchHubsResponse res = sdk.search().voiceSearchHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSectionHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSectionHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSectionHubsRequest req = GetSectionHubsRequest.builder()
|
|
.sectionId(336924L)
|
|
.onlyTransient(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetSectionHubsResponse res = sdk.hubs().getSectionHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ResetSectionDefaultsRequest;
|
|
import dev.plexapi.sdk.models.operations.ResetSectionDefaultsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ResetSectionDefaultsRequest req = ResetSectionDefaultsRequest.builder()
|
|
.sectionId(383022L)
|
|
.build();
|
|
|
|
ResetSectionDefaultsResponse res = sdk.hubs().resetSectionDefaults()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.ListHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListHubsRequest req = ListHubsRequest.builder()
|
|
.sectionId(442546L)
|
|
.build();
|
|
|
|
ListHubsResponse res = sdk.hubs().listHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.CreateCustomHubRequest;
|
|
import dev.plexapi.sdk.models.operations.CreateCustomHubResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CreateCustomHubRequest req = CreateCustomHubRequest.builder()
|
|
.sectionId(869922L)
|
|
.metadataItemId(703843L)
|
|
.promotedToRecommended(BoolInt.ONE)
|
|
.promotedToOwnHome(BoolInt.ONE)
|
|
.promotedToSharedHome(BoolInt.ONE)
|
|
.build();
|
|
|
|
CreateCustomHubResponse res = sdk.hubs().createCustomHub()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.MoveHubRequest;
|
|
import dev.plexapi.sdk.models.operations.MoveHubResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
MoveHubRequest req = MoveHubRequest.builder()
|
|
.sectionId(755710L)
|
|
.identifier("<value>")
|
|
.build();
|
|
|
|
MoveHubResponse res = sdk.hubs().moveHub()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.getResponses200().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage/{identifier}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteCustomHubRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteCustomHubResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteCustomHubRequest req = DeleteCustomHubRequest.builder()
|
|
.sectionId(625677L)
|
|
.identifier("<value>")
|
|
.build();
|
|
|
|
DeleteCustomHubResponse res = sdk.hubs().deleteCustomHub()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage/{identifier}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.UpdateHubVisibilityRequest;
|
|
import dev.plexapi.sdk.models.operations.UpdateHubVisibilityResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
UpdateHubVisibilityRequest req = UpdateHubVisibilityRequest.builder()
|
|
.sectionId(341650L)
|
|
.identifier("<value>")
|
|
.promotedToRecommended(BoolInt.ONE)
|
|
.promotedToOwnHome(BoolInt.ONE)
|
|
.promotedToSharedHome(BoolInt.ONE)
|
|
.build();
|
|
|
|
UpdateHubVisibilityResponse res = sdk.hubs().updateHubVisibility()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/identity"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetIdentityResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.build();
|
|
|
|
GetIdentityResponse res = sdk.general().getIdentity()
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetLibraryItemsRequest req = GetLibraryItemsRequest.builder()
|
|
.build();
|
|
|
|
GetLibraryItemsResponse res = sdk.library().getLibraryItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/caches"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteCachesResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteCachesResponse res = sdk.library().deleteCaches()
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/clean/bundles"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.CleanBundlesResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CleanBundlesResponse res = sdk.library().cleanBundles()
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/collections"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.CreateCollectionRequest;
|
|
import dev.plexapi.sdk.models.operations.CreateCollectionResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CreateCollectionRequest req = CreateCollectionRequest.builder()
|
|
.sectionId("<id>")
|
|
.build();
|
|
|
|
CreateCollectionResponse res = sdk.collections().createCollection()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/collections/{collectionId}/composite/{updatedAt}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetCollectionImageRequest;
|
|
import dev.plexapi.sdk.models.operations.GetCollectionImageResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetCollectionImageRequest req = GetCollectionImageRequest.builder()
|
|
.collectionId(474227L)
|
|
.updatedAt(759379L)
|
|
.build();
|
|
|
|
GetCollectionImageResponse res = sdk.content().getCollectionImage()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.responseStream().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/collections/{collectionId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetCollectionItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetCollectionItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetCollectionItemsRequest req = GetCollectionItemsRequest.builder()
|
|
.collectionId(314585L)
|
|
.build();
|
|
|
|
GetCollectionItemsResponse res = sdk.content().getCollectionItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/collections/{collectionId}/items"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.AddCollectionItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.AddCollectionItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
AddCollectionItemsRequest req = AddCollectionItemsRequest.builder()
|
|
.collectionId(338144L)
|
|
.uri("https://expensive-bakeware.com")
|
|
.build();
|
|
|
|
AddCollectionItemsResponse res = sdk.libraryCollections().addCollectionItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/collections/{collectionId}/items/{itemId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteCollectionItemRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteCollectionItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteCollectionItemRequest req = DeleteCollectionItemRequest.builder()
|
|
.collectionId(320928L)
|
|
.itemId(406983L)
|
|
.build();
|
|
|
|
DeleteCollectionItemResponse res = sdk.libraryCollections().deleteCollectionItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/collections/{collectionId}/items/{itemId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.MoveCollectionItemRequest;
|
|
import dev.plexapi.sdk.models.operations.MoveCollectionItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
MoveCollectionItemRequest req = MoveCollectionItemRequest.builder()
|
|
.collectionId(239532L)
|
|
.itemId(513864L)
|
|
.build();
|
|
|
|
MoveCollectionItemResponse res = sdk.libraryCollections().moveCollectionItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/file"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.IngestTransientItemRequest;
|
|
import dev.plexapi.sdk.models.operations.IngestTransientItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
IngestTransientItemRequest req = IngestTransientItemRequest.builder()
|
|
.url("file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv")
|
|
.virtualFilePath("/Avatar.mkv")
|
|
.computeHashes(BoolInt.ONE)
|
|
.ingestNonMatches(BoolInt.ONE)
|
|
.build();
|
|
|
|
IngestTransientItemResponse res = sdk.library().ingestTransientItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/matches"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetLibraryMatchesRequest;
|
|
import dev.plexapi.sdk.models.operations.GetLibraryMatchesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetLibraryMatchesRequest req = GetLibraryMatchesRequest.builder()
|
|
.includeFullMetadata(BoolInt.ONE)
|
|
.includeAncestorMetadata(BoolInt.ONE)
|
|
.includeAlternateMetadataSources(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetLibraryMatchesResponse res = sdk.library().getLibraryMatches()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/media/{mediaId}/chapterImages/{chapter}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetChapterImageRequest;
|
|
import dev.plexapi.sdk.models.operations.GetChapterImageResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetChapterImageRequest req = GetChapterImageRequest.builder()
|
|
.mediaId(892563L)
|
|
.chapter(48348L)
|
|
.build();
|
|
|
|
GetChapterImageResponse res = sdk.library().getChapterImage()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.responseStream().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/augmentations/{augmentationId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetAugmentationStatusRequest;
|
|
import dev.plexapi.sdk.models.operations.GetAugmentationStatusResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetAugmentationStatusRequest req = GetAugmentationStatusRequest.builder()
|
|
.augmentationId("<id>")
|
|
.wait_(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetAugmentationStatusResponse res = sdk.library().getAugmentationStatus()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteMetadataItemRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteMetadataItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteMetadataItemRequest req = DeleteMetadataItemRequest.builder()
|
|
.ids("<value>")
|
|
.proxy(BoolInt.ONE)
|
|
.build();
|
|
|
|
DeleteMetadataItemResponse res = sdk.library().deleteMetadataItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetMetadataItemRequest;
|
|
import dev.plexapi.sdk.models.operations.GetMetadataItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetMetadataItemRequest req = GetMetadataItemRequest.builder()
|
|
.ids(List.of())
|
|
.asyncCheckFiles(BoolInt.ONE)
|
|
.asyncRefreshLocalMediaAgent(BoolInt.ONE)
|
|
.asyncRefreshAnalysis(BoolInt.ONE)
|
|
.checkFiles(BoolInt.ONE)
|
|
.skipRefresh(BoolInt.ONE)
|
|
.checkFileAvailability(BoolInt.ONE)
|
|
.asyncAugmentMetadata(BoolInt.ONE)
|
|
.augmentCount(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetMetadataItemResponse res = sdk.content().getMetadataItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.EditMetadataItemRequest;
|
|
import dev.plexapi.sdk.models.operations.EditMetadataItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
EditMetadataItemRequest req = EditMetadataItemRequest.builder()
|
|
.ids(List.of(
|
|
"<value 1>",
|
|
"<value 2>"))
|
|
.build();
|
|
|
|
EditMetadataItemResponse res = sdk.library().editMetadataItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/addetect"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DetectAdsRequest;
|
|
import dev.plexapi.sdk.models.operations.DetectAdsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DetectAdsRequest req = DetectAdsRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
DetectAdsResponse res = sdk.library().detectAds()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/allLeaves"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetAllItemLeavesRequest;
|
|
import dev.plexapi.sdk.models.operations.GetAllItemLeavesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetAllItemLeavesRequest req = GetAllItemLeavesRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
GetAllItemLeavesResponse res = sdk.library().getAllItemLeaves()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/analyze"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.AnalyzeMetadataRequest;
|
|
import dev.plexapi.sdk.models.operations.AnalyzeMetadataResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
AnalyzeMetadataRequest req = AnalyzeMetadataRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
AnalyzeMetadataResponse res = sdk.library().analyzeMetadata()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/chapterThumbs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GenerateThumbsRequest;
|
|
import dev.plexapi.sdk.models.operations.GenerateThumbsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GenerateThumbsRequest req = GenerateThumbsRequest.builder()
|
|
.ids("<value>")
|
|
.force(BoolInt.ONE)
|
|
.build();
|
|
|
|
GenerateThumbsResponse res = sdk.library().generateThumbs()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/credits"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DetectCreditsRequest;
|
|
import dev.plexapi.sdk.models.operations.DetectCreditsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DetectCreditsRequest req = DetectCreditsRequest.builder()
|
|
.ids("<value>")
|
|
.force(BoolInt.ONE)
|
|
.manual(BoolInt.ONE)
|
|
.build();
|
|
|
|
DetectCreditsResponse res = sdk.library().detectCredits()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/extras"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetExtrasRequest;
|
|
import dev.plexapi.sdk.models.operations.GetExtrasResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetExtrasRequest req = GetExtrasRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
GetExtrasResponse res = sdk.library().getExtras()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/extras"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.AddExtrasRequest;
|
|
import dev.plexapi.sdk.models.operations.AddExtrasResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
AddExtrasRequest req = AddExtrasRequest.builder()
|
|
.ids("<value>")
|
|
.url("https://super-mortise.biz/")
|
|
.build();
|
|
|
|
AddExtrasResponse res = sdk.library().addExtras()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/file"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetFileRequest;
|
|
import dev.plexapi.sdk.models.operations.GetFileResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetFileRequest req = GetFileRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
GetFileResponse res = sdk.library().getFile()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.twoHundredAudioMpeg3ResponseStream().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/index"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.StartBifGenerationRequest;
|
|
import dev.plexapi.sdk.models.operations.StartBifGenerationResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
StartBifGenerationRequest req = StartBifGenerationRequest.builder()
|
|
.ids("<value>")
|
|
.force(BoolInt.ONE)
|
|
.build();
|
|
|
|
StartBifGenerationResponse res = sdk.library().startBifGeneration()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/intro"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DetectIntrosRequest;
|
|
import dev.plexapi.sdk.models.operations.DetectIntrosResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DetectIntrosRequest req = DetectIntrosRequest.builder()
|
|
.ids("<value>")
|
|
.force(BoolInt.ONE)
|
|
.build();
|
|
|
|
DetectIntrosResponse res = sdk.library().detectIntros()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/marker"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CreateMarkerRequest req = CreateMarkerRequest.builder()
|
|
.ids("<value>")
|
|
.type(248391L)
|
|
.startTimeOffset(535191L)
|
|
.attributes(Attributes.builder()
|
|
.build())
|
|
.build();
|
|
|
|
CreateMarkerResponse res = sdk.library().createMarker()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/marker/{marker}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteMarkerRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteMarkerResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteMarkerRequest req = DeleteMarkerRequest.builder()
|
|
.ids("<value>")
|
|
.marker("<value>")
|
|
.build();
|
|
|
|
DeleteMarkerResponse res = sdk.library().deleteMarker()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/marker/{marker}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
EditMarkerRequest req = EditMarkerRequest.builder()
|
|
.ids("<value>")
|
|
.marker("<value>")
|
|
.type(884347L)
|
|
.startTimeOffset(517251L)
|
|
.attributes(QueryParamAttributes.builder()
|
|
.build())
|
|
.build();
|
|
|
|
EditMarkerResponse res = sdk.library().editMarker()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.postResponses200().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/match"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.MatchItemRequest;
|
|
import dev.plexapi.sdk.models.operations.MatchItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
MatchItemRequest req = MatchItemRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
MatchItemResponse res = sdk.library().matchItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/matches"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListMatchesRequest;
|
|
import dev.plexapi.sdk.models.operations.ListMatchesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListMatchesRequest req = ListMatchesRequest.builder()
|
|
.ids("<value>")
|
|
.manual(BoolInt.ONE)
|
|
.build();
|
|
|
|
ListMatchesResponse res = sdk.library().listMatches()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/media/{mediaItem}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteMediaItemRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteMediaItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteMediaItemRequest req = DeleteMediaItemRequest.builder()
|
|
.ids("<value>")
|
|
.mediaItem("<value>")
|
|
.proxy(BoolInt.ONE)
|
|
.build();
|
|
|
|
DeleteMediaItemResponse res = sdk.library().deleteMediaItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/merge"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.MergeItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.MergeItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
MergeItemsRequest req = MergeItemsRequest.builder()
|
|
.idsPathParameter("<value>")
|
|
.idsQueryParameter(List.of(
|
|
"<",
|
|
"v",
|
|
"a",
|
|
"l",
|
|
"u",
|
|
"e",
|
|
">"))
|
|
.build();
|
|
|
|
MergeItemsResponse res = sdk.library().mergeItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/nearest"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListSonicallySimilarRequest;
|
|
import dev.plexapi.sdk.models.operations.ListSonicallySimilarResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListSonicallySimilarRequest req = ListSonicallySimilarRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
ListSonicallySimilarResponse res = sdk.library().listSonicallySimilar()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.SetItemPreferencesRequest;
|
|
import dev.plexapi.sdk.models.operations.SetItemPreferencesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
SetItemPreferencesRequest req = SetItemPreferencesRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
SetItemPreferencesResponse res = sdk.library().setItemPreferences()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/refresh"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.RefreshItemsMetadataRequest;
|
|
import dev.plexapi.sdk.models.operations.RefreshItemsMetadataResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
RefreshItemsMetadataRequest req = RefreshItemsMetadataRequest.builder()
|
|
.ids("<value>")
|
|
.markUpdated(BoolInt.ONE)
|
|
.build();
|
|
|
|
RefreshItemsMetadataResponse res = sdk.library().refreshItemsMetadata()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/related"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetRelatedItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetRelatedItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetRelatedItemsRequest req = GetRelatedItemsRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
GetRelatedItemsResponse res = sdk.library().getRelatedItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/similar"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListSimilarRequest;
|
|
import dev.plexapi.sdk.models.operations.ListSimilarResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListSimilarRequest req = ListSimilarRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
ListSimilarResponse res = sdk.library().listSimilar()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/split"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.SplitItemRequest;
|
|
import dev.plexapi.sdk.models.operations.SplitItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
SplitItemRequest req = SplitItemRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
SplitItemResponse res = sdk.library().splitItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/subtitles"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.AddSubtitlesRequest;
|
|
import dev.plexapi.sdk.models.operations.AddSubtitlesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
AddSubtitlesRequest req = AddSubtitlesRequest.builder()
|
|
.ids("<value>")
|
|
.forced(BoolInt.ONE)
|
|
.hearingImpaired(BoolInt.ONE)
|
|
.build();
|
|
|
|
AddSubtitlesResponse res = sdk.library().addSubtitles()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/tree"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetItemTreeRequest;
|
|
import dev.plexapi.sdk.models.operations.GetItemTreeResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetItemTreeRequest req = GetItemTreeRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
GetItemTreeResponse res = sdk.library().getItemTree()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithNestedMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/unmatch"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.UnmatchRequest;
|
|
import dev.plexapi.sdk.models.operations.UnmatchResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
UnmatchRequest req = UnmatchRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
UnmatchResponse res = sdk.library().unmatch()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/users/top"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListTopUsersRequest;
|
|
import dev.plexapi.sdk.models.operations.ListTopUsersResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListTopUsersRequest req = ListTopUsersRequest.builder()
|
|
.ids("<value>")
|
|
.build();
|
|
|
|
ListTopUsersResponse res = sdk.library().listTopUsers()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/voiceActivity"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DetectVoiceActivityRequest;
|
|
import dev.plexapi.sdk.models.operations.DetectVoiceActivityResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DetectVoiceActivityRequest req = DetectVoiceActivityRequest.builder()
|
|
.ids("<value>")
|
|
.force(BoolInt.ONE)
|
|
.manual(BoolInt.ONE)
|
|
.build();
|
|
|
|
DetectVoiceActivityResponse res = sdk.library().detectVoiceActivity()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/{element}"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
SetItemArtworkRequest req = SetItemArtworkRequest.builder()
|
|
.ids("<value>")
|
|
.element(Element.BANNER)
|
|
.build();
|
|
|
|
SetItemArtworkResponse res = sdk.library().setItemArtwork()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/{element}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
UpdateItemArtworkRequest req = UpdateItemArtworkRequest.builder()
|
|
.ids("<value>")
|
|
.element(PathParamElement.CLEAR_LOGO)
|
|
.build();
|
|
|
|
UpdateItemArtworkResponse res = sdk.library().updateItemArtwork()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/{element}/{timestamp}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetItemArtworkRequest req = GetItemArtworkRequest.builder()
|
|
.ids("<value>")
|
|
.element(GetItemArtworkPathParamElement.POSTER)
|
|
.timestamp(999555L)
|
|
.build();
|
|
|
|
GetItemArtworkResponse res = sdk.library().getItemArtwork()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.twoHundredAudioMpeg3ResponseStream().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/optimize"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.OptimizeDatabaseRequest;
|
|
import dev.plexapi.sdk.models.operations.OptimizeDatabaseResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
OptimizeDatabaseRequest req = OptimizeDatabaseRequest.builder()
|
|
.async(BoolInt.ONE)
|
|
.build();
|
|
|
|
OptimizeDatabaseResponse res = sdk.library().optimizeDatabase()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/parts/{partId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.SetStreamSelectionRequest;
|
|
import dev.plexapi.sdk.models.operations.SetStreamSelectionResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
SetStreamSelectionRequest req = SetStreamSelectionRequest.builder()
|
|
.partId(360489L)
|
|
.allParts(BoolInt.ONE)
|
|
.build();
|
|
|
|
SetStreamSelectionResponse res = sdk.library().setStreamSelection()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/parts/{partId}/indexes/{index}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetPartIndexRequest req = GetPartIndexRequest.builder()
|
|
.partId(724750L)
|
|
.index(Index.SD)
|
|
.build();
|
|
|
|
GetPartIndexResponse res = sdk.library().getPartIndex()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.responseStream().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/parts/{partId}/indexes/{index}/{offset}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetImageFromBifRequest req = GetImageFromBifRequest.builder()
|
|
.partId(304273L)
|
|
.index(PathParamIndex.SD)
|
|
.offset(939569L)
|
|
.build();
|
|
|
|
GetImageFromBifResponse res = sdk.library().getImageFromBif()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.responseStream().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/parts/{partId}/{changestamp}/{filename}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetMediaPartRequest;
|
|
import dev.plexapi.sdk.models.operations.GetMediaPartResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetMediaPartRequest req = GetMediaPartRequest.builder()
|
|
.partId(877105L)
|
|
.changestamp(970622L)
|
|
.filename("example.file")
|
|
.download(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetMediaPartResponse res = sdk.library().getMediaPart()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/people/{personId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetPersonRequest;
|
|
import dev.plexapi.sdk.models.operations.GetPersonResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetPersonRequest req = GetPersonRequest.builder()
|
|
.personId("<id>")
|
|
.build();
|
|
|
|
GetPersonResponse res = sdk.library().getPerson()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/people/{personId}/media"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListPersonMediaRequest;
|
|
import dev.plexapi.sdk.models.operations.ListPersonMediaResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListPersonMediaRequest req = ListPersonMediaRequest.builder()
|
|
.personId("<id>")
|
|
.build();
|
|
|
|
ListPersonMediaResponse res = sdk.library().listPersonMedia()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/randomArtwork"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetRandomArtworkRequest;
|
|
import dev.plexapi.sdk.models.operations.GetRandomArtworkResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetRandomArtworkRequest req = GetRandomArtworkRequest.builder()
|
|
.sections(List.of(
|
|
5L,
|
|
6L))
|
|
.build();
|
|
|
|
GetRandomArtworkResponse res = sdk.library().getRandomArtwork()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithArtwork().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSectionsResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSectionsResponse res = sdk.library().getSections()
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/all"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
AddSectionRequest req = AddSectionRequest.builder()
|
|
.name("<value>")
|
|
.type(39544L)
|
|
.agent("<value>")
|
|
.language("<value>")
|
|
.locations(List.of(
|
|
"O:\fatboy\\Media\\Ripped\\Music",
|
|
"O:\fatboy\\Media\\My Music"))
|
|
.prefs(QueryParamPrefs.builder()
|
|
.build())
|
|
.relative(BoolInt.ONE)
|
|
.importFromiTunes(BoolInt.ONE)
|
|
.build();
|
|
|
|
AddSectionResponse res = sdk.library().addSection()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.slashGetResponses200().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/all/refresh"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.StopAllRefreshesResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
StopAllRefreshesResponse res = sdk.library().stopAllRefreshes()
|
|
.call();
|
|
|
|
if (res.librarySections().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/prefs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSectionsPrefsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSectionsPrefsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSectionsPrefsRequest req = GetSectionsPrefsRequest.builder()
|
|
.type(460221L)
|
|
.build();
|
|
|
|
GetSectionsPrefsResponse res = sdk.library().getSectionsPrefs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.librarySections().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/refresh"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.RefreshSectionsMetadataRequest;
|
|
import dev.plexapi.sdk.models.operations.RefreshSectionsMetadataResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
RefreshSectionsMetadataRequest req = RefreshSectionsMetadataRequest.builder()
|
|
.build();
|
|
|
|
RefreshSectionsMetadataResponse res = sdk.library().refreshSectionsMetadata()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteLibrarySectionRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteLibrarySectionResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteLibrarySectionRequest req = DeleteLibrarySectionRequest.builder()
|
|
.sectionId("<id>")
|
|
.async(BoolInt.ONE)
|
|
.build();
|
|
|
|
DeleteLibrarySectionResponse res = sdk.library().deleteLibrarySection()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetLibraryDetailsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetLibraryDetailsRequest req = GetLibraryDetailsRequest.builder()
|
|
.sectionId("<id>")
|
|
.includeDetails(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetLibraryDetailsResponse res = sdk.library().getLibraryDetails()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
EditSectionRequest req = EditSectionRequest.builder()
|
|
.sectionId("<id>")
|
|
.agent("<value>")
|
|
.locations(List.of(
|
|
"O:\fatboy\\Media\\Ripped\\Music",
|
|
"O:\fatboy\\Media\\My Music"))
|
|
.prefs(EditSectionQueryParamPrefs.builder()
|
|
.build())
|
|
.build();
|
|
|
|
EditSectionResponse res = sdk.library().editSection()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/albums"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetAlbumsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetAlbumsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetAlbumsRequest req = GetAlbumsRequest.builder()
|
|
.sectionId(817133L)
|
|
.build();
|
|
|
|
GetAlbumsResponse res = sdk.content().getAlbums()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListContentRequest;
|
|
import dev.plexapi.sdk.models.operations.ListContentResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListContentRequest req = ListContentRequest.builder()
|
|
.sectionId("<id>")
|
|
.build();
|
|
|
|
ListContentResponse res = sdk.content().listContent()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/all"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.UpdateItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.UpdateItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
UpdateItemsRequest req = UpdateItemsRequest.builder()
|
|
.sectionId("<id>")
|
|
.fieldLocked(BoolInt.ONE)
|
|
.build();
|
|
|
|
UpdateItemsResponse res = sdk.library().updateItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/allLeaves"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetAllLeavesRequest;
|
|
import dev.plexapi.sdk.models.operations.GetAllLeavesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetAllLeavesRequest req = GetAllLeavesRequest.builder()
|
|
.sectionId(633197L)
|
|
.build();
|
|
|
|
GetAllLeavesResponse res = sdk.content().getAllLeaves()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/analyze"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.StartAnalysisRequest;
|
|
import dev.plexapi.sdk.models.operations.StartAnalysisResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
StartAnalysisRequest req = StartAnalysisRequest.builder()
|
|
.sectionId(158829L)
|
|
.build();
|
|
|
|
StartAnalysisResponse res = sdk.library().startAnalysis()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/arts"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetArtsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetArtsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetArtsRequest req = GetArtsRequest.builder()
|
|
.sectionId(859200L)
|
|
.build();
|
|
|
|
GetArtsResponse res = sdk.content().getArts()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithArtwork().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/autocomplete"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.AutocompleteRequest;
|
|
import dev.plexapi.sdk.models.operations.AutocompleteResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
AutocompleteRequest req = AutocompleteRequest.builder()
|
|
.sectionId(942007L)
|
|
.build();
|
|
|
|
AutocompleteResponse res = sdk.library().autocomplete()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/categories"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetCategoriesRequest;
|
|
import dev.plexapi.sdk.models.operations.GetCategoriesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetCategoriesRequest req = GetCategoriesRequest.builder()
|
|
.sectionId(21841L)
|
|
.build();
|
|
|
|
GetCategoriesResponse res = sdk.content().getCategories()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithArtwork().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/cluster"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetClusterRequest;
|
|
import dev.plexapi.sdk.models.operations.GetClusterResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetClusterRequest req = GetClusterRequest.builder()
|
|
.sectionId(138560L)
|
|
.build();
|
|
|
|
GetClusterResponse res = sdk.content().getCluster()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithArtwork().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/collection/{collectionId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteCollectionRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteCollectionResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteCollectionRequest req = DeleteCollectionRequest.builder()
|
|
.sectionId(283619L)
|
|
.collectionId(680895L)
|
|
.build();
|
|
|
|
DeleteCollectionResponse res = sdk.library().deleteCollection()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/collections"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetCollectionsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetCollectionsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetCollectionsRequest req = GetCollectionsRequest.builder()
|
|
.sectionId(348838L)
|
|
.build();
|
|
|
|
GetCollectionsResponse res = sdk.library().getCollections()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/common"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetCommonRequest;
|
|
import dev.plexapi.sdk.models.operations.GetCommonResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetCommonRequest req = GetCommonRequest.builder()
|
|
.sectionId(298154L)
|
|
.build();
|
|
|
|
GetCommonResponse res = sdk.library().getCommon()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/composite/{updatedAt}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSectionImageRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSectionImageResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSectionImageRequest req = GetSectionImageRequest.builder()
|
|
.sectionId(925611L)
|
|
.updatedAt(117413L)
|
|
.build();
|
|
|
|
GetSectionImageResponse res = sdk.library().getSectionImage()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/computePath"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSonicPathRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSonicPathResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSonicPathRequest req = GetSonicPathRequest.builder()
|
|
.sectionId(914549L)
|
|
.startID(629990L)
|
|
.endID(687740L)
|
|
.build();
|
|
|
|
GetSonicPathResponse res = sdk.content().getSonicPath()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/emptyTrash"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.EmptyTrashRequest;
|
|
import dev.plexapi.sdk.models.operations.EmptyTrashResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
EmptyTrashRequest req = EmptyTrashRequest.builder()
|
|
.sectionId(30052L)
|
|
.build();
|
|
|
|
EmptyTrashResponse res = sdk.library().emptyTrash()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/filters"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSectionFiltersRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSectionFiltersResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSectionFiltersRequest req = GetSectionFiltersRequest.builder()
|
|
.sectionId(380557L)
|
|
.build();
|
|
|
|
GetSectionFiltersResponse res = sdk.library().getSectionFilters()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/firstCharacters"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetFirstCharactersRequest;
|
|
import dev.plexapi.sdk.models.operations.GetFirstCharactersResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetFirstCharactersRequest req = GetFirstCharactersRequest.builder()
|
|
.sectionId(3947L)
|
|
.build();
|
|
|
|
GetFirstCharactersResponse res = sdk.library().getFirstCharacters()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/indexes"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteIndexesRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteIndexesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteIndexesRequest req = DeleteIndexesRequest.builder()
|
|
.sectionId(588437L)
|
|
.build();
|
|
|
|
DeleteIndexesResponse res = sdk.library().deleteIndexes()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/intros"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteIntrosRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteIntrosResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteIntrosRequest req = DeleteIntrosRequest.builder()
|
|
.sectionId(498656L)
|
|
.build();
|
|
|
|
DeleteIntrosResponse res = sdk.library().deleteIntros()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/location"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetFoldersRequest;
|
|
import dev.plexapi.sdk.models.operations.GetFoldersResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetFoldersRequest req = GetFoldersRequest.builder()
|
|
.sectionId(892532L)
|
|
.build();
|
|
|
|
GetFoldersResponse res = sdk.content().getFolders()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/moment"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListMomentsRequest;
|
|
import dev.plexapi.sdk.models.operations.ListMomentsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListMomentsRequest req = ListMomentsRequest.builder()
|
|
.sectionId(403239L)
|
|
.build();
|
|
|
|
ListMomentsResponse res = sdk.content().listMoments()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithArtwork().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/nearest"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSonicallySimilarRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSonicallySimilarResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSonicallySimilarRequest req = GetSonicallySimilarRequest.builder()
|
|
.sectionId(525956L)
|
|
.values(List.of())
|
|
.build();
|
|
|
|
GetSonicallySimilarResponse res = sdk.content().getSonicallySimilar()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/prefs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSectionPreferencesRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSectionPreferencesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSectionPreferencesRequest req = GetSectionPreferencesRequest.builder()
|
|
.sectionId(754869L)
|
|
.build();
|
|
|
|
GetSectionPreferencesResponse res = sdk.library().getSectionPreferences()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithSettings().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
SetSectionPreferencesRequest req = SetSectionPreferencesRequest.builder()
|
|
.sectionId(349936L)
|
|
.prefs(SetSectionPreferencesQueryParamPrefs.builder()
|
|
.build())
|
|
.build();
|
|
|
|
SetSectionPreferencesResponse res = sdk.library().setSectionPreferences()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/refresh"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.CancelRefreshRequest;
|
|
import dev.plexapi.sdk.models.operations.CancelRefreshResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CancelRefreshRequest req = CancelRefreshRequest.builder()
|
|
.sectionId(326852L)
|
|
.build();
|
|
|
|
CancelRefreshResponse res = sdk.library().cancelRefresh()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/refresh"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.RefreshSectionRequest;
|
|
import dev.plexapi.sdk.models.operations.RefreshSectionResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
RefreshSectionRequest req = RefreshSectionRequest.builder()
|
|
.sectionId(450300L)
|
|
.force(BoolInt.ONE)
|
|
.build();
|
|
|
|
RefreshSectionResponse res = sdk.library().refreshSection()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/sorts"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetAvailableSortsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetAvailableSortsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetAvailableSortsRequest req = GetAvailableSortsRequest.builder()
|
|
.sectionId(212498L)
|
|
.build();
|
|
|
|
GetAvailableSortsResponse res = sdk.library().getAvailableSorts()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/streams/{streamId}.{ext}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteStreamRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteStreamResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteStreamRequest req = DeleteStreamRequest.builder()
|
|
.streamId(841510L)
|
|
.ext("<value>")
|
|
.build();
|
|
|
|
DeleteStreamResponse res = sdk.library().deleteStream()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/streams/{streamId}.{ext}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetStreamRequest;
|
|
import dev.plexapi.sdk.models.operations.GetStreamResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetStreamRequest req = GetStreamRequest.builder()
|
|
.streamId(314506L)
|
|
.ext("<value>")
|
|
.autoAdjustSubtitle(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetStreamResponse res = sdk.library().getStream()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/streams/{streamId}.{ext}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.SetStreamOffsetRequest;
|
|
import dev.plexapi.sdk.models.operations.SetStreamOffsetResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
SetStreamOffsetRequest req = SetStreamOffsetRequest.builder()
|
|
.streamId(606295L)
|
|
.ext("<value>")
|
|
.build();
|
|
|
|
SetStreamOffsetResponse res = sdk.library().setStreamOffset()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/streams/{streamId}/levels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetStreamLevelsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetStreamLevelsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetStreamLevelsRequest req = GetStreamLevelsRequest.builder()
|
|
.streamId(447611L)
|
|
.build();
|
|
|
|
GetStreamLevelsResponse res = sdk.library().getStreamLevels()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/streams/{streamId}/loudness"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetStreamLoudnessRequest;
|
|
import dev.plexapi.sdk.models.operations.GetStreamLoudnessResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetStreamLoudnessRequest req = GetStreamLoudnessRequest.builder()
|
|
.streamId(277271L)
|
|
.build();
|
|
|
|
GetStreamLoudnessResponse res = sdk.library().getStreamLoudness()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.res().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/tags"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetTagsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetTagsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetTagsRequest req = GetTagsRequest.builder()
|
|
.build();
|
|
|
|
GetTagsResponse res = sdk.library().getTags()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListDVRsResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListDVRsResponse res = sdk.dvRs().listDVRs()
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.CreateDVRRequest;
|
|
import dev.plexapi.sdk.models.operations.CreateDVRResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CreateDVRRequest req = CreateDVRRequest.builder()
|
|
.lineup("lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT")
|
|
.deviceQueryParameter(List.of(
|
|
"d",
|
|
"e",
|
|
"v",
|
|
"i",
|
|
"c",
|
|
"e",
|
|
"[",
|
|
"]",
|
|
"=",
|
|
"d",
|
|
"e",
|
|
"v",
|
|
"i",
|
|
"c",
|
|
"e",
|
|
":",
|
|
"/",
|
|
"/",
|
|
"t",
|
|
"v",
|
|
".",
|
|
"p",
|
|
"l",
|
|
"e",
|
|
"x",
|
|
".",
|
|
"g",
|
|
"r",
|
|
"a",
|
|
"b",
|
|
"b",
|
|
"e",
|
|
"r",
|
|
"s",
|
|
".",
|
|
"h",
|
|
"d",
|
|
"h",
|
|
"o",
|
|
"m",
|
|
"e",
|
|
"r",
|
|
"u",
|
|
"n",
|
|
"/",
|
|
"1",
|
|
"0",
|
|
"5",
|
|
"3",
|
|
"C",
|
|
"0",
|
|
"C",
|
|
"A"))
|
|
.language("eng")
|
|
.build();
|
|
|
|
CreateDVRResponse res = sdk.dvRs().createDVR()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.dvrRequestHandlerSlashGetResponses200().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteDVRRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteDVRResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteDVRRequest req = DeleteDVRRequest.builder()
|
|
.dvrId(855088L)
|
|
.build();
|
|
|
|
DeleteDVRResponse res = sdk.dvRs().deleteDVR()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetDVRRequest;
|
|
import dev.plexapi.sdk.models.operations.GetDVRResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetDVRRequest req = GetDVRRequest.builder()
|
|
.dvrId(973518L)
|
|
.build();
|
|
|
|
GetDVRResponse res = sdk.dvRs().getDVR()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/channels/{channel}/tune"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.TuneChannelRequest;
|
|
import dev.plexapi.sdk.models.operations.TuneChannelResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
TuneChannelRequest req = TuneChannelRequest.builder()
|
|
.dvrId(834281L)
|
|
.channel("2.1")
|
|
.build();
|
|
|
|
TuneChannelResponse res = sdk.dvRs().tuneChannel()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/devices/{deviceId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRRequest;
|
|
import dev.plexapi.sdk.models.operations.RemoveDeviceFromDVRResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
RemoveDeviceFromDVRRequest req = RemoveDeviceFromDVRRequest.builder()
|
|
.dvrId(945416L)
|
|
.deviceId(260761L)
|
|
.build();
|
|
|
|
RemoveDeviceFromDVRResponse res = sdk.dvRs().removeDeviceFromDVR()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/devices/{deviceId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.AddDeviceToDVRRequest;
|
|
import dev.plexapi.sdk.models.operations.AddDeviceToDVRResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
AddDeviceToDVRRequest req = AddDeviceToDVRRequest.builder()
|
|
.dvrId(334755L)
|
|
.deviceId(852930L)
|
|
.build();
|
|
|
|
AddDeviceToDVRResponse res = sdk.dvRs().addDeviceToDVR()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/lineups"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteLineupRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteLineupResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteLineupRequest req = DeleteLineupRequest.builder()
|
|
.dvrId(454470L)
|
|
.lineup("<value>")
|
|
.build();
|
|
|
|
DeleteLineupResponse res = sdk.dvRs().deleteLineup()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/lineups"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.AddLineupRequest;
|
|
import dev.plexapi.sdk.models.operations.AddLineupResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
AddLineupRequest req = AddLineupRequest.builder()
|
|
.dvrId(945235L)
|
|
.lineup("<value>")
|
|
.build();
|
|
|
|
AddLineupResponse res = sdk.dvRs().addLineup()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.SetDVRPreferencesRequest;
|
|
import dev.plexapi.sdk.models.operations.SetDVRPreferencesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
SetDVRPreferencesRequest req = SetDVRPreferencesRequest.builder()
|
|
.dvrId(116357L)
|
|
.build();
|
|
|
|
SetDVRPreferencesResponse res = sdk.dvRs().setDVRPreferences()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/reloadGuide"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.StopDVRReloadRequest;
|
|
import dev.plexapi.sdk.models.operations.StopDVRReloadResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
StopDVRReloadRequest req = StopDVRReloadRequest.builder()
|
|
.dvrId(348053L)
|
|
.build();
|
|
|
|
StopDVRReloadResponse res = sdk.dvRs().stopDVRReload()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/reloadGuide"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ReloadGuideRequest;
|
|
import dev.plexapi.sdk.models.operations.ReloadGuideResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ReloadGuideRequest req = ReloadGuideRequest.builder()
|
|
.dvrId(140753L)
|
|
.build();
|
|
|
|
ReloadGuideResponse res = sdk.dvRs().reloadGuide()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/channelmap"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ComputeChannelMapRequest;
|
|
import dev.plexapi.sdk.models.operations.ComputeChannelMapResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ComputeChannelMapRequest req = ComputeChannelMapRequest.builder()
|
|
.deviceQueryParameter("<value>")
|
|
.lineup("<value>")
|
|
.build();
|
|
|
|
ComputeChannelMapResponse res = sdk.epg().computeChannelMap()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/channels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetChannelsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetChannelsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetChannelsRequest req = GetChannelsRequest.builder()
|
|
.lineup("<value>")
|
|
.build();
|
|
|
|
GetChannelsResponse res = sdk.epg().getChannels()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/countries"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetCountriesResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetCountriesResponse res = sdk.epg().getCountries()
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/lineups"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetCountriesLineupsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetCountriesLineupsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetCountriesLineupsRequest req = GetCountriesLineupsRequest.builder()
|
|
.country("Malawi")
|
|
.epgId("<id>")
|
|
.build();
|
|
|
|
GetCountriesLineupsResponse res = sdk.epg().getCountriesLineups()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithLineup().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/regions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetCountryRegionsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetCountryRegionsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetCountryRegionsRequest req = GetCountryRegionsRequest.builder()
|
|
.country("Morocco")
|
|
.epgId("<id>")
|
|
.build();
|
|
|
|
GetCountryRegionsResponse res = sdk.epg().getCountryRegions()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/regions/{region}/lineups"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListLineupsRequest;
|
|
import dev.plexapi.sdk.models.operations.ListLineupsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListLineupsRequest req = ListLineupsRequest.builder()
|
|
.country("Vanuatu")
|
|
.epgId("<id>")
|
|
.region("<value>")
|
|
.build();
|
|
|
|
ListLineupsResponse res = sdk.epg().listLineups()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithLineup().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/languages"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetAllLanguagesResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetAllLanguagesResponse res = sdk.epg().getAllLanguages()
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/lineup"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetLineupRequest;
|
|
import dev.plexapi.sdk.models.operations.GetLineupResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetLineupRequest req = GetLineupRequest.builder()
|
|
.deviceQueryParameter("<value>")
|
|
.lineupGroup("<value>")
|
|
.build();
|
|
|
|
GetLineupResponse res = sdk.epg().getLineup()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/lineupchannels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetLineupChannelsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetLineupChannelsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetLineupChannelsRequest req = GetLineupChannelsRequest.builder()
|
|
.lineup(List.of(
|
|
"<value 1>",
|
|
"<value 2>"))
|
|
.build();
|
|
|
|
GetLineupChannelsResponse res = sdk.epg().getLineupChannels()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/sessions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSessionsResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSessionsResponse res = sdk.liveTV().getSessions()
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/sessions/{sessionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetLiveTVSessionRequest;
|
|
import dev.plexapi.sdk.models.operations.GetLiveTVSessionResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetLiveTVSessionRequest req = GetLiveTVSessionRequest.builder()
|
|
.sessionId("<id>")
|
|
.build();
|
|
|
|
GetLiveTVSessionResponse res = sdk.liveTV().getLiveTVSession()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/sessions/{sessionId}/{consumerId}/index.m3u8"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSessionPlaylistIndexRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSessionPlaylistIndexResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSessionPlaylistIndexRequest req = GetSessionPlaylistIndexRequest.builder()
|
|
.sessionId("<id>")
|
|
.consumerId("<id>")
|
|
.build();
|
|
|
|
GetSessionPlaylistIndexResponse res = sdk.liveTV().getSessionPlaylistIndex()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/sessions/{sessionId}/{consumerId}/{segmentId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSessionSegmentRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSessionSegmentResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSessionSegmentRequest req = GetSessionSegmentRequest.builder()
|
|
.sessionId("<id>")
|
|
.consumerId("<id>")
|
|
.segmentId("<id>")
|
|
.build();
|
|
|
|
GetSessionSegmentResponse res = sdk.liveTV().getSessionSegment()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/log"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.WriteLogResponse;
|
|
import dev.plexapi.sdk.utils.Utils;
|
|
import java.io.FileInputStream;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
byte[] req = Utils.readBytesAndClose(new FileInputStream("example.file"));
|
|
|
|
WriteLogResponse res = sdk.log().writeLog()
|
|
.request(req)
|
|
.call();
|
|
|
|
}
|
|
}
|
|
- target: $["paths"]["/log"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.WriteMessageRequest;
|
|
import dev.plexapi.sdk.models.operations.WriteMessageResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
WriteMessageRequest req = WriteMessageRequest.builder()
|
|
.build();
|
|
|
|
WriteMessageResponse res = sdk.log().writeMessage()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/log/networked"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.EnablePapertrailRequest;
|
|
import dev.plexapi.sdk.models.operations.EnablePapertrailResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
EnablePapertrailRequest req = EnablePapertrailRequest.builder()
|
|
.build();
|
|
|
|
EnablePapertrailResponse res = sdk.log().enablePapertrail()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetAvailableGrabbersRequest;
|
|
import dev.plexapi.sdk.models.operations.GetAvailableGrabbersResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetAvailableGrabbersRequest req = GetAvailableGrabbersRequest.builder()
|
|
.protocol("livetv")
|
|
.build();
|
|
|
|
GetAvailableGrabbersResponse res = sdk.devices().getAvailableGrabbers()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListDevicesResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListDevicesResponse res = sdk.devices().listDevices()
|
|
.call();
|
|
|
|
if (res.mediaContainerWithDevice().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.AddDeviceRequest;
|
|
import dev.plexapi.sdk.models.operations.AddDeviceResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
AddDeviceRequest req = AddDeviceRequest.builder()
|
|
.uri("http://10.0.0.5")
|
|
.build();
|
|
|
|
AddDeviceResponse res = sdk.devices().addDevice()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithDevice().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/discover"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DiscoverDevicesResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DiscoverDevicesResponse res = sdk.devices().discoverDevices()
|
|
.call();
|
|
|
|
if (res.mediaContainerWithDevice().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.RemoveDeviceRequest;
|
|
import dev.plexapi.sdk.models.operations.RemoveDeviceResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
RemoveDeviceRequest req = RemoveDeviceRequest.builder()
|
|
.deviceId(685908L)
|
|
.build();
|
|
|
|
RemoveDeviceResponse res = sdk.devices().removeDevice()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetDeviceDetailsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetDeviceDetailsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetDeviceDetailsRequest req = GetDeviceDetailsRequest.builder()
|
|
.deviceId(170949L)
|
|
.build();
|
|
|
|
GetDeviceDetailsResponse res = sdk.devices().getDeviceDetails()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithDevice().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ModifyDeviceRequest;
|
|
import dev.plexapi.sdk.models.operations.ModifyDeviceResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ModifyDeviceRequest req = ModifyDeviceRequest.builder()
|
|
.deviceId(879135L)
|
|
.enabled(BoolInt.ONE)
|
|
.build();
|
|
|
|
ModifyDeviceResponse res = sdk.devices().modifyDevice()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/channelmap"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
SetChannelmapRequest req = SetChannelmapRequest.builder()
|
|
.deviceId(937661L)
|
|
.channelMapping(ChannelMapping.builder()
|
|
.build())
|
|
.channelMappingByKey(ChannelMappingByKey.builder()
|
|
.build())
|
|
.channelsEnabled(List.of(
|
|
"4",
|
|
"6",
|
|
".",
|
|
"1",
|
|
",",
|
|
"4",
|
|
"4",
|
|
".",
|
|
"1",
|
|
",",
|
|
"4",
|
|
"5",
|
|
".",
|
|
"1"))
|
|
.build();
|
|
|
|
SetChannelmapResponse res = sdk.devices().setChannelmap()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithDevice().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/channels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetDevicesChannelsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetDevicesChannelsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetDevicesChannelsRequest req = GetDevicesChannelsRequest.builder()
|
|
.deviceId(517209L)
|
|
.build();
|
|
|
|
GetDevicesChannelsResponse res = sdk.devices().getDevicesChannels()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.SetDevicePreferencesRequest;
|
|
import dev.plexapi.sdk.models.operations.SetDevicePreferencesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
SetDevicePreferencesRequest req = SetDevicePreferencesRequest.builder()
|
|
.deviceId(420973L)
|
|
.build();
|
|
|
|
SetDevicePreferencesResponse res = sdk.devices().setDevicePreferences()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/scan"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.StopScanRequest;
|
|
import dev.plexapi.sdk.models.operations.StopScanResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
StopScanRequest req = StopScanRequest.builder()
|
|
.deviceId(576494L)
|
|
.build();
|
|
|
|
StopScanResponse res = sdk.devices().stopScan()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithDevice().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/scan"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ScanRequest;
|
|
import dev.plexapi.sdk.models.operations.ScanResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ScanRequest req = ScanRequest.builder()
|
|
.deviceId(57391L)
|
|
.source("Cable")
|
|
.build();
|
|
|
|
ScanResponse res = sdk.devices().scan()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithDevice().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/thumb/{version}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetThumbRequest;
|
|
import dev.plexapi.sdk.models.operations.GetThumbResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetThumbRequest req = GetThumbRequest.builder()
|
|
.deviceId(960617L)
|
|
.versionPathParameter(1025L)
|
|
.build();
|
|
|
|
GetThumbResponse res = sdk.devices().getThumb()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/operations/{operationId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.CancelGrabRequest;
|
|
import dev.plexapi.sdk.models.operations.CancelGrabResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CancelGrabRequest req = CancelGrabRequest.builder()
|
|
.operationId("<id>")
|
|
.build();
|
|
|
|
CancelGrabResponse res = sdk.subscriptions().cancelGrab()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/providers"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListProvidersResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListProvidersResponse res = sdk.provider().listProviders()
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/providers"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.AddProviderRequest;
|
|
import dev.plexapi.sdk.models.operations.AddProviderResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
AddProviderRequest req = AddProviderRequest.builder()
|
|
.url("https://steep-obedience.name/")
|
|
.build();
|
|
|
|
AddProviderResponse res = sdk.provider().addProvider()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/providers/refresh"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.RefreshProvidersResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
RefreshProvidersResponse res = sdk.provider().refreshProviders()
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/providers/{provider}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteMediaProviderRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteMediaProviderResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteMediaProviderRequest req = DeleteMediaProviderRequest.builder()
|
|
.provider("<value>")
|
|
.build();
|
|
|
|
DeleteMediaProviderResponse res = sdk.provider().deleteMediaProvider()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetAllSubscriptionsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetAllSubscriptionsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetAllSubscriptionsRequest req = GetAllSubscriptionsRequest.builder()
|
|
.includeGrabs(BoolInt.ONE)
|
|
.includeStorage(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetAllSubscriptionsResponse res = sdk.subscriptions().getAllSubscriptions()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithSubscription().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CreateSubscriptionRequest req = CreateSubscriptionRequest.builder()
|
|
.targetLibrarySectionID(1L)
|
|
.targetSectionLocationID(3L)
|
|
.type(2L)
|
|
.hints(Hints.builder()
|
|
.build())
|
|
.prefs(CreateSubscriptionQueryParamPrefs.builder()
|
|
.build())
|
|
.params(Params.builder()
|
|
.build())
|
|
.build();
|
|
|
|
CreateSubscriptionResponse res = sdk.subscriptions().createSubscription()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/process"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ProcessSubscriptionsResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ProcessSubscriptionsResponse res = sdk.subscriptions().processSubscriptions()
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/scheduled"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetScheduledRecordingsResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetScheduledRecordingsResponse res = sdk.subscriptions().getScheduledRecordings()
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/template"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetTemplateRequest;
|
|
import dev.plexapi.sdk.models.operations.GetTemplateResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetTemplateRequest req = GetTemplateRequest.builder()
|
|
.guid("plex://episode/5fc70265c40548002d539d23")
|
|
.build();
|
|
|
|
GetTemplateResponse res = sdk.subscriptions().getTemplate()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteSubscriptionRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteSubscriptionResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteSubscriptionRequest req = DeleteSubscriptionRequest.builder()
|
|
.subscriptionId(974618L)
|
|
.build();
|
|
|
|
DeleteSubscriptionResponse res = sdk.subscriptions().deleteSubscription()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSubscriptionRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSubscriptionResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSubscriptionRequest req = GetSubscriptionRequest.builder()
|
|
.subscriptionId(186713L)
|
|
.includeGrabs(BoolInt.ONE)
|
|
.includeStorage(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetSubscriptionResponse res = sdk.subscriptions().getSubscription()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithSubscription().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
EditSubscriptionPreferencesRequest req = EditSubscriptionPreferencesRequest.builder()
|
|
.subscriptionId(673918L)
|
|
.prefs(EditSubscriptionPreferencesQueryParamPrefs.builder()
|
|
.build())
|
|
.build();
|
|
|
|
EditSubscriptionPreferencesResponse res = sdk.subscriptions().editSubscriptionPreferences()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithSubscription().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ReorderSubscriptionRequest;
|
|
import dev.plexapi.sdk.models.operations.ReorderSubscriptionResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ReorderSubscriptionRequest req = ReorderSubscriptionRequest.builder()
|
|
.subscriptionId(440634L)
|
|
.build();
|
|
|
|
ReorderSubscriptionResponse res = sdk.subscriptions().reorderSubscription()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithSubscription().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/photo/:/transcode"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.TranscodeImageRequest;
|
|
import dev.plexapi.sdk.models.operations.TranscodeImageResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
TranscodeImageRequest req = TranscodeImageRequest.builder()
|
|
.url("/library/metadata/265/thumb/1715112705")
|
|
.background("#ff5522")
|
|
.upscale(BoolInt.ONE)
|
|
.minSize(BoolInt.ONE)
|
|
.rotate(BoolInt.ONE)
|
|
.blendColor("#ff5522")
|
|
.build();
|
|
|
|
TranscodeImageResponse res = sdk.transcoder().transcodeImage()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.twoHundredImageJpegResponseStream().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CreatePlayQueueRequest req = CreatePlayQueueRequest.builder()
|
|
.type(Type.AUDIO)
|
|
.shuffle(BoolInt.ONE)
|
|
.repeat(BoolInt.ONE)
|
|
.continuous(BoolInt.ONE)
|
|
.recursive(BoolInt.ONE)
|
|
.onDeck(BoolInt.ONE)
|
|
.build();
|
|
|
|
CreatePlayQueueResponse res = sdk.playQueue().createPlayQueue()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetPlayQueueRequest;
|
|
import dev.plexapi.sdk.models.operations.GetPlayQueueResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetPlayQueueRequest req = GetPlayQueueRequest.builder()
|
|
.playQueueId(210646L)
|
|
.own(BoolInt.ONE)
|
|
.includeBefore(BoolInt.ONE)
|
|
.includeAfter(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetPlayQueueResponse res = sdk.playQueue().getPlayQueue()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.AddToPlayQueueRequest;
|
|
import dev.plexapi.sdk.models.operations.AddToPlayQueueResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
AddToPlayQueueRequest req = AddToPlayQueueRequest.builder()
|
|
.playQueueId(919248L)
|
|
.next(BoolInt.ONE)
|
|
.build();
|
|
|
|
AddToPlayQueueResponse res = sdk.playQueue().addToPlayQueue()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}/items"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ClearPlayQueueRequest;
|
|
import dev.plexapi.sdk.models.operations.ClearPlayQueueResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ClearPlayQueueRequest req = ClearPlayQueueRequest.builder()
|
|
.playQueueId(86357L)
|
|
.build();
|
|
|
|
ClearPlayQueueResponse res = sdk.playQueue().clearPlayQueue()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}/items/{playQueueItemId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeletePlayQueueItemRequest;
|
|
import dev.plexapi.sdk.models.operations.DeletePlayQueueItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeletePlayQueueItemRequest req = DeletePlayQueueItemRequest.builder()
|
|
.playQueueId(285738L)
|
|
.playQueueItemId(464354L)
|
|
.build();
|
|
|
|
DeletePlayQueueItemResponse res = sdk.playQueue().deletePlayQueueItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}/items/{playQueueItemId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.MovePlayQueueItemRequest;
|
|
import dev.plexapi.sdk.models.operations.MovePlayQueueItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
MovePlayQueueItemRequest req = MovePlayQueueItemRequest.builder()
|
|
.playQueueId(31341L)
|
|
.playQueueItemId(495865L)
|
|
.build();
|
|
|
|
MovePlayQueueItemResponse res = sdk.playQueue().movePlayQueueItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}/reset"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ResetPlayQueueRequest;
|
|
import dev.plexapi.sdk.models.operations.ResetPlayQueueResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ResetPlayQueueRequest req = ResetPlayQueueRequest.builder()
|
|
.playQueueId(581891L)
|
|
.build();
|
|
|
|
ResetPlayQueueResponse res = sdk.playQueue().resetPlayQueue()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}/shuffle"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ShuffleRequest;
|
|
import dev.plexapi.sdk.models.operations.ShuffleResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ShuffleRequest req = ShuffleRequest.builder()
|
|
.playQueueId(316150L)
|
|
.build();
|
|
|
|
ShuffleResponse res = sdk.playQueue().shuffle()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}/unshuffle"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.UnshuffleRequest;
|
|
import dev.plexapi.sdk.models.operations.UnshuffleResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
UnshuffleRequest req = UnshuffleRequest.builder()
|
|
.playQueueId(484388L)
|
|
.build();
|
|
|
|
UnshuffleResponse res = sdk.playQueue().unshuffle()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListPlaylistsRequest;
|
|
import dev.plexapi.sdk.models.operations.ListPlaylistsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListPlaylistsRequest req = ListPlaylistsRequest.builder()
|
|
.build();
|
|
|
|
ListPlaylistsResponse res = sdk.playlist().listPlaylists()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.CreatePlaylistRequest;
|
|
import dev.plexapi.sdk.models.operations.CreatePlaylistResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CreatePlaylistRequest req = CreatePlaylistRequest.builder()
|
|
.build();
|
|
|
|
CreatePlaylistResponse res = sdk.libraryPlaylists().createPlaylist()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/upload"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.UploadPlaylistRequest;
|
|
import dev.plexapi.sdk.models.operations.UploadPlaylistResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
UploadPlaylistRequest req = UploadPlaylistRequest.builder()
|
|
.path("/home/barkley/playlist.m3u")
|
|
.force(BoolInt.ONE)
|
|
.build();
|
|
|
|
UploadPlaylistResponse res = sdk.libraryPlaylists().uploadPlaylist()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeletePlaylistRequest;
|
|
import dev.plexapi.sdk.models.operations.DeletePlaylistResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeletePlaylistRequest req = DeletePlaylistRequest.builder()
|
|
.playlistId(343293L)
|
|
.build();
|
|
|
|
DeletePlaylistResponse res = sdk.libraryPlaylists().deletePlaylist()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetPlaylistRequest;
|
|
import dev.plexapi.sdk.models.operations.GetPlaylistResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetPlaylistRequest req = GetPlaylistRequest.builder()
|
|
.playlistId(841953L)
|
|
.build();
|
|
|
|
GetPlaylistResponse res = sdk.playlist().getPlaylist()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.UpdatePlaylistRequest;
|
|
import dev.plexapi.sdk.models.operations.UpdatePlaylistResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
UpdatePlaylistRequest req = UpdatePlaylistRequest.builder()
|
|
.playlistId(157966L)
|
|
.build();
|
|
|
|
UpdatePlaylistResponse res = sdk.libraryPlaylists().updatePlaylist()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/generators"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetPlaylistGeneratorsRequest req = GetPlaylistGeneratorsRequest.builder()
|
|
.playlistId(162342L)
|
|
.build();
|
|
|
|
GetPlaylistGeneratorsResponse res = sdk.libraryPlaylists().getPlaylistGenerators()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ClearPlaylistItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.ClearPlaylistItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ClearPlaylistItemsRequest req = ClearPlaylistItemsRequest.builder()
|
|
.playlistId(552140L)
|
|
.build();
|
|
|
|
ClearPlaylistItemsResponse res = sdk.libraryPlaylists().clearPlaylistItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetPlaylistItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetPlaylistItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetPlaylistItemsRequest req = GetPlaylistItemsRequest.builder()
|
|
.playlistId(118195L)
|
|
.build();
|
|
|
|
GetPlaylistItemsResponse res = sdk.playlist().getPlaylistItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.AddPlaylistItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.AddPlaylistItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
AddPlaylistItemsRequest req = AddPlaylistItemsRequest.builder()
|
|
.playlistId(533723L)
|
|
.build();
|
|
|
|
AddPlaylistItemsResponse res = sdk.libraryPlaylists().addPlaylistItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeletePlaylistItemRequest;
|
|
import dev.plexapi.sdk.models.operations.DeletePlaylistItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeletePlaylistItemRequest req = DeletePlaylistItemRequest.builder()
|
|
.playlistId(981646L)
|
|
.generatorId(194010L)
|
|
.build();
|
|
|
|
DeletePlaylistItemResponse res = sdk.libraryPlaylists().deletePlaylistItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorRequest;
|
|
import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetPlaylistGeneratorRequest req = GetPlaylistGeneratorRequest.builder()
|
|
.playlistId(744880L)
|
|
.generatorId(322168L)
|
|
.build();
|
|
|
|
GetPlaylistGeneratorResponse res = sdk.libraryPlaylists().getPlaylistGenerator()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetPlaylistGeneratorItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetPlaylistGeneratorItemsRequest req = GetPlaylistGeneratorItemsRequest.builder()
|
|
.playlistId(77230L)
|
|
.generatorId(979714L)
|
|
.build();
|
|
|
|
GetPlaylistGeneratorItemsResponse res = sdk.libraryPlaylists().getPlaylistGeneratorItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}/{metadataId}/{action}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
RefreshPlaylistRequest req = RefreshPlaylistRequest.builder()
|
|
.playlistId(895314L)
|
|
.generatorId(629742L)
|
|
.metadataId(724422L)
|
|
.action(Action.DISABLE)
|
|
.build();
|
|
|
|
RefreshPlaylistResponse res = sdk.libraryPlaylists().refreshPlaylist()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{playlistItemId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.MovePlaylistItemRequest;
|
|
import dev.plexapi.sdk.models.operations.MovePlaylistItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
MovePlaylistItemRequest req = MovePlaylistItemRequest.builder()
|
|
.playlistId(940298L)
|
|
.playlistItemId(375626L)
|
|
.build();
|
|
|
|
MovePlaylistItemResponse res = sdk.libraryPlaylists().movePlaylistItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithPlaylistMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/security/resources"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSourceConnectionInformationRequest req = GetSourceConnectionInformationRequest.builder()
|
|
.source("<value>")
|
|
.refresh(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetSourceConnectionInformationResponse res = sdk.general().getSourceConnectionInformation()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/security/token"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetTransientTokenRequest req = GetTransientTokenRequest.builder()
|
|
.type(QueryParamType.DELEGATION)
|
|
.scope(Scope.ALL)
|
|
.build();
|
|
|
|
GetTransientTokenResponse res = sdk.general().getTransientToken()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/services/ultrablur/colors"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetColorsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetColorsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetColorsRequest req = GetColorsRequest.builder()
|
|
.url("/library/metadata/217745/art/1718931408")
|
|
.build();
|
|
|
|
GetColorsResponse res = sdk.ultraBlur().getColors()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/services/ultrablur/image"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetImageRequest;
|
|
import dev.plexapi.sdk.models.operations.GetImageResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetImageRequest req = GetImageRequest.builder()
|
|
.topLeft("3f280a")
|
|
.topRight("6b4713")
|
|
.bottomRight("0f2a43")
|
|
.bottomLeft("1c425d")
|
|
.width(1920L)
|
|
.height(1080L)
|
|
.noise(BoolInt.ONE)
|
|
.build();
|
|
|
|
GetImageResponse res = sdk.ultraBlur().getImage()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.responseStream().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/status/sessions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListSessionsResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListSessionsResponse res = sdk.status().listSessions()
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/status/sessions/background"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetBackgroundTasksResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetBackgroundTasksResponse res = sdk.status().getBackgroundTasks()
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/status/sessions/history/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListPlaybackHistoryRequest;
|
|
import dev.plexapi.sdk.models.operations.ListPlaybackHistoryResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListPlaybackHistoryRequest req = ListPlaybackHistoryRequest.builder()
|
|
.sort(List.of(
|
|
"v",
|
|
"i",
|
|
"e",
|
|
"w",
|
|
"e",
|
|
"d",
|
|
"A",
|
|
"t",
|
|
":",
|
|
"d",
|
|
"e",
|
|
"s",
|
|
"c",
|
|
",",
|
|
"a",
|
|
"c",
|
|
"c",
|
|
"o",
|
|
"u",
|
|
"n",
|
|
"t",
|
|
"I",
|
|
"D"))
|
|
.build();
|
|
|
|
ListPlaybackHistoryResponse res = sdk.status().listPlaybackHistory()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/status/sessions/history/{historyId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteHistoryRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteHistoryResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteHistoryRequest req = DeleteHistoryRequest.builder()
|
|
.historyId(953579L)
|
|
.build();
|
|
|
|
DeleteHistoryResponse res = sdk.status().deleteHistory()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainer().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/status/sessions/history/{historyId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetHistoryItemRequest;
|
|
import dev.plexapi.sdk.models.operations.GetHistoryItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetHistoryItemRequest req = GetHistoryItemRequest.builder()
|
|
.historyId(832213L)
|
|
.build();
|
|
|
|
GetHistoryItemResponse res = sdk.status().getHistoryItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.historyAllGetResponses200().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/status/sessions/terminate"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.TerminateSessionRequest;
|
|
import dev.plexapi.sdk.models.operations.TerminateSessionResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
TerminateSessionRequest req = TerminateSessionRequest.builder()
|
|
.sessionId("cdefghijklmnopqrstuvwxyz")
|
|
.reason("Stop Playing")
|
|
.build();
|
|
|
|
TerminateSessionResponse res = sdk.status().terminateSession()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/updater/apply"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ApplyUpdatesRequest;
|
|
import dev.plexapi.sdk.models.operations.ApplyUpdatesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ApplyUpdatesRequest req = ApplyUpdatesRequest.builder()
|
|
.tonight(BoolInt.ONE)
|
|
.skip(BoolInt.ONE)
|
|
.build();
|
|
|
|
ApplyUpdatesResponse res = sdk.updater().applyUpdates()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/updater/check"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.CheckUpdatesRequest;
|
|
import dev.plexapi.sdk.models.operations.CheckUpdatesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CheckUpdatesRequest req = CheckUpdatesRequest.builder()
|
|
.download(BoolInt.ONE)
|
|
.build();
|
|
|
|
CheckUpdatesResponse res = sdk.updater().checkUpdates()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/updater/status"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetUpdatesStatusResponse;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetUpdatesStatusResponse res = sdk.updater().getUpdatesStatus()
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/decision"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.*;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
MakeDecisionRequest req = MakeDecisionRequest.builder()
|
|
.transcodeType(TranscodeType.MUSIC)
|
|
.advancedSubtitles(AdvancedSubtitles.BURN)
|
|
.audioBoost(50L)
|
|
.audioChannelCount(5L)
|
|
.autoAdjustQuality(BoolInt.ONE)
|
|
.autoAdjustSubtitle(BoolInt.ONE)
|
|
.directPlay(BoolInt.ONE)
|
|
.directStream(BoolInt.ONE)
|
|
.directStreamAudio(BoolInt.ONE)
|
|
.disableResolutionRotation(BoolInt.ONE)
|
|
.hasMDE(BoolInt.ONE)
|
|
.location(Location.WAN)
|
|
.mediaBufferSize(102400L)
|
|
.mediaIndex(0L)
|
|
.musicBitrate(5000L)
|
|
.offset(90.5)
|
|
.partIndex(0L)
|
|
.path("/library/metadata/151671")
|
|
.peakBitrate(12000L)
|
|
.photoResolution("1080x1080")
|
|
.protocol(Protocol.DASH)
|
|
.secondsPerSegment(5L)
|
|
.subtitleSize(50L)
|
|
.videoBitrate(12000L)
|
|
.videoQuality(50L)
|
|
.videoResolution("1080x1080")
|
|
.xPlexClientProfileExtra("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)")
|
|
.xPlexClientProfileName("generic")
|
|
.build();
|
|
|
|
MakeDecisionResponse res = sdk.transcoder().makeDecision()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithDecision().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/fallback"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.TriggerFallbackRequest;
|
|
import dev.plexapi.sdk.models.operations.TriggerFallbackResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.TranscodeType;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
TriggerFallbackRequest req = TriggerFallbackRequest.builder()
|
|
.transcodeType(TranscodeType.AUDIO)
|
|
.build();
|
|
|
|
TriggerFallbackResponse res = sdk.transcoder().triggerFallback()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/start.{extension}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.*;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
StartTranscodeSessionRequest req = StartTranscodeSessionRequest.builder()
|
|
.transcodeType(TranscodeType.MUSIC)
|
|
.extension(Extension.MPD)
|
|
.advancedSubtitles(AdvancedSubtitles.BURN)
|
|
.audioBoost(50L)
|
|
.audioChannelCount(5L)
|
|
.autoAdjustQuality(BoolInt.ONE)
|
|
.autoAdjustSubtitle(BoolInt.ONE)
|
|
.directPlay(BoolInt.ONE)
|
|
.directStream(BoolInt.ONE)
|
|
.directStreamAudio(BoolInt.ONE)
|
|
.disableResolutionRotation(BoolInt.ONE)
|
|
.hasMDE(BoolInt.ONE)
|
|
.location(StartTranscodeSessionQueryParamLocation.WAN)
|
|
.mediaBufferSize(102400L)
|
|
.mediaIndex(0L)
|
|
.musicBitrate(5000L)
|
|
.offset(90.5)
|
|
.partIndex(0L)
|
|
.path("/library/metadata/151671")
|
|
.peakBitrate(12000L)
|
|
.photoResolution("1080x1080")
|
|
.protocol(StartTranscodeSessionQueryParamProtocol.DASH)
|
|
.secondsPerSegment(5L)
|
|
.subtitleSize(50L)
|
|
.videoBitrate(12000L)
|
|
.videoQuality(50L)
|
|
.videoResolution("1080x1080")
|
|
.xPlexClientProfileExtra("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)")
|
|
.xPlexClientProfileName("generic")
|
|
.build();
|
|
|
|
StartTranscodeSessionResponse res = sdk.transcoder().startTranscodeSession()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.responseStream().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/subtitles"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: java
|
|
label: PlexJava
|
|
source: |-
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.*;
|
|
import dev.plexapi.sdk.models.shared.*;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
TranscodeSubtitlesRequest req = TranscodeSubtitlesRequest.builder()
|
|
.transcodeType(TranscodeType.AUDIO)
|
|
.advancedSubtitles(AdvancedSubtitles.BURN)
|
|
.audioBoost(50L)
|
|
.audioChannelCount(5L)
|
|
.autoAdjustQuality(BoolInt.ONE)
|
|
.autoAdjustSubtitle(BoolInt.ONE)
|
|
.directPlay(BoolInt.ONE)
|
|
.directStream(BoolInt.ONE)
|
|
.directStreamAudio(BoolInt.ONE)
|
|
.disableResolutionRotation(BoolInt.ONE)
|
|
.hasMDE(BoolInt.ONE)
|
|
.location(QueryParamLocation.WAN)
|
|
.mediaBufferSize(102400L)
|
|
.mediaIndex(0L)
|
|
.musicBitrate(5000L)
|
|
.offset(90.5)
|
|
.partIndex(0L)
|
|
.path("/library/metadata/151671")
|
|
.peakBitrate(12000L)
|
|
.photoResolution("1080x1080")
|
|
.protocol(QueryParamProtocol.DASH)
|
|
.secondsPerSegment(5L)
|
|
.subtitleSize(50L)
|
|
.videoBitrate(12000L)
|
|
.videoQuality(50L)
|
|
.videoResolution("1080x1080")
|
|
.xPlexClientProfileExtra("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)")
|
|
.xPlexClientProfileName("generic")
|
|
.build();
|
|
|
|
TranscodeSubtitlesResponse res = sdk.transcoder().transcodeSubtitles()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|