Files
plexcsharp/docs/sdks/hubs/README.md
speakeasybot c0836c3b34 ## Csharp SDK Changes:
* `PlexApi.LibraryPlaylists.AddPlaylistItems()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.LibraryPlaylists.ClearPlaylistItems()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.LibraryCollections.MoveCollectionItem()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.LibraryCollections.DeleteCollectionItem()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.LibraryCollections.AddCollectionItems()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Content.GetSonicallySimilar()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Butler.StopTask()`:  `request` **Changed** **Breaking** ⚠️
* `PlexApi.Butler.StartTask()`:  `request` **Changed** **Breaking** ⚠️
* `PlexApi.Content.GetSonicPath()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.DownloadQueue.GetItemDecision()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Hubs.GetAllHubs()`: 
  *  `request.OnlyTransient` **Changed**
  *  `response.mediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Hubs.GetContinueWatching()`:  `response.mediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Hubs.GetPromotedHubs()`:  `response.mediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Hubs.GetMetadataHubs()`: 
  *  `request.OnlyTransient` **Changed**
  *  `response.mediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Hubs.GetPostplayHubs()`: 
  *  `request.OnlyTransient` **Changed**
  *  `response.mediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Hubs.GetRelatedHubs()`: 
  *  `request.OnlyTransient` **Changed**
  *  `response.mediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Hubs.GetSectionHubs()`: 
  *  `request.OnlyTransient` **Changed**
  *  `response.mediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Content.GetAllLeaves()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Content.ListContent()`: 
  *  `request` **Changed**
  *  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Search.SearchHubs()`:  `response.mediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Content.GetAlbums()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.GetLibraryItems()`: 
  *  `request.MediaQuery` **Changed**
  *  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.IngestTransientItem()`: 
  *  `request` **Changed**
  *  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.GetLibraryMatches()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Content.GetMetadataItem()`: 
  *  `request` **Changed**
  *  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.GetSections()`:  `response.mediaContainer.Directory.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.AddSection()`: 
  *  `request` **Changed**
  *  `response.mediaContainer.Directory.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.GetTags()`: 
  *  `request.Type` **Changed** **Breaking** ⚠️
* `PlexApi.Content.GetCollectionItems()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.GetAllItemLeaves()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Status.ListSessions()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.PlayQueue.MovePlayQueueItem()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.GetExtras()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.PlayQueue.DeletePlayQueueItem()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.PlayQueue.Unshuffle()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.ListMatches()`: 
  *  `request.Manual` **Changed**
  *  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.ListSonicallySimilar()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.PlayQueue.Shuffle()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.GetRelatedItems()`:  `response.mediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.ListSimilar()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.PlayQueue.ResetPlayQueue()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.GetItemTree()`:  `response.mediaContainer.MetadataItem.[]` **Changed** **Breaking** ⚠️
* `PlexApi.PlayQueue.ClearPlayQueue()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.PlayQueue.AddToPlayQueue()`: 
  *  `request.Next` **Changed**
  *  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.GetCommon()`: 
  *  `request.MediaQuery` **Changed**
  *  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.GetPerson()`:  `response.mediaContainer.Directory.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.ListPersonMedia()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.PlayQueue.GetPlayQueue()`: 
  *  `request` **Changed**
  *  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.GetLibraryDetails()`: 
  *  `request.IncludeDetails` **Changed**
  *  `response.mediaContainer.Directory.[]` **Changed** **Breaking** ⚠️
* `PlexApi.LibraryPlaylists.MovePlaylistItem()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.Autocomplete()`: 
  *  `request.MediaQuery` **Changed**
  *  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Library.GetCollections()`: 
  *  `request.MediaQuery` **Changed**
  *  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.LibraryPlaylists.GetPlaylistGeneratorItems()`:  `response.mediaContainer.Metadata` **Changed** **Breaking** ⚠️
* `PlexApi.LibraryPlaylists.DeletePlaylistItem()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Search.VoiceSearchHubs()`: 
  *  `request.Type` **Changed** **Breaking** ⚠️
  *  `response.mediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.LibraryPlaylists.CreatePlaylist()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Playlist.GetPlaylistItems()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Playlist.GetPlaylist()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Playlist.ListPlaylists()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Collections.CreateCollection()`: 
  *  `request.Type` **Changed** **Breaking** ⚠️
  *  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.DvRs.TuneChannel()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.LiveTv.GetSessions()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.LiveTv.GetLiveTvSession()`:  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Transcoder.MakeDecision()`: 
  *  `request` **Changed**
  *  `response.mediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️
* `PlexApi.Subscriptions.GetAllSubscriptions()`: 
  *  `request` **Changed**
  *  `response.mediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️
