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**
902 lines
37 KiB
Markdown
902 lines
37 KiB
Markdown
# Content
|
|
(*content()*)
|
|
|
|
## Overview
|
|
|
|
The actual content of the media provider
|
|
|
|
### Available Operations
|
|
|
|
* [getCollectionItems](#getcollectionitems) - Get items in a collection
|
|
* [getMetadataItem](#getmetadataitem) - Get a metadata item
|
|
* [getAlbums](#getalbums) - Set section albums
|
|
* [listContent](#listcontent) - Get items in the section
|
|
* [getAllLeaves](#getallleaves) - Set section leaves
|
|
* [getArts](#getarts) - Set section artwork
|
|
* [getCategories](#getcategories) - Set section categories
|
|
* [getCluster](#getcluster) - Set section clusters
|
|
* [getSonicPath](#getsonicpath) - Similar tracks to transition from one to another
|
|
* [getFolders](#getfolders) - Get all folder locations
|
|
* [listMoments](#listmoments) - Set section moments
|
|
* [getSonicallySimilar](#getsonicallysimilar) - The nearest audio tracks
|
|
* [getCollectionImage](#getcollectionimage) - Get a collection's image
|
|
|
|
## getCollectionItems
|
|
|
|
Get items in a collection. Note if this collection contains more than 100 items, paging must be used.
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getCollectionItems" method="get" path="/library/collections/{collectionId}/items" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetCollectionItemsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetCollectionItemsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetCollectionItemsRequest req = GetCollectionItemsRequest.builder()
|
|
.collectionId(314585L)
|
|
.build();
|
|
|
|
GetCollectionItemsResponse res = sdk.content().getCollectionItems()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
| `request` | [GetCollectionItemsRequest](../../models/operations/GetCollectionItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetCollectionItemsResponse](../../models/operations/GetCollectionItemsResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getMetadataItem
|
|
|
|
Get one or more metadata items.
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getMetadataItem" method="get" path="/library/metadata/{ids}" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetMetadataItemRequest;
|
|
import dev.plexapi.sdk.models.operations.GetMetadataItemResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import dev.plexapi.sdk.models.shared.BoolInt;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetMetadataItemRequest req = GetMetadataItemRequest.builder()
|
|
.ids(List.of())
|
|
.asyncCheckFiles(BoolInt.True)
|
|
.asyncRefreshLocalMediaAgent(BoolInt.True)
|
|
.asyncRefreshAnalysis(BoolInt.True)
|
|
.checkFiles(BoolInt.True)
|
|
.skipRefresh(BoolInt.True)
|
|
.checkFileAvailability(BoolInt.True)
|
|
.asyncAugmentMetadata(BoolInt.True)
|
|
.augmentCount(BoolInt.True)
|
|
.build();
|
|
|
|
GetMetadataItemResponse res = sdk.content().getMetadataItem()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
| `request` | [GetMetadataItemRequest](../../models/operations/GetMetadataItemRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetMetadataItemResponse](../../models/operations/GetMetadataItemResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getAlbums
|
|
|
|
Get all albums in a music section
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getAlbums" method="get" path="/library/sections/{sectionId}/albums" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetAlbumsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetAlbumsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetAlbumsRequest req = GetAlbumsRequest.builder()
|
|
.sectionId(817133L)
|
|
.build();
|
|
|
|
GetAlbumsResponse res = sdk.content().getAlbums()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
|
| `request` | [GetAlbumsRequest](../../models/operations/GetAlbumsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetAlbumsResponse](../../models/operations/GetAlbumsResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## listContent
|
|
|
|
Get the items in a section, potentially filtering them
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="listContent" method="get" path="/library/sections/{sectionId}/all" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListContentRequest;
|
|
import dev.plexapi.sdk.models.operations.ListContentResponse;
|
|
import dev.plexapi.sdk.models.shared.*;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListContentRequest req = ListContentRequest.builder()
|
|
.sectionId("<id>")
|
|
.mediaQuery(MediaQuery.builder()
|
|
.type(MediaType.Episode)
|
|
.sourceType(2L)
|
|
.sort("duration:desc,index")
|
|
.build())
|
|
.includeMeta(BoolInt.True)
|
|
.includeGuids(BoolInt.True)
|
|
.build();
|
|
|
|
ListContentResponse res = sdk.content().listContent()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
| `request` | [ListContentRequest](../../models/operations/ListContentRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[ListContentResponse](../../models/operations/ListContentResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getAllLeaves
|
|
|
|
Get all leaves in a section (such as episodes in a show section)
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getAllLeaves" method="get" path="/library/sections/{sectionId}/allLeaves" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetAllLeavesRequest;
|
|
import dev.plexapi.sdk.models.operations.GetAllLeavesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetAllLeavesRequest req = GetAllLeavesRequest.builder()
|
|
.sectionId(633197L)
|
|
.build();
|
|
|
|
GetAllLeavesResponse res = sdk.content().getAllLeaves()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
| `request` | [GetAllLeavesRequest](../../models/operations/GetAllLeavesRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetAllLeavesResponse](../../models/operations/GetAllLeavesResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getArts
|
|
|
|
Get artwork for a library section
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getArts" method="get" path="/library/sections/{sectionId}/arts" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetArtsRequest;
|
|
import dev.plexapi.sdk.models.operations.GetArtsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetArtsRequest req = GetArtsRequest.builder()
|
|
.sectionId(859200L)
|
|
.build();
|
|
|
|
GetArtsResponse res = sdk.content().getArts()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithArtwork().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
|
| `request` | [GetArtsRequest](../../models/operations/GetArtsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetArtsResponse](../../models/operations/GetArtsResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getCategories
|
|
|
|
Get categories in a library section
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getCategories" method="get" path="/library/sections/{sectionId}/categories" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetCategoriesRequest;
|
|
import dev.plexapi.sdk.models.operations.GetCategoriesResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetCategoriesRequest req = GetCategoriesRequest.builder()
|
|
.sectionId(21841L)
|
|
.build();
|
|
|
|
GetCategoriesResponse res = sdk.content().getCategories()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithArtwork().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
| `request` | [GetCategoriesRequest](../../models/operations/GetCategoriesRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetCategoriesResponse](../../models/operations/GetCategoriesResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getCluster
|
|
|
|
Get clusters in a library section (typically for photos)
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getCluster" method="get" path="/library/sections/{sectionId}/cluster" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetClusterRequest;
|
|
import dev.plexapi.sdk.models.operations.GetClusterResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetClusterRequest req = GetClusterRequest.builder()
|
|
.sectionId(138560L)
|
|
.build();
|
|
|
|
GetClusterResponse res = sdk.content().getCluster()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithArtwork().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
| `request` | [GetClusterRequest](../../models/operations/GetClusterRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetClusterResponse](../../models/operations/GetClusterResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getSonicPath
|
|
|
|
Get a list of audio tracks starting at one and ending at another which are similar across the path
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getSonicPath" method="get" path="/library/sections/{sectionId}/computePath" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSonicPathRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSonicPathResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSonicPathRequest req = GetSonicPathRequest.builder()
|
|
.sectionId(914549L)
|
|
.startID(629990L)
|
|
.endID(687740L)
|
|
.build();
|
|
|
|
GetSonicPathResponse res = sdk.content().getSonicPath()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
| `request` | [GetSonicPathRequest](../../models/operations/GetSonicPathRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetSonicPathResponse](../../models/operations/GetSonicPathResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getFolders
|
|
|
|
Get all folder locations of the media in a section
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getFolders" method="get" path="/library/sections/{sectionId}/location" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetFoldersRequest;
|
|
import dev.plexapi.sdk.models.operations.GetFoldersResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetFoldersRequest req = GetFoldersRequest.builder()
|
|
.sectionId(892532L)
|
|
.build();
|
|
|
|
GetFoldersResponse res = sdk.content().getFolders()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.object().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
| `request` | [GetFoldersRequest](../../models/operations/GetFoldersRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetFoldersResponse](../../models/operations/GetFoldersResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## listMoments
|
|
|
|
Get moments in a library section (typically for photos)
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="listMoments" method="get" path="/library/sections/{sectionId}/moment" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.ListMomentsRequest;
|
|
import dev.plexapi.sdk.models.operations.ListMomentsResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
ListMomentsRequest req = ListMomentsRequest.builder()
|
|
.sectionId(403239L)
|
|
.build();
|
|
|
|
ListMomentsResponse res = sdk.content().listMoments()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithArtwork().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
| `request` | [ListMomentsRequest](../../models/operations/ListMomentsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[ListMomentsResponse](../../models/operations/ListMomentsResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getSonicallySimilar
|
|
|
|
Get the nearest audio tracks to a particular analysis
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getSonicallySimilar" method="get" path="/library/sections/{sectionId}/nearest" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetSonicallySimilarRequest;
|
|
import dev.plexapi.sdk.models.operations.GetSonicallySimilarResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
import java.util.List;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetSonicallySimilarRequest req = GetSonicallySimilarRequest.builder()
|
|
.sectionId(525956L)
|
|
.values(List.of())
|
|
.build();
|
|
|
|
GetSonicallySimilarResponse res = sdk.content().getSonicallySimilar()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.mediaContainerWithMetadata().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
| `request` | [GetSonicallySimilarRequest](../../models/operations/GetSonicallySimilarRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetSonicallySimilarResponse](../../models/operations/GetSonicallySimilarResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## getCollectionImage
|
|
|
|
Get an image for the collection based on the items within
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="java" operationID="getCollectionImage" method="get" path="/library/collections/{collectionId}/composite/{updatedAt}" -->
|
|
```java
|
|
package hello.world;
|
|
|
|
import dev.plexapi.sdk.PlexAPI;
|
|
import dev.plexapi.sdk.models.operations.GetCollectionImageRequest;
|
|
import dev.plexapi.sdk.models.operations.GetCollectionImageResponse;
|
|
import dev.plexapi.sdk.models.shared.Accepts;
|
|
import java.lang.Exception;
|
|
|
|
public class Application {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
PlexAPI sdk = PlexAPI.builder()
|
|
.accepts(Accepts.APPLICATION_XML)
|
|
.clientIdentifier("abc123")
|
|
.product("Plex for Roku")
|
|
.version("2.4.1")
|
|
.platform("Roku")
|
|
.platformVersion("4.3 build 1057")
|
|
.device("Roku 3")
|
|
.model("4200X")
|
|
.deviceVendor("Roku")
|
|
.deviceName("Living Room TV")
|
|
.marketplace("googlePlay")
|
|
.token(System.getenv().getOrDefault("TOKEN", ""))
|
|
.build();
|
|
|
|
GetCollectionImageRequest req = GetCollectionImageRequest.builder()
|
|
.collectionId(474227L)
|
|
.updatedAt(759379L)
|
|
.build();
|
|
|
|
GetCollectionImageResponse res = sdk.content().getCollectionImage()
|
|
.request(req)
|
|
.call();
|
|
|
|
if (res.responseStream().isPresent()) {
|
|
// handle response
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
| `request` | [GetCollectionImageRequest](../../models/operations/GetCollectionImageRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
|
|
### Response
|
|
|
|
**[GetCollectionImageResponse](../../models/operations/GetCollectionImageResponse.md)**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ---------------------- | ---------------------- | ---------------------- |
|
|
| models/errors/SDKError | 4XX, 5XX | \*/\* | |