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.errors.GetServerCapabilitiesBadRequest; import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized; import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() .call(); if (res.object().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.errors.GetServerPreferencesBadRequest; import dev.plexapi.sdk.models.errors.GetServerPreferencesUnauthorized; import dev.plexapi.sdk.models.operations.GetServerPreferencesResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetServerPreferencesBadRequest, GetServerPreferencesUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetServerPreferencesResponse res = sdk.server().getServerPreferences() .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/:/progress"]["post"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.UpdatePlayProgressBadRequest; import dev.plexapi.sdk.models.errors.UpdatePlayProgressUnauthorized; import dev.plexapi.sdk.models.operations.UpdatePlayProgressResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws UpdatePlayProgressBadRequest, UpdatePlayProgressUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); UpdatePlayProgressResponse res = sdk.media().updatePlayProgress() .key("") .time(90000) .state("played") .call(); // handle response } } - target: $["paths"]["/:/scrobble"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.MarkPlayedBadRequest; import dev.plexapi.sdk.models.errors.MarkPlayedUnauthorized; import dev.plexapi.sdk.models.operations.MarkPlayedResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws MarkPlayedBadRequest, MarkPlayedUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); MarkPlayedResponse res = sdk.media().markPlayed() .key(59398) .call(); // handle response } } - target: $["paths"]["/:/timeline"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetTimelineBadRequest; import dev.plexapi.sdk.models.errors.GetTimelineUnauthorized; import dev.plexapi.sdk.models.operations.*; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetTimelineBadRequest, GetTimelineUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetTimelineRequest req = GetTimelineRequest.builder() .ratingKey(23409) .key("/library/metadata/23409") .state(State.PLAYING) .hasMDE(1) .time(2000) .duration(10000) .context("home:hub.continueWatching") .playQueueItemID(1) .playBackTime(2000) .row(1) .build(); GetTimelineResponse res = sdk.video().getTimeline() .request(req) .call(); // handle response } } - target: $["paths"]["/:/unscrobble"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.MarkUnplayedBadRequest; import dev.plexapi.sdk.models.errors.MarkUnplayedUnauthorized; import dev.plexapi.sdk.models.operations.MarkUnplayedResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws MarkUnplayedBadRequest, MarkUnplayedUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); MarkUnplayedResponse res = sdk.media().markUnplayed() .key(59398) .call(); // 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.errors.GetServerActivitiesBadRequest; import dev.plexapi.sdk.models.errors.GetServerActivitiesUnauthorized; import dev.plexapi.sdk.models.operations.GetServerActivitiesResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetServerActivitiesBadRequest, GetServerActivitiesUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetServerActivitiesResponse res = sdk.activities().getServerActivities() .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/activities/{activityUUID}"]["delete"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.CancelServerActivitiesBadRequest; import dev.plexapi.sdk.models.errors.CancelServerActivitiesUnauthorized; import dev.plexapi.sdk.models.operations.CancelServerActivitiesResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws CancelServerActivitiesBadRequest, CancelServerActivitiesUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); CancelServerActivitiesResponse res = sdk.activities().cancelServerActivities() .activityUUID("25b71ed5-0f9d-461c-baa7-d404e9e10d3e") .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.errors.StopAllTasksBadRequest; import dev.plexapi.sdk.models.errors.StopAllTasksUnauthorized; import dev.plexapi.sdk.models.operations.StopAllTasksResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws StopAllTasksBadRequest, StopAllTasksUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); StopAllTasksResponse res = sdk.butler().stopAllTasks() .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.errors.GetButlerTasksBadRequest; import dev.plexapi.sdk.models.errors.GetButlerTasksUnauthorized; import dev.plexapi.sdk.models.operations.GetButlerTasksResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetButlerTasksBadRequest, GetButlerTasksUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetButlerTasksResponse res = sdk.butler().getButlerTasks() .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.errors.StartAllTasksBadRequest; import dev.plexapi.sdk.models.errors.StartAllTasksUnauthorized; import dev.plexapi.sdk.models.operations.StartAllTasksResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws StartAllTasksBadRequest, StartAllTasksUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); StartAllTasksResponse res = sdk.butler().startAllTasks() .call(); // handle response } } - target: $["paths"]["/butler/{taskName}"]["delete"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.StopTaskBadRequest; import dev.plexapi.sdk.models.errors.StopTaskUnauthorized; import dev.plexapi.sdk.models.operations.PathParamTaskName; import dev.plexapi.sdk.models.operations.StopTaskResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws StopTaskBadRequest, StopTaskUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); StopTaskResponse res = sdk.butler().stopTask() .taskName(PathParamTaskName.BACKUP_DATABASE) .call(); // handle response } } - target: $["paths"]["/butler/{taskName}"]["post"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.StartTaskBadRequest; import dev.plexapi.sdk.models.errors.StartTaskUnauthorized; import dev.plexapi.sdk.models.operations.StartTaskResponse; import dev.plexapi.sdk.models.operations.TaskName; import java.lang.Exception; public class Application { public static void main(String[] args) throws StartTaskBadRequest, StartTaskUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); StartTaskResponse res = sdk.butler().startTask() .taskName(TaskName.CLEAN_OLD_BUNDLES) .call(); // handle response } } - target: $["paths"]["/clients"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest; import dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized; import dev.plexapi.sdk.models.operations.GetAvailableClientsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetAvailableClientsBadRequest, GetAvailableClientsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetAvailableClientsResponse res = sdk.server().getAvailableClients() .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/companions"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest; import dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized; import dev.plexapi.sdk.models.operations.GetCompanionsDataResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetCompanionsDataBadRequest, GetCompanionsDataUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetCompanionsDataResponse res = sdk.plex().getCompanionsData() .call(); if (res.responseBodies().isPresent()) { // handle response } } } - target: $["paths"]["/devices"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetDevicesBadRequest; import dev.plexapi.sdk.models.errors.GetDevicesUnauthorized; import dev.plexapi.sdk.models.operations.GetDevicesResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetDevicesBadRequest, GetDevicesUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetDevicesResponse res = sdk.server().getDevices() .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/friends"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetUserFriendsBadRequest; import dev.plexapi.sdk.models.errors.GetUserFriendsUnauthorized; import dev.plexapi.sdk.models.operations.GetUserFriendsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetUserFriendsBadRequest, GetUserFriendsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetUserFriendsResponse res = sdk.plex().getUserFriends() .call(); if (res.friends().isPresent()) { // handle response } } } - target: $["paths"]["/geoip"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetGeoDataBadRequest; import dev.plexapi.sdk.models.errors.GetGeoDataUnauthorized; import dev.plexapi.sdk.models.operations.GetGeoDataResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetGeoDataBadRequest, GetGeoDataUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .build(); GetGeoDataResponse res = sdk.plex().getGeoData() .call(); if (res.geoData().isPresent()) { // handle response } } } - target: $["paths"]["/home"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetHomeDataBadRequest; import dev.plexapi.sdk.models.errors.GetHomeDataUnauthorized; import dev.plexapi.sdk.models.operations.GetHomeDataResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetHomeDataBadRequest, GetHomeDataUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetHomeDataResponse res = sdk.plex().getHomeData() .call(); if (res.object().isPresent()) { // 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.errors.GetGlobalHubsBadRequest; import dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized; import dev.plexapi.sdk.models.operations.GetGlobalHubsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetGlobalHubsBadRequest, GetGlobalHubsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs() .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/hubs/home/recentlyAdded"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.operations.*; import java.lang.Exception; public class Application { public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetRecentlyAddedRequest req = GetRecentlyAddedRequest.builder() .contentDirectoryID(470161L) .type(Type.TvShow) .sectionID(2L) .build(); GetRecentlyAddedResponse res = sdk.hubs().getRecentlyAdded() .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.errors.PerformSearchBadRequest; import dev.plexapi.sdk.models.errors.PerformSearchUnauthorized; import dev.plexapi.sdk.models.operations.PerformSearchResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws PerformSearchBadRequest, PerformSearchUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); PerformSearchResponse res = sdk.search().performSearch() .query("dylan") .call(); // 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.errors.PerformVoiceSearchBadRequest; import dev.plexapi.sdk.models.errors.PerformVoiceSearchUnauthorized; import dev.plexapi.sdk.models.operations.PerformVoiceSearchResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws PerformVoiceSearchBadRequest, PerformVoiceSearchUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); PerformVoiceSearchResponse res = sdk.search().performVoiceSearch() .query("dead+poop") .call(); // 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.errors.GetLibraryHubsBadRequest; import dev.plexapi.sdk.models.errors.GetLibraryHubsUnauthorized; import dev.plexapi.sdk.models.operations.GetLibraryHubsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetLibraryHubsBadRequest, GetLibraryHubsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs() .sectionId(6728.76) .call(); if (res.object().isPresent()) { // 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.errors.GetServerIdentityRequestTimeout; import dev.plexapi.sdk.models.operations.GetServerIdentityResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetServerIdentityRequestTimeout, Exception { PlexAPI sdk = PlexAPI.builder() .build(); GetServerIdentityResponse res = sdk.server().getServerIdentity() .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/all/top"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetTopWatchedContentBadRequest; import dev.plexapi.sdk.models.errors.GetTopWatchedContentUnauthorized; import dev.plexapi.sdk.models.operations.GetTopWatchedContentQueryParamType; import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetTopWatchedContentBadRequest, GetTopWatchedContentUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent() .includeGuids(1L) .type(GetTopWatchedContentQueryParamType.TvShow) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/hashes"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetFileHashBadRequest; import dev.plexapi.sdk.models.errors.GetFileHashUnauthorized; import dev.plexapi.sdk.models.operations.GetFileHashResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetFileHashBadRequest, GetFileHashUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetFileHashResponse res = sdk.library().getFileHash() .url("file://C:\Image.png&type=13") .call(); // handle response } } - target: $["paths"]["/library/metadata/{ratingKey}"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetMediaMetaDataBadRequest; import dev.plexapi.sdk.models.errors.GetMediaMetaDataUnauthorized; import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequest; import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetMediaMetaDataBadRequest, GetMediaMetaDataUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetMediaMetaDataRequest req = GetMediaMetaDataRequest.builder() .ratingKey(9518L) .includeConcerts(true) .includeExtras(true) .includeOnDeck(true) .includePopularLeaves(true) .includePreferences(true) .includeReviews(true) .includeChapters(true) .includeStations(true) .includeExternalMedia(true) .asyncAugmentMetadata(true) .asyncCheckFiles(true) .asyncRefreshAnalysis(true) .asyncRefreshLocalMediaAgent(true) .build(); GetMediaMetaDataResponse res = sdk.library().getMediaMetaData() .request(req) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/metadata/{ratingKey}/arts"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.operations.GetMediaArtsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetMediaArtsResponse res = sdk.library().getMediaArts() .ratingKey(16099L) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/metadata/{ratingKey}/arts"]["post"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.operations.PostMediaArtsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); PostMediaArtsResponse res = sdk.library().postMediaArts() .ratingKey(2268L) .url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b") .call(); // handle response } } - target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetBannerImageBadRequest; import dev.plexapi.sdk.models.errors.GetBannerImageUnauthorized; import dev.plexapi.sdk.models.operations.GetBannerImageRequest; import dev.plexapi.sdk.models.operations.GetBannerImageResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetBannerImageBadRequest, GetBannerImageUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetBannerImageRequest req = GetBannerImageRequest.builder() .ratingKey(9518L) .width(396L) .height(396L) .minSize(1L) .upscale(1L) .xPlexToken("CV5xoxjTpFKUzBTShsaf") .build(); GetBannerImageResponse res = sdk.media().getBannerImage() .request(req) .call(); if (res.responseStream().isPresent()) { // handle response } } } - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetMetadataChildrenBadRequest; import dev.plexapi.sdk.models.errors.GetMetadataChildrenUnauthorized; import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetMetadataChildrenBadRequest, GetMetadataChildrenUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetMetadataChildrenResponse res = sdk.library().getMetadataChildren() .ratingKey(1539.14) .includeElements("Stream") .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/metadata/{ratingKey}/posters"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.operations.GetMediaPostersResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetMediaPostersResponse res = sdk.library().getMediaPosters() .ratingKey(16099L) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/metadata/{ratingKey}/posters"]["post"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.operations.PostMediaPosterResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); PostMediaPosterResponse res = sdk.library().postMediaPoster() .ratingKey(2268L) .url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b") .call(); // handle response } } - target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetThumbImageBadRequest; import dev.plexapi.sdk.models.errors.GetThumbImageUnauthorized; import dev.plexapi.sdk.models.operations.GetThumbImageRequest; import dev.plexapi.sdk.models.operations.GetThumbImageResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetThumbImageBadRequest, GetThumbImageUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetThumbImageRequest req = GetThumbImageRequest.builder() .ratingKey(9518L) .width(396L) .height(396L) .minSize(1L) .upscale(1L) .xPlexToken("CV5xoxjTpFKUzBTShsaf") .build(); GetThumbImageResponse res = sdk.media().getThumbImage() .request(req) .call(); if (res.responseStream().isPresent()) { // handle response } } } - target: $["paths"]["/library/recentlyAdded"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryBadRequest; import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryUnauthorized; import dev.plexapi.sdk.models.operations.*; import java.lang.Exception; import java.util.List; public class Application { public static void main(String[] args) throws GetRecentlyAddedLibraryBadRequest, GetRecentlyAddedLibraryUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetRecentlyAddedLibraryRequest req = GetRecentlyAddedLibraryRequest.builder() .type(QueryParamType.TvShow) .contentDirectoryID(2L) .pinnedContentDirectoryID(List.of( 3L, 5L, 7L, 13L, 12L, 1L, 6L, 14L, 2L, 10L, 16L, 17L)) .sectionID(2L) .build(); GetRecentlyAddedLibraryResponse res = sdk.library().getRecentlyAddedLibrary() .request(req) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/search"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetSearchAllLibrariesBadRequest; import dev.plexapi.sdk.models.errors.GetSearchAllLibrariesUnauthorized; import dev.plexapi.sdk.models.operations.*; import java.lang.Exception; import java.util.List; public class Application { public static void main(String[] args) throws GetSearchAllLibrariesBadRequest, GetSearchAllLibrariesUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetSearchAllLibrariesRequest req = GetSearchAllLibrariesRequest.builder() .query("") .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") .searchTypes(List.of( SearchTypes.PEOPLE)) .build(); GetSearchAllLibrariesResponse res = sdk.library().getSearchAllLibraries() .request(req) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/sections"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetAllLibrariesBadRequest; import dev.plexapi.sdk.models.errors.GetAllLibrariesUnauthorized; import dev.plexapi.sdk.models.operations.GetAllLibrariesResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetAllLibrariesBadRequest, GetAllLibrariesUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetAllLibrariesResponse res = sdk.library().getAllLibraries() .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/sections/watchlist/{filter}"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetWatchListBadRequest; import dev.plexapi.sdk.models.errors.GetWatchListUnauthorized; import dev.plexapi.sdk.models.operations.*; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetWatchListBadRequest, GetWatchListUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetWatchListRequest req = GetWatchListRequest.builder() .filter(Filter.AVAILABLE) .xPlexToken("CV5xoxjTpFKUzBTShsaf") .build(); GetWatchListResponse res = sdk.watchlist().getWatchList() .request(req) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/sections/{sectionKey}"]["delete"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.DeleteLibraryBadRequest; import dev.plexapi.sdk.models.errors.DeleteLibraryUnauthorized; import dev.plexapi.sdk.models.operations.DeleteLibraryResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws DeleteLibraryBadRequest, DeleteLibraryUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); DeleteLibraryResponse res = sdk.library().deleteLibrary() .sectionKey(9518) .call(); // handle response } } - target: $["paths"]["/library/sections/{sectionKey}"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest; import dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized; import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetLibraryDetailsBadRequest, GetLibraryDetailsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetLibraryDetailsResponse res = sdk.library().getLibraryDetails() .sectionKey(9518) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/sections/{sectionKey}/actor"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetActorsLibraryBadRequest; import dev.plexapi.sdk.models.errors.GetActorsLibraryUnauthorized; import dev.plexapi.sdk.models.operations.GetActorsLibraryQueryParamType; import dev.plexapi.sdk.models.operations.GetActorsLibraryResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetActorsLibraryBadRequest, GetActorsLibraryUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetActorsLibraryResponse res = sdk.library().getActorsLibrary() .sectionKey(9518) .type(GetActorsLibraryQueryParamType.TvShow) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/sections/{sectionKey}/all"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetAllMediaLibraryBadRequest; import dev.plexapi.sdk.models.errors.GetAllMediaLibraryUnauthorized; import dev.plexapi.sdk.models.operations.*; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetAllMediaLibraryBadRequest, GetAllMediaLibraryUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetAllMediaLibraryRequest req = GetAllMediaLibraryRequest.builder() .sectionKey(9518) .type(GetAllMediaLibraryQueryParamType.TvShow) .build(); GetAllMediaLibraryResponse res = sdk.library().getAllMediaLibrary() .request(req) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/sections/{sectionKey}/country"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetCountriesLibraryBadRequest; import dev.plexapi.sdk.models.errors.GetCountriesLibraryUnauthorized; import dev.plexapi.sdk.models.operations.GetCountriesLibraryQueryParamType; import dev.plexapi.sdk.models.operations.GetCountriesLibraryResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetCountriesLibraryBadRequest, GetCountriesLibraryUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetCountriesLibraryResponse res = sdk.library().getCountriesLibrary() .sectionKey(9518) .type(GetCountriesLibraryQueryParamType.TvShow) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/sections/{sectionKey}/genre"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetGenresLibraryBadRequest; import dev.plexapi.sdk.models.errors.GetGenresLibraryUnauthorized; import dev.plexapi.sdk.models.operations.GetGenresLibraryQueryParamType; import dev.plexapi.sdk.models.operations.GetGenresLibraryResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetGenresLibraryBadRequest, GetGenresLibraryUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetGenresLibraryResponse res = sdk.library().getGenresLibrary() .sectionKey(9518) .type(GetGenresLibraryQueryParamType.TvShow) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/sections/{sectionKey}/refresh"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataBadRequest; import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataUnauthorized; import dev.plexapi.sdk.models.operations.Force; import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetRefreshLibraryMetadataBadRequest, GetRefreshLibraryMetadataUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetRefreshLibraryMetadataResponse res = sdk.library().getRefreshLibraryMetadata() .force(Force.ONE) .sectionKey(9518) .call(); // handle response } } - target: $["paths"]["/library/sections/{sectionKey}/search"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetSearchLibraryBadRequest; import dev.plexapi.sdk.models.errors.GetSearchLibraryUnauthorized; import dev.plexapi.sdk.models.operations.GetSearchLibraryQueryParamType; import dev.plexapi.sdk.models.operations.GetSearchLibraryResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetSearchLibraryBadRequest, GetSearchLibraryUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetSearchLibraryResponse res = sdk.library().getSearchLibrary() .sectionKey(9518) .type(GetSearchLibraryQueryParamType.TvShow) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/library/sections/{sectionKey}/{tag}"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetLibraryItemsBadRequest; import dev.plexapi.sdk.models.errors.GetLibraryItemsUnauthorized; import dev.plexapi.sdk.models.operations.*; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetLibraryItemsBadRequest, GetLibraryItemsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetLibraryItemsRequest req = GetLibraryItemsRequest.builder() .tag(Tag.EDITION) .type(GetLibraryItemsQueryParamType.TvShow) .sectionKey(9518) .build(); GetLibraryItemsResponse res = sdk.library().getLibraryItems() .request(req) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/log"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.LogLineBadRequest; import dev.plexapi.sdk.models.errors.LogLineUnauthorized; import dev.plexapi.sdk.models.operations.Level; import dev.plexapi.sdk.models.operations.LogLineResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws LogLineBadRequest, LogLineUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); LogLineResponse res = sdk.log().logLine() .level(Level.THREE) .message("Test log message") .source("Postman") .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.errors.LogMultiLineBadRequest; import dev.plexapi.sdk.models.errors.LogMultiLineUnauthorized; import dev.plexapi.sdk.models.operations.LogMultiLineResponse; import java.lang.Exception; import java.lang.String; public class Application { public static void main(String[] args) throws LogMultiLineBadRequest, LogMultiLineUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .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"; LogMultiLineResponse res = sdk.log().logMultiLine() .request(req) .call(); // handle response } } - target: $["paths"]["/log/networked"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.EnablePaperTrailBadRequest; import dev.plexapi.sdk.models.errors.EnablePaperTrailUnauthorized; import dev.plexapi.sdk.models.operations.EnablePaperTrailResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws EnablePaperTrailBadRequest, EnablePaperTrailUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); EnablePaperTrailResponse res = sdk.log().enablePaperTrail() .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.errors.GetMediaProvidersBadRequest; import dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized; import dev.plexapi.sdk.models.operations.GetMediaProvidersResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetMediaProvidersBadRequest, GetMediaProvidersUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetMediaProvidersResponse res = sdk.server().getMediaProviders() .xPlexToken("CV5xoxjTpFKUzBTShsaf") .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/myplex/account"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest; import dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized; import dev.plexapi.sdk.models.operations.GetMyPlexAccountResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetMyPlexAccountBadRequest, GetMyPlexAccountUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount() .call(); if (res.object().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.errors.GetResizedPhotoBadRequest; import dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized; import dev.plexapi.sdk.models.operations.*; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetResizedPhotoBadRequest, GetResizedPhotoUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetResizedPhotoRequest req = GetResizedPhotoRequest.builder() .width(110) .height(165) .opacity(100L) .blur(0) .minSize(MinSize.ONE) .upscale(Upscale.ONE) .url("/library/metadata/49564/thumb/1654258204") .build(); GetResizedPhotoResponse res = sdk.server().getResizedPhoto() .request(req) .call(); // handle response } } - target: $["paths"]["/pins"]["post"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetPinBadRequest; import dev.plexapi.sdk.models.operations.GetPinRequest; import dev.plexapi.sdk.models.operations.GetPinResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetPinBadRequest, Exception { PlexAPI sdk = PlexAPI.builder() .build(); GetPinRequest req = GetPinRequest.builder() .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") .clientName("Plex for Roku") .deviceNickname("Roku 3") .clientVersion("2.4.1") .platform("Roku") .build(); GetPinResponse res = sdk.plex().getPin() .request(req) .call(); if (res.authPinContainer().isPresent()) { // handle response } } } - target: $["paths"]["/pins/{pinID}"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetTokenByPinIdBadRequest; import dev.plexapi.sdk.models.errors.GetTokenByPinIdResponseBody; import dev.plexapi.sdk.models.operations.GetTokenByPinIdRequest; import dev.plexapi.sdk.models.operations.GetTokenByPinIdResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetTokenByPinIdBadRequest, GetTokenByPinIdResponseBody, Exception { PlexAPI sdk = PlexAPI.builder() .build(); GetTokenByPinIdRequest req = GetTokenByPinIdRequest.builder() .pinID(408895L) .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") .clientName("Plex for Roku") .deviceNickname("Roku 3") .clientVersion("2.4.1") .platform("Roku") .build(); GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId() .request(req) .call(); if (res.authPinContainer().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.errors.GetPlaylistsBadRequest; import dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized; import dev.plexapi.sdk.models.operations.GetPlaylistsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetPlaylistsBadRequest, GetPlaylistsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetPlaylistsResponse res = sdk.playlists().getPlaylists() .call(); if (res.object().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.errors.CreatePlaylistBadRequest; import dev.plexapi.sdk.models.errors.CreatePlaylistUnauthorized; import dev.plexapi.sdk.models.operations.*; import java.lang.Exception; public class Application { public static void main(String[] args) throws CreatePlaylistBadRequest, CreatePlaylistUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); CreatePlaylistRequest req = CreatePlaylistRequest.builder() .title("") .type(CreatePlaylistQueryParamType.PHOTO) .smart(Smart.ONE) .uri("https://hoarse-testing.info/") .build(); CreatePlaylistResponse res = sdk.playlists().createPlaylist() .request(req) .call(); if (res.object().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.errors.UploadPlaylistBadRequest; import dev.plexapi.sdk.models.errors.UploadPlaylistUnauthorized; import dev.plexapi.sdk.models.operations.QueryParamForce; import dev.plexapi.sdk.models.operations.UploadPlaylistResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws UploadPlaylistBadRequest, UploadPlaylistUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); UploadPlaylistResponse res = sdk.playlists().uploadPlaylist() .path("/home/barkley/playlist.m3u") .force(QueryParamForce.ZERO) .sectionID(1L) .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.errors.DeletePlaylistBadRequest; import dev.plexapi.sdk.models.errors.DeletePlaylistUnauthorized; import dev.plexapi.sdk.models.operations.DeletePlaylistResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws DeletePlaylistBadRequest, DeletePlaylistUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); DeletePlaylistResponse res = sdk.playlists().deletePlaylist() .playlistID(216.22) .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.errors.GetPlaylistBadRequest; import dev.plexapi.sdk.models.errors.GetPlaylistUnauthorized; import dev.plexapi.sdk.models.operations.GetPlaylistResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetPlaylistBadRequest, GetPlaylistUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetPlaylistResponse res = sdk.playlists().getPlaylist() .playlistID(4109.48) .call(); if (res.object().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.errors.UpdatePlaylistBadRequest; import dev.plexapi.sdk.models.errors.UpdatePlaylistUnauthorized; import dev.plexapi.sdk.models.operations.UpdatePlaylistResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws UpdatePlaylistBadRequest, UpdatePlaylistUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); UpdatePlaylistResponse res = sdk.playlists().updatePlaylist() .playlistID(3915) .call(); // 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.errors.ClearPlaylistContentsBadRequest; import dev.plexapi.sdk.models.errors.ClearPlaylistContentsUnauthorized; import dev.plexapi.sdk.models.operations.ClearPlaylistContentsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws ClearPlaylistContentsBadRequest, ClearPlaylistContentsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents() .playlistID(1893.18) .call(); // 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.errors.GetPlaylistContentsBadRequest; import dev.plexapi.sdk.models.errors.GetPlaylistContentsUnauthorized; import dev.plexapi.sdk.models.operations.GetPlaylistContentsQueryParamType; import dev.plexapi.sdk.models.operations.GetPlaylistContentsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetPlaylistContentsBadRequest, GetPlaylistContentsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents() .playlistID(5004.46) .type(GetPlaylistContentsQueryParamType.TvShow) .call(); if (res.object().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.errors.AddPlaylistContentsBadRequest; import dev.plexapi.sdk.models.errors.AddPlaylistContentsUnauthorized; import dev.plexapi.sdk.models.operations.AddPlaylistContentsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws AddPlaylistContentsBadRequest, AddPlaylistContentsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents() .playlistID(8502.01) .uri("server://12345/com.plexapp.plugins.library/library/metadata/1") .playQueueID(123) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/resources"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest; import dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized; import dev.plexapi.sdk.models.operations.GetServerResourcesResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetServerResourcesBadRequest, GetServerResourcesUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetServerResourcesResponse res = sdk.plex().getServerResources() .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") .call(); if (res.plexDevices().isPresent()) { // handle response } } } - target: $["paths"]["/search"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetSearchResultsBadRequest; import dev.plexapi.sdk.models.errors.GetSearchResultsUnauthorized; import dev.plexapi.sdk.models.operations.GetSearchResultsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetSearchResultsBadRequest, GetSearchResultsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetSearchResultsResponse res = sdk.search().getSearchResults() .query("110") .call(); if (res.object().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.errors.GetSourceConnectionInformationBadRequest; import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationUnauthorized; import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetSourceConnectionInformationBadRequest, GetSourceConnectionInformationUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation() .source("provider://provider-identifier") .call(); // handle response } } - target: $["paths"]["/security/token"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetTransientTokenBadRequest; import dev.plexapi.sdk.models.errors.GetTransientTokenUnauthorized; import dev.plexapi.sdk.models.operations.*; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetTransientTokenBadRequest, GetTransientTokenUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetTransientTokenResponse res = sdk.authentication().getTransientToken() .type(GetTransientTokenQueryParamType.DELEGATION) .scope(Scope.ALL) .call(); // handle response } } - target: $["paths"]["/servers"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetServerListBadRequest; import dev.plexapi.sdk.models.errors.GetServerListUnauthorized; import dev.plexapi.sdk.models.operations.GetServerListResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetServerListBadRequest, GetServerListUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetServerListResponse res = sdk.server().getServerList() .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/statistics/bandwidth"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsBadRequest; import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsUnauthorized; import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetBandwidthStatisticsBadRequest, GetBandwidthStatisticsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetBandwidthStatisticsResponse res = sdk.statistics().getBandwidthStatistics() .timespan(4L) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/statistics/media"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetStatisticsBadRequest; import dev.plexapi.sdk.models.errors.GetStatisticsUnauthorized; import dev.plexapi.sdk.models.operations.GetStatisticsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetStatisticsBadRequest, GetStatisticsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetStatisticsResponse res = sdk.statistics().getStatistics() .timespan(4L) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/statistics/resources"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetResourcesStatisticsBadRequest; import dev.plexapi.sdk.models.errors.GetResourcesStatisticsUnauthorized; import dev.plexapi.sdk.models.operations.GetResourcesStatisticsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetResourcesStatisticsBadRequest, GetResourcesStatisticsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetResourcesStatisticsResponse res = sdk.statistics().getResourcesStatistics() .timespan(4L) .call(); if (res.object().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.errors.GetSessionsBadRequest; import dev.plexapi.sdk.models.errors.GetSessionsUnauthorized; import dev.plexapi.sdk.models.operations.GetSessionsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetSessionsBadRequest, GetSessionsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetSessionsResponse res = sdk.sessions().getSessions() .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.errors.GetSessionHistoryBadRequest; import dev.plexapi.sdk.models.errors.GetSessionHistoryUnauthorized; import dev.plexapi.sdk.models.operations.GetSessionHistoryResponse; import dev.plexapi.sdk.models.operations.QueryParamFilter; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetSessionHistoryBadRequest, GetSessionHistoryUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetSessionHistoryResponse res = sdk.sessions().getSessionHistory() .sort("viewedAt:desc") .accountId(1L) .filter(QueryParamFilter.builder() .build()) .librarySectionID(12L) .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/transcode/sessions"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetTranscodeSessionsBadRequest; import dev.plexapi.sdk.models.errors.GetTranscodeSessionsUnauthorized; import dev.plexapi.sdk.models.operations.GetTranscodeSessionsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetTranscodeSessionsBadRequest, GetTranscodeSessionsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions() .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.StopTranscodeSessionBadRequest; import dev.plexapi.sdk.models.errors.StopTranscodeSessionUnauthorized; import dev.plexapi.sdk.models.operations.StopTranscodeSessionResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws StopTranscodeSessionBadRequest, StopTranscodeSessionUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession() .sessionKey("zz7llzqlx8w9vnrsbnwhbmep") .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.errors.ApplyUpdatesBadRequest; import dev.plexapi.sdk.models.errors.ApplyUpdatesUnauthorized; import dev.plexapi.sdk.models.operations.*; import java.lang.Exception; public class Application { public static void main(String[] args) throws ApplyUpdatesBadRequest, ApplyUpdatesUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); ApplyUpdatesResponse res = sdk.updater().applyUpdates() .tonight(Tonight.ONE) .skip(Skip.ONE) .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.errors.CheckForUpdatesBadRequest; import dev.plexapi.sdk.models.errors.CheckForUpdatesUnauthorized; import dev.plexapi.sdk.models.operations.CheckForUpdatesResponse; import dev.plexapi.sdk.models.operations.Download; import java.lang.Exception; public class Application { public static void main(String[] args) throws CheckForUpdatesBadRequest, CheckForUpdatesUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); CheckForUpdatesResponse res = sdk.updater().checkForUpdates() .download(Download.ONE) .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.errors.GetUpdateStatusBadRequest; import dev.plexapi.sdk.models.errors.GetUpdateStatusUnauthorized; import dev.plexapi.sdk.models.operations.GetUpdateStatusResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetUpdateStatusBadRequest, GetUpdateStatusUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetUpdateStatusResponse res = sdk.updater().getUpdateStatus() .call(); if (res.object().isPresent()) { // handle response } } } - target: $["paths"]["/user"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetTokenDetailsBadRequest; import dev.plexapi.sdk.models.errors.GetTokenDetailsUnauthorized; import dev.plexapi.sdk.models.operations.GetTokenDetailsResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetTokenDetailsBadRequest, GetTokenDetailsUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); GetTokenDetailsResponse res = sdk.authentication().getTokenDetails() .call(); if (res.userPlexAccount().isPresent()) { // handle response } } } - target: $["paths"]["/users"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetUsersBadRequest; import dev.plexapi.sdk.models.errors.GetUsersUnauthorized; import dev.plexapi.sdk.models.operations.GetUsersRequest; import dev.plexapi.sdk.models.operations.GetUsersResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws GetUsersBadRequest, GetUsersUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .build(); GetUsersRequest req = GetUsersRequest.builder() .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") .xPlexToken("CV5xoxjTpFKUzBTShsaf") .clientName("Plex for Roku") .deviceNickname("Roku 3") .deviceName("Chrome") .deviceScreenResolution("1487x1165,2560x1440") .clientVersion("2.4.1") .platform("Roku") .clientFeatures("external-media,indirect-media,hub-style-list") .model("4200X") .xPlexSessionId("97e136ef-4ddd-4ff3-89a7-a5820c96c2ca") .xPlexLanguage("en") .platformVersion("4.3 build 1057") .build(); GetUsersResponse res = sdk.users().getUsers() .request(req) .call(); if (res.body().isPresent()) { // handle response } } } - target: $["paths"]["/users/signin"]["post"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.PostUsersSignInDataBadRequest; import dev.plexapi.sdk.models.errors.PostUsersSignInDataUnauthorized; import dev.plexapi.sdk.models.operations.*; import java.lang.Exception; public class Application { public static void main(String[] args) throws PostUsersSignInDataBadRequest, PostUsersSignInDataUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .build(); PostUsersSignInDataRequest req = PostUsersSignInDataRequest.builder() .clientID("3381b62b-9ab7-4e37-827b-203e9809eb58") .clientName("Plex for Roku") .deviceNickname("Roku 3") .clientVersion("2.4.1") .platform("Roku") .requestBody(PostUsersSignInDataRequestBody.builder() .login("username@email.com") .password("password123") .verificationCode("123456") .build()) .build(); PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData() .request(req) .call(); if (res.userPlexAccount().isPresent()) { // handle response } } } - target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"] update: x-codeSamples: - lang: java label: PlexJava source: |- package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.StartUniversalTranscodeBadRequest; import dev.plexapi.sdk.models.errors.StartUniversalTranscodeUnauthorized; import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequest; import dev.plexapi.sdk.models.operations.StartUniversalTranscodeResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws StartUniversalTranscodeBadRequest, StartUniversalTranscodeUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") .build(); StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder() .hasMDE(1) .path("/library/metadata/23409") .mediaIndex(0) .partIndex(0) .protocol("hls") .fastSeek(0) .directPlay(0) .directStream(0) .subtitleSize(100) .subtites("burn") .audioBoost(100) .location("lan") .mediaBufferSize(102400) .session("zvcage8b7rkioqcm8f4uns4c") .addDebugOverlay(0) .autoAdjustQuality(0) .build(); StartUniversalTranscodeResponse res = sdk.video().startUniversalTranscode() .request(req) .call(); // handle response } }