mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-06 04:20:46 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.615.2
This commit is contained in:
214
codeSamples.yaml
214
codeSamples.yaml
@@ -22,7 +22,7 @@ actions:
|
||||
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||
@@ -52,7 +52,7 @@ actions:
|
||||
public static void main(String[] args) throws GetServerPreferencesBadRequest, GetServerPreferencesUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetServerPreferencesResponse res = sdk.server().getServerPreferences()
|
||||
@@ -82,12 +82,12 @@ actions:
|
||||
public static void main(String[] args) throws UpdatePlayProgressBadRequest, UpdatePlayProgressUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
UpdatePlayProgressResponse res = sdk.media().updatePlayProgress()
|
||||
.key("<key>")
|
||||
.time(90000)
|
||||
.time(90000d)
|
||||
.state("played")
|
||||
.call();
|
||||
|
||||
@@ -113,11 +113,11 @@ actions:
|
||||
public static void main(String[] args) throws MarkPlayedBadRequest, MarkPlayedUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
MarkPlayedResponse res = sdk.media().markPlayed()
|
||||
.key(59398)
|
||||
.key(59398d)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
@@ -142,20 +142,20 @@ actions:
|
||||
public static void main(String[] args) throws GetTimelineBadRequest, GetTimelineUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetTimelineRequest req = GetTimelineRequest.builder()
|
||||
.ratingKey(23409)
|
||||
.ratingKey(23409d)
|
||||
.key("/library/metadata/23409")
|
||||
.state(State.PLAYING)
|
||||
.hasMDE(1)
|
||||
.time(2000)
|
||||
.duration(10000)
|
||||
.hasMDE(1d)
|
||||
.time(2000d)
|
||||
.duration(10000d)
|
||||
.context("home:hub.continueWatching")
|
||||
.playQueueItemID(1)
|
||||
.playBackTime(2000)
|
||||
.row(1)
|
||||
.playQueueItemID(1d)
|
||||
.playBackTime(2000d)
|
||||
.row(1d)
|
||||
.build();
|
||||
|
||||
GetTimelineResponse res = sdk.video().getTimeline()
|
||||
@@ -184,11 +184,11 @@ actions:
|
||||
public static void main(String[] args) throws MarkUnplayedBadRequest, MarkUnplayedUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
MarkUnplayedResponse res = sdk.media().markUnplayed()
|
||||
.key(59398)
|
||||
.key(59398d)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
@@ -213,7 +213,7 @@ actions:
|
||||
public static void main(String[] args) throws GetServerActivitiesBadRequest, GetServerActivitiesUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetServerActivitiesResponse res = sdk.activities().getServerActivities()
|
||||
@@ -243,7 +243,7 @@ actions:
|
||||
public static void main(String[] args) throws CancelServerActivitiesBadRequest, CancelServerActivitiesUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
CancelServerActivitiesResponse res = sdk.activities().cancelServerActivities()
|
||||
@@ -272,7 +272,7 @@ actions:
|
||||
public static void main(String[] args) throws StopAllTasksBadRequest, StopAllTasksUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
StopAllTasksResponse res = sdk.butler().stopAllTasks()
|
||||
@@ -300,7 +300,7 @@ actions:
|
||||
public static void main(String[] args) throws GetButlerTasksBadRequest, GetButlerTasksUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetButlerTasksResponse res = sdk.butler().getButlerTasks()
|
||||
@@ -330,7 +330,7 @@ actions:
|
||||
public static void main(String[] args) throws StartAllTasksBadRequest, StartAllTasksUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
StartAllTasksResponse res = sdk.butler().startAllTasks()
|
||||
@@ -359,7 +359,7 @@ actions:
|
||||
public static void main(String[] args) throws StopTaskBadRequest, StopTaskUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
StopTaskResponse res = sdk.butler().stopTask()
|
||||
@@ -389,7 +389,7 @@ actions:
|
||||
public static void main(String[] args) throws StartTaskBadRequest, StartTaskUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
StartTaskResponse res = sdk.butler().startTask()
|
||||
@@ -418,7 +418,7 @@ actions:
|
||||
public static void main(String[] args) throws GetAvailableClientsBadRequest, GetAvailableClientsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetAvailableClientsResponse res = sdk.server().getAvailableClients()
|
||||
@@ -448,7 +448,7 @@ actions:
|
||||
public static void main(String[] args) throws GetCompanionsDataBadRequest, GetCompanionsDataUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetCompanionsDataResponse res = sdk.plex().getCompanionsData()
|
||||
@@ -478,7 +478,7 @@ actions:
|
||||
public static void main(String[] args) throws GetDevicesBadRequest, GetDevicesUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetDevicesResponse res = sdk.server().getDevices()
|
||||
@@ -508,7 +508,7 @@ actions:
|
||||
public static void main(String[] args) throws GetUserFriendsBadRequest, GetUserFriendsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetUserFriendsResponse res = sdk.plex().getUserFriends()
|
||||
@@ -567,7 +567,7 @@ actions:
|
||||
public static void main(String[] args) throws GetHomeDataBadRequest, GetHomeDataUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetHomeDataResponse res = sdk.plex().getHomeData()
|
||||
@@ -597,7 +597,7 @@ actions:
|
||||
public static void main(String[] args) throws GetGlobalHubsBadRequest, GetGlobalHubsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs()
|
||||
@@ -625,7 +625,7 @@ actions:
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetRecentlyAddedRequest req = GetRecentlyAddedRequest.builder()
|
||||
@@ -663,12 +663,12 @@ actions:
|
||||
public static void main(String[] args) throws PerformSearchBadRequest, PerformSearchUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
PerformSearchResponse res = sdk.search().performSearch()
|
||||
.query("arnold")
|
||||
.limit(5)
|
||||
.limit(5d)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
@@ -693,12 +693,12 @@ actions:
|
||||
public static void main(String[] args) throws PerformVoiceSearchBadRequest, PerformVoiceSearchUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
PerformVoiceSearchResponse res = sdk.search().performVoiceSearch()
|
||||
.query("dead+poop")
|
||||
.limit(5)
|
||||
.limit(5d)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
@@ -723,7 +723,7 @@ actions:
|
||||
public static void main(String[] args) throws GetLibraryHubsBadRequest, GetLibraryHubsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs()
|
||||
@@ -782,7 +782,7 @@ actions:
|
||||
public static void main(String[] args) throws GetTopWatchedContentBadRequest, GetTopWatchedContentUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent()
|
||||
@@ -814,11 +814,11 @@ actions:
|
||||
public static void main(String[] args) throws GetFileHashBadRequest, GetFileHashUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetFileHashResponse res = sdk.library().getFileHash()
|
||||
.url("file://C:\Image.png&type=13")
|
||||
.url("file://C:\\Image.png&type=13")
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
@@ -844,7 +844,7 @@ actions:
|
||||
public static void main(String[] args) throws GetMediaMetaDataBadRequest, GetMediaMetaDataUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetMediaMetaDataRequest req = GetMediaMetaDataRequest.builder()
|
||||
@@ -890,7 +890,7 @@ actions:
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetMediaArtsResponse res = sdk.library().getMediaArts()
|
||||
@@ -919,7 +919,7 @@ actions:
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
PostMediaArtsResponse res = sdk.library().postMediaArts()
|
||||
@@ -927,7 +927,6 @@ actions:
|
||||
.url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b")
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"]
|
||||
@@ -950,7 +949,7 @@ actions:
|
||||
public static void main(String[] args) throws GetBannerImageBadRequest, GetBannerImageUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetBannerImageRequest req = GetBannerImageRequest.builder()
|
||||
@@ -990,7 +989,7 @@ actions:
|
||||
public static void main(String[] args) throws GetMetadataChildrenBadRequest, GetMetadataChildrenUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetMetadataChildrenResponse res = sdk.library().getMetadataChildren()
|
||||
@@ -1020,7 +1019,7 @@ actions:
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetMediaPostersResponse res = sdk.library().getMediaPosters()
|
||||
@@ -1049,7 +1048,7 @@ actions:
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
PostMediaPosterResponse res = sdk.library().postMediaPoster()
|
||||
@@ -1057,7 +1056,6 @@ actions:
|
||||
.url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b")
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"]
|
||||
@@ -1080,7 +1078,7 @@ actions:
|
||||
public static void main(String[] args) throws GetThumbImageBadRequest, GetThumbImageUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetThumbImageRequest req = GetThumbImageRequest.builder()
|
||||
@@ -1121,7 +1119,7 @@ actions:
|
||||
public static void main(String[] args) throws GetRecentlyAddedLibraryBadRequest, GetRecentlyAddedLibraryUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetRecentlyAddedLibraryRequest req = GetRecentlyAddedLibraryRequest.builder()
|
||||
@@ -1173,7 +1171,7 @@ actions:
|
||||
public static void main(String[] args) throws GetSearchAllLibrariesBadRequest, GetSearchAllLibrariesUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetSearchAllLibrariesRequest req = GetSearchAllLibrariesRequest.builder()
|
||||
@@ -1213,7 +1211,7 @@ actions:
|
||||
public static void main(String[] args) throws GetAllLibrariesBadRequest, GetAllLibrariesUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetAllLibrariesResponse res = sdk.library().getAllLibraries()
|
||||
@@ -1243,7 +1241,7 @@ actions:
|
||||
public static void main(String[] args) throws GetWatchListBadRequest, GetWatchListUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetWatchListRequest req = GetWatchListRequest.builder()
|
||||
@@ -1279,7 +1277,7 @@ actions:
|
||||
public static void main(String[] args) throws DeleteLibraryBadRequest, DeleteLibraryUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
DeleteLibraryResponse res = sdk.library().deleteLibrary()
|
||||
@@ -1309,7 +1307,7 @@ actions:
|
||||
public static void main(String[] args) throws GetLibraryDetailsBadRequest, GetLibraryDetailsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetLibraryDetailsResponse res = sdk.library().getLibraryDetails()
|
||||
@@ -1342,7 +1340,7 @@ actions:
|
||||
public static void main(String[] args) throws GetActorsLibraryBadRequest, GetActorsLibraryUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetActorsLibraryResponse res = sdk.library().getActorsLibrary()
|
||||
@@ -1374,7 +1372,7 @@ actions:
|
||||
public static void main(String[] args) throws GetLibrarySectionsAllBadRequest, GetLibrarySectionsAllUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetLibrarySectionsAllRequest req = GetLibrarySectionsAllRequest.builder()
|
||||
@@ -1416,7 +1414,7 @@ actions:
|
||||
public static void main(String[] args) throws GetCountriesLibraryBadRequest, GetCountriesLibraryUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetCountriesLibraryResponse res = sdk.library().getCountriesLibrary()
|
||||
@@ -1449,7 +1447,7 @@ actions:
|
||||
public static void main(String[] args) throws GetGenresLibraryBadRequest, GetGenresLibraryUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetGenresLibraryResponse res = sdk.library().getGenresLibrary()
|
||||
@@ -1482,7 +1480,7 @@ actions:
|
||||
public static void main(String[] args) throws GetRefreshLibraryMetadataBadRequest, GetRefreshLibraryMetadataUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetRefreshLibraryMetadataResponse res = sdk.library().getRefreshLibraryMetadata()
|
||||
@@ -1513,7 +1511,7 @@ actions:
|
||||
public static void main(String[] args) throws GetSearchLibraryBadRequest, GetSearchLibraryUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetSearchLibraryResponse res = sdk.library().getSearchLibrary()
|
||||
@@ -1545,7 +1543,7 @@ actions:
|
||||
public static void main(String[] args) throws GetLibraryItemsBadRequest, GetLibraryItemsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetLibraryItemsRequest req = GetLibraryItemsRequest.builder()
|
||||
@@ -1585,7 +1583,7 @@ actions:
|
||||
public static void main(String[] args) throws LogLineBadRequest, LogLineUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
LogLineResponse res = sdk.log().logLine()
|
||||
@@ -1617,7 +1615,7 @@ actions:
|
||||
public static void main(String[] args) throws LogMultiLineBadRequest, LogMultiLineUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
String req = "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman\nlevel=1&message=Test%20message%203&source=postman";
|
||||
@@ -1648,7 +1646,7 @@ actions:
|
||||
public static void main(String[] args) throws EnablePaperTrailBadRequest, EnablePaperTrailUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
EnablePaperTrailResponse res = sdk.log().enablePaperTrail()
|
||||
@@ -1676,7 +1674,7 @@ actions:
|
||||
public static void main(String[] args) throws GetMediaProvidersBadRequest, GetMediaProvidersUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetMediaProvidersResponse res = sdk.server().getMediaProviders()
|
||||
@@ -1707,7 +1705,7 @@ actions:
|
||||
public static void main(String[] args) throws GetMyPlexAccountBadRequest, GetMyPlexAccountUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount()
|
||||
@@ -1737,14 +1735,14 @@ actions:
|
||||
public static void main(String[] args) throws GetResizedPhotoBadRequest, GetResizedPhotoUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetResizedPhotoRequest req = GetResizedPhotoRequest.builder()
|
||||
.width(110)
|
||||
.height(165)
|
||||
.width(110d)
|
||||
.height(165d)
|
||||
.opacity(100L)
|
||||
.blur(0)
|
||||
.blur(0d)
|
||||
.minSize(MinSize.ZERO)
|
||||
.upscale(Upscale.ZERO)
|
||||
.url("/library/metadata/49564/thumb/1654258204")
|
||||
@@ -1854,7 +1852,7 @@ actions:
|
||||
public static void main(String[] args) throws GetPlaylistsBadRequest, GetPlaylistsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetPlaylistsResponse res = sdk.playlists().getPlaylists()
|
||||
@@ -1884,7 +1882,7 @@ actions:
|
||||
public static void main(String[] args) throws CreatePlaylistBadRequest, CreatePlaylistUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
CreatePlaylistRequest req = CreatePlaylistRequest.builder()
|
||||
@@ -1923,7 +1921,7 @@ actions:
|
||||
public static void main(String[] args) throws UploadPlaylistBadRequest, UploadPlaylistUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
UploadPlaylistResponse res = sdk.playlists().uploadPlaylist()
|
||||
@@ -1954,7 +1952,7 @@ actions:
|
||||
public static void main(String[] args) throws DeletePlaylistBadRequest, DeletePlaylistUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
DeletePlaylistResponse res = sdk.playlists().deletePlaylist()
|
||||
@@ -1983,7 +1981,7 @@ actions:
|
||||
public static void main(String[] args) throws GetPlaylistBadRequest, GetPlaylistUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetPlaylistResponse res = sdk.playlists().getPlaylist()
|
||||
@@ -2014,7 +2012,7 @@ actions:
|
||||
public static void main(String[] args) throws UpdatePlaylistBadRequest, UpdatePlaylistUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
UpdatePlaylistResponse res = sdk.playlists().updatePlaylist()
|
||||
@@ -2043,7 +2041,7 @@ actions:
|
||||
public static void main(String[] args) throws ClearPlaylistContentsBadRequest, ClearPlaylistContentsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents()
|
||||
@@ -2073,7 +2071,7 @@ actions:
|
||||
public static void main(String[] args) throws GetPlaylistContentsBadRequest, GetPlaylistContentsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents()
|
||||
@@ -2105,13 +2103,13 @@ actions:
|
||||
public static void main(String[] args) throws AddPlaylistContentsBadRequest, AddPlaylistContentsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents()
|
||||
.playlistID(7013.44)
|
||||
.uri("server://12345/com.plexapp.plugins.library/library/metadata/1")
|
||||
.playQueueID(123)
|
||||
.playQueueID(123d)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
@@ -2138,7 +2136,7 @@ actions:
|
||||
public static void main(String[] args) throws GetServerResourcesBadRequest, GetServerResourcesUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetServerResourcesResponse res = sdk.plex().getServerResources()
|
||||
@@ -2172,7 +2170,7 @@ actions:
|
||||
public static void main(String[] args) throws GetSearchResultsBadRequest, GetSearchResultsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetSearchResultsResponse res = sdk.search().getSearchResults()
|
||||
@@ -2203,7 +2201,7 @@ actions:
|
||||
public static void main(String[] args) throws GetSourceConnectionInformationBadRequest, GetSourceConnectionInformationUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation()
|
||||
@@ -2232,7 +2230,7 @@ actions:
|
||||
public static void main(String[] args) throws GetTransientTokenBadRequest, GetTransientTokenUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetTransientTokenResponse res = sdk.authentication().getTransientToken()
|
||||
@@ -2262,7 +2260,7 @@ actions:
|
||||
public static void main(String[] args) throws GetServerListBadRequest, GetServerListUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetServerListResponse res = sdk.server().getServerList()
|
||||
@@ -2292,7 +2290,7 @@ actions:
|
||||
public static void main(String[] args) throws GetBandwidthStatisticsBadRequest, GetBandwidthStatisticsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetBandwidthStatisticsResponse res = sdk.statistics().getBandwidthStatistics()
|
||||
@@ -2323,7 +2321,7 @@ actions:
|
||||
public static void main(String[] args) throws GetStatisticsBadRequest, GetStatisticsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetStatisticsResponse res = sdk.statistics().getStatistics()
|
||||
@@ -2354,7 +2352,7 @@ actions:
|
||||
public static void main(String[] args) throws GetResourcesStatisticsBadRequest, GetResourcesStatisticsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetResourcesStatisticsResponse res = sdk.statistics().getResourcesStatistics()
|
||||
@@ -2385,7 +2383,7 @@ actions:
|
||||
public static void main(String[] args) throws GetSessionsBadRequest, GetSessionsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetSessionsResponse res = sdk.sessions().getSessions()
|
||||
@@ -2416,7 +2414,7 @@ actions:
|
||||
public static void main(String[] args) throws GetSessionHistoryBadRequest, GetSessionHistoryUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetSessionHistoryResponse res = sdk.sessions().getSessionHistory()
|
||||
@@ -2451,7 +2449,7 @@ actions:
|
||||
public static void main(String[] args) throws GetTranscodeSessionsBadRequest, GetTranscodeSessionsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions()
|
||||
@@ -2481,7 +2479,7 @@ actions:
|
||||
public static void main(String[] args) throws StopTranscodeSessionBadRequest, StopTranscodeSessionUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession()
|
||||
@@ -2510,7 +2508,7 @@ actions:
|
||||
public static void main(String[] args) throws ApplyUpdatesBadRequest, ApplyUpdatesUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
ApplyUpdatesResponse res = sdk.updater().applyUpdates()
|
||||
@@ -2541,7 +2539,7 @@ actions:
|
||||
public static void main(String[] args) throws CheckForUpdatesBadRequest, CheckForUpdatesUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
CheckForUpdatesResponse res = sdk.updater().checkForUpdates()
|
||||
@@ -2570,7 +2568,7 @@ actions:
|
||||
public static void main(String[] args) throws GetUpdateStatusBadRequest, GetUpdateStatusUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetUpdateStatusResponse res = sdk.updater().getUpdateStatus()
|
||||
@@ -2600,7 +2598,7 @@ actions:
|
||||
public static void main(String[] args) throws GetTokenDetailsBadRequest, GetTokenDetailsUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
GetTokenDetailsResponse res = sdk.authentication().getTokenDetails()
|
||||
@@ -2721,26 +2719,26 @@ actions:
|
||||
public static void main(String[] args) throws StartUniversalTranscodeBadRequest, StartUniversalTranscodeUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.accessToken(System.getenv().getOrDefault("ACCESS_TOKEN", ""))
|
||||
.build();
|
||||
|
||||
StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder()
|
||||
.hasMDE(1)
|
||||
.hasMDE(1d)
|
||||
.path("/library/metadata/23409")
|
||||
.mediaIndex(0)
|
||||
.partIndex(0)
|
||||
.mediaIndex(0d)
|
||||
.partIndex(0d)
|
||||
.protocol("hls")
|
||||
.fastSeek(0)
|
||||
.directPlay(0)
|
||||
.directStream(0)
|
||||
.subtitleSize(100)
|
||||
.fastSeek(0d)
|
||||
.directPlay(0d)
|
||||
.directStream(0d)
|
||||
.subtitleSize(100d)
|
||||
.subtites("burn")
|
||||
.audioBoost(100)
|
||||
.audioBoost(100d)
|
||||
.location("lan")
|
||||
.mediaBufferSize(102400)
|
||||
.mediaBufferSize(102400d)
|
||||
.session("zvcage8b7rkioqcm8f4uns4c")
|
||||
.addDebugOverlay(0)
|
||||
.autoAdjustQuality(0)
|
||||
.addDebugOverlay(0d)
|
||||
.autoAdjustQuality(0d)
|
||||
.build();
|
||||
|
||||
StartUniversalTranscodeResponse res = sdk.video().startUniversalTranscode()
|
||||
|
||||
Reference in New Issue
Block a user