* `PlexApi.Butler.StartTask()`: * `request` **Changed** **Breaking** ⚠️ * `error` **Changed** **Breaking** ⚠️ * `PlexApi.Butler.StopTask()`: * `request` **Changed** **Breaking** ⚠️ * `error` **Changed** **Breaking** ⚠️ * `PlexApi.Updater.ApplyUpdates()`: * `request` **Changed** **Breaking** ⚠️ * `error` **Changed** **Breaking** ⚠️ * `PlexApi.General.GetServerInfo()`: **Added** * `PlexApi.General.GetIdentity()`: **Added** * `PlexApi.General.GetSourceConnectionInformation()`: **Added** * `PlexApi.General.GetTransientToken()`: **Added** * `PlexApi.Events.GetNotifications()`: **Added** * `PlexApi.Events.ConnectWebSocket()`: **Added** * `PlexApi.Preferences.GetAllPreferences()`: **Added** * `PlexApi.Preferences.SetPreferences()`: **Added** * `PlexApi.Preferences.GetPreference()`: **Added** * `PlexApi.Rate.SetRating()`: **Added** * `PlexApi.Timeline.MarkPlayed()`: **Added** * `PlexApi.Timeline.Report()`: **Added** * `PlexApi.Timeline.Unscrobble()`: **Added** * `PlexApi.Activities.ListActivities()`: **Added** * `PlexApi.Activities.CancelActivity()`: **Added** * `PlexApi.Butler.StopTasks()`: **Added** * `PlexApi.Butler.GetTasks()`: **Added** * `PlexApi.Butler.StartTasks()`: **Added** * `PlexApi.DownloadQueue.CreateDownloadQueue()`: **Added** * `PlexApi.DownloadQueue.GetDownloadQueue()`: **Added** * `PlexApi.DownloadQueue.AddDownloadQueueItems()`: **Added** * `PlexApi.DownloadQueue.ListDownloadQueueItems()`: **Added** * `PlexApi.DownloadQueue.GetItemDecision()`: **Added** * `PlexApi.DownloadQueue.GetDownloadQueueMedia()`: **Added** * `PlexApi.DownloadQueue.RemoveDownloadQueueItems()`: **Added** * `PlexApi.DownloadQueue.GetDownloadQueueItems()`: **Added** * `PlexApi.DownloadQueue.RestartProcessingDownloadQueueItems()`: **Added** * `PlexApi.Hubs.GetAllHubs()`: **Added** * `PlexApi.Hubs.GetContinueWatching()`: **Added** * `PlexApi.Hubs.GetHubItems()`: **Added** * `PlexApi.Hubs.GetPromotedHubs()`: **Added** * `PlexApi.Hubs.GetMetadataHubs()`: **Added** * `PlexApi.Hubs.GetPostplayHubs()`: **Added** * `PlexApi.Hubs.GetRelatedHubs()`: **Added** * `PlexApi.Hubs.GetSectionHubs()`: **Added** * `PlexApi.Hubs.ResetSectionDefaults()`: **Added** * `PlexApi.Hubs.ListHubs()`: **Added** * `PlexApi.Hubs.CreateCustomHub()`: **Added** * `PlexApi.Hubs.MoveHub()`: **Added** * `PlexApi.Hubs.DeleteCustomHub()`: **Added** * `PlexApi.Hubs.UpdateHubVisibility()`: **Added** * `PlexApi.Search.SearchHubs()`: **Added** * `PlexApi.Search.VoiceSearchHubs()`: **Added** * `PlexApi.Library.GetLibraryItems()`: **Added** * `PlexApi.Library.DeleteCaches()`: **Added** * `PlexApi.Library.CleanBundles()`: **Added** * `PlexApi.Library.IngestTransientItem()`: **Added** * `PlexApi.Library.GetLibraryMatches()`: **Added** * `PlexApi.Library.OptimizeDatabase()`: **Added** * `PlexApi.Library.GetRandomArtwork()`: **Added** * `PlexApi.Library.GetSections()`: **Added** * `PlexApi.Library.AddSection()`: **Added** * `PlexApi.Library.StopAllRefreshes()`: **Added** * `PlexApi.Library.GetSectionsPrefs()`: **Added** * `PlexApi.Library.RefreshSectionsMetadata()`: **Added** * `PlexApi.Library.GetTags()`: **Added** * `PlexApi.Library.DeleteMetadataItem()`: **Added** * `PlexApi.Library.EditMetadataItem()`: **Added** * `PlexApi.Library.DetectAds()`: **Added** * `PlexApi.Library.GetAllItemLeaves()`: **Added** * `PlexApi.Library.AnalyzeMetadata()`: **Added** * `PlexApi.Library.GenerateThumbs()`: **Added** * `PlexApi.Library.DetectCredits()`: **Added** * `PlexApi.Library.GetExtras()`: **Added** * `PlexApi.Library.AddExtras()`: **Added** * `PlexApi.Library.GetFile()`: **Added** * `PlexApi.Library.StartBifGeneration()`: **Added** * `PlexApi.Library.DetectIntros()`: **Added** * `PlexApi.Library.CreateMarker()`: **Added** * `PlexApi.Library.MatchItem()`: **Added** * `PlexApi.Library.ListMatches()`: **Added** * `PlexApi.Library.MergeItems()`: **Added** * `PlexApi.Library.ListSonicallySimilar()`: **Added** * `PlexApi.Library.SetItemPreferences()`: **Added** * `PlexApi.Library.RefreshItemsMetadata()`: **Added** * `PlexApi.Library.GetRelatedItems()`: **Added** * `PlexApi.Library.ListSimilar()`: **Added** * `PlexApi.Library.SplitItem()`: **Added** * `PlexApi.Library.AddSubtitles()`: **Added** * `PlexApi.Library.GetItemTree()`: **Added** * `PlexApi.Library.Unmatch()`: **Added** * `PlexApi.Library.ListTopUsers()`: **Added** * `PlexApi.Library.DetectVoiceActivity()`: **Added** * `PlexApi.Library.GetAugmentationStatus()`: **Added** * `PlexApi.Library.SetStreamSelection()`: **Added** * `PlexApi.Library.GetPerson()`: **Added** * `PlexApi.Library.ListPersonMedia()`: **Added** * `PlexApi.Library.DeleteLibrarySection()`: **Added** * `PlexApi.Library.GetLibraryDetails()`: **Added** * `PlexApi.Library.EditSection()`: **Added** * `PlexApi.Library.UpdateItems()`: **Added** * `PlexApi.Library.StartAnalysis()`: **Added** * `PlexApi.Library.Autocomplete()`: **Added** * `PlexApi.Library.GetCollections()`: **Added** * `PlexApi.Library.GetCommon()`: **Added** * `PlexApi.Library.EmptyTrash()`: **Added** * `PlexApi.Library.GetSectionFilters()`: **Added** * `PlexApi.Library.GetFirstCharacters()`: **Added** * `PlexApi.Library.DeleteIndexes()`: **Added** * `PlexApi.Library.DeleteIntros()`: **Added** * `PlexApi.Library.GetSectionPreferences()`: **Added** * `PlexApi.Library.SetSectionPreferences()`: **Added** * `PlexApi.Library.CancelRefresh()`: **Added** * `PlexApi.Library.RefreshSection()`: **Added** * `PlexApi.Library.GetAvailableSorts()`: **Added** * `PlexApi.Library.GetStreamLevels()`: **Added** * `PlexApi.Library.GetStreamLoudness()`: **Added** * `PlexApi.Library.GetChapterImage()`: **Added** * `PlexApi.Library.SetItemArtwork()`: **Added** * `PlexApi.Library.UpdateItemArtwork()`: **Added** * `PlexApi.Library.DeleteMarker()`: **Added** * `PlexApi.Library.EditMarker()`: **Added** * `PlexApi.Library.DeleteMediaItem()`: **Added** * `PlexApi.Library.GetPartIndex()`: **Added** * `PlexApi.Library.DeleteCollection()`: **Added** * `PlexApi.Library.GetSectionImage()`: **Added** * `PlexApi.Library.DeleteStream()`: **Added** * `PlexApi.Library.GetStream()`: **Added** * `PlexApi.Library.SetStreamOffset()`: **Added** * `PlexApi.Library.GetItemArtwork()`: **Added** * `PlexApi.Library.GetMediaPart()`: **Added** * `PlexApi.Library.GetImageFromBif()`: **Added** * `PlexApi.Collections.CreateCollection()`: **Added** * `PlexApi.DvRs.ListDvRs()`: **Added** * `PlexApi.DvRs.CreateDvr()`: **Added** * `PlexApi.DvRs.DeleteDvr()`: **Added** * `PlexApi.DvRs.GetDvr()`: **Added** * `PlexApi.DvRs.DeleteLineup()`: **Added** * `PlexApi.DvRs.AddLineup()`: **Added** * `PlexApi.DvRs.SetDvrPreferences()`: **Added** * `PlexApi.DvRs.StopDvrReload()`: **Added** * `PlexApi.DvRs.ReloadGuide()`: **Added** * `PlexApi.DvRs.TuneChannel()`: **Added** * `PlexApi.DvRs.RemoveDeviceFromDvr()`: **Added** * `PlexApi.DvRs.AddDeviceToDvr()`: **Added** * `PlexApi.Epg.ComputeChannelMap()`: **Added** * `PlexApi.Epg.GetChannels()`: **Added** * `PlexApi.Epg.GetCountries()`: **Added** * `PlexApi.Epg.GetAllLanguages()`: **Added** * `PlexApi.Epg.GetLineup()`: **Added** * `PlexApi.Epg.GetLineupChannels()`: **Added** * `PlexApi.Epg.GetCountriesLineups()`: **Added** * `PlexApi.Epg.GetCountryRegions()`: **Added** * `PlexApi.Epg.ListLineups()`: **Added** * `PlexApi.LiveTv.GetSessions()`: **Added** * `PlexApi.LiveTv.GetLiveTvSession()`: **Added** * `PlexApi.LiveTv.GetSessionPlaylistIndex()`: **Added** * `PlexApi.LiveTv.GetSessionSegment()`: **Added** * `PlexApi.Log.WriteLog()`: **Added** * `PlexApi.Log.WriteMessage()`: **Added** * `PlexApi.Log.EnablePapertrail()`: **Added** * `PlexApi.Devices.GetAvailableGrabbers()`: **Added** * `PlexApi.Devices.ListDevices()`: **Added** * `PlexApi.Devices.AddDevice()`: **Added** * `PlexApi.Devices.DiscoverDevices()`: **Added** * `PlexApi.Devices.RemoveDevice()`: **Added** * `PlexApi.Devices.GetDeviceDetails()`: **Added** * `PlexApi.Devices.ModifyDevice()`: **Added** * `PlexApi.Devices.SetChannelmap()`: **Added** * `PlexApi.Devices.GetDevicesChannels()`: **Added** * `PlexApi.Devices.SetDevicePreferences()`: **Added** * `PlexApi.Devices.StopScan()`: **Added** * `PlexApi.Devices.Scan()`: **Added** * `PlexApi.Devices.GetThumb()`: **Added** * `PlexApi.Provider.ListProviders()`: **Added** * `PlexApi.Provider.AddProvider()`: **Added** * `PlexApi.Provider.RefreshProviders()`: **Added** * `PlexApi.Provider.DeleteMediaProvider()`: **Added** * `PlexApi.Subscriptions.GetAllSubscriptions()`: **Added** * `PlexApi.Subscriptions.CreateSubscription()`: **Added** * `PlexApi.Subscriptions.ProcessSubscriptions()`: **Added** * `PlexApi.Subscriptions.GetScheduledRecordings()`: **Added** * `PlexApi.Subscriptions.GetTemplate()`: **Added** * `PlexApi.Subscriptions.CancelGrab()`: **Added** * `PlexApi.Subscriptions.DeleteSubscription()`: **Added** * `PlexApi.Subscriptions.GetSubscription()`: **Added** * `PlexApi.Subscriptions.EditSubscriptionPreferences()`: **Added** * `PlexApi.Subscriptions.ReorderSubscription()`: **Added** * `PlexApi.Transcoder.TranscodeImage()`: **Added** * `PlexApi.Transcoder.MakeDecision()`: **Added** * `PlexApi.Transcoder.TriggerFallback()`: **Added** * `PlexApi.Transcoder.TranscodeSubtitles()`: **Added** * `PlexApi.Transcoder.StartTranscodeSession()`: **Added** * `PlexApi.Playlist.ListPlaylists()`: **Added** * `PlexApi.Playlist.GetPlaylist()`: **Added** * `PlexApi.Playlist.GetPlaylistItems()`: **Added** * `PlexApi.LibraryPlaylists.CreatePlaylist()`: **Added** * `PlexApi.LibraryPlaylists.UploadPlaylist()`: **Added** * `PlexApi.LibraryPlaylists.DeletePlaylist()`: **Added** * `PlexApi.LibraryPlaylists.UpdatePlaylist()`: **Added** * `PlexApi.LibraryPlaylists.GetPlaylistGenerators()`: **Added** * `PlexApi.LibraryPlaylists.ClearPlaylistItems()`: **Added** * `PlexApi.LibraryPlaylists.AddPlaylistItems()`: **Added** * `PlexApi.LibraryPlaylists.DeletePlaylistItem()`: **Added** * `PlexApi.LibraryPlaylists.GetPlaylistGenerator()`: **Added** * `PlexApi.LibraryPlaylists.ModifyPlaylistGenerator()`: **Added** * `PlexApi.LibraryPlaylists.GetPlaylistGeneratorItems()`: **Added** * `PlexApi.LibraryPlaylists.MovePlaylistItem()`: **Added** * `PlexApi.LibraryPlaylists.RefreshPlaylist()`: **Added** * `PlexApi.PlayQueue.CreatePlayQueue()`: **Added** * `PlexApi.PlayQueue.GetPlayQueue()`: **Added** * `PlexApi.PlayQueue.AddToPlayQueue()`: **Added** * `PlexApi.PlayQueue.ClearPlayQueue()`: **Added** * `PlexApi.PlayQueue.ResetPlayQueue()`: **Added** * `PlexApi.PlayQueue.Shuffle()`: **Added** * `PlexApi.PlayQueue.Unshuffle()`: **Added** * `PlexApi.PlayQueue.DeletePlayQueueItem()`: **Added** * `PlexApi.PlayQueue.MovePlayQueueItem()`: **Added** * `PlexApi.UltraBlur.GetColors()`: **Added** * `PlexApi.UltraBlur.GetImage()`: **Added** * `PlexApi.Status.ListSessions()`: **Added** * `PlexApi.Status.GetBackgroundTasks()`: **Added** * `PlexApi.Status.ListPlaybackHistory()`: **Added** * `PlexApi.Status.TerminateSession()`: **Added** * `PlexApi.Status.DeleteHistory()`: **Added** * `PlexApi.Status.GetHistoryItem()`: **Added** * `PlexApi.Updater.CheckUpdates()`: **Added** * `PlexApi.Updater.GetUpdatesStatus()`: **Added** * `PlexApi.Content.GetCollectionItems()`: **Added** * `PlexApi.Content.GetMetadataItem()`: **Added** * `PlexApi.Content.GetAlbums()`: **Added** * `PlexApi.Content.ListContent()`: **Added** * `PlexApi.Content.GetAllLeaves()`: **Added** * `PlexApi.Content.GetArts()`: **Added** * `PlexApi.Content.GetCategories()`: **Added** * `PlexApi.Content.GetCluster()`: **Added** * `PlexApi.Content.GetSonicPath()`: **Added** * `PlexApi.Content.GetFolders()`: **Added** * `PlexApi.Content.ListMoments()`: **Added** * `PlexApi.Content.GetSonicallySimilar()`: **Added** * `PlexApi.Content.GetCollectionImage()`: **Added** * `PlexApi.LibraryCollections.AddCollectionItems()`: **Added** * `PlexApi.LibraryCollections.DeleteCollectionItem()`: **Added** * `PlexApi.LibraryCollections.MoveCollectionItem()`: **Added** * `PlexApi.Server.GetServerCapabilities()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Server.GetServerPreferences()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Server.GetAvailableClients()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Server.GetDevices()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Server.Get-Server-Identity()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Server.GetMyPlexAccount()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Server.GetResizedPhoto()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Server.Get-Media-Providers()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Server.GetServerList()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Media.MarkPlayed()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Media.MarkUnplayed()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Media.UpdatePlayProgress()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Media.Get-Banner-Image()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Media.Get-Thumb-Image()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Video.GetTimeline()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Video.StartUniversalTranscode()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Activities.GetServerActivities()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Activities.CancelServerActivities()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Butler.GetButlerTasks()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Butler.StartAllTasks()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Butler.StopAllTasks()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Plex.GetCompanionsData()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Plex.GetUserFriends()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Plex.GetGeoData()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Plex.GetHomeData()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Plex.Get-Server-Resources()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Plex.GetPin()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Plex.GetTokenByPinId()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Hubs.GetGlobalHubs()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Hubs.Get-Recently-Added()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Hubs.GetLibraryHubs()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Search.PerformSearch()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Search.PerformVoiceSearch()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Search.GetSearchResults()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.GetFileHash()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-Recently-Added-Library()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-All-Libraries()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-Library-Details()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.DeleteLibrary()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-Library-Items()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-Library-Sections-All()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-Refresh-Library-Metadata()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-Search-Library()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-Genres-Library()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-Countries-Library()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-Actors-Library()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-Search-All-Libraries()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-Media-Meta-Data()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-Media-Arts()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Post-Media-Arts()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Get-Media-Posters()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.Post-Media-Poster()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.GetMetadataChildren()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Library.GetTopWatchedContent()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Watchlist.Get-Watch-List()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Log.LogLine()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Log.LogMultiLine()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Log.EnablePaperTrail()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Playlists.CreatePlaylist()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Playlists.GetPlaylists()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Playlists.GetPlaylist()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Playlists.DeletePlaylist()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Playlists.UpdatePlaylist()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Playlists.GetPlaylistContents()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Playlists.ClearPlaylistContents()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Playlists.AddPlaylistContents()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Playlists.UploadPlaylist()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Authentication.GetTransientToken()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Authentication.GetSourceConnectionInformation()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Authentication.GetTokenDetails()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Authentication.Post-Users-Sign-In-Data()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Statistics.GetStatistics()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Statistics.GetResourcesStatistics()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Statistics.GetBandwidthStatistics()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Sessions.GetSessions()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Sessions.GetSessionHistory()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Sessions.GetTranscodeSessions()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Sessions.StopTranscodeSession()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Updater.GetUpdateStatus()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Updater.CheckForUpdates()`: **Deleted** **Breaking** ⚠️ * `PlexApi.Users.Get-Users()`: **Deleted** **Breaking** ⚠️
Library
(Library)
Overview
Library endpoints which are outside of the Media Provider API. Typically this is manipulation of the library (adding/removing sections, modifying preferences, etc).
Available Operations
- GetLibraryItems - Get all items in library
- DeleteCaches - Delete library caches
- CleanBundles - Clean bundles
- IngestTransientItem - Ingest a transient item
- GetLibraryMatches - Get library matches
- OptimizeDatabase - Optimize the Database
- GetRandomArtwork - Get random artwork
- GetSections - Get library sections (main Media Provider Only)
- AddSection - Add a library section
- StopAllRefreshes - Stop refresh
- GetSectionsPrefs - Get section prefs
- RefreshSectionsMetadata - Refresh all sections
- GetTags - Get all library tags of a type
- DeleteMetadataItem - Delete a metadata item
- EditMetadataItem - Edit a metadata item
- DetectAds - Ad-detect an item
- GetAllItemLeaves - Get the leaves of an item
- AnalyzeMetadata - Analyze an item
- GenerateThumbs - Generate thumbs of chapters for an item
- DetectCredits - Credit detect a metadata item
- GetExtras - Get an item's extras
- AddExtras - Add to an item's extras
- GetFile - Get a file from a metadata or media bundle
- StartBifGeneration - Start BIF generation of an item
- DetectIntros - Intro detect an item
- CreateMarker - Create a marker
- MatchItem - Match a metadata item
- ListMatches - Get metadata matches for an item
- MergeItems - Merge a metadata item
- ListSonicallySimilar - Get nearest tracks to metadata item
- SetItemPreferences - Set metadata preferences
- RefreshItemsMetadata - Refresh a metadata item
- GetRelatedItems - Get related items
- ListSimilar - Get similar items
- SplitItem - Split a metadata item
- AddSubtitles - Add subtitles
- GetItemTree - Get metadata items as a tree
- Unmatch - Unmatch a metadata item
- ListTopUsers - Get metadata top users
- DetectVoiceActivity - Detect voice activity
- GetAugmentationStatus - Get augmentation status
- SetStreamSelection - Set stream selection
- GetPerson - Get person details
- ListPersonMedia - Get media for a person
- DeleteLibrarySection - Delete a library section
- GetLibraryDetails - Get a library section by id
- EditSection - Edit a library section
- UpdateItems - Set the fields of the filtered items
- StartAnalysis - Analyze a section
- Autocomplete - Get autocompletions for search
- GetCollections - Get collections in a section
- GetCommon - Get common fields for items
- EmptyTrash - Empty section trash
- GetSectionFilters - Get section filters
- GetFirstCharacters - Get list of first characters
- DeleteIndexes - Delete section indexes
- DeleteIntros - Delete section intro markers
- GetSectionPreferences - Get section prefs
- SetSectionPreferences - Set section prefs
- CancelRefresh - Cancel section refresh
- RefreshSection - Refresh section
- GetAvailableSorts - Get a section sorts
- GetStreamLevels - Get loudness about a stream in json
- GetStreamLoudness - Get loudness about a stream
- GetChapterImage - Get a chapter image
- SetItemArtwork - Set an item's artwork, theme, etc
- UpdateItemArtwork - Set an item's artwork, theme, etc
- DeleteMarker - Delete a marker
- EditMarker - Edit a marker
- DeleteMediaItem - Delete a media item
- GetPartIndex - Get BIF index for a part
- DeleteCollection - Delete a collection
- GetSectionImage - Get a section composite image
- DeleteStream - Delete a stream
- GetStream - Get a stream
- SetStreamOffset - Set a stream offset
- GetItemArtwork - Get an item's artwork, theme, etc
- GetMediaPart - Get a media part
- GetImageFromBif - Get an image from part BIF
GetLibraryItems
Request all metadata items according to a query.
Example Usage
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{})
if err != nil {
log.Fatal(err)
}
if res.MediaContainerWithMetadata != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetLibraryItemsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetLibraryItemsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DeleteCaches
Delete the hub caches so they are recomputed on next request
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DeleteCachesResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
CleanBundles
Clean out any now unused bundles. Bundles can become unused when media is deleted
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.CleanBundlesResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
IngestTransientItem
This endpoint takes a file path specified in the url parameter, matches it using the scanner's match mechanism, downloads rich metadata, and then ingests the item as a transient item (without a library section). In the case where the file represents an episode, the entire tree (show, season, and episode) is added as transient items. At this time, movies and episodes are the only supported types, which are gleaned automatically from the file path.
Note that any of the parameters passed to the metadata details endpoint (e.g. includeExtras=1) work here.
Example Usage
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.BoolIntOne.ToPointer(),
IngestNonMatches: components.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res.MediaContainerWithMetadata != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.IngestTransientItemRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.IngestTransientItemResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetLibraryMatches
The matches endpoint is used to match content external to the library with content inside the library. This is done by passing a series of semantic "hints" about the content (its type, name, or release year). Each type (e.g. movie) has a canonical set of minimal required hints.
This ability to match content is useful in a variety of scenarios. For example, in the DVR, the EPG uses the endpoint to match recording rules against airing content. And in the cloud, the UMP uses the endpoint to match up a piece of media with rich metadata.
The endpoint response can including multiple matches, if there is ambiguity, each one containing a score from 0 to 100. For somewhat historical reasons, anything over 85 is considered a positive match (we prefer false negatives over false positives in general for matching).
The guid hint is somewhat special, in that it generally represents a unique identity for a piece of media (e.g. the IMDB ttXXX) identifier, in contrast with other hints which can be much more ambiguous (e.g. a title of Jane Eyre, which could refer to the 1943 or the 2011 version).
Episodes require either a season/episode pair, or an air date (or both). Either the path must be sent, or the show title
Example Usage
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{
IncludeFullMetadata: components.BoolIntOne.ToPointer(),
IncludeAncestorMetadata: components.BoolIntOne.ToPointer(),
IncludeAlternateMetadataSources: components.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res.MediaContainerWithMetadata != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetLibraryMatchesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetLibraryMatchesResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
OptimizeDatabase
Initiate optimize on the database.
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.OptimizeDatabaseRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.OptimizeDatabaseResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetRandomArtwork
Get random artwork across sections. This is commonly used for a screensaver.
This retrieves 100 random artwork paths in the specified sections and returns them. Restrictions are put in place to not return artwork for items the user is not allowed to access. Artwork will be for Movies, Shows, and Artists only.
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetRandomArtworkRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetRandomArtworkResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetSections
A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year).
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetSectionsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
AddSection
Add a new library section to the server
Example Usage
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.BoolIntOne.ToPointer(),
ImportFromiTunes: components.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res.SlashGetResponses200 != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.AddSectionRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.AddSectionResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
StopAllRefreshes
Stop all refreshes across all sections
Example Usage
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.RequestHandlerSlashGetResponses200 != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.StopAllRefreshesResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetSectionsPrefs
Get a section's preferences for a metadata type
Example Usage
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.RequestHandlerSlashGetResponses200 != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetSectionsPrefsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetSectionsPrefsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
RefreshSectionsMetadata
Tell PMS to refresh all section metadata
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RefreshSectionsMetadataRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.RefreshSectionsMetadataResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetTags
Get all library tags of a type
Example Usage
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{})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetTagsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetTagsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DeleteMetadataItem
Delete a single metadata item from the library, deleting media as well
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DeleteMetadataItemRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DeleteMetadataItemResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
EditMetadataItem
Edit metadata items setting fields
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.EditMetadataItemRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.EditMetadataItemResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DetectAds
Start the detection of ads in a metadata item
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DetectAdsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DetectAdsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetAllItemLeaves
Get the leaves for a metadata item such as the episodes in a show
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetAllItemLeavesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetAllItemLeavesResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
AnalyzeMetadata
Start the analysis of a metadata item
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.AnalyzeMetadataRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.AnalyzeMetadataResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GenerateThumbs
Start the chapter thumb generation for an item
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GenerateThumbsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GenerateThumbsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DetectCredits
Start credit detection on a metadata item
Example Usage
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.BoolIntOne.ToPointer(),
Manual: components.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DetectCreditsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DetectCreditsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetExtras
Get the extras for a metadata item
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetExtrasRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetExtrasResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
AddExtras
Add an extra to a metadata item
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.AddExtrasRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.AddExtrasResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetFile
Get a bundle file for a metadata or media item. This is either an image or a mp3 (for a show's theme)
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetFileRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetFileResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
StartBifGeneration
Start the indexing (BIF generation) of an item
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.StartBifGenerationRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.StartBifGenerationResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DetectIntros
Start the detection of intros in a metadata item
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DetectIntrosRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DetectIntrosResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
CreateMarker
Create a marker for this user on the metadata item
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.CreateMarkerRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.CreateMarkerResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
MatchItem
Match a metadata item to a guid
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.MatchItemRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.MatchItemResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListMatches
Get the list of metadata matches for a metadata item
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res.MediaContainerWithMetadata != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListMatchesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ListMatchesResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
MergeItems
Merge a metadata item with other items
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.MergeItemsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.MergeItemsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListSonicallySimilar
Get the nearest tracks, sonically, to the provided track
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListSonicallySimilarRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ListSonicallySimilarResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
SetItemPreferences
Set the preferences on a metadata item
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.SetItemPreferencesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.SetItemPreferencesResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
RefreshItemsMetadata
Refresh a metadata item from the agent
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RefreshItemsMetadataRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.RefreshItemsMetadataResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetRelatedItems
Get a hub of related items to a metadata item
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetRelatedItemsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetRelatedItemsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListSimilar
Get a list of similar items to a metadata item
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListSimilarRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ListSimilarResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
SplitItem
Split a metadata item into multiple items
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.SplitItemRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.SplitItemResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
AddSubtitles
Add a subtitle to a metadata item
Example Usage
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.BoolIntOne.ToPointer(),
HearingImpaired: components.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.AddSubtitlesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.AddSubtitlesResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetItemTree
Get a tree of metadata items, such as the seasons/episodes of a show
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetItemTreeRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetItemTreeResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
Unmatch
Unmatch a metadata item to info fetched from the agent
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.UnmatchRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.UnmatchResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListTopUsers
Get the list of users which have played this item starting with the most
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListTopUsersRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ListTopUsersResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DetectVoiceActivity
Start the detection of voice in a metadata item
Example Usage
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.BoolIntOne.ToPointer(),
Manual: components.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DetectVoiceActivityRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DetectVoiceActivityResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetAugmentationStatus
Get augmentation status and potentially wait for completion
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetAugmentationStatusRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetAugmentationStatusResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
SetStreamSelection
Set which streams (audio/subtitle) are selected by this user
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.SetStreamSelectionRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.SetStreamSelectionResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetPerson
Get details for a single actor.
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetPersonRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetPersonResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListPersonMedia
Get all the media for a single actor.
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListPersonMediaRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ListPersonMediaResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DeleteLibrarySection
Delete a library section by id
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DeleteLibrarySectionRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DeleteLibrarySectionResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetLibraryDetails
Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. It often contains a list of Directory metadata objects: These used to be used by clients to build a menuing system.
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetLibraryDetailsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetLibraryDetailsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
EditSection
Edit a library section by id setting parameters
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.EditSectionRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.EditSectionResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
UpdateItems
This endpoint takes an large possible set of values. Here are some examples.
-
Parameters, extra documentation
- artist.title.value
- When used with track, both artist.title.value and album.title.value need to be specified
- title.value usage
- Summary
- Tracks always rename and never merge
- Albums and Artists
- if single item and item without title does not exist, it is renamed.
- if single item and item with title does exist they are merged.
- if multiple they are always merged.
- Tracks
- Works as expected will update the track's title
- Single track:
/library/sections/{id}/all?type=10&id=42&title.value=NewName - Multiple tracks:
/library/sections/{id}/all?type=10&id=42,43,44&title.value=NewName - All tracks:
/library/sections/{id}/all?type=10&title.value=NewName
- Albums
- Functionality changes depending on the existence of an album with the same title
- Album exists
- Single album:
/library/sections/{id}/all?type=9&id=42&title.value=Album 2- Album with id 42 is merged into album titled "Album 2"
- Multiple/All albums:
/library/sections/{id}/all?type=9&title.value=Moo Album- All albums are merged into the existing album titled "Moo Album"
- Single album:
- Album does not exist
- Single album:
/library/sections/{id}/all?type=9&id=42&title.value=NewAlbumTitle- Album with id 42 has title modified to "NewAlbumTitle"
- Multiple/All albums:
/library/sections/{id}/all?type=9&title.value=NewAlbumTitle- All albums are merged into a new album with title="NewAlbumTitle"
- Single album:
- Artists
- Functionaly changes depending on the existence of an artist with the same title.
- Artist exists
- Single artist:
/library/sections/{id}/all?type=8&id=42&title.value=Artist 2- Artist with id 42 is merged into existing artist titled "Artist 2"
- Multiple/All artists:
/library/sections/{id}/all?type=8&title.value=Artist 3- All artists are merged into the existing artist titled "Artist 3"
- Single artist:
- Artist does not exist
- Single artist:
/library/sections/{id}/all?type=8&id=42&title.value=NewArtistTitle- Artist with id 42 has title modified to "NewArtistTitle"
- Multiple/All artists:
/library/sections/{id}/all?type=8&title.value=NewArtistTitle- All artists are merged into a new artist with title="NewArtistTitle"
- Single artist:
- Summary
- artist.title.value
-
Notes
- Technically square brackets are not allowed in an URI except the Internet Protocol Literal Address
- RFC3513: A host identified by an Internet Protocol literal address, version 6 [RFC3513] or later, is distinguished by enclosing the IP literal within square brackets ("[" and "]"). This is the only place where square bracket characters are allowed in the URI syntax.
- Escaped square brackets are allowed, but don't render well
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.UpdateItemsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.UpdateItemsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
StartAnalysis
Start analysis of all items in a section. If BIF generation is enabled, this will also be started on this section
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.StartAnalysisRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.StartAnalysisResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
Autocomplete
The field to autocomplete on is specified by the {field}.query parameter. For example genre.query or title.query.
Returns a set of items from the filtered items whose {field} starts with {field}.query. In the results, a {field}.queryRange will be present to express the range of the match
Example Usage
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,
})
if err != nil {
log.Fatal(err)
}
if res.MediaContainerWithMetadata != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.AutocompleteRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.AutocompleteResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetCollections
Get all collections in a section
Example Usage
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,
})
if err != nil {
log.Fatal(err)
}
if res.MediaContainerWithMetadata != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetCollectionsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetCollectionsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetCommon
Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter
Fields which are not common will be expressed in the mixedFields field
Example Usage
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,
})
if err != nil {
log.Fatal(err)
}
if res.MediaContainerWithMetadata != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetCommonRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetCommonResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
EmptyTrash
Empty trash in the section, permanently deleting media/metadata for missing media
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.EmptyTrashRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.EmptyTrashResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetSectionFilters
Get common filters on a section
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetSectionFiltersRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetSectionFiltersResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetFirstCharacters
Get list of first characters in this section
Example Usage
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,
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetFirstCharactersRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetFirstCharactersResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DeleteIndexes
Delete all the indexes in a section
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DeleteIndexesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DeleteIndexesResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DeleteIntros
Delete all the intro markers in a section
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DeleteIntrosRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DeleteIntrosResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetSectionPreferences
Get the prefs for a section by id and potentially overriding the agent
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetSectionPreferencesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetSectionPreferencesResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
SetSectionPreferences
Set the prefs for a section by id
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.SetSectionPreferencesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.SetSectionPreferencesResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
CancelRefresh
Cancel the refresh of a section
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.CancelRefreshRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.CancelRefreshResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
RefreshSection
Start a refresh of this section
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RefreshSectionRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.RefreshSectionResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetAvailableSorts
Get the sort mechanisms available in a section
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetAvailableSortsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetAvailableSortsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetStreamLevels
The the loudness of a stream in db, one entry per 100ms
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetStreamLevelsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetStreamLevelsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetStreamLoudness
The the loudness of a stream in db, one number per line, one entry per 100ms
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetStreamLoudnessRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetStreamLoudnessResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetChapterImage
Get a single chapter image for a piece of media
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetChapterImageRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetChapterImageResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
SetItemArtwork
Set the artwork, thumb, element for a metadata item Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.SetItemArtworkRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.SetItemArtworkResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
UpdateItemArtwork
Set the artwork, thumb, element for a metadata item Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.UpdateItemArtworkRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.UpdateItemArtworkResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DeleteMarker
Delete a marker for this user on the metadata item
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DeleteMarkerRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DeleteMarkerResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
EditMarker
Edit a marker for this user on the metadata item
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.EditMarkerRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.EditMarkerResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DeleteMediaItem
Delete a single media from a metadata item in the library
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DeleteMediaItemRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DeleteMediaItemResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetPartIndex
Get BIF index for a part by index type
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetPartIndexRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetPartIndexResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DeleteCollection
Delete a library collection from the PMS
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DeleteCollectionRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DeleteCollectionResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetSectionImage
Get a composite image of images in this section
Example Usage
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,
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetSectionImageRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetSectionImageResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DeleteStream
Delete a stream. Only applies to downloaded subtitle streams or a sidecar subtitle when media deletion is enabled.
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DeleteStreamRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DeleteStreamResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetStream
Get a stream (such as a sidecar subtitle stream)
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetStreamRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetStreamResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
SetStreamOffset
Set a stream offset in ms. This may not be respected by all clients
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.SetStreamOffsetRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.SetStreamOffsetResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetItemArtwork
Get the artwork, thumb, element for a metadata item
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetItemArtworkRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetItemArtworkResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetMediaPart
Get a media part for streaming or download.
- streaming: This is the default scenario. Bandwidth usage on this endpoint will be guaranteed (on the server's end) to be at least the bandwidth reservation given in the decision. If no decision exists, an ad-hoc decision will be created if sufficient bandwidth exists. Clients should not rely on ad-hoc decisions being made as this may be removed in the future.
- download: Indicated if the query parameter indicates this is a download. Bandwidth will be prioritized behind playbacks and will get a fair share of what remains.
Example Usage
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.BoolIntOne.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetMediaPartRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetMediaPartResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetImageFromBif
Extract an image from the BIF for a part at a particular offset
Example Usage
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
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetImageFromBifRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetImageFromBifResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |