mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
* `PlexApi.LibraryPlaylists.AddPlaylistItems()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetMetadataHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].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.Request` **Changed** **Breaking** ⚠️ * `PlexApi.Butler.StartTask()`: `request.Request` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetSonicPath()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.DownloadQueue.GetItemDecision()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetAllHubs()`: * `request.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.Content.GetAllLeaves()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetPostplayHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetRelatedHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetSectionHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Content.ListContent()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetAlbums()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Search.SearchHubs()`: `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Search.VoiceSearchHubs()`: * `request.Request.Type` **Changed** **Breaking** ⚠️ * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetLibraryItems()`: * `request.Request.MediaQuery` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.IngestTransientItem()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetLibraryMatches()`: * `request.Request` **Changed** **Breaking** ⚠️ * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetMetadataItem()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetSections()`: `response.MediaContainer.Directory.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.AddSection()`: * `request.Request` **Changed** * `response.MediaContainer.Directory.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetTags()`: * `request.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.Request.Manual` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.ListSonicallySimilar()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.ResetPlayQueue()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetRelatedItems()`: `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.ListSimilar()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.ClearPlayQueue()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetItemTree()`: `response.MediaContainer.MetadataItem.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.AddToPlayQueue()`: * `request.Request.Next` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.GetPlayQueue()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.MovePlaylistItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetPerson()`: `response.MediaContainer.Directory.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.ListPersonMedia()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.GetPlaylistGeneratorItems()`: `response.MediaContainer.Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetLibraryDetails()`: * `request.Request.IncludeDetails` **Changed** * `response.MediaContainer.Directory.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.ModifyPlaylistGenerator()`: * `request.Request.Item` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.Autocomplete()`: * `request.Request.MediaQuery` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetCollections()`: * `request.Request.MediaQuery` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetCommon()`: * `request.Request.MediaQuery` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.DeletePlaylistItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.ClearPlaylistItems()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.Shuffle()`: `response.MediaContainer.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.Collections.CreateCollection()`: * `request.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.Playlist.ListPlaylists()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.GetAllSubscriptions()`: * `request.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.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.Transcoder.MakeDecision()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.RefreshItemsMetadata()`: * `request.Request.MarkUpdated` **Changed** * `PlexApi.Authentication.Post-Users-Sign-In-Data()`: **Added** * `PlexApi.Transcoder.StartTranscodeSession()`: `request.Request` **Changed** * `PlexApi.Devices.ModifyDevice()`: * `request.Request.Enabled` **Changed** * `PlexApi.Library.GetMediaPart()`: * `request.Request.Download` **Changed** * `PlexApi.Library.DetectIntros()`: * `request.Request.Force` **Changed** * `PlexApi.Library.RefreshSection()`: * `request.Request.Force` **Changed** * `PlexApi.LibraryPlaylists.UploadPlaylist()`: * `request.Request.Force` **Changed** * `PlexApi.Library.DeleteMediaItem()`: * `request.Request.Proxy` **Changed** * `PlexApi.Authentication.GetTokenDetails()`: **Added** * `PlexApi.Library.GetFirstCharacters()`: * `request.Request.MediaQuery` **Changed** * `PlexApi.Library.UpdateItems()`: * `request.Request.Field.locked` **Changed** * `PlexApi.Library.DeleteLibrarySection()`: * `request.Request.Async` **Changed** * `PlexApi.Library.SetStreamSelection()`: * `request.Request.AllParts` **Changed** * `PlexApi.PlayQueue.CreatePlayQueue()`: `request.Request` **Changed** * `PlexApi.Library.GetAugmentationStatus()`: * `request.Request.Wait` **Changed** * `PlexApi.Library.DetectVoiceActivity()`: `request.Request` **Changed** * `PlexApi.Transcoder.TranscodeImage()`: `request.Request` **Changed** * `PlexApi.Transcoder.TranscodeSubtitles()`: `request.Request` **Changed** * `PlexApi.Library.AddSubtitles()`: `request.Request` **Changed** * `PlexApi.Library.GetStream()`: * `request.Request.AutoAdjustSubtitle` **Changed** * `PlexApi.Library.StartBifGeneration()`: * `request.Request.Force` **Changed** * `PlexApi.Library.DetectCredits()`: `request.Request` **Changed** * `PlexApi.UltraBlur.GetImage()`: * `request.Request.Noise` **Changed** * `PlexApi.Library.GenerateThumbs()`: * `request.Request.Force` **Changed** * `PlexApi.Updater.ApplyUpdates()`: `request.Request` **Changed** * `PlexApi.Updater.CheckUpdates()`: * `request.Request.Download` **Changed** * `PlexApi.Library.DeleteMetadataItem()`: * `request.Request.Proxy` **Changed** * `PlexApi.Library.OptimizeDatabase()`: * `request.Request.Async` **Changed** * `PlexApi.Hubs.UpdateHubVisibility()`: `request.Request` **Changed** * `PlexApi.Hubs.CreateCustomHub()`: `request.Request` **Changed** * `PlexApi.Library.GetSectionImage()`: * `request.Request.MediaQuery` **Changed** * `PlexApi.DownloadQueue.AddDownloadQueueItems()`: `request.Request` **Changed** * `PlexApi.Timeline.Report()`: `request.Request` **Changed** * `PlexApi.General.GetSourceConnectionInformation()`: * `request.Request.Refresh` **Changed** * `PlexApi.Plex.Get-Server-Resources()`: **Added** * `PlexApi.Users.Get-Users()`: **Added**
961 lines
47 KiB
Markdown
961 lines
47 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="go" operationID="getAllHubs" method="get" path="/hubs" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.GetAllHubs(ctx, operations.GetAllHubsRequest{
|
|
OnlyTransient: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.GetAllHubsRequest](../../models/operations/getallhubsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.GetAllHubsResponse](../../models/operations/getallhubsresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## GetContinueWatching
|
|
|
|
Get the global continue watching hub
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="go" operationID="getContinueWatching" method="get" path="/hubs/continueWatching" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.GetContinueWatching(ctx, operations.GetContinueWatchingRequest{})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.GetContinueWatchingRequest](../../models/operations/getcontinuewatchingrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.GetContinueWatchingResponse](../../models/operations/getcontinuewatchingresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## GetHubItems
|
|
|
|
Get the items within a single hub specified by identifier
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="go" operationID="getHubItems" method="get" path="/hubs/items" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.GetHubItems(ctx, operations.GetHubItemsRequest{
|
|
Identifier: []string{
|
|
"<value 1>",
|
|
"<value 2>",
|
|
"<value 3>",
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.GetHubItemsRequest](../../models/operations/gethubitemsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.GetHubItemsResponse](../../models/operations/gethubitemsresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## GetPromotedHubs
|
|
|
|
Get the global hubs which are promoted (should be displayed on the home screen)
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="go" operationID="getPromotedHubs" method="get" path="/hubs/promoted" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.GetPromotedHubs(ctx, operations.GetPromotedHubsRequest{})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.GetPromotedHubsRequest](../../models/operations/getpromotedhubsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.GetPromotedHubsResponse](../../models/operations/getpromotedhubsresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## GetMetadataHubs
|
|
|
|
Get the hubs for a section by metadata item. Currently only for music sections
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="go" operationID="getMetadataHubs" method="get" path="/hubs/metadata/{metadataId}" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.GetMetadataHubs(ctx, operations.GetMetadataHubsRequest{
|
|
MetadataID: 605482,
|
|
OnlyTransient: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithHubs != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.GetMetadataHubsRequest](../../models/operations/getmetadatahubsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.GetMetadataHubsResponse](../../models/operations/getmetadatahubsresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## GetPostplayHubs
|
|
|
|
Get the hubs for a metadata to be displayed in post play
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="go" operationID="getPostplayHubs" method="get" path="/hubs/metadata/{metadataId}/postplay" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.GetPostplayHubs(ctx, operations.GetPostplayHubsRequest{
|
|
MetadataID: 441419,
|
|
OnlyTransient: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithHubs != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.GetPostplayHubsRequest](../../models/operations/getpostplayhubsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.GetPostplayHubsResponse](../../models/operations/getpostplayhubsresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## GetRelatedHubs
|
|
|
|
Get the hubs for a metadata related to the provided metadata item
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="go" operationID="getRelatedHubs" method="get" path="/hubs/metadata/{metadataId}/related" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.GetRelatedHubs(ctx, operations.GetRelatedHubsRequest{
|
|
MetadataID: 8858,
|
|
OnlyTransient: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithHubs != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.GetRelatedHubsRequest](../../models/operations/getrelatedhubsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.GetRelatedHubsResponse](../../models/operations/getrelatedhubsresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## GetSectionHubs
|
|
|
|
Get the hubs for a single section
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="go" operationID="getSectionHubs" method="get" path="/hubs/sections/{sectionId}" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.GetSectionHubs(ctx, operations.GetSectionHubsRequest{
|
|
SectionID: 336924,
|
|
OnlyTransient: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.GetSectionHubsRequest](../../models/operations/getsectionhubsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.GetSectionHubsResponse](../../models/operations/getsectionhubsresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## ResetSectionDefaults
|
|
|
|
Reset hubs for this section to defaults and delete custom hubs
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="go" operationID="resetSectionDefaults" method="delete" path="/hubs/sections/{sectionId}/manage" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.ResetSectionDefaults(ctx, operations.ResetSectionDefaultsRequest{
|
|
SectionID: 383022,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.ResetSectionDefaultsRequest](../../models/operations/resetsectiondefaultsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.ResetSectionDefaultsResponse](../../models/operations/resetsectiondefaultsresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## ListHubs
|
|
|
|
Get the list of hubs including both built-in and custom
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="go" operationID="listHubs" method="get" path="/hubs/sections/{sectionId}/manage" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.ListHubs(ctx, operations.ListHubsRequest{
|
|
SectionID: 442546,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.ListHubsRequest](../../models/operations/listhubsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.ListHubsResponse](../../models/operations/listhubsresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## CreateCustomHub
|
|
|
|
Create a custom hub based on a metadata item
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="go" operationID="createCustomHub" method="post" path="/hubs/sections/{sectionId}/manage" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.CreateCustomHub(ctx, operations.CreateCustomHubRequest{
|
|
SectionID: 869922,
|
|
MetadataItemID: 703843,
|
|
PromotedToRecommended: components.BoolIntTrue.ToPointer(),
|
|
PromotedToOwnHome: components.BoolIntTrue.ToPointer(),
|
|
PromotedToSharedHome: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.CreateCustomHubRequest](../../models/operations/createcustomhubrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.CreateCustomHubResponse](../../models/operations/createcustomhubresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## MoveHub
|
|
|
|
Changed the ordering of a hub among others hubs
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="go" operationID="moveHub" method="put" path="/hubs/sections/{sectionId}/manage/move" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.MoveHub(ctx, operations.MoveHubRequest{
|
|
SectionID: 755710,
|
|
Identifier: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.GetResponses200 != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.MoveHubRequest](../../models/operations/movehubrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.MoveHubResponse](../../models/operations/movehubresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## DeleteCustomHub
|
|
|
|
Delete a custom hub from the server
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="go" operationID="deleteCustomHub" method="delete" path="/hubs/sections/{sectionId}/manage/{identifier}" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.DeleteCustomHub(ctx, operations.DeleteCustomHubRequest{
|
|
SectionID: 625677,
|
|
Identifier: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.DeleteCustomHubRequest](../../models/operations/deletecustomhubrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.DeleteCustomHubResponse](../../models/operations/deletecustomhubresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
|
|
|
## UpdateHubVisibility
|
|
|
|
Changed the visibility of a hub for both the admin and shared users
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="go" operationID="updateHubVisibility" method="put" path="/hubs/sections/{sectionId}/manage/{identifier}" -->
|
|
```go
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"github.com/LukeHagar/plexgo"
|
|
"github.com/LukeHagar/plexgo/models/operations"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
|
plexgo.WithClientIdentifier("abc123"),
|
|
plexgo.WithProduct("Plex for Roku"),
|
|
plexgo.WithVersion("2.4.1"),
|
|
plexgo.WithPlatform("Roku"),
|
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
|
plexgo.WithDevice("Roku 3"),
|
|
plexgo.WithModel("4200X"),
|
|
plexgo.WithDeviceVendor("Roku"),
|
|
plexgo.WithDeviceName("Living Room TV"),
|
|
plexgo.WithMarketplace("googlePlay"),
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Hubs.UpdateHubVisibility(ctx, operations.UpdateHubVisibilityRequest{
|
|
SectionID: 341650,
|
|
Identifier: "<value>",
|
|
PromotedToRecommended: components.BoolIntTrue.ToPointer(),
|
|
PromotedToOwnHome: components.BoolIntTrue.ToPointer(),
|
|
PromotedToSharedHome: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
|
| `request` | [operations.UpdateHubVisibilityRequest](../../models/operations/updatehubvisibilityrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
|
|
|
### Response
|
|
|
|
**[*operations.UpdateHubVisibilityResponse](../../models/operations/updatehubvisibilityresponse.md), error**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| ------------------ | ------------------ | ------------------ |
|
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* | |