* `PlexApi.Subscriptions.CreateSubscription()`:  `response.mediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️
* `PlexApi.Subscriptions.GetScheduledRecordings()`:  `response.mediaContainer.MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️
* `PlexApi.Subscriptions.GetTemplate()`:  `response.mediaContainer.SubscriptionTemplate.[].MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️
* `PlexApi.Subscriptions.GetSubscription()`: 
  *  `request` **Changed**
  *  `response.mediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️
* `PlexApi.Subscriptions.EditSubscriptionPreferences()`:  `response.mediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️
* `PlexApi.Subscriptions.ReorderSubscription()`:  `response.mediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️
* `PlexApi.Library.AddSubtitles()`:  `request` **Changed**
* `PlexApi.LibraryPlaylists.UploadPlaylist()`: 
  *  `request.Force` **Changed**
* `PlexApi.Transcoder.TranscodeSubtitles()`:  `request` **Changed**
* `PlexApi.Transcoder.StartTranscodeSession()`:  `request` **Changed**
* `PlexApi.Library.GetMediaPart()`: 
  *  `request.Download` **Changed**
* `PlexApi.Library.DetectIntros()`: 
  *  `request.Force` **Changed**
* `PlexApi.Library.GetSectionImage()`: 
  *  `request.MediaQuery` **Changed**
* `PlexApi.Library.DeleteMediaItem()`: 
  *  `request.Proxy` **Changed**
* `PlexApi.Library.RefreshItemsMetadata()`: 
  *  `request.MarkUpdated` **Changed**
* `PlexApi.Authentication.Post-Users-Sign-In-Data()`: **Added**
* `PlexApi.Authentication.GetTokenDetails()`: **Added**
* `PlexApi.Library.DetectCredits()`:  `request` **Changed**
* `PlexApi.Library.SetStreamSelection()`: 
  *  `request.AllParts` **Changed**
* `PlexApi.Library.UpdateItems()`: 
  *  `request.Field.locked` **Changed**
* `PlexApi.PlayQueue.CreatePlayQueue()`:  `request` **Changed**
* `PlexApi.Library.DeleteLibrarySection()`: 
  *  `request.Async` **Changed**
* `PlexApi.Library.GetAugmentationStatus()`: 
  *  `request.Wait` **Changed**
* `PlexApi.Transcoder.TranscodeImage()`:  `request` **Changed**
* `PlexApi.Devices.ModifyDevice()`: 
  *  `request.Enabled` **Changed**
* `PlexApi.Library.DetectVoiceActivity()`:  `request` **Changed**
* `PlexApi.Library.GetStream()`: 
  *  `request.AutoAdjustSubtitle` **Changed**
* `PlexApi.Library.StartBifGeneration()`: 
  *  `request.Force` **Changed**
* `PlexApi.Library.GetFirstCharacters()`: 
  *  `request.MediaQuery` **Changed**
* `PlexApi.UltraBlur.GetImage()`: 
  *  `request.Noise` **Changed**
* `PlexApi.Library.GenerateThumbs()`: 
  *  `request.Force` **Changed**
* `PlexApi.Updater.ApplyUpdates()`:  `request` **Changed**
* `PlexApi.Updater.CheckUpdates()`: 
  *  `request.Download` **Changed**
* `PlexApi.Library.DeleteMetadataItem()`: 
  *  `request.Proxy` **Changed**
* `PlexApi.Library.OptimizeDatabase()`: 
  *  `request.Async` **Changed**
* `PlexApi.Library.RefreshSection()`: 
  *  `request.Force` **Changed**
* `PlexApi.Hubs.UpdateHubVisibility()`:  `request` **Changed**
* `PlexApi.Hubs.CreateCustomHub()`:  `request` **Changed**
* `PlexApi.DownloadQueue.AddDownloadQueueItems()`:  `request` **Changed**
* `PlexApi.Timeline.Report()`:  `request` **Changed**
* `PlexApi.General.GetSourceConnectionInformation()`: 
  *  `request.Refresh` **Changed**
