mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-06 04:20:46 +00:00
* `plex-api.libraryPlaylists.addPlaylistItems()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.clearPlaylistItems()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryCollections.moveCollectionItem()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryCollections.deleteCollectionItem()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryCollections.addCollectionItems()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.content.getSonicallySimilar()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.butler.stopTask()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.butler.startTask()`: `request` **Changed** **Breaking** ⚠️ * `plex-api.content.getSonicPath()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.downloadQueue.getItemDecision()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getAllHubs()`: * `request.onlyTransient` **Changed** * `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getContinueWatching()`: `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getPromotedHubs()`: `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getMetadataHubs()`: * `request.onlyTransient` **Changed** * `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getPostplayHubs()`: * `request.onlyTransient` **Changed** * `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getRelatedHubs()`: * `request.onlyTransient` **Changed** * `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.hubs.getSectionHubs()`: * `request.onlyTransient` **Changed** * `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.content.getAllLeaves()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.content.listContent()`: * `request` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.search.searchHubs()`: `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.content.getAlbums()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getLibraryItems()`: * `request.mediaQuery` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.ingestTransientItem()`: * `request` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getLibraryMatches()`: * `request` **Changed** **Breaking** ⚠️ * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.content.getMetadataItem()`: * `request` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getSections()`: `response.mediacontainer.directory.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.addSection()`: * `request` **Changed** * `response.mediacontainer.directory.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getTags()`: * `request.type` **Changed** **Breaking** ⚠️ * `plex-api.content.getCollectionItems()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getAllItemLeaves()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.status.listSessions()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.movePlayQueueItem()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getExtras()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.deletePlayQueueItem()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.unshuffle()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.listMatches()`: * `request.manual` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.listSonicallySimilar()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.shuffle()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getRelatedItems()`: `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.listSimilar()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.resetPlayQueue()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getItemTree()`: `response.mediacontainer.metadataItem.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.clearPlayQueue()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.addToPlayQueue()`: * `request.next` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getCommon()`: * `request.mediaQuery` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getPerson()`: `response.mediacontainer.directory.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.listPersonMedia()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playQueue.getPlayQueue()`: * `request` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getLibraryDetails()`: * `request.includeDetails` **Changed** * `response.mediacontainer.directory.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.movePlaylistItem()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.autocomplete()`: * `request.mediaQuery` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.library.getCollections()`: * `request.mediaQuery` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.getPlaylistGeneratorItems()`: `response.mediacontainer.metadata` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.deletePlaylistItem()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.search.voiceSearchHubs()`: * `request.type` **Changed** **Breaking** ⚠️ * `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.libraryPlaylists.createPlaylist()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playlist.getPlaylistItems()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playlist.getPlaylist()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.playlist.listPlaylists()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.collections.createCollection()`: * `request.type` **Changed** **Breaking** ⚠️ * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.dvRs.tuneChannel()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.liveTv.getSessions()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.liveTv.getLiveTvSession()`: `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.transcoder.makeDecision()`: * `request` **Changed** * `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.getAllSubscriptions()`: * `request` **Changed** * `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.createSubscription()`: `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.getScheduledRecordings()`: `response.mediacontainer.mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.getTemplate()`: `response.mediacontainer.subscriptionTemplate.[].mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.getSubscription()`: * `request` **Changed** * `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.editSubscriptionPreferences()`: `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.subscriptions.reorderSubscription()`: `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️ * `plex-api.library.addSubtitles()`: `request` **Changed** * `plex-api.libraryPlaylists.uploadPlaylist()`: * `request.force` **Changed** * `plex-api.transcoder.transcodeSubtitles()`: `request` **Changed** * `plex-api.transcoder.startTranscodeSession()`: `request` **Changed** * `plex-api.library.getMediaPart()`: * `request.download` **Changed** * `plex-api.library.detectIntros()`: * `request.force` **Changed** * `plex-api.library.getSectionImage()`: * `request.mediaQuery` **Changed** * `plex-api.library.deleteMediaItem()`: * `request.proxy` **Changed** * `plex-api.library.refreshItemsMetadata()`: * `request.markUpdated` **Changed** * `plex-api.authentication.postUsersSignInData()`: **Added** * `plex-api.authentication.getTokenDetails()`: **Added** * `plex-api.library.detectCredits()`: `request` **Changed** * `plex-api.library.setStreamSelection()`: * `request.allParts` **Changed** * `plex-api.library.updateItems()`: * `request.field.locked` **Changed** * `plex-api.playQueue.createPlayQueue()`: `request` **Changed** * `plex-api.library.deleteLibrarySection()`: * `request.async` **Changed** * `plex-api.library.getAugmentationStatus()`: * `request.wait` **Changed** * `plex-api.transcoder.transcodeImage()`: `request` **Changed** * `plex-api.devices.modifyDevice()`: * `request.enabled` **Changed** * `plex-api.library.detectVoiceActivity()`: `request` **Changed** * `plex-api.library.getStream()`: * `request.autoAdjustSubtitle` **Changed** * `plex-api.library.startBifGeneration()`: * `request.force` **Changed** * `plex-api.library.getFirstCharacters()`: * `request.mediaQuery` **Changed** * `plex-api.ultraBlur.getImage()`: * `request.noise` **Changed** * `plex-api.library.generateThumbs()`: * `request.force` **Changed** * `plex-api.updater.applyUpdates()`: `request` **Changed** * `plex-api.updater.checkUpdates()`: * `request.download` **Changed** * `plex-api.library.deleteMetadataItem()`: * `request.proxy` **Changed** * `plex-api.library.optimizeDatabase()`: * `request.async` **Changed** * `plex-api.library.refreshSection()`: * `request.force` **Changed** * `plex-api.hubs.updateHubVisibility()`: `request` **Changed** * `plex-api.hubs.createCustomHub()`: `request` **Changed** * `plex-api.downloadQueue.addDownloadQueueItems()`: `request` **Changed** * `plex-api.timeline.report()`: `request` **Changed** * `plex-api.general.getSourceConnectionInformation()`: * `request.refresh` **Changed** * `plex-api.plex.getServerResources()`: **Added** * `plex-api.users.getUsers()`: **Added**
962 lines
40 KiB
Markdown
962 lines
40 KiB
Markdown
# Hubs
|
|
(*hubs()*)
|
|
|
|
## Overview
|
|
|
|
The hubs within a media provider
|
|
|
|
### Available Operations
|
|
|
|
* [getAllHubs](#getallhubs) - Get global hubs
|
|
* [getContinueWatching](#getcontinuewatching) - Get the continue watching hub
|
|
* [getHubItems](#gethubitems) - Get a hub's items
|
|
* [getPromotedHubs](#getpromotedhubs) - Get the hubs which are promoted
|
|
* [getMetadataHubs](#getmetadatahubs) - Get hubs for section by metadata item
|
|
* [getPostplayHubs](#getpostplayhubs) - Get postplay hubs
|
|
* [getRelatedHubs](#getrelatedhubs) - Get related hubs
|
|
* [getSectionHubs](#getsectionhubs) - Get section hubs
|
|
* [resetSectionDefaults](#resetsectiondefaults) - Reset hubs to defaults
|
|
* [listHubs](#listhubs) - Get hubs
|
|
* [createCustomHub](#createcustomhub) - Create a custom hub
|
|
* [moveHub](#movehub) - Move Hub
|
|
* [deleteCustomHub](#deletecustomhub) - Delete a custom hub
|
|
* [updateHubVisibility](#updatehubvisibility) - Change hub visibility
|
|
|
|
## getAllHubs
|
|
|
|
Get the global hubs in this PMS
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getAllHubs" method="get" path="/hubs" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetAllHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetAllHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetAllHubsRequest req = GetAllHubsRequest.builder()
|
|
.onlyTransient(BoolInt.True)
|
|
.build();
|
|
|
|
GetAllHubsResponse res = sdk.hubs().getAllHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
| `request` | [GetAllHubsRequest](../../models/operations/GetAllHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetAllHubsResponse](../../models/operations/GetAllHubsResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getContinueWatching
|
|
|
|
Get the global continue watching hub
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getContinueWatching" method="get" path="/hubs/continueWatching" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetContinueWatchingRequest;
|
|
import dev.plexapi.sdk.models.operations.GetContinueWatchingResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetContinueWatchingRequest req = GetContinueWatchingRequest.builder()
|
|
.build();
|
|
|
|
GetContinueWatchingResponse res = sdk.hubs().getContinueWatching()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
| `request` | [GetContinueWatchingRequest](../../models/operations/GetContinueWatchingRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetContinueWatchingResponse](../../models/operations/GetContinueWatchingResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getHubItems
|
|
|
|
Get the items within a single hub specified by identifier
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getHubItems" method="get" path="/hubs/items" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetHubItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetHubItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetHubItemsRequest req = GetHubItemsRequest.builder()
|
|
.identifier(List.of(
|
|
"<value 1>",
|
|
"<value 2>",
|
|
"<value 3>"))
|
|
.build();
|
|
|
|
GetHubItemsResponse res = sdk.hubs().getHubItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
| `request` | [GetHubItemsRequest](../../models/operations/GetHubItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetHubItemsResponse](../../models/operations/GetHubItemsResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getPromotedHubs
|
|
|
|
Get the global hubs which are promoted (should be displayed on the home screen)
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getPromotedHubs" method="get" path="/hubs/promoted" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetPromotedHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetPromotedHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetPromotedHubsRequest req = GetPromotedHubsRequest.builder()
|
|
.build();
|
|
|
|
GetPromotedHubsResponse res = sdk.hubs().getPromotedHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
| `request` | [GetPromotedHubsRequest](../../models/operations/GetPromotedHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetPromotedHubsResponse](../../models/operations/GetPromotedHubsResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getMetadataHubs
|
|
|
|
Get the hubs for a section by metadata item. Currently only for music sections
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getMetadataHubs" method="get" path="/hubs/metadata/{metadataId}" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetMetadataHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetMetadataHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetMetadataHubsRequest req = GetMetadataHubsRequest.builder()
|
|
.metadataId(605482L)
|
|
.onlyTransient(BoolInt.True)
|
|
.build();
|
|
|
|
GetMetadataHubsResponse res = sdk.hubs().getMetadataHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithHubs().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
| `request` | [GetMetadataHubsRequest](../../models/operations/GetMetadataHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetMetadataHubsResponse](../../models/operations/GetMetadataHubsResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getPostplayHubs
|
|
|
|
Get the hubs for a metadata to be displayed in post play
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getPostplayHubs" method="get" path="/hubs/metadata/{metadataId}/postplay" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetPostplayHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetPostplayHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetPostplayHubsRequest req = GetPostplayHubsRequest.builder()
|
|
.metadataId(441419L)
|
|
.onlyTransient(BoolInt.True)
|
|
.build();
|
|
|
|
GetPostplayHubsResponse res = sdk.hubs().getPostplayHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithHubs().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
| `request` | [GetPostplayHubsRequest](../../models/operations/GetPostplayHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetPostplayHubsResponse](../../models/operations/GetPostplayHubsResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getRelatedHubs
|
|
|
|
Get the hubs for a metadata related to the provided metadata item
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getRelatedHubs" method="get" path="/hubs/metadata/{metadataId}/related" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetRelatedHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetRelatedHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetRelatedHubsRequest req = GetRelatedHubsRequest.builder()
|
|
.metadataId(8858L)
|
|
.onlyTransient(BoolInt.True)
|
|
.build();
|
|
|
|
GetRelatedHubsResponse res = sdk.hubs().getRelatedHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithHubs().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
| `request` | [GetRelatedHubsRequest](../../models/operations/GetRelatedHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetRelatedHubsResponse](../../models/operations/GetRelatedHubsResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getSectionHubs
|
|
|
|
Get the hubs for a single section
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getSectionHubs" method="get" path="/hubs/sections/{sectionId}" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSectionHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSectionHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSectionHubsRequest req = GetSectionHubsRequest.builder()
|
|
.sectionId(336924L)
|
|
.onlyTransient(BoolInt.True)
|
|
.build();
|
|
|
|
GetSectionHubsResponse res = sdk.hubs().getSectionHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
| `request` | [GetSectionHubsRequest](../../models/operations/GetSectionHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetSectionHubsResponse](../../models/operations/GetSectionHubsResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## resetSectionDefaults
|
|
|
|
Reset hubs for this section to defaults and delete custom hubs
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="resetSectionDefaults" method="delete" path="/hubs/sections/{sectionId}/manage" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ResetSectionDefaultsRequest;
|
|
import dev.plexapi.sdk.models.operations.ResetSectionDefaultsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ResetSectionDefaultsRequest req = ResetSectionDefaultsRequest.builder()
|
|
.sectionId(383022L)
|
|
.build();
|
|
|
|
ResetSectionDefaultsResponse res = sdk.hubs().resetSectionDefaults()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
| `request` | [ResetSectionDefaultsRequest](../../models/operations/ResetSectionDefaultsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[ResetSectionDefaultsResponse](../../models/operations/ResetSectionDefaultsResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## listHubs
|
|
|
|
Get the list of hubs including both built-in and custom
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="listHubs" method="get" path="/hubs/sections/{sectionId}/manage" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListHubsRequest;
|
|
import dev.plexapi.sdk.models.operations.ListHubsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListHubsRequest req = ListHubsRequest.builder()
|
|
.sectionId(442546L)
|
|
.build();
|
|
|
|
ListHubsResponse res = sdk.hubs().listHubs()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
| `request` | [ListHubsRequest](../../models/operations/ListHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[ListHubsResponse](../../models/operations/ListHubsResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## createCustomHub
|
|
|
|
Create a custom hub based on a metadata item
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="createCustomHub" method="post" path="/hubs/sections/{sectionId}/manage" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.CreateCustomHubRequest;
|
|
import dev.plexapi.sdk.models.operations.CreateCustomHubResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
CreateCustomHubRequest req = CreateCustomHubRequest.builder()
|
|
.sectionId(869922L)
|
|
.metadataItemId(703843L)
|
|
.promotedToRecommended(BoolInt.True)
|
|
.promotedToOwnHome(BoolInt.True)
|
|
.promotedToSharedHome(BoolInt.True)
|
|
.build();
|
|
|
|
CreateCustomHubResponse res = sdk.hubs().createCustomHub()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
| `request` | [CreateCustomHubRequest](../../models/operations/CreateCustomHubRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[CreateCustomHubResponse](../../models/operations/CreateCustomHubResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## moveHub
|
|
|
|
Changed the ordering of a hub among others hubs
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="moveHub" method="put" path="/hubs/sections/{sectionId}/manage/move" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.MoveHubRequest;
|
|
import dev.plexapi.sdk.models.operations.MoveHubResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
MoveHubRequest req = MoveHubRequest.builder()
|
|
.sectionId(755710L)
|
|
.identifier("<value>")
|
|
.build();
|
|
|
|
MoveHubResponse res = sdk.hubs().moveHub()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.getResponses200().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
|
| `request` | [MoveHubRequest](../../models/operations/MoveHubRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[MoveHubResponse](../../models/operations/MoveHubResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## deleteCustomHub
|
|
|
|
Delete a custom hub from the server
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="deleteCustomHub" method="delete" path="/hubs/sections/{sectionId}/manage/{identifier}" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.DeleteCustomHubRequest;
|
|
import dev.plexapi.sdk.models.operations.DeleteCustomHubResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
DeleteCustomHubRequest req = DeleteCustomHubRequest.builder()
|
|
.sectionId(625677L)
|
|
.identifier("<value>")
|
|
.build();
|
|
|
|
DeleteCustomHubResponse res = sdk.hubs().deleteCustomHub()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
| `request` | [DeleteCustomHubRequest](../../models/operations/DeleteCustomHubRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[DeleteCustomHubResponse](../../models/operations/DeleteCustomHubResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## updateHubVisibility
|
|
|
|
Changed the visibility of a hub for both the admin and shared users
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="updateHubVisibility" method="put" path="/hubs/sections/{sectionId}/manage/{identifier}" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.UpdateHubVisibilityRequest;
|
|
import dev.plexapi.sdk.models.operations.UpdateHubVisibilityResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
UpdateHubVisibilityRequest req = UpdateHubVisibilityRequest.builder()
|
|
.sectionId(341650L)
|
|
.identifier("<value>")
|
|
.promotedToRecommended(BoolInt.True)
|
|
.promotedToOwnHome(BoolInt.True)
|
|
.promotedToSharedHome(BoolInt.True)
|
|
.build();
|
|
|
|
UpdateHubVisibilityResponse res = sdk.hubs().updateHubVisibility()
|
|
.request(req)
|
|
.call();
|
|
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
| `request` | [UpdateHubVisibilityRequest](../../models/operations/UpdateHubVisibilityRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[UpdateHubVisibilityResponse](../../models/operations/UpdateHubVisibilityResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* | |