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**
10675 lines
378 KiB
YAML
10675 lines
378 KiB
YAML
overlay: 1.0.0
|
|
info:
|
|
title: CodeSamples overlay for go target
|
|
version: 0.0.0
|
|
actions:
|
|
- target: $["paths"]["/"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.General.GetServerInfo(ctx, operations.GetServerInfoRequest{})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithDirectory != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/eventsource/notifications"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Events.GetNotifications(ctx, operations.GetNotificationsRequest{})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.ResponseStream != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/prefs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Preferences.GetAllPreferences(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithSettings != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Preferences.SetPreferences(ctx, operations.SetPreferencesRequest{
|
|
Prefs: operations.Prefs{},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/prefs/get"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Preferences.GetPreference(ctx, operations.GetPreferenceRequest{})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithSettings != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/rate"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Rate.SetRating(ctx, operations.SetRatingRequest{
|
|
Identifier: "<value>",
|
|
Key: "<key>",
|
|
Rating: 8722.46,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/scrobble"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Timeline.MarkPlayed(ctx, operations.MarkPlayedRequest{
|
|
Identifier: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/timeline"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Timeline.Report(ctx, operations.ReportRequest{
|
|
Key: plexgo.Pointer("/foo"),
|
|
RatingKey: plexgo.Pointer("xyz"),
|
|
State: operations.StatePlaying.ToPointer(),
|
|
PlayQueueItemID: plexgo.Pointer("123"),
|
|
Time: plexgo.Pointer[int64](0),
|
|
Duration: plexgo.Pointer[int64](10000),
|
|
Continuing: components.BoolIntTrue.ToPointer(),
|
|
Updated: plexgo.Pointer[int64](14200000),
|
|
Offline: components.BoolIntTrue.ToPointer(),
|
|
TimeToFirstFrame: plexgo.Pointer[int64](1000),
|
|
TimeStalled: plexgo.Pointer[int64](1000),
|
|
Bandwidth: plexgo.Pointer[int64](100),
|
|
BufferedTime: plexgo.Pointer[int64](100),
|
|
BufferedSize: plexgo.Pointer[int64](1024),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/unscrobble"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Timeline.Unscrobble(ctx, operations.UnscrobbleRequest{
|
|
Identifier: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/:/websocket/notifications"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Events.ConnectWebSocket(ctx, operations.ConnectWebSocketRequest{})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.ResponseStream != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/activities"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Activities.ListActivities(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/activities/{activityId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Activities.CancelActivity(ctx, operations.CancelActivityRequest{
|
|
ActivityID: "d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/butler"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Butler.StopTasks(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/butler"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Butler.GetTasks(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/butler"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Butler.StartTasks(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/butler/{butlerTask}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Butler.StopTask(ctx, operations.StopTaskRequest{
|
|
ButlerTask: operations.ButlerTaskCleanOldBundles,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/butler/{butlerTask}"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Butler.StartTask(ctx, operations.StartTaskRequest{
|
|
ButlerTask: operations.PathParamButlerTaskRefreshLocalMedia,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.DownloadQueue.CreateDownloadQueue(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DownloadQueue.GetDownloadQueue(ctx, operations.GetDownloadQueueRequest{
|
|
QueueID: 922802,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/add"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DownloadQueue.AddDownloadQueueItems(ctx, operations.AddDownloadQueueItemsRequest{
|
|
QueueID: 984925,
|
|
Keys: []string{
|
|
"/library/metadata/3",
|
|
"/library/metadata/6",
|
|
},
|
|
AdvancedSubtitles: components.AdvancedSubtitlesBurn.ToPointer(),
|
|
AudioBoost: plexgo.Pointer[int64](50),
|
|
AudioChannelCount: plexgo.Pointer[int64](5),
|
|
AutoAdjustQuality: components.BoolIntTrue.ToPointer(),
|
|
AutoAdjustSubtitle: components.BoolIntTrue.ToPointer(),
|
|
DirectPlay: components.BoolIntTrue.ToPointer(),
|
|
DirectStream: components.BoolIntTrue.ToPointer(),
|
|
DirectStreamAudio: components.BoolIntTrue.ToPointer(),
|
|
DisableResolutionRotation: components.BoolIntTrue.ToPointer(),
|
|
HasMDE: components.BoolIntTrue.ToPointer(),
|
|
Location: components.LocationWan.ToPointer(),
|
|
MediaBufferSize: plexgo.Pointer[int64](102400),
|
|
MediaIndex: plexgo.Pointer[int64](0),
|
|
MusicBitrate: plexgo.Pointer[int64](5000),
|
|
Offset: plexgo.Pointer[float64](90.5),
|
|
PartIndex: plexgo.Pointer[int64](0),
|
|
Path: plexgo.Pointer("/library/metadata/151671"),
|
|
PeakBitrate: plexgo.Pointer[int64](12000),
|
|
PhotoResolution: plexgo.Pointer("1080x1080"),
|
|
Protocol: components.ProtocolDash.ToPointer(),
|
|
SecondsPerSegment: plexgo.Pointer[int64](5),
|
|
SubtitleSize: plexgo.Pointer[int64](50),
|
|
VideoBitrate: plexgo.Pointer[int64](12000),
|
|
VideoQuality: plexgo.Pointer[int64](50),
|
|
VideoResolution: plexgo.Pointer("1080x1080"),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/item/{itemId}/decision"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DownloadQueue.GetItemDecision(ctx, operations.GetItemDecisionRequest{
|
|
QueueID: 231605,
|
|
ItemID: 32,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithDecision != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/item/{itemId}/media"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DownloadQueue.GetDownloadQueueMedia(ctx, operations.GetDownloadQueueMediaRequest{
|
|
QueueID: 663184,
|
|
ItemID: 32,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DownloadQueue.ListDownloadQueueItems(ctx, operations.ListDownloadQueueItemsRequest{
|
|
QueueID: 524138,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DownloadQueue.RemoveDownloadQueueItems(ctx, operations.RemoveDownloadQueueItemsRequest{
|
|
QueueID: 946275,
|
|
ItemID: []int64{
|
|
32,
|
|
345,
|
|
23,
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DownloadQueue.GetDownloadQueueItems(ctx, operations.GetDownloadQueueItemsRequest{
|
|
QueueID: 809886,
|
|
ItemID: []int64{
|
|
32,
|
|
345,
|
|
23,
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}/restart"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DownloadQueue.RestartProcessingDownloadQueueItems(ctx, operations.RestartProcessingDownloadQueueItemsRequest{
|
|
QueueID: 713001,
|
|
ItemID: []int64{
|
|
32,
|
|
345,
|
|
23,
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/continueWatching"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/metadata/{metadataId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/metadata/{metadataId}/postplay"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/metadata/{metadataId}/related"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/promoted"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/search"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Search.SearchHubs(ctx, operations.SearchHubsRequest{
|
|
Query: "<value>",
|
|
SectionID: plexgo.Pointer[int64](1),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/search/voice"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Search.VoiceSearchHubs(ctx, operations.VoiceSearchHubsRequest{
|
|
Query: "<value>",
|
|
Type: components.MediaTypeTvShow.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage/{identifier}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/hubs/sections/{sectionId}/manage/{identifier}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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
|
|
}
|
|
}
|
|
- target: $["paths"]["/identity"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New()
|
|
|
|
res, err := s.General.GetIdentity(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetLibraryItems(ctx, operations.GetLibraryItemsRequest{
|
|
MediaQuery: &components.MediaQuery{
|
|
Type: components.MediaTypeEpisode.ToPointer(),
|
|
SourceType: plexgo.Pointer[int64](2),
|
|
Sort: plexgo.Pointer("duration:desc,index"),
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/caches"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Library.DeleteCaches(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/clean/bundles"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Library.CleanBundles(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/collections"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Collections.CreateCollection(ctx, operations.CreateCollectionRequest{
|
|
SectionID: "<id>",
|
|
Type: components.MediaTypeTvShow.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/collections/{collectionId}/composite/{updatedAt}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Content.GetCollectionImage(ctx, operations.GetCollectionImageRequest{
|
|
CollectionID: 474227,
|
|
UpdatedAt: 759379,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.ResponseStream != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/collections/{collectionId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Content.GetCollectionItems(ctx, operations.GetCollectionItemsRequest{
|
|
CollectionID: 314585,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/collections/{collectionId}/items"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryCollections.AddCollectionItems(ctx, operations.AddCollectionItemsRequest{
|
|
CollectionID: 338144,
|
|
URI: "https://expensive-bakeware.com",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/collections/{collectionId}/items/{itemId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryCollections.DeleteCollectionItem(ctx, operations.DeleteCollectionItemRequest{
|
|
CollectionID: 320928,
|
|
ItemID: 406983,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/collections/{collectionId}/items/{itemId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryCollections.MoveCollectionItem(ctx, operations.MoveCollectionItemRequest{
|
|
CollectionID: 239532,
|
|
ItemID: 513864,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/file"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.IngestTransientItem(ctx, operations.IngestTransientItemRequest{
|
|
URL: plexgo.Pointer("file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv"),
|
|
VirtualFilePath: plexgo.Pointer("/Avatar.mkv"),
|
|
ComputeHashes: components.BoolIntTrue.ToPointer(),
|
|
IngestNonMatches: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/matches"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetLibraryMatches(ctx, operations.GetLibraryMatchesRequest{
|
|
Type: components.MediaTypeTvShow.ToPointer(),
|
|
IncludeFullMetadata: components.BoolIntTrue.ToPointer(),
|
|
IncludeAncestorMetadata: components.BoolIntTrue.ToPointer(),
|
|
IncludeAlternateMetadataSources: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/media/{mediaId}/chapterImages/{chapter}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetChapterImage(ctx, operations.GetChapterImageRequest{
|
|
MediaID: 892563,
|
|
Chapter: 48348,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.ResponseStream != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/augmentations/{augmentationId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetAugmentationStatus(ctx, operations.GetAugmentationStatusRequest{
|
|
AugmentationID: "<id>",
|
|
Wait: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.DeleteMetadataItem(ctx, operations.DeleteMetadataItemRequest{
|
|
Ids: "<value>",
|
|
Proxy: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Content.GetMetadataItem(ctx, operations.GetMetadataItemRequest{
|
|
Ids: []string{},
|
|
AsyncCheckFiles: components.BoolIntTrue.ToPointer(),
|
|
AsyncRefreshLocalMediaAgent: components.BoolIntTrue.ToPointer(),
|
|
AsyncRefreshAnalysis: components.BoolIntTrue.ToPointer(),
|
|
CheckFiles: components.BoolIntTrue.ToPointer(),
|
|
SkipRefresh: components.BoolIntTrue.ToPointer(),
|
|
CheckFileAvailability: components.BoolIntTrue.ToPointer(),
|
|
AsyncAugmentMetadata: components.BoolIntTrue.ToPointer(),
|
|
AugmentCount: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.EditMetadataItem(ctx, operations.EditMetadataItemRequest{
|
|
Ids: []string{
|
|
"<value 1>",
|
|
"<value 2>",
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/addetect"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.DetectAds(ctx, operations.DetectAdsRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/allLeaves"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetAllItemLeaves(ctx, operations.GetAllItemLeavesRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/analyze"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.AnalyzeMetadata(ctx, operations.AnalyzeMetadataRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/chapterThumbs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GenerateThumbs(ctx, operations.GenerateThumbsRequest{
|
|
Ids: "<value>",
|
|
Force: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/credits"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.DetectCredits(ctx, operations.DetectCreditsRequest{
|
|
Ids: "<value>",
|
|
Force: components.BoolIntTrue.ToPointer(),
|
|
Manual: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/extras"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetExtras(ctx, operations.GetExtrasRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/extras"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.AddExtras(ctx, operations.AddExtrasRequest{
|
|
Ids: "<value>",
|
|
URL: "https://super-mortise.biz/",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/file"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetFile(ctx, operations.GetFileRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.TwoHundredAudioMpeg3ResponseStream != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/index"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.StartBifGeneration(ctx, operations.StartBifGenerationRequest{
|
|
Ids: "<value>",
|
|
Force: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/intro"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.DetectIntros(ctx, operations.DetectIntrosRequest{
|
|
Ids: "<value>",
|
|
Force: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/marker"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.CreateMarker(ctx, operations.CreateMarkerRequest{
|
|
Ids: "<value>",
|
|
Type: 248391,
|
|
StartTimeOffset: 535191,
|
|
Attributes: &operations.Attributes{},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/marker/{marker}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.DeleteMarker(ctx, operations.DeleteMarkerRequest{
|
|
Ids: "<value>",
|
|
Marker: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/marker/{marker}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.EditMarker(ctx, operations.EditMarkerRequest{
|
|
Ids: "<value>",
|
|
Marker: "<value>",
|
|
Type: 884347,
|
|
StartTimeOffset: 517251,
|
|
Attributes: &operations.QueryParamAttributes{},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.PostResponses200 != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/match"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.MatchItem(ctx, operations.MatchItemRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/matches"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.ListMatches(ctx, operations.ListMatchesRequest{
|
|
Ids: "<value>",
|
|
Manual: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/media/{mediaItem}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.DeleteMediaItem(ctx, operations.DeleteMediaItemRequest{
|
|
Ids: "<value>",
|
|
MediaItem: "<value>",
|
|
Proxy: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/merge"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.MergeItems(ctx, operations.MergeItemsRequest{
|
|
IdsPathParameter: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/nearest"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.ListSonicallySimilar(ctx, operations.ListSonicallySimilarRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.SetItemPreferences(ctx, operations.SetItemPreferencesRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/refresh"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.RefreshItemsMetadata(ctx, operations.RefreshItemsMetadataRequest{
|
|
Ids: "<value>",
|
|
MarkUpdated: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/related"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetRelatedItems(ctx, operations.GetRelatedItemsRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/similar"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.ListSimilar(ctx, operations.ListSimilarRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/split"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.SplitItem(ctx, operations.SplitItemRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/subtitles"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.AddSubtitles(ctx, operations.AddSubtitlesRequest{
|
|
Ids: "<value>",
|
|
Forced: components.BoolIntTrue.ToPointer(),
|
|
HearingImpaired: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/tree"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetItemTree(ctx, operations.GetItemTreeRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithNestedMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/unmatch"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.Unmatch(ctx, operations.UnmatchRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/users/top"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.ListTopUsers(ctx, operations.ListTopUsersRequest{
|
|
Ids: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/voiceActivity"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.DetectVoiceActivity(ctx, operations.DetectVoiceActivityRequest{
|
|
Ids: "<value>",
|
|
Force: components.BoolIntTrue.ToPointer(),
|
|
Manual: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/{element}"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.SetItemArtwork(ctx, operations.SetItemArtworkRequest{
|
|
Ids: "<value>",
|
|
Element: operations.ElementBanner,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/{element}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.UpdateItemArtwork(ctx, operations.UpdateItemArtworkRequest{
|
|
Ids: "<value>",
|
|
Element: operations.PathParamElementClearLogo,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/metadata/{ids}/{element}/{timestamp}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetItemArtwork(ctx, operations.GetItemArtworkRequest{
|
|
Ids: "<value>",
|
|
Element: operations.GetItemArtworkPathParamElementPoster,
|
|
Timestamp: 999555,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.TwoHundredAudioMpeg3ResponseStream != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/optimize"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.OptimizeDatabase(ctx, operations.OptimizeDatabaseRequest{
|
|
Async: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/parts/{partId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.SetStreamSelection(ctx, operations.SetStreamSelectionRequest{
|
|
PartID: 360489,
|
|
AllParts: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/parts/{partId}/indexes/{index}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetPartIndex(ctx, operations.GetPartIndexRequest{
|
|
PartID: 724750,
|
|
Index: operations.IndexSd,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.ResponseStream != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/parts/{partId}/indexes/{index}/{offset}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetImageFromBif(ctx, operations.GetImageFromBifRequest{
|
|
PartID: 304273,
|
|
Index: operations.PathParamIndexSd,
|
|
Offset: 939569,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.ResponseStream != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/parts/{partId}/{changestamp}/{filename}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetMediaPart(ctx, operations.GetMediaPartRequest{
|
|
PartID: 877105,
|
|
Changestamp: 970622,
|
|
Filename: "example.file",
|
|
Download: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/people/{personId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetPerson(ctx, operations.GetPersonRequest{
|
|
PersonID: "<id>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/people/{personId}/media"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.ListPersonMedia(ctx, operations.ListPersonMediaRequest{
|
|
PersonID: "<id>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/randomArtwork"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetRandomArtwork(ctx, operations.GetRandomArtworkRequest{
|
|
Sections: []int64{
|
|
5,
|
|
6,
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithArtwork != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Library.GetSections(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/all"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.AddSection(ctx, operations.AddSectionRequest{
|
|
Name: "<value>",
|
|
Type: 39544,
|
|
Agent: "<value>",
|
|
Language: "<value>",
|
|
Locations: []string{
|
|
"O:\fatboy\\Media\\Ripped\\Music",
|
|
"O:\fatboy\\Media\\My Music",
|
|
},
|
|
Prefs: &operations.QueryParamPrefs{},
|
|
Relative: components.BoolIntTrue.ToPointer(),
|
|
ImportFromiTunes: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.SlashGetResponses200 != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/all/refresh"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Library.StopAllRefreshes(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.LibrarySections != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/prefs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetSectionsPrefs(ctx, operations.GetSectionsPrefsRequest{
|
|
Type: 460221,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.LibrarySections != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/refresh"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.RefreshSectionsMetadata(ctx, operations.RefreshSectionsMetadataRequest{})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.DeleteLibrarySection(ctx, operations.DeleteLibrarySectionRequest{
|
|
SectionID: "<id>",
|
|
Async: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetLibraryDetails(ctx, operations.GetLibraryDetailsRequest{
|
|
SectionID: "<id>",
|
|
IncludeDetails: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.EditSection(ctx, operations.EditSectionRequest{
|
|
SectionID: "<id>",
|
|
Agent: "<value>",
|
|
Locations: []string{
|
|
"O:\fatboy\\Media\\Ripped\\Music",
|
|
"O:\fatboy\\Media\\My Music",
|
|
},
|
|
Prefs: &operations.EditSectionQueryParamPrefs{},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/albums"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Content.GetAlbums(ctx, operations.GetAlbumsRequest{
|
|
SectionID: 817133,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Content.ListContent(ctx, operations.ListContentRequest{
|
|
MediaQuery: &components.MediaQuery{
|
|
Type: components.MediaTypeEpisode.ToPointer(),
|
|
SourceType: plexgo.Pointer[int64](2),
|
|
Sort: plexgo.Pointer("duration:desc,index"),
|
|
},
|
|
IncludeMeta: components.BoolIntTrue.ToPointer(),
|
|
IncludeGuids: components.BoolIntTrue.ToPointer(),
|
|
SectionID: "<id>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/all"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.UpdateItems(ctx, operations.UpdateItemsRequest{
|
|
SectionID: "<id>",
|
|
FieldLocked: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/allLeaves"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Content.GetAllLeaves(ctx, operations.GetAllLeavesRequest{
|
|
SectionID: 633197,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/analyze"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.StartAnalysis(ctx, operations.StartAnalysisRequest{
|
|
SectionID: 158829,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/arts"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Content.GetArts(ctx, operations.GetArtsRequest{
|
|
SectionID: 859200,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithArtwork != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/autocomplete"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.Autocomplete(ctx, operations.AutocompleteRequest{
|
|
SectionID: 942007,
|
|
MediaQuery: &components.MediaQuery{
|
|
Type: components.MediaTypeEpisode.ToPointer(),
|
|
SourceType: plexgo.Pointer[int64](2),
|
|
Sort: plexgo.Pointer("duration:desc,index"),
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/categories"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Content.GetCategories(ctx, operations.GetCategoriesRequest{
|
|
SectionID: 21841,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithArtwork != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/cluster"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Content.GetCluster(ctx, operations.GetClusterRequest{
|
|
SectionID: 138560,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithArtwork != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/collection/{collectionId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.DeleteCollection(ctx, operations.DeleteCollectionRequest{
|
|
SectionID: 283619,
|
|
CollectionID: 680895,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/collections"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetCollections(ctx, operations.GetCollectionsRequest{
|
|
SectionID: 348838,
|
|
MediaQuery: &components.MediaQuery{
|
|
Type: components.MediaTypeEpisode.ToPointer(),
|
|
SourceType: plexgo.Pointer[int64](2),
|
|
Sort: plexgo.Pointer("duration:desc,index"),
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/common"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetCommon(ctx, operations.GetCommonRequest{
|
|
SectionID: 298154,
|
|
MediaQuery: &components.MediaQuery{
|
|
Type: components.MediaTypeEpisode.ToPointer(),
|
|
SourceType: plexgo.Pointer[int64](2),
|
|
Sort: plexgo.Pointer("duration:desc,index"),
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/composite/{updatedAt}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetSectionImage(ctx, operations.GetSectionImageRequest{
|
|
SectionID: 925611,
|
|
UpdatedAt: 117413,
|
|
MediaQuery: &components.MediaQuery{
|
|
Type: components.MediaTypeEpisode.ToPointer(),
|
|
SourceType: plexgo.Pointer[int64](2),
|
|
Sort: plexgo.Pointer("duration:desc,index"),
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/computePath"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Content.GetSonicPath(ctx, operations.GetSonicPathRequest{
|
|
SectionID: 914549,
|
|
StartID: 629990,
|
|
EndID: 687740,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/emptyTrash"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.EmptyTrash(ctx, operations.EmptyTrashRequest{
|
|
SectionID: 30052,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/filters"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetSectionFilters(ctx, operations.GetSectionFiltersRequest{
|
|
SectionID: 380557,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/firstCharacters"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetFirstCharacters(ctx, operations.GetFirstCharactersRequest{
|
|
SectionID: 3947,
|
|
MediaQuery: &components.MediaQuery{
|
|
Type: components.MediaTypeEpisode.ToPointer(),
|
|
SourceType: plexgo.Pointer[int64](2),
|
|
Sort: plexgo.Pointer("duration:desc,index"),
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/indexes"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.DeleteIndexes(ctx, operations.DeleteIndexesRequest{
|
|
SectionID: 588437,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/intros"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.DeleteIntros(ctx, operations.DeleteIntrosRequest{
|
|
SectionID: 498656,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/location"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Content.GetFolders(ctx, operations.GetFoldersRequest{
|
|
SectionID: 892532,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/moment"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Content.ListMoments(ctx, operations.ListMomentsRequest{
|
|
SectionID: 403239,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithArtwork != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/nearest"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Content.GetSonicallySimilar(ctx, operations.GetSonicallySimilarRequest{
|
|
SectionID: 525956,
|
|
Values: []int64{},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/prefs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetSectionPreferences(ctx, operations.GetSectionPreferencesRequest{
|
|
SectionID: 754869,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithSettings != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.SetSectionPreferences(ctx, operations.SetSectionPreferencesRequest{
|
|
SectionID: 349936,
|
|
Prefs: operations.SetSectionPreferencesQueryParamPrefs{},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/refresh"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.CancelRefresh(ctx, operations.CancelRefreshRequest{
|
|
SectionID: 326852,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/refresh"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.RefreshSection(ctx, operations.RefreshSectionRequest{
|
|
SectionID: 450300,
|
|
Force: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/sections/{sectionId}/sorts"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetAvailableSorts(ctx, operations.GetAvailableSortsRequest{
|
|
SectionID: 212498,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/streams/{streamId}.{ext}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.DeleteStream(ctx, operations.DeleteStreamRequest{
|
|
StreamID: 841510,
|
|
Ext: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/streams/{streamId}.{ext}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetStream(ctx, operations.GetStreamRequest{
|
|
StreamID: 314506,
|
|
Ext: "<value>",
|
|
AutoAdjustSubtitle: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/streams/{streamId}.{ext}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.SetStreamOffset(ctx, operations.SetStreamOffsetRequest{
|
|
StreamID: 606295,
|
|
Ext: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/streams/{streamId}/levels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetStreamLevels(ctx, operations.GetStreamLevelsRequest{
|
|
StreamID: 447611,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/streams/{streamId}/loudness"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetStreamLoudness(ctx, operations.GetStreamLoudnessRequest{
|
|
StreamID: 277271,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/library/tags"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Library.GetTags(ctx, operations.GetTagsRequest{
|
|
Type: components.MediaTypeTvShow.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.DVRs.ListDVRs(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DVRs.CreateDVR(ctx, operations.CreateDVRRequest{
|
|
Lineup: plexgo.Pointer("lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT"),
|
|
DeviceQueryParameter: []string{
|
|
"d",
|
|
"e",
|
|
"v",
|
|
"i",
|
|
"c",
|
|
"e",
|
|
"[",
|
|
"]",
|
|
"=",
|
|
"d",
|
|
"e",
|
|
"v",
|
|
"i",
|
|
"c",
|
|
"e",
|
|
":",
|
|
"/",
|
|
"/",
|
|
"t",
|
|
"v",
|
|
".",
|
|
"p",
|
|
"l",
|
|
"e",
|
|
"x",
|
|
".",
|
|
"g",
|
|
"r",
|
|
"a",
|
|
"b",
|
|
"b",
|
|
"e",
|
|
"r",
|
|
"s",
|
|
".",
|
|
"h",
|
|
"d",
|
|
"h",
|
|
"o",
|
|
"m",
|
|
"e",
|
|
"r",
|
|
"u",
|
|
"n",
|
|
"/",
|
|
"1",
|
|
"0",
|
|
"5",
|
|
"3",
|
|
"C",
|
|
"0",
|
|
"C",
|
|
"A",
|
|
},
|
|
Language: plexgo.Pointer("eng"),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.DvrRequestHandlerSlashGetResponses200 != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DVRs.DeleteDVR(ctx, operations.DeleteDVRRequest{
|
|
DvrID: 855088,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DVRs.GetDVR(ctx, operations.GetDVRRequest{
|
|
DvrID: 973518,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/channels/{channel}/tune"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DVRs.TuneChannel(ctx, operations.TuneChannelRequest{
|
|
DvrID: 834281,
|
|
Channel: "2.1",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/devices/{deviceId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DVRs.RemoveDeviceFromDVR(ctx, operations.RemoveDeviceFromDVRRequest{
|
|
DvrID: 945416,
|
|
DeviceID: 260761,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/devices/{deviceId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DVRs.AddDeviceToDVR(ctx, operations.AddDeviceToDVRRequest{
|
|
DvrID: 334755,
|
|
DeviceID: 852930,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/lineups"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DVRs.DeleteLineup(ctx, operations.DeleteLineupRequest{
|
|
DvrID: 454470,
|
|
Lineup: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/lineups"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DVRs.AddLineup(ctx, operations.AddLineupRequest{
|
|
DvrID: 945235,
|
|
Lineup: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DVRs.SetDVRPreferences(ctx, operations.SetDVRPreferencesRequest{
|
|
DvrID: 116357,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/reloadGuide"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DVRs.StopDVRReload(ctx, operations.StopDVRReloadRequest{
|
|
DvrID: 348053,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/dvrs/{dvrId}/reloadGuide"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.DVRs.ReloadGuide(ctx, operations.ReloadGuideRequest{
|
|
DvrID: 140753,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/channelmap"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Epg.ComputeChannelMap(ctx, operations.ComputeChannelMapRequest{
|
|
DeviceQueryParameter: "<value>",
|
|
Lineup: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/channels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Epg.GetChannels(ctx, operations.GetChannelsRequest{
|
|
Lineup: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/countries"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Epg.GetCountries(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/lineups"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Epg.GetCountriesLineups(ctx, operations.GetCountriesLineupsRequest{
|
|
Country: "Malawi",
|
|
EpgID: "<id>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithLineup != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/regions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Epg.GetCountryRegions(ctx, operations.GetCountryRegionsRequest{
|
|
Country: "Morocco",
|
|
EpgID: "<id>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/regions/{region}/lineups"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Epg.ListLineups(ctx, operations.ListLineupsRequest{
|
|
Country: "Vanuatu",
|
|
EpgID: "<id>",
|
|
Region: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithLineup != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/languages"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Epg.GetAllLanguages(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/lineup"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Epg.GetLineup(ctx, operations.GetLineupRequest{
|
|
DeviceQueryParameter: "<value>",
|
|
LineupGroup: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/epg/lineupchannels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Epg.GetLineupChannels(ctx, operations.GetLineupChannelsRequest{
|
|
Lineup: []string{
|
|
"<value 1>",
|
|
"<value 2>",
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/sessions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.LiveTV.GetSessions(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/sessions/{sessionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LiveTV.GetLiveTVSession(ctx, operations.GetLiveTVSessionRequest{
|
|
SessionID: "<id>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/sessions/{sessionId}/{consumerId}/index.m3u8"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LiveTV.GetSessionPlaylistIndex(ctx, operations.GetSessionPlaylistIndexRequest{
|
|
SessionID: "<id>",
|
|
ConsumerID: "<id>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/livetv/sessions/{sessionId}/{consumerId}/{segmentId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LiveTV.GetSessionSegment(ctx, operations.GetSessionSegmentRequest{
|
|
SessionID: "<id>",
|
|
ConsumerID: "<id>",
|
|
SegmentID: "<id>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/log"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"os"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
example, fileErr := os.Open("example.file")
|
|
if fileErr != nil {
|
|
panic(fileErr)
|
|
}
|
|
|
|
res, err := s.Log.WriteLog(ctx, example)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/log"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Log.WriteMessage(ctx, operations.WriteMessageRequest{})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/log/networked"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Log.EnablePapertrail(ctx, operations.EnablePapertrailRequest{})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Devices.GetAvailableGrabbers(ctx, operations.GetAvailableGrabbersRequest{
|
|
Protocol: plexgo.Pointer("livetv"),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Devices.ListDevices(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithDevice != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Devices.AddDevice(ctx, operations.AddDeviceRequest{
|
|
URI: plexgo.Pointer("http://10.0.0.5"),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithDevice != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/discover"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Devices.DiscoverDevices(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithDevice != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Devices.RemoveDevice(ctx, operations.RemoveDeviceRequest{
|
|
DeviceID: 685908,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Devices.GetDeviceDetails(ctx, operations.GetDeviceDetailsRequest{
|
|
DeviceID: 170949,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithDevice != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Devices.ModifyDevice(ctx, operations.ModifyDeviceRequest{
|
|
DeviceID: 879135,
|
|
Enabled: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/channelmap"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Devices.SetChannelmap(ctx, operations.SetChannelmapRequest{
|
|
DeviceID: 937661,
|
|
ChannelMapping: &operations.ChannelMapping{},
|
|
ChannelMappingByKey: &operations.ChannelMappingByKey{},
|
|
ChannelsEnabled: []string{
|
|
"4",
|
|
"6",
|
|
".",
|
|
"1",
|
|
",",
|
|
"4",
|
|
"4",
|
|
".",
|
|
"1",
|
|
",",
|
|
"4",
|
|
"5",
|
|
".",
|
|
"1",
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithDevice != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/channels"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Devices.GetDevicesChannels(ctx, operations.GetDevicesChannelsRequest{
|
|
DeviceID: 517209,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/prefs"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Devices.SetDevicePreferences(ctx, operations.SetDevicePreferencesRequest{
|
|
DeviceID: 420973,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/scan"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Devices.StopScan(ctx, operations.StopScanRequest{
|
|
DeviceID: 576494,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithDevice != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/scan"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Devices.Scan(ctx, operations.ScanRequest{
|
|
DeviceID: 57391,
|
|
Source: plexgo.Pointer("Cable"),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithDevice != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/devices/{deviceId}/thumb/{version}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Devices.GetThumb(ctx, operations.GetThumbRequest{
|
|
DeviceID: 960617,
|
|
VersionPathParameter: 1025,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/grabbers/operations/{operationId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Subscriptions.CancelGrab(ctx, operations.CancelGrabRequest{
|
|
OperationID: "<id>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/providers"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Provider.ListProviders(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/providers"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Provider.AddProvider(ctx, operations.AddProviderRequest{
|
|
URL: "https://steep-obedience.name/",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/providers/refresh"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Provider.RefreshProviders(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/providers/{provider}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Provider.DeleteMediaProvider(ctx, operations.DeleteMediaProviderRequest{
|
|
Provider: "<value>",
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Subscriptions.GetAllSubscriptions(ctx, operations.GetAllSubscriptionsRequest{
|
|
IncludeGrabs: components.BoolIntTrue.ToPointer(),
|
|
IncludeStorage: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithSubscription != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Subscriptions.CreateSubscription(ctx, operations.CreateSubscriptionRequest{
|
|
TargetLibrarySectionID: plexgo.Pointer[int64](1),
|
|
TargetSectionLocationID: plexgo.Pointer[int64](3),
|
|
Type: plexgo.Pointer[int64](2),
|
|
Hints: &operations.Hints{},
|
|
Prefs: &operations.CreateSubscriptionQueryParamPrefs{},
|
|
Params: &operations.Params{},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/process"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Subscriptions.ProcessSubscriptions(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/scheduled"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Subscriptions.GetScheduledRecordings(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/template"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Subscriptions.GetTemplate(ctx, operations.GetTemplateRequest{
|
|
GUID: plexgo.Pointer("plex://episode/5fc70265c40548002d539d23"),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Subscriptions.DeleteSubscription(ctx, operations.DeleteSubscriptionRequest{
|
|
SubscriptionID: 974618,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Subscriptions.GetSubscription(ctx, operations.GetSubscriptionRequest{
|
|
SubscriptionID: 186713,
|
|
IncludeGrabs: components.BoolIntTrue.ToPointer(),
|
|
IncludeStorage: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithSubscription != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Subscriptions.EditSubscriptionPreferences(ctx, operations.EditSubscriptionPreferencesRequest{
|
|
SubscriptionID: 673918,
|
|
Prefs: &operations.EditSubscriptionPreferencesQueryParamPrefs{},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithSubscription != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/media/subscriptions/{subscriptionId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Subscriptions.ReorderSubscription(ctx, operations.ReorderSubscriptionRequest{
|
|
SubscriptionID: 440634,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithSubscription != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/photo/:/transcode"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Transcoder.TranscodeImage(ctx, operations.TranscodeImageRequest{
|
|
URL: plexgo.Pointer("/library/metadata/265/thumb/1715112705"),
|
|
Background: plexgo.Pointer("#ff5522"),
|
|
Upscale: components.BoolIntTrue.ToPointer(),
|
|
MinSize: components.BoolIntTrue.ToPointer(),
|
|
Rotate: components.BoolIntTrue.ToPointer(),
|
|
BlendColor: plexgo.Pointer("#ff5522"),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.TwoHundredImageJpegResponseStream != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.PlayQueue.CreatePlayQueue(ctx, operations.CreatePlayQueueRequest{
|
|
Type: operations.TypeAudio,
|
|
Shuffle: components.BoolIntTrue.ToPointer(),
|
|
Repeat: components.BoolIntTrue.ToPointer(),
|
|
Continuous: components.BoolIntTrue.ToPointer(),
|
|
Recursive: components.BoolIntTrue.ToPointer(),
|
|
OnDeck: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.PlayQueue.GetPlayQueue(ctx, operations.GetPlayQueueRequest{
|
|
PlayQueueID: 210646,
|
|
Own: components.BoolIntTrue.ToPointer(),
|
|
IncludeBefore: components.BoolIntTrue.ToPointer(),
|
|
IncludeAfter: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.PlayQueue.AddToPlayQueue(ctx, operations.AddToPlayQueueRequest{
|
|
PlayQueueID: 919248,
|
|
Next: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}/items"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.PlayQueue.ClearPlayQueue(ctx, operations.ClearPlayQueueRequest{
|
|
PlayQueueID: 86357,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}/items/{playQueueItemId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.PlayQueue.DeletePlayQueueItem(ctx, operations.DeletePlayQueueItemRequest{
|
|
PlayQueueID: 285738,
|
|
PlayQueueItemID: 464354,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}/items/{playQueueItemId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.PlayQueue.MovePlayQueueItem(ctx, operations.MovePlayQueueItemRequest{
|
|
PlayQueueID: 31341,
|
|
PlayQueueItemID: 495865,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}/reset"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.PlayQueue.ResetPlayQueue(ctx, operations.ResetPlayQueueRequest{
|
|
PlayQueueID: 581891,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}/shuffle"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.PlayQueue.Shuffle(ctx, operations.ShuffleRequest{
|
|
PlayQueueID: 316150,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playQueues/{playQueueId}/unshuffle"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.PlayQueue.Unshuffle(ctx, operations.UnshuffleRequest{
|
|
PlayQueueID: 484388,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Playlist.ListPlaylists(ctx, operations.ListPlaylistsRequest{})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryPlaylists.CreatePlaylist(ctx, operations.CreatePlaylistRequest{})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/upload"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryPlaylists.UploadPlaylist(ctx, operations.UploadPlaylistRequest{
|
|
Path: plexgo.Pointer("/home/barkley/playlist.m3u"),
|
|
Force: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryPlaylists.DeletePlaylist(ctx, operations.DeletePlaylistRequest{
|
|
PlaylistID: 343293,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Playlist.GetPlaylist(ctx, operations.GetPlaylistRequest{
|
|
PlaylistID: 841953,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryPlaylists.UpdatePlaylist(ctx, operations.UpdatePlaylistRequest{
|
|
PlaylistID: 157966,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/generators"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryPlaylists.GetPlaylistGenerators(ctx, operations.GetPlaylistGeneratorsRequest{
|
|
PlaylistID: 162342,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryPlaylists.ClearPlaylistItems(ctx, operations.ClearPlaylistItemsRequest{
|
|
PlaylistID: 552140,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Playlist.GetPlaylistItems(ctx, operations.GetPlaylistItemsRequest{
|
|
PlaylistID: 118195,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryPlaylists.AddPlaylistItems(ctx, operations.AddPlaylistItemsRequest{
|
|
PlaylistID: 533723,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryPlaylists.DeletePlaylistItem(ctx, operations.DeletePlaylistItemRequest{
|
|
PlaylistID: 981646,
|
|
GeneratorID: 194010,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryPlaylists.GetPlaylistGenerator(ctx, operations.GetPlaylistGeneratorRequest{
|
|
PlaylistID: 744880,
|
|
GeneratorID: 322168,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryPlaylists.ModifyPlaylistGenerator(ctx, operations.ModifyPlaylistGeneratorRequest{
|
|
PlaylistID: 972007,
|
|
GeneratorID: 208334,
|
|
Item: &operations.Item{
|
|
Location: &operations.ModifyPlaylistGeneratorQueryParamLocation{
|
|
URI: plexgo.Pointer("library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146"),
|
|
},
|
|
LocationID: plexgo.Pointer[int64](-1),
|
|
Policy: &operations.Policy{
|
|
Value: plexgo.Pointer[int64](),
|
|
Scope: operations.QueryParamScopeAll.ToPointer(),
|
|
},
|
|
Target: plexgo.Pointer(""),
|
|
TargetTagID: plexgo.Pointer[int64](1),
|
|
Title: plexgo.Pointer("Jack-Jack Attack"),
|
|
Type: plexgo.Pointer[int64](42),
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}/items"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryPlaylists.GetPlaylistGeneratorItems(ctx, operations.GetPlaylistGeneratorItemsRequest{
|
|
PlaylistID: 77230,
|
|
GeneratorID: 979714,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{generatorId}/{metadataId}/{action}"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryPlaylists.RefreshPlaylist(ctx, operations.RefreshPlaylistRequest{
|
|
PlaylistID: 895314,
|
|
GeneratorID: 629742,
|
|
MetadataID: 724422,
|
|
Action: operations.ActionDisable,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/playlists/{playlistId}/items/{playlistItemId}/move"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.LibraryPlaylists.MovePlaylistItem(ctx, operations.MovePlaylistItemRequest{
|
|
PlaylistID: 940298,
|
|
PlaylistItemID: 375626,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithPlaylistMetadata != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/resources"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Plex.GetServerResources(ctx, operations.GetServerResourcesRequest{
|
|
IncludeHTTPS: operations.IncludeHTTPSTrue.ToPointer(),
|
|
IncludeRelay: operations.IncludeRelayTrue.ToPointer(),
|
|
IncludeIPv6: operations.IncludeIPv6True.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.PlexDevices != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/security/resources"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.General.GetSourceConnectionInformation(ctx, operations.GetSourceConnectionInformationRequest{
|
|
Source: "<value>",
|
|
Refresh: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/security/token"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.General.GetTransientToken(ctx, operations.GetTransientTokenRequest{
|
|
Type: operations.QueryParamTypeDelegation,
|
|
Scope: operations.ScopeAll,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/services/ultrablur/colors"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.UltraBlur.GetColors(ctx, operations.GetColorsRequest{
|
|
URL: plexgo.Pointer("/library/metadata/217745/art/1718931408"),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/services/ultrablur/image"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.UltraBlur.GetImage(ctx, operations.GetImageRequest{
|
|
TopLeft: plexgo.Pointer("3f280a"),
|
|
TopRight: plexgo.Pointer("6b4713"),
|
|
BottomRight: plexgo.Pointer("0f2a43"),
|
|
BottomLeft: plexgo.Pointer("1c425d"),
|
|
Width: plexgo.Pointer[int64](1920),
|
|
Height: plexgo.Pointer[int64](1080),
|
|
Noise: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.ResponseStream != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/status/sessions"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Status.ListSessions(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/status/sessions/background"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Status.GetBackgroundTasks(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/status/sessions/history/all"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Status.ListPlaybackHistory(ctx, operations.ListPlaybackHistoryRequest{
|
|
Sort: []string{
|
|
"v",
|
|
"i",
|
|
"e",
|
|
"w",
|
|
"e",
|
|
"d",
|
|
"A",
|
|
"t",
|
|
":",
|
|
"d",
|
|
"e",
|
|
"s",
|
|
"c",
|
|
",",
|
|
"a",
|
|
"c",
|
|
"c",
|
|
"o",
|
|
"u",
|
|
"n",
|
|
"t",
|
|
"I",
|
|
"D",
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/status/sessions/history/{historyId}"]["delete"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Status.DeleteHistory(ctx, operations.DeleteHistoryRequest{
|
|
HistoryID: 953579,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainer != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/status/sessions/history/{historyId}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Status.GetHistoryItem(ctx, operations.GetHistoryItemRequest{
|
|
HistoryID: 832213,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.HistoryAllGetResponses200 != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/status/sessions/terminate"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Status.TerminateSession(ctx, operations.TerminateSessionRequest{
|
|
SessionID: "cdefghijklmnopqrstuvwxyz",
|
|
Reason: plexgo.Pointer("Stop Playing"),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/updater/apply"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Updater.ApplyUpdates(ctx, operations.ApplyUpdatesRequest{
|
|
Tonight: components.BoolIntTrue.ToPointer(),
|
|
Skip: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/updater/check"]["put"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Updater.CheckUpdates(ctx, operations.CheckUpdatesRequest{
|
|
Download: components.BoolIntTrue.ToPointer(),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/updater/status"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
package main
|
|
|
|
import(
|
|
"context"
|
|
"github.com/LukeHagar/plexgo"
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
s := plexgo.New(
|
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
|
)
|
|
|
|
res, err := s.Updater.GetUpdatesStatus(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/user"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Authentication.GetTokenDetails(ctx, operations.GetTokenDetailsRequest{})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.UserPlexAccount != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/users"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Users.GetUsers(ctx, operations.GetUsersRequest{})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.Object != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/users/signin"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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"),
|
|
)
|
|
|
|
res, err := s.Authentication.PostUsersSignInData(ctx, operations.PostUsersSignInDataRequest{
|
|
RequestBody: &operations.PostUsersSignInDataRequestBody{
|
|
Login: "username@email.com",
|
|
Password: "password123",
|
|
VerificationCode: plexgo.Pointer("123456"),
|
|
},
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.UserPlexAccount != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/decision"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Transcoder.MakeDecision(ctx, operations.MakeDecisionRequest{
|
|
TranscodeType: components.TranscodeTypeMusic,
|
|
AdvancedSubtitles: components.AdvancedSubtitlesBurn.ToPointer(),
|
|
AudioBoost: plexgo.Pointer[int64](50),
|
|
AudioChannelCount: plexgo.Pointer[int64](5),
|
|
AutoAdjustQuality: components.BoolIntTrue.ToPointer(),
|
|
AutoAdjustSubtitle: components.BoolIntTrue.ToPointer(),
|
|
DirectPlay: components.BoolIntTrue.ToPointer(),
|
|
DirectStream: components.BoolIntTrue.ToPointer(),
|
|
DirectStreamAudio: components.BoolIntTrue.ToPointer(),
|
|
DisableResolutionRotation: components.BoolIntTrue.ToPointer(),
|
|
HasMDE: components.BoolIntTrue.ToPointer(),
|
|
Location: operations.LocationWan.ToPointer(),
|
|
MediaBufferSize: plexgo.Pointer[int64](102400),
|
|
MediaIndex: plexgo.Pointer[int64](0),
|
|
MusicBitrate: plexgo.Pointer[int64](5000),
|
|
Offset: plexgo.Pointer[float64](90.5),
|
|
PartIndex: plexgo.Pointer[int64](0),
|
|
Path: plexgo.Pointer("/library/metadata/151671"),
|
|
PeakBitrate: plexgo.Pointer[int64](12000),
|
|
PhotoResolution: plexgo.Pointer("1080x1080"),
|
|
Protocol: operations.ProtocolDash.ToPointer(),
|
|
SecondsPerSegment: plexgo.Pointer[int64](5),
|
|
SubtitleSize: plexgo.Pointer[int64](50),
|
|
VideoBitrate: plexgo.Pointer[int64](12000),
|
|
VideoQuality: plexgo.Pointer[int64](50),
|
|
VideoResolution: plexgo.Pointer("1080x1080"),
|
|
XPlexClientProfileExtra: plexgo.Pointer("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)"),
|
|
XPlexClientProfileName: plexgo.Pointer("generic"),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.MediaContainerWithDecision != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/fallback"]["post"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Transcoder.TriggerFallback(ctx, operations.TriggerFallbackRequest{
|
|
TranscodeType: components.TranscodeTypeAudio,
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/start.{extension}"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Transcoder.StartTranscodeSession(ctx, operations.StartTranscodeSessionRequest{
|
|
TranscodeType: components.TranscodeTypeMusic,
|
|
Extension: operations.ExtensionMpd,
|
|
AdvancedSubtitles: components.AdvancedSubtitlesBurn.ToPointer(),
|
|
AudioBoost: plexgo.Pointer[int64](50),
|
|
AudioChannelCount: plexgo.Pointer[int64](5),
|
|
AutoAdjustQuality: components.BoolIntTrue.ToPointer(),
|
|
AutoAdjustSubtitle: components.BoolIntTrue.ToPointer(),
|
|
DirectPlay: components.BoolIntTrue.ToPointer(),
|
|
DirectStream: components.BoolIntTrue.ToPointer(),
|
|
DirectStreamAudio: components.BoolIntTrue.ToPointer(),
|
|
DisableResolutionRotation: components.BoolIntTrue.ToPointer(),
|
|
HasMDE: components.BoolIntTrue.ToPointer(),
|
|
Location: operations.StartTranscodeSessionQueryParamLocationWan.ToPointer(),
|
|
MediaBufferSize: plexgo.Pointer[int64](102400),
|
|
MediaIndex: plexgo.Pointer[int64](0),
|
|
MusicBitrate: plexgo.Pointer[int64](5000),
|
|
Offset: plexgo.Pointer[float64](90.5),
|
|
PartIndex: plexgo.Pointer[int64](0),
|
|
Path: plexgo.Pointer("/library/metadata/151671"),
|
|
PeakBitrate: plexgo.Pointer[int64](12000),
|
|
PhotoResolution: plexgo.Pointer("1080x1080"),
|
|
Protocol: operations.StartTranscodeSessionQueryParamProtocolDash.ToPointer(),
|
|
SecondsPerSegment: plexgo.Pointer[int64](5),
|
|
SubtitleSize: plexgo.Pointer[int64](50),
|
|
VideoBitrate: plexgo.Pointer[int64](12000),
|
|
VideoQuality: plexgo.Pointer[int64](50),
|
|
VideoResolution: plexgo.Pointer("1080x1080"),
|
|
XPlexClientProfileExtra: plexgo.Pointer("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)"),
|
|
XPlexClientProfileName: plexgo.Pointer("generic"),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res.ResponseStream != nil {
|
|
// handle response
|
|
}
|
|
}
|
|
- target: $["paths"]["/{transcodeType}/:/transcode/universal/subtitles"]["get"]
|
|
update:
|
|
x-codeSamples:
|
|
- lang: go
|
|
label: PlexGO
|
|
source: |-
|
|
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.Transcoder.TranscodeSubtitles(ctx, operations.TranscodeSubtitlesRequest{
|
|
TranscodeType: components.TranscodeTypeAudio,
|
|
AdvancedSubtitles: components.AdvancedSubtitlesBurn.ToPointer(),
|
|
AudioBoost: plexgo.Pointer[int64](50),
|
|
AudioChannelCount: plexgo.Pointer[int64](5),
|
|
AutoAdjustQuality: components.BoolIntTrue.ToPointer(),
|
|
AutoAdjustSubtitle: components.BoolIntTrue.ToPointer(),
|
|
DirectPlay: components.BoolIntTrue.ToPointer(),
|
|
DirectStream: components.BoolIntTrue.ToPointer(),
|
|
DirectStreamAudio: components.BoolIntTrue.ToPointer(),
|
|
DisableResolutionRotation: components.BoolIntTrue.ToPointer(),
|
|
HasMDE: components.BoolIntTrue.ToPointer(),
|
|
Location: operations.QueryParamLocationWan.ToPointer(),
|
|
MediaBufferSize: plexgo.Pointer[int64](102400),
|
|
MediaIndex: plexgo.Pointer[int64](0),
|
|
MusicBitrate: plexgo.Pointer[int64](5000),
|
|
Offset: plexgo.Pointer[float64](90.5),
|
|
PartIndex: plexgo.Pointer[int64](0),
|
|
Path: plexgo.Pointer("/library/metadata/151671"),
|
|
PeakBitrate: plexgo.Pointer[int64](12000),
|
|
PhotoResolution: plexgo.Pointer("1080x1080"),
|
|
Protocol: operations.QueryParamProtocolDash.ToPointer(),
|
|
SecondsPerSegment: plexgo.Pointer[int64](5),
|
|
SubtitleSize: plexgo.Pointer[int64](50),
|
|
VideoBitrate: plexgo.Pointer[int64](12000),
|
|
VideoQuality: plexgo.Pointer[int64](50),
|
|
VideoResolution: plexgo.Pointer("1080x1080"),
|
|
XPlexClientProfileExtra: plexgo.Pointer("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)"),
|
|
XPlexClientProfileName: plexgo.Pointer("generic"),
|
|
})
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
if res != nil {
|
|
// handle response
|
|
}
|
|
}
|