* `PlexApi.Plex.Get-Server-Resources()`: **Added**
* `PlexApi.Users.Get-Users()`: **Added**
2025-12-01 00:32:52 +00:00

766 lines
34 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="csharp" operationID="getAllHubs" method="get" path="/hubs" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
GetAllHubsRequest req = new GetAllHubsRequest() {
OnlyTransient = BoolInt.True,
};
var res = await sdk.Hubs.GetAllHubsAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
| `request` | [GetAllHubsRequest](../../Models/Requests/GetAllHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[GetAllHubsResponse](../../Models/Requests/GetAllHubsResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
## GetContinueWatching
Get the global continue watching hub
### Example Usage
<!-- UsageSnippet language="csharp" operationID="getContinueWatching" method="get" path="/hubs/continueWatching" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
GetContinueWatchingRequest req = new GetContinueWatchingRequest() {};
var res = await sdk.Hubs.GetContinueWatchingAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `request` | [GetContinueWatchingRequest](../../Models/Requests/GetContinueWatchingRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[GetContinueWatchingResponse](../../Models/Requests/GetContinueWatchingResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
## GetHubItems
Get the items within a single hub specified by identifier
### Example Usage
<!-- UsageSnippet language="csharp" operationID="getHubItems" method="get" path="/hubs/items" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using System.Collections.Generic;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
GetHubItemsRequest req = new GetHubItemsRequest() {
Identifier = new List<string>() {
"<value 1>",
"<value 2>",
"<value 3>",
},
};
var res = await sdk.Hubs.GetHubItemsAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
| `request` | [GetHubItemsRequest](../../Models/Requests/GetHubItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[GetHubItemsResponse](../../Models/Requests/GetHubItemsResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
## GetPromotedHubs
Get the global hubs which are promoted (should be displayed on the home screen)
### Example Usage
<!-- UsageSnippet language="csharp" operationID="getPromotedHubs" method="get" path="/hubs/promoted" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
GetPromotedHubsRequest req = new GetPromotedHubsRequest() {};
var res = await sdk.Hubs.GetPromotedHubsAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `request` | [GetPromotedHubsRequest](../../Models/Requests/GetPromotedHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[GetPromotedHubsResponse](../../Models/Requests/GetPromotedHubsResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
## GetMetadataHubs
Get the hubs for a section by metadata item. Currently only for music sections
### Example Usage
<!-- UsageSnippet language="csharp" operationID="getMetadataHubs" method="get" path="/hubs/metadata/{metadataId}" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
GetMetadataHubsRequest req = new GetMetadataHubsRequest() {
MetadataId = 605482,
OnlyTransient = BoolInt.True,
};
var res = await sdk.Hubs.GetMetadataHubsAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `request` | [GetMetadataHubsRequest](../../Models/Requests/GetMetadataHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[GetMetadataHubsResponse](../../Models/Requests/GetMetadataHubsResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
## GetPostplayHubs
Get the hubs for a metadata to be displayed in post play
### Example Usage
<!-- UsageSnippet language="csharp" operationID="getPostplayHubs" method="get" path="/hubs/metadata/{metadataId}/postplay" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
GetPostplayHubsRequest req = new GetPostplayHubsRequest() {
MetadataId = 441419,
OnlyTransient = BoolInt.True,
};
var res = await sdk.Hubs.GetPostplayHubsAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `request` | [GetPostplayHubsRequest](../../Models/Requests/GetPostplayHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[GetPostplayHubsResponse](../../Models/Requests/GetPostplayHubsResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
## GetRelatedHubs
Get the hubs for a metadata related to the provided metadata item
### Example Usage
<!-- UsageSnippet language="csharp" operationID="getRelatedHubs" method="get" path="/hubs/metadata/{metadataId}/related" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
GetRelatedHubsRequest req = new GetRelatedHubsRequest() {
MetadataId = 8858,
OnlyTransient = BoolInt.True,
};
var res = await sdk.Hubs.GetRelatedHubsAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `request` | [GetRelatedHubsRequest](../../Models/Requests/GetRelatedHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[GetRelatedHubsResponse](../../Models/Requests/GetRelatedHubsResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
## GetSectionHubs
Get the hubs for a single section
### Example Usage
<!-- UsageSnippet language="csharp" operationID="getSectionHubs" method="get" path="/hubs/sections/{sectionId}" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
GetSectionHubsRequest req = new GetSectionHubsRequest() {
SectionId = 336924,
OnlyTransient = BoolInt.True,
};
var res = await sdk.Hubs.GetSectionHubsAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `request` | [GetSectionHubsRequest](../../Models/Requests/GetSectionHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[GetSectionHubsResponse](../../Models/Requests/GetSectionHubsResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
## ResetSectionDefaults
Reset hubs for this section to defaults and delete custom hubs
### Example Usage
<!-- UsageSnippet language="csharp" operationID="resetSectionDefaults" method="delete" path="/hubs/sections/{sectionId}/manage" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
ResetSectionDefaultsRequest req = new ResetSectionDefaultsRequest() {
SectionId = 383022,
};
var res = await sdk.Hubs.ResetSectionDefaultsAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `request` | [ResetSectionDefaultsRequest](../../Models/Requests/ResetSectionDefaultsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[ResetSectionDefaultsResponse](../../Models/Requests/ResetSectionDefaultsResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
## ListHubs
Get the list of hubs including both built-in and custom
### Example Usage
<!-- UsageSnippet language="csharp" operationID="listHubs" method="get" path="/hubs/sections/{sectionId}/manage" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
ListHubsRequest req = new ListHubsRequest() {
SectionId = 442546,
};
var res = await sdk.Hubs.ListHubsAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
| `request` | [ListHubsRequest](../../Models/Requests/ListHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[ListHubsResponse](../../Models/Requests/ListHubsResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
## CreateCustomHub
Create a custom hub based on a metadata item
### Example Usage
<!-- UsageSnippet language="csharp" operationID="createCustomHub" method="post" path="/hubs/sections/{sectionId}/manage" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
CreateCustomHubRequest req = new CreateCustomHubRequest() {
SectionId = 869922,
MetadataItemId = 703843,
PromotedToRecommended = BoolInt.True,
PromotedToOwnHome = BoolInt.True,
PromotedToSharedHome = BoolInt.True,
};
var res = await sdk.Hubs.CreateCustomHubAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `request` | [CreateCustomHubRequest](../../Models/Requests/CreateCustomHubRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[CreateCustomHubResponse](../../Models/Requests/CreateCustomHubResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
## MoveHub
Changed the ordering of a hub among others hubs
### Example Usage
<!-- UsageSnippet language="csharp" operationID="moveHub" method="put" path="/hubs/sections/{sectionId}/manage/move" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
MoveHubRequest req = new MoveHubRequest() {
SectionId = 755710,
Identifier = "<value>",
};
var res = await sdk.Hubs.MoveHubAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
| `request` | [MoveHubRequest](../../Models/Requests/MoveHubRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[MoveHubResponse](../../Models/Requests/MoveHubResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
## DeleteCustomHub
Delete a custom hub from the server
### Example Usage
<!-- UsageSnippet language="csharp" operationID="deleteCustomHub" method="delete" path="/hubs/sections/{sectionId}/manage/{identifier}" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
DeleteCustomHubRequest req = new DeleteCustomHubRequest() {
SectionId = 625677,
Identifier = "<value>",
};
var res = await sdk.Hubs.DeleteCustomHubAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `request` | [DeleteCustomHubRequest](../../Models/Requests/DeleteCustomHubRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[DeleteCustomHubResponse](../../Models/Requests/DeleteCustomHubResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
## UpdateHubVisibility
Changed the visibility of a hub for both the admin and shared users
### Example Usage
<!-- UsageSnippet language="csharp" operationID="updateHubVisibility" method="put" path="/hubs/sections/{sectionId}/manage/{identifier}" -->
```csharp
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
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: "<YOUR_API_KEY_HERE>"
);
UpdateHubVisibilityRequest req = new UpdateHubVisibilityRequest() {
SectionId = 341650,
Identifier = "<value>",
PromotedToRecommended = BoolInt.True,
PromotedToOwnHome = BoolInt.True,
PromotedToSharedHome = BoolInt.True,
};
var res = await sdk.Hubs.UpdateHubVisibilityAsync(req);
// handle response
```
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `request` | [UpdateHubVisibilityRequest](../../Models/Requests/UpdateHubVisibilityRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[UpdateHubVisibilityResponse](../../Models/Requests/UpdateHubVisibilityResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |