Compare commits

...

40 Commits

Author SHA1 Message Date
speakeasybot
8642a796e0 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.636.3 2025-10-13 00:12:37 +00:00
speakeasybot
37988d5081 ## Go SDK Changes Detected:
* `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** ⚠️
2025-10-12 05:54:12 +00:00
Luke Hagar
b6e4544107 Update plexapi source location in workflow.yaml 2025-10-11 21:21:59 -05:00
speakeasybot
0a712f5595 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.635.1 2025-10-07 00:11:50 +00:00
speakeasybot
484b48c271 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.615.2 2025-09-16 00:11:29 +00:00
speakeasybot
06ae97fe29 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.598.3 2025-08-07 00:13:14 +00:00
speakeasybot
5848325f97 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.598.0 2025-08-06 00:13:08 +00:00
speakeasybot
82e9da0574 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.558.1 2025-06-10 00:12:09 +00:00
speakeasybot
8c4caee48d ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.555.3 2025-06-05 00:12:09 +00:00
speakeasybot
d9f461ec33 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.542.3 2025-05-06 00:11:47 +00:00
speakeasybot
9b882120dd ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.542.0 2025-05-02 00:11:38 +00:00
speakeasybot
673a771f04 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.535.1 2025-04-19 17:13:50 +00:00
speakeasybot
216a94fe7d ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.535.1 2025-04-18 23:01:17 +00:00
speakeasybot
88d690ffc2 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.531.4 2025-04-15 00:11:29 +00:00
speakeasybot
48a739d923 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.529.1 2025-04-07 00:11:42 +00:00
speakeasybot
8b50020e1e ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.528.1 2025-04-03 21:57:04 +00:00
speakeasybot
4bcd080211 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.526.6 2025-03-31 17:31:23 +00:00
Luke Hagar
2e0f3b64ea Update workflow.yaml 2025-03-31 12:04:45 -05:00
speakeasybot
9b0ac863a4 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.513.4 2025-03-10 00:10:03 +00:00
speakeasybot
33fe0755b5 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.513.4 2025-03-08 00:09:26 +00:00
speakeasybot
1cfc2d604f ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.488.0 2025-02-11 00:10:34 +00:00
speakeasybot
ef0d39928c ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.487.1 2025-02-08 00:10:21 +00:00
speakeasybot
d2a1c188d5 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.487.0 2025-02-07 00:10:35 +00:00
speakeasybot
6db5d8fb30 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.484.1 2025-02-06 00:10:27 +00:00
speakeasybot
89fbd6238e ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.476.2 2025-01-28 00:10:16 +00:00
speakeasybot
7af7441ac7 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.476.0 2025-01-25 00:10:13 +00:00
speakeasybot
d1945b544b ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.459.2 2024-12-23 00:10:53 +00:00
speakeasybot
16bb49d558 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.459.2 2024-12-21 00:10:31 +00:00
speakeasybot
4bea7ae0d8 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.3 2024-11-14 00:10:23 +00:00
speakeasybot
da5491e935 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.1 2024-11-12 00:10:16 +00:00
speakeasybot
aeebf438e1 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.406.0 2024-10-04 00:10:38 +00:00
speakeasybot
dc815780a6 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.406.0 2024-10-03 00:10:47 +00:00
speakeasybot
636840a553 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.6 2024-10-01 00:11:35 +00:00
speakeasybot
c65c9e0cae ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.402.14 2024-09-26 00:10:34 +00:00
speakeasybot
95df2396e7 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2 2024-09-22 00:11:12 +00:00
speakeasybot
f52d81d1f6 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2 2024-09-21 00:10:16 +00:00
speakeasybot
d83bd96c5f ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.399.2 2024-09-19 00:11:05 +00:00
speakeasybot
2289036c2b ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.399.2 2024-09-18 15:03:35 +00:00
speakeasybot
a7eedd3598 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.399.1 2024-09-18 14:12:18 +00:00
speakeasybot
e579b8d23b ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.399.0 2024-09-18 03:04:05 +00:00
2166 changed files with 184347 additions and 57329 deletions

6
.gitignore vendored
View File

@@ -1 +1,7 @@
.env
.env.local
.DS_Store
**/.speakeasy/temp/
**/.speakeasy/logs/
.speakeasy/reports
# .gitignore

File diff suppressed because one or more lines are too long

View File

@@ -4,18 +4,30 @@ generation:
maintainOpenAPIOrder: true
usageSnippets:
optionalPropertyRendering: withExample
sdkInitStyle: constructor
useClassNamesForArrayFields: true
fixes:
nameResolutionDec2023: true
nameResolutionFeb2025: false
parameterOrderingFeb2024: true
requestResponseComponentNamesFeb2024: true
securityFeb2025: false
sharedErrorComponentsApr2025: false
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
hoistGlobalSecurity: true
tests:
generateTests: true
generateNewTests: false
skipResponseBodyAssertions: false
go:
version: 0.11.10
version: 0.26.1
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
baseErrorName: PlexAPIError
clientServerStatusCodesAsErrors: true
defaultErrorName: SDKError
flattenGlobalSecurity: true
imports:
option: openapi
@@ -28,6 +40,10 @@ go:
inputModelSuffix: input
maxMethodParams: 4
methodArguments: require-security-and-request
modulePath: ""
nullableOptionalWrapper: false
outputModelSuffix: output
packageName: github.com/LukeHagar/plexgo
respectRequiredFields: false
responseFormat: envelope
sdkPackageName: ""

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.397.2
speakeasyVersion: 1.636.3
sources:
my-source:
sourceNamespace: my-source
@@ -9,26 +9,29 @@ sources:
- main
plexapi:
sourceNamespace: plexapi
sourceRevisionDigest: sha256:533fe97486e3fe2d84e890b7bbcdba4543d415e45181386154e011861f6da36f
sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9
sourceRevisionDigest: sha256:0e9f7ca03e6a970d7b77654ab41d0a1605f0105871db2630a7afc85d4362b624
sourceBlobDigest: sha256:c0a6079f21e9d8cf8b3a205d2da333b78b2cb7e0db9dd895a41c68c2580e2d64
tags:
- latest
- main
- speakeasy-sdk-regen-1760314262
- 1.1.1
targets:
plexgo:
source: plexapi
sourceNamespace: plexapi
sourceRevisionDigest: sha256:533fe97486e3fe2d84e890b7bbcdba4543d415e45181386154e011861f6da36f
sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9
sourceRevisionDigest: sha256:0e9f7ca03e6a970d7b77654ab41d0a1605f0105871db2630a7afc85d4362b624
sourceBlobDigest: sha256:c0a6079f21e9d8cf8b3a205d2da333b78b2cb7e0db9dd895a41c68c2580e2d64
codeSamplesNamespace: code-samples-go-plexgo
codeSamplesRevisionDigest: sha256:ba2ba4d04b303610d1b4e427fc8218019e23e68eadf78aebe160d760566a5066
codeSamplesRevisionDigest: sha256:8db88ac0989f866606672aee950cbd308054218a71e5ca5bb6afd2dc37e09f11
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
plexapi:
inputs:
- location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/refs/heads/main/plex-api-spec.yaml
registry:
location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi
targets:
plexgo:
target: go
@@ -37,3 +40,5 @@ workflow:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-go-plexgo
labelOverride:
fixedValue: PlexGO

View File

@@ -3,7 +3,9 @@ speakeasyVersion: latest
sources:
plexapi:
inputs:
- location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/refs/heads/main/plex-api-spec.yaml
registry:
location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi
targets:
plexgo:
target: go
@@ -12,3 +14,5 @@ targets:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-go-plexgo
labelOverride:
fixedValue: PlexGO

804
README.md

File diff suppressed because it is too large Load Diff

View File

@@ -853,3 +853,383 @@ Based on:
- [go v0.11.10] .
### Releases
- [Go v0.11.10] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.10 - .
## 2024-09-18 03:01:47
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.399.0 (2.415.8) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.11] .
### Releases
- [Go v0.11.11] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.11 - .
## 2024-09-18 14:09:58
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.399.1 (2.415.8) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.12] .
### Releases
- [Go v0.11.12] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.12 - .
## 2024-09-18 15:01:19
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.399.2 (2.416.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.13] .
### Releases
- [Go v0.11.13] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.13 - .
## 2024-09-19 00:08:52
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.399.2 (2.416.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.14] .
### Releases
- [Go v0.11.14] https://github.com/LukeHagar/plexgo/releases/tag/v0.11.14 - .
## 2024-09-21 00:08:46
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.401.2 (2.421.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.12.0] .
### Releases
- [Go v0.12.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.12.0 - .
## 2024-09-22 00:09:45
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.401.2 (2.421.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.12.1] .
### Releases
- [Go v0.12.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.12.1 - .
## 2024-09-26 00:09:00
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.402.14 (2.422.22) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.13.0] .
### Releases
- [Go v0.13.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.13.0 - .
## 2024-10-01 00:10:01
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.14.0] .
### Releases
- [Go v0.14.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.14.0 - .
## 2024-10-03 00:09:11
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.406.0 (2.429.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.15.0] .
### Releases
- [Go v0.15.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.15.0 - .
## 2024-10-04 00:09:04
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.406.0 (2.429.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.15.1] .
### Releases
- [Go v0.15.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.15.1 - .
## 2024-11-12 00:08:55
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.438.1 (2.457.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.16.0] .
### Releases
- [Go v0.16.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.16.0 - .
## 2024-11-14 00:09:05
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.438.3 (2.457.9) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.16.1] .
### Releases
- [Go v0.16.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.16.1 - .
## 2024-12-21 00:09:02
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.459.2 (2.483.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.17.0] .
### Releases
- [Go v0.17.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.17.0 - .
## 2024-12-23 00:09:31
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.459.2 (2.483.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.17.1] .
### Releases
- [Go v0.17.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.17.1 - .
## 2025-01-25 00:08:47
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.476.0 (2.496.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.17.2] .
### Releases
- [Go v0.17.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.17.2 - .
## 2025-01-28 00:08:53
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.476.2 (2.495.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.17.3] .
### Releases
- [Go v0.17.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.17.3 - .
## 2025-02-06 00:09:00
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.484.1 (2.503.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.17.4] .
### Releases
- [Go v0.17.4] https://github.com/LukeHagar/plexgo/releases/tag/v0.17.4 - .
## 2025-02-07 00:09:08
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.487.0 (2.506.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.18.0] .
### Releases
- [Go v0.18.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.18.0 - .
## 2025-02-08 00:08:51
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.487.1 (2.506.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.18.1] .
### Releases
- [Go v0.18.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.18.1 - .
## 2025-02-11 00:09:00
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.488.0 (2.506.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.19.0] .
### Releases
- [Go v0.19.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.19.0 - .
## 2025-03-08 00:07:57
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.513.4 (2.545.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.19.1] .
### Releases
- [Go v0.19.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.19.1 - .
## 2025-03-10 00:08:31
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.513.4 (2.545.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.19.2] .
### Releases
- [Go v0.19.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.19.2 - .
## 2025-03-31 17:29:50
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.526.6 (2.563.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.19.3] .
### Releases
- [Go v0.19.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.19.3 - .
## 2025-04-03 21:55:33
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.528.1 (2.565.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.20.0] .
### Releases
- [Go v0.20.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.20.0 - .
## 2025-04-07 00:10:20
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.529.1 (2.566.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.20.1] .
### Releases
- [Go v0.20.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.20.1 - .
## 2025-04-15 00:10:03
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.531.4 (2.570.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.20.2] .
### Releases
- [Go v0.20.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.20.2 - .
## 2025-04-18 22:59:48
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.535.1 (2.585.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.20.3] .
### Releases
- [Go v0.20.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.20.3 - .
## 2025-04-19 17:12:25
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.535.1 (2.585.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.21.0] .
### Releases
- [Go v0.21.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.21.0 - .
## 2025-05-02 00:10:13
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.542.0 (2.596.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.21.1] .
### Releases
- [Go v0.21.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.21.1 - .
## 2025-05-06 00:10:17
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.542.3 (2.597.9) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.21.2] .
### Releases
- [Go v0.21.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.21.2 - .
## 2025-06-05 00:10:42
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.555.3 (2.620.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.22.0] .
### Releases
- [Go v0.22.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.22.0 - .
## 2025-06-10 00:10:47
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.558.1 (2.623.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.23.0] .
### Releases
- [Go v0.23.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.23.0 - .
## 2025-08-06 00:11:40
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.598.0 (2.674.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.24.0] .
### Releases
- [Go v0.24.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.24.0 - .
## 2025-08-07 00:11:47
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.598.3 (2.674.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.24.1] .
### Releases
- [Go v0.24.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.24.1 - .
## 2025-09-16 00:09:55
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.615.2 (2.698.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.24.2] .
### Releases
- [Go v0.24.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.24.2 - .
## 2025-10-07 00:10:14
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.635.1 (2.722.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.25.0] .
### Releases
- [Go v0.25.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.25.0 - .
## 2025-10-12 05:52:17
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.636.3 (2.723.11) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.26.0] .
### Releases
- [Go v0.26.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.26.0 - .
## 2025-10-13 00:10:42
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.636.3 (2.723.11) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.26.1] .
### Releases
- [Go v0.26.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.26.1 - .

View File

@@ -5,21 +5,64 @@ package main
import (
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/components"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithAccepts(components.AcceptsApplicationXML),
plexgo.WithClientIdentifier("abc123"),
plexgo.WithProduct("Plex for Roku"),
plexgo.WithVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithPlatformVersion("4.3 build 1057"),
plexgo.WithDevice("Roku 3"),
plexgo.WithModel("4200X"),
plexgo.WithDeviceVendor("Roku"),
plexgo.WithDeviceName("Living Room TV"),
plexgo.WithMarketplace("googlePlay"),
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40"),
)
ctx := context.Background()
res, err := s.Server.GetServerCapabilities(ctx)
res, err := s.Transcoder.StartTranscodeSession(ctx, operations.StartTranscodeSessionRequest{
TranscodeType: components.TranscodeTypeMusic,
Extension: operations.ExtensionMpd,
AdvancedSubtitles: components.AdvancedSubtitlesBurn.ToPointer(),
AudioBoost: plexgo.Pointer[int64](50),
AudioChannelCount: plexgo.Pointer[int64](5),
AutoAdjustQuality: components.BoolIntOne.ToPointer(),
AutoAdjustSubtitle: components.BoolIntOne.ToPointer(),
DirectPlay: components.BoolIntOne.ToPointer(),
DirectStream: components.BoolIntOne.ToPointer(),
DirectStreamAudio: components.BoolIntOne.ToPointer(),
DisableResolutionRotation: components.BoolIntOne.ToPointer(),
HasMDE: components.BoolIntOne.ToPointer(),
Location: operations.StartTranscodeSessionQueryParamLocationWan.ToPointer(),
MediaBufferSize: plexgo.Pointer[int64](102400),
MediaIndex: plexgo.Pointer[int64](0),
MusicBitrate: plexgo.Pointer[int64](5000),
Offset: plexgo.Pointer[float64](90.5),
PartIndex: plexgo.Pointer[int64](0),
Path: plexgo.Pointer("/library/metadata/151671"),
PeakBitrate: plexgo.Pointer[int64](12000),
PhotoResolution: plexgo.Pointer("1080x1080"),
Protocol: operations.StartTranscodeSessionQueryParamProtocolDash.ToPointer(),
SecondsPerSegment: plexgo.Pointer[int64](5),
SubtitleSize: plexgo.Pointer[int64](50),
VideoBitrate: plexgo.Pointer[int64](12000),
VideoQuality: plexgo.Pointer[int64](50),
VideoResolution: plexgo.Pointer("1080x1080"),
XPlexClientProfileExtra: plexgo.Pointer("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)"),
XPlexClientProfileName: plexgo.Pointer("generic"),
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
if res.ResponseStream != nil {
// handle response
}
}

View File

@@ -6,43 +6,38 @@ import (
"bytes"
"context"
"fmt"
"github.com/LukeHagar/plexgo/internal/config"
"github.com/LukeHagar/plexgo/internal/hooks"
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/operations"
"github.com/LukeHagar/plexgo/models/sdkerrors"
"github.com/cenkalti/backoff/v4"
"io"
"github.com/LukeHagar/plexgo/retry"
"net/http"
"net/url"
)
// Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
// Activities provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
//
// Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity.
// Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details:
// - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity.
// - They must contain an `type` which is used by clients to distinguish the specific activity.
// - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.)
// - The may contain a `Response` object which attributes which represent the result of the asynchronous operation.
//
// Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint.
type Activities struct {
sdkConfiguration sdkConfiguration
rootSDK *PlexAPI
sdkConfiguration config.SDKConfiguration
hooks *hooks.Hooks
}
func newActivities(sdkConfig sdkConfiguration) *Activities {
func newActivities(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Activities {
return &Activities{
rootSDK: rootSDK,
sdkConfiguration: sdkConfig,
hooks: hooks,
}
}
// GetServerActivities - Get Server Activities
// Get Server Activities
func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations.Option) (*operations.GetServerActivitiesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getServerActivities",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
// ListActivities - Get all activities
// List all activities on the server. Admins can see all activities but other users can only see their own
func (s *Activities) ListActivities(ctx context.Context, opts ...operations.Option) (*operations.ListActivitiesResponse, error) {
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
@@ -55,12 +50,27 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
}
}
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
var baseURL string
if o.ServerURL == nil {
baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
} else {
baseURL = *o.ServerURL
}
opURL, err := url.JoinPath(baseURL, "/activities")
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
hookCtx := hooks.HookContext{
SDK: s.rootSDK,
SDKConfiguration: s.sdkConfiguration,
BaseURL: baseURL,
Context: ctx,
OperationID: "listActivities",
OAuth2Scopes: nil,
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
@@ -83,6 +93,10 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
return nil, err
}
for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
@@ -103,17 +117,23 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}
return nil, retry.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
@@ -124,7 +144,7 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
@@ -132,13 +152,13 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
@@ -151,123 +171,68 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
} else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.GetServerActivitiesResponse{
res := &operations.ListActivitiesResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
getRawBody := func() ([]byte, error) {
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
return rawBody, nil
}
switch {
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out operations.GetServerActivitiesResponseBody
var out operations.ListActivitiesResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.Object = &out
default:
rawBody, err := getRawBody()
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.GetServerActivitiesBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.GetServerActivitiesUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := getRawBody()
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := getRawBody()
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
@@ -275,18 +240,21 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
}
// CancelServerActivities - Cancel Server Activities
// Cancel Server Activities
func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID string, opts ...operations.Option) (*operations.CancelServerActivitiesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "cancelServerActivities",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.CancelServerActivitiesRequest{
ActivityUUID: activityUUID,
// CancelActivity - Cancel a running activity
// Cancel a running activity. Admins can cancel all activities but other users can only cancel their own
func (s *Activities) CancelActivity(ctx context.Context, request operations.CancelActivityRequest, opts ...operations.Option) (*operations.CancelActivityResponse, error) {
globals := operations.CancelActivityGlobals{
Accepts: s.sdkConfiguration.Globals.Accepts,
ClientIdentifier: s.sdkConfiguration.Globals.ClientIdentifier,
Product: s.sdkConfiguration.Globals.Product,
Version: s.sdkConfiguration.Globals.Version,
Platform: s.sdkConfiguration.Globals.Platform,
PlatformVersion: s.sdkConfiguration.Globals.PlatformVersion,
Device: s.sdkConfiguration.Globals.Device,
Model: s.sdkConfiguration.Globals.Model,
DeviceVendor: s.sdkConfiguration.Globals.DeviceVendor,
DeviceName: s.sdkConfiguration.Globals.DeviceName,
Marketplace: s.sdkConfiguration.Globals.Marketplace,
}
o := operations.Options{}
@@ -301,12 +269,27 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
}
}
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
opURL, err := utils.GenerateURL(ctx, baseURL, "/activities/{activityUUID}", request, nil)
var baseURL string
if o.ServerURL == nil {
baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
} else {
baseURL = *o.ServerURL
}
opURL, err := utils.GenerateURL(ctx, baseURL, "/activities/{activityId}", request, globals)
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
hookCtx := hooks.HookContext{
SDK: s.rootSDK,
SDKConfiguration: s.sdkConfiguration,
BaseURL: baseURL,
Context: ctx,
OperationID: "cancelActivity",
OAuth2Scopes: nil,
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
@@ -322,13 +305,19 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("Accept", "*/*")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
utils.PopulateHeaders(ctx, req, request, globals)
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
@@ -349,17 +338,23 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}
return nil, retry.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
@@ -370,7 +365,7 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
@@ -378,13 +373,13 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
@@ -397,102 +392,52 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
} else if utils.MatchStatusCodes([]string{"400", "404", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.CancelServerActivitiesResponse{
res := &operations.CancelActivityResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
getRawBody := func() ([]byte, error) {
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
return rawBody, nil
}
switch {
case httpRes.StatusCode == 200:
case httpRes.StatusCode == 400:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.CancelServerActivitiesBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.CancelServerActivitiesUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := getRawBody()
case httpRes.StatusCode == 404:
fallthrough
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := getRawBody()
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}

View File

@@ -1,997 +0,0 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package plexgo
import (
"bytes"
"context"
"fmt"
"github.com/LukeHagar/plexgo/internal/hooks"
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/operations"
"github.com/LukeHagar/plexgo/models/sdkerrors"
"github.com/cenkalti/backoff/v4"
"io"
"net/http"
"net/url"
)
// Authentication - API Calls regarding authentication for Plex Media Server
type Authentication struct {
sdkConfiguration sdkConfiguration
}
func newAuthentication(sdkConfig sdkConfiguration) *Authentication {
return &Authentication{
sdkConfiguration: sdkConfig,
}
}
// GetTransientToken - Get a Transient Token
// This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations.GetTransientTokenQueryParamType, scope operations.Scope, opts ...operations.Option) (*operations.GetTransientTokenResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getTransientToken",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetTransientTokenRequest{
Type: type_,
Scope: scope,
}
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}
for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
opURL, err := url.JoinPath(baseURL, "/security/token")
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
}
if timeout != nil {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, *timeout)
defer cancel()
}
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}
var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.GetTransientTokenResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
getRawBody := func() ([]byte, error) {
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
return rawBody, nil
}
switch {
case httpRes.StatusCode == 200:
case httpRes.StatusCode == 400:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.GetTransientTokenBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.GetTransientTokenUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}
// GetSourceConnectionInformation - Get Source Connection Information
// If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
// Note: requires Plex Media Server >= 1.15.4.
func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, source string, opts ...operations.Option) (*operations.GetSourceConnectionInformationResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getSourceConnectionInformation",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetSourceConnectionInformationRequest{
Source: source,
}
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}
for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
opURL, err := url.JoinPath(baseURL, "/security/resources")
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
}
if timeout != nil {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, *timeout)
defer cancel()
}
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}
var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.GetSourceConnectionInformationResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
getRawBody := func() ([]byte, error) {
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
return rawBody, nil
}
switch {
case httpRes.StatusCode == 200:
case httpRes.StatusCode == 400:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.GetSourceConnectionInformationBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.GetSourceConnectionInformationUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}
// GetTokenDetails - Get Token Details
// Get the User data from the provided X-Plex-Token
func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations.Option) (*operations.GetTokenDetailsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getTokenDetails",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionServerURL,
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}
for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}
baseURL := utils.ReplaceParameters(operations.GetTokenDetailsServerList[0], map[string]string{})
if o.ServerURL != nil {
baseURL = *o.ServerURL
}
opURL, err := url.JoinPath(baseURL, "/user")
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
}
if timeout != nil {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, *timeout)
defer cancel()
}
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}
var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.GetTokenDetailsResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
getRawBody := func() ([]byte, error) {
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
return rawBody, nil
}
switch {
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out operations.GetTokenDetailsUserPlexAccount
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.UserPlexAccount = &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.GetTokenDetailsBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.GetTokenDetailsUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}
// PostUsersSignInData - Get User Sign In Data
// Sign in user with username and password and return user data with Plex authentication token
func (s *Authentication) PostUsersSignInData(ctx context.Context, xPlexClientIdentifier *string, requestBody *operations.PostUsersSignInDataRequestBody, opts ...operations.Option) (*operations.PostUsersSignInDataResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "post-users-sign-in-data",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
request := operations.PostUsersSignInDataRequest{
XPlexClientIdentifier: xPlexClientIdentifier,
RequestBody: requestBody,
}
globals := operations.PostUsersSignInDataGlobals{
XPlexClientIdentifier: s.sdkConfiguration.Globals.XPlexClientIdentifier,
}
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionServerURL,
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}
for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}
baseURL := utils.ReplaceParameters(operations.PostUsersSignInDataServerList[0], map[string]string{})
if o.ServerURL != nil {
baseURL = *o.ServerURL
}
opURL, err := url.JoinPath(baseURL, "/users/signin")
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "form", `request:"mediaType=application/x-www-form-urlencoded"`)
if err != nil {
return nil, err
}
timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
}
if timeout != nil {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, *timeout)
defer cancel()
}
req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
req.Header.Set("Content-Type", reqContentType)
if err := utils.PopulateQueryParams(ctx, req, request, globals); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}
var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.PostUsersSignInDataResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
getRawBody := func() ([]byte, error) {
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
return rawBody, nil
}
switch {
case httpRes.StatusCode == 201:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out operations.PostUsersSignInDataUserPlexAccount
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.UserPlexAccount = &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.PostUsersSignInDataBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
var out sdkerrors.PostUsersSignInDataUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := getRawBody()
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}

1284
butler.go

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

260
collections.go Normal file
View File

@@ -0,0 +1,260 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package plexgo
import (
"bytes"
"context"
"fmt"
"github.com/LukeHagar/plexgo/internal/config"
"github.com/LukeHagar/plexgo/internal/hooks"
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"github.com/LukeHagar/plexgo/models/operations"
"github.com/LukeHagar/plexgo/models/sdkerrors"
"github.com/LukeHagar/plexgo/retry"
"net/http"
"net/url"
)
// Collections - API Operations against the Collections
type Collections struct {
rootSDK *PlexAPI
sdkConfiguration config.SDKConfiguration
hooks *hooks.Hooks
}
func newCollections(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Collections {
return &Collections{
rootSDK: rootSDK,
sdkConfiguration: sdkConfig,
hooks: hooks,
}
}
// CreateCollection - Create collection
// Create a collection in the library
func (s *Collections) CreateCollection(ctx context.Context, request operations.CreateCollectionRequest, opts ...operations.Option) (*operations.CreateCollectionResponse, error) {
globals := operations.CreateCollectionGlobals{
Accepts: s.sdkConfiguration.Globals.Accepts,
ClientIdentifier: s.sdkConfiguration.Globals.ClientIdentifier,
Product: s.sdkConfiguration.Globals.Product,
Version: s.sdkConfiguration.Globals.Version,
Platform: s.sdkConfiguration.Globals.Platform,
PlatformVersion: s.sdkConfiguration.Globals.PlatformVersion,
Device: s.sdkConfiguration.Globals.Device,
Model: s.sdkConfiguration.Globals.Model,
DeviceVendor: s.sdkConfiguration.Globals.DeviceVendor,
DeviceName: s.sdkConfiguration.Globals.DeviceName,
Marketplace: s.sdkConfiguration.Globals.Marketplace,
}
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}
for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}
var baseURL string
if o.ServerURL == nil {
baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
} else {
baseURL = *o.ServerURL
}
opURL, err := url.JoinPath(baseURL, "/library/collections")
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
hookCtx := hooks.HookContext{
SDK: s.rootSDK,
SDKConfiguration: s.sdkConfiguration,
BaseURL: baseURL,
Context: ctx,
OperationID: "createCollection",
OAuth2Scopes: nil,
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
}
if timeout != nil {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, *timeout)
defer cancel()
}
req, err := http.NewRequestWithContext(ctx, "POST", opURL, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
utils.PopulateHeaders(ctx, req, request, globals)
if err := utils.PopulateQueryParams(ctx, req, request, globals); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}
var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}
return nil, retry.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
if err != nil {
return nil, err
} else {
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.CreateCollectionResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
switch {
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out components.MediaContainerWithMetadata
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.MediaContainerWithMetadata = &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
fallthrough
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}

2925
content.go Normal file

File diff suppressed because it is too large Load Diff

2918
devices.go Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
# Accepts
## Values
| Name | Value |
| ------------------------ | ------------------------ |
| `AcceptsApplicationJSON` | application/json |
| `AcceptsApplicationXML` | application/xml |

View File

@@ -0,0 +1,10 @@
# AdvancedSubtitles
## Values
| Name | Value |
| -------------------------- | -------------------------- |
| `AdvancedSubtitlesBurn` | burn |
| `AdvancedSubtitlesText` | text |
| `AdvancedSubtitlesUnknown` | unknown |

View File

@@ -0,0 +1,9 @@
# AiringsType
## Values
| Name | Value |
| -------------------------------- | -------------------------------- |
| `AiringsTypeNewAiringsOnly` | New Airings Only |
| `AiringsTypeNewAndRepeatAirings` | New and Repeat Airings |

View File

@@ -0,0 +1,9 @@
# BoolInt
## Values
| Name | Value |
| ------------- | ------------- |
| `BoolIntZero` | 0 |
| `BoolIntOne` | 1 |

View File

@@ -0,0 +1,15 @@
# Channel
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `Title` | **string* | :heavy_minus_sign: | N/A |
| `CallSign` | **string* | :heavy_minus_sign: | N/A |
| `ChannelVcn` | **string* | :heavy_minus_sign: | N/A |
| `Hd` | **bool* | :heavy_minus_sign: | N/A |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Key` | **string* | :heavy_minus_sign: | N/A |
| `Language` | **string* | :heavy_minus_sign: | N/A |
| `Thumb` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# ChannelMapping
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `ChannelKey` | **string* | :heavy_minus_sign: | N/A |
| `DeviceIdentifier` | **string* | :heavy_minus_sign: | N/A |
| `Enabled` | **string* | :heavy_minus_sign: | N/A |
| `LineupIdentifier` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,18 @@
# Composite
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| `Type` | **int64* | :heavy_minus_sign: | Limit composite to specified metadata types |
| `Format` | [*components.Format](../../models/components/format.md) | :heavy_minus_sign: | The image type |
| `BackgroundColor` | **string* | :heavy_minus_sign: | 6 character hex RGB value for background color for image |
| `Border` | **int64* | :heavy_minus_sign: | The width of the intra-image border |
| `Cols` | **int64* | :heavy_minus_sign: | Number of columns to construct in the composite image |
| `Crop` | [*components.Crop](../../models/components/crop.md) | :heavy_minus_sign: | Where to crop source images to fit into composite image proportions |
| `Height` | **int64* | :heavy_minus_sign: | The height of the image |
| `Media` | [*components.CompositeMedia](../../models/components/compositemedia.md) | :heavy_minus_sign: | The default image type to use as the sources |
| `Repeat` | **bool* | :heavy_minus_sign: | Allow repetion of images if there are not enough source images to fill grid |
| `Rows` | **int64* | :heavy_minus_sign: | Number of rows to construct in the composite image |
| `Width` | **int64* | :heavy_minus_sign: | The width of the image |

View File

@@ -0,0 +1,12 @@
# CompositeMedia
The default image type to use as the sources
## Values
| Name | Value |
| ---------------------- | ---------------------- |
| `CompositeMediaThumb` | thumb |
| `CompositeMediaArt` | art |
| `CompositeMediaBanner` | banner |

View File

@@ -0,0 +1,11 @@
# Crop
Where to crop source images to fit into composite image proportions
## Values
| Name | Value |
| ------------ | ------------ |
| `CropCenter` | center |
| `CropTop` | top |

View File

@@ -0,0 +1,10 @@
# Decision
## Values
| Name | Value |
| -------------------- | -------------------- |
| `DecisionDirectplay` | directplay |
| `DecisionTranscode` | transcode |
| `DecisionNone` | none |

View File

@@ -0,0 +1,25 @@
# Default
The default value of this setting
## Supported Types
###
```go
default := components.CreateDefaultStr(string{/* values here */})
```
###
```go
default := components.CreateDefaultNumber(float64{/* values here */})
```
###
```go
default := components.CreateDefaultBoolean(bool{/* values here */})
```

View File

@@ -0,0 +1,11 @@
# DefaultDirection
This default diction of this sort
## Values
| Name | Value |
| ---------------------- | ---------------------- |
| `DefaultDirectionAsc` | asc |
| `DefaultDirectionDesc` | desc |

View File

@@ -0,0 +1,20 @@
# Device
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `ChannelMapping` | [][components.ChannelMapping](../../models/components/channelmapping.md) | :heavy_minus_sign: | N/A |
| `Key` | **string* | :heavy_minus_sign: | N/A |
| `LastSeenAt` | **int64* | :heavy_minus_sign: | N/A |
| `Make` | **string* | :heavy_minus_sign: | N/A |
| `Model` | **string* | :heavy_minus_sign: | N/A |
| `ModelNumber` | **string* | :heavy_minus_sign: | N/A |
| `Protocol` | **string* | :heavy_minus_sign: | N/A |
| `Sources` | **string* | :heavy_minus_sign: | N/A |
| `State` | **string* | :heavy_minus_sign: | N/A |
| `Status` | **string* | :heavy_minus_sign: | N/A |
| `Tuners` | **string* | :heavy_minus_sign: | N/A |
| `URI` | **string* | :heavy_minus_sign: | N/A |
| `UUID` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,23 @@
# Directory
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
| `Title` | **string* | :heavy_minus_sign: | N/A |
| `Type` | **string* | :heavy_minus_sign: | N/A |
| `Art` | **string* | :heavy_minus_sign: | N/A |
| `Content` | **bool* | :heavy_minus_sign: | N/A |
| `Filter` | **string* | :heavy_minus_sign: | N/A |
| `HasPrefs` | **bool* | :heavy_minus_sign: | N/A |
| `HasStoreServices` | **bool* | :heavy_minus_sign: | N/A |
| `HubKey` | **string* | :heavy_minus_sign: | N/A |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Key` | **string* | :heavy_minus_sign: | N/A |
| `LastAccessedAt` | **int64* | :heavy_minus_sign: | N/A |
| `Pivot` | [][components.Pivot](../../models/components/pivot.md) | :heavy_minus_sign: | N/A |
| `Share` | **int64* | :heavy_minus_sign: | N/A |
| `Thumb` | **string* | :heavy_minus_sign: | N/A |
| `TitleBar` | **string* | :heavy_minus_sign: | N/A |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,12 @@
# Dvr
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `Device` | [][components.Device](../../models/components/device.md) | :heavy_minus_sign: | N/A |
| `Key` | **string* | :heavy_minus_sign: | N/A |
| `Language` | **string* | :heavy_minus_sign: | N/A |
| `Lineup` | **string* | :heavy_minus_sign: | N/A |
| `UUID` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,10 @@
# DvrRequestHandlerSlashGetResponses200
OK
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.DvrRequestHandlerSlashGetResponses200MediaContainer](../../models/components/dvrrequesthandlerslashgetresponses200mediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,9 @@
# DvrRequestHandlerSlashGetResponses200MediaContainer
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer](../../models/components/dvrrequesthandlerslashgetresponses200mediacontainermediacontainer.md) | :heavy_minus_sign: | N/A |
| `Dvr` | [][components.Dvr](../../models/components/dvr.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,17 @@
# DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `Status` | **int64* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error |

View File

@@ -0,0 +1,27 @@
# Filter
Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an important subset useful for top-level API.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Title` | **string* | :heavy_minus_sign: | The title for the filter. |
| `Type` | **string* | :heavy_minus_sign: | N/A |
| `Art` | **string* | :heavy_minus_sign: | N/A |
| `Content` | **bool* | :heavy_minus_sign: | N/A |
| `Filter` | **string* | :heavy_minus_sign: | This represents the filter name used for the filter, which can be used to construct complex media queries with. |
| `HasPrefs` | **bool* | :heavy_minus_sign: | N/A |
| `HasStoreServices` | **bool* | :heavy_minus_sign: | N/A |
| `HubKey` | **string* | :heavy_minus_sign: | N/A |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Key` | **string* | :heavy_minus_sign: | This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. |
| `LastAccessedAt` | **int64* | :heavy_minus_sign: | N/A |
| `Pivot` | [][components.FilterPivot](../../models/components/filterpivot.md) | :heavy_minus_sign: | N/A |
| `Share` | **int64* | :heavy_minus_sign: | N/A |
| `Thumb` | **string* | :heavy_minus_sign: | N/A |
| `TitleBar` | **string* | :heavy_minus_sign: | N/A |
| `FilterType` | **string* | :heavy_minus_sign: | This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,13 @@
# FilterPivot
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `Title` | **string* | :heavy_minus_sign: | N/A |
| `Type` | **string* | :heavy_minus_sign: | N/A |
| `Context` | **string* | :heavy_minus_sign: | N/A |
| `ID` | **string* | :heavy_minus_sign: | N/A |
| `Key` | **string* | :heavy_minus_sign: | N/A |
| `Symbol` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# Format
The image type
## Values
| Name | Value |
| ----------- | ----------- |
| `FormatJpg` | jpg |
| `FormatPng` | png |

View File

@@ -0,0 +1,10 @@
# GetResponses200
OK
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.GetResponses200MediaContainer](../../models/components/getresponses200mediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,14 @@
# GetResponses200Hub
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `HomeVisibility` | [*components.HomeVisibility](../../models/components/homevisibility.md) | :heavy_minus_sign: | Whether this hub is visible on the home screen<br/> - all: Visible to all users<br/> - none: Visible to no users<br/> - admin: Visible to only admin users<br/> - shared: Visible to shared users<br/> |
| `Identifier` | **string* | :heavy_minus_sign: | The identifier for this hub |
| `PromotedToOwnHome` | **bool* | :heavy_minus_sign: | Whether this hub is visible to admin user home |
| `PromotedToRecommended` | **bool* | :heavy_minus_sign: | Whether this hub is promoted to all for recommendations |
| `PromotedToSharedHome` | **bool* | :heavy_minus_sign: | Whether this hub is visible to shared user's home |
| `RecommendationsVisibility` | [*components.RecommendationsVisibility](../../models/components/recommendationsvisibility.md) | :heavy_minus_sign: | The visibility of this hub in recommendations:<br/> - all: Visible to all users<br/> - none: Visible to no users<br/> - admin: Visible to only admin users<br/> - shared: Visible to shared users<br/> |
| `Title` | **string* | :heavy_minus_sign: | The title of this hub |

View File

@@ -0,0 +1,17 @@
# GetResponses200MediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `Hub` | [][components.GetResponses200Hub](../../models/components/getresponses200hub.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,10 @@
# HistoryAllGetResponses200
OK
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.HistoryAllGetResponses200MediaContainer](../../models/components/historyallgetresponses200mediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,17 @@
# HistoryAllGetResponses200MediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `Metadata` | [][components.HistoryAllGetResponses200Metadata](../../models/components/historyallgetresponses200metadata.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,18 @@
# HistoryAllGetResponses200Metadata
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- |
| `AccountID` | **int64* | :heavy_minus_sign: | The account id of this playback |
| `DeviceID` | **int64* | :heavy_minus_sign: | The device id which played the item |
| `HistoryKey` | **string* | :heavy_minus_sign: | The key for this individual history item |
| `Key` | **string* | :heavy_minus_sign: | The metadata key for the item played |
| `LibrarySectionID` | **string* | :heavy_minus_sign: | The library section id containing the item played |
| `OriginallyAvailableAt` | **string* | :heavy_minus_sign: | The originally available at of the item played |
| `RatingKey` | **string* | :heavy_minus_sign: | The rating key for the item played |
| `Thumb` | **string* | :heavy_minus_sign: | The thumb of the item played |
| `Title` | **string* | :heavy_minus_sign: | The title of the item played |
| `Type` | **string* | :heavy_minus_sign: | The metadata type of the item played |
| `ViewedAt` | **int64* | :heavy_minus_sign: | The time when the item was played |

View File

@@ -0,0 +1,18 @@
# HomeVisibility
Whether this hub is visible on the home screen
- all: Visible to all users
- none: Visible to no users
- admin: Visible to only admin users
- shared: Visible to shared users
## Values
| Name | Value |
| ---------------------- | ---------------------- |
| `HomeVisibilityAll` | all |
| `HomeVisibilityNone` | none |
| `HomeVisibilityAdmin` | admin |
| `HomeVisibilityShared` | shared |

View File

@@ -0,0 +1,22 @@
# Hub
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Title` | **string* | :heavy_minus_sign: | A title for this grouping of content | |
| `Type` | **string* | :heavy_minus_sign: | The type of the items contained in this hub, or possibly `mixed` if there are multiple types | track |
| `Context` | **string* | :heavy_minus_sign: | N/A | hub.home.onDeck |
| `HubIdentifier` | **string* | :heavy_minus_sign: | A unique identifier for the hub | home.onDeck |
| `HubKey` | **string* | :heavy_minus_sign: | A key at which the exact content currently displayed can be fetched again. This is particularly important when a hub is marked as random and requesting the `key` may get different results. It's otherwise optional.<br/> | |
| `Key` | **string* | :heavy_minus_sign: | The key at which all of the content for this hub can be retrieved | /hubs/sections/home/onDeck |
| `Metadata` | [][components.Metadata](../../models/components/metadata.md) | :heavy_minus_sign: | N/A | |
| `More` | **bool* | :heavy_minus_sign: | "A boolean indicating that the hub contains more than what's included in the current response."<br/> | |
| `Promoted` | **bool* | :heavy_minus_sign: | Indicating if the hub should be promoted to the user's homescreen | |
| `Random` | **bool* | :heavy_minus_sign: | Indicating that the contents of the hub may change on each request | |
| `Size` | **int64* | :heavy_minus_sign: | N/A | 1 |
| `Style` | **string* | :heavy_minus_sign: | A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell` | |
| `Subtype` | **string* | :heavy_minus_sign: | The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types | podcast |
| `TotalSize` | **int64* | :heavy_minus_sign: | N/A | 8 |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,13 @@
# Image
Images such as movie posters and background artwork are represented by Image elements.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `Type` | [*components.ImageType](../../models/components/imagetype.md) | :heavy_minus_sign: | Describes both the purpose and intended presentation of the image. |
| `Alt` | **string* | :heavy_minus_sign: | Title to use for accessibility. |
| `URL` | **string* | :heavy_minus_sign: | The relative path or absolute url for the image. |

View File

@@ -0,0 +1,14 @@
# ImageType
Describes both the purpose and intended presentation of the image.
## Values
| Name | Value |
| ---------------------- | ---------------------- |
| `ImageTypeBackground` | background |
| `ImageTypeBanner` | banner |
| `ImageTypeClearLogo` | clearLogo |
| `ImageTypeCoverPoster` | coverPoster |
| `ImageTypeSnapshot` | snapshot |

View File

@@ -0,0 +1,83 @@
# Items
Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Title` | *any* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) |
| `Type` | *any* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. |
| `AbsoluteIndex` | **int64* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. |
| `AddedAt` | **int64* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. |
| `Art` | *any* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. |
| `AudienceRating` | **float64* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings |
| `AudienceRatingImage` | *any* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). |
| `Autotag` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Banner` | *any* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. |
| `ChapterSource` | *any* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). |
| `Composite` | *any* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). |
| `ContentRating` | *any* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. |
| `Country` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Director` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Duration` | **int64* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. |
| `Filter` | [][components.Filter](../../models/components/filter.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level |
| `Genre` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `GrandparentArt` | **string* | :heavy_minus_sign: | The `art` of the grandparent |
| `GrandparentHero` | **string* | :heavy_minus_sign: | The `hero` of the grandparent |
| `GrandparentKey` | **string* | :heavy_minus_sign: | The `key` of the grandparent |
| `GrandparentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the grandparent |
| `GrandparentTheme` | **string* | :heavy_minus_sign: | The `theme` of the grandparent |
| `GrandparentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the grandparent |
| `GrandparentTitle` | **string* | :heavy_minus_sign: | The `title` of the grandparent |
| `GUID` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Hero` | *any* | :heavy_minus_sign: | When present, the URL for a hero image for the item. |
| `Image` | [][components.Image](../../models/components/image.md) | :heavy_minus_sign: | N/A |
| `Index` | **int64* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. |
| `Key` | *any* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. |
| `LastViewedAt` | **int64* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. |
| `LeafCount` | **int64* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. |
| `Media` | [][components.Media](../../models/components/media.md) | :heavy_minus_sign: | N/A |
| `OriginallyAvailableAt` | *any* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. |
| `OriginalTitle` | *any* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. |
| `ParentHero` | **string* | :heavy_minus_sign: | The `hero` of the parent |
| `ParentIndex` | **int64* | :heavy_minus_sign: | The `index` of the parent |
| `ParentKey` | **string* | :heavy_minus_sign: | The `key` of the parent |
| `ParentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the parent |
| `ParentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the parent |
| `ParentTitle` | **string* | :heavy_minus_sign: | The `title` of the parent |
| `PrimaryExtraKey` | *any* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. |
| `Prompt` | **string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) |
| `Rating` | **float64* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. |
| `RatingArray` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `RatingCount` | **int64* | :heavy_minus_sign: | Number of ratings under this metadata |
| `RatingImage` | *any* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. |
| `RatingKey` | *any* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. |
| `Role` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Search` | **bool* | :heavy_minus_sign: | Indicates this is a search directory |
| `Secondary` | **bool* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. |
| `SkipChildren` | **bool* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. |
| `SkipParent` | **bool* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). |
| `Sort` | [][components.Sort](../../models/components/sort.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level |
| `Studio` | *any* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). |
| `Subtype` | *any* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library |
| `Summary` | *any* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). |
| `Tagline` | *any* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). |
| `Theme` | *any* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). |
| `Thumb` | *any* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. |
| `TitleSort` | *any* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). |
| `UpdatedAt` | **int64* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). |
| `UserRating` | **float64* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating |
| `ViewCount` | **int64* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. |
| `ViewedLeafCount` | **int64* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. |
| `ViewOffset` | **int64* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. |
| `Writer` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Year` | **int64* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). |
| `MetadataItem` | [][components.Items](../../models/components/items.md) | :heavy_minus_sign: | N/A |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,27 @@
# LibrarySection
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `Title` | **string* | :heavy_minus_sign: | N/A |
| `Type` | **string* | :heavy_minus_sign: | N/A |
| `Agent` | **string* | :heavy_minus_sign: | N/A |
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A |
| `Art` | **string* | :heavy_minus_sign: | N/A |
| `Composite` | **string* | :heavy_minus_sign: | N/A |
| `Content` | **bool* | :heavy_minus_sign: | N/A |
| `ContentChangedAt` | **int64* | :heavy_minus_sign: | N/A |
| `CreatedAt` | **int64* | :heavy_minus_sign: | N/A |
| `Directory` | **bool* | :heavy_minus_sign: | N/A |
| `Filters` | **bool* | :heavy_minus_sign: | Indicates whether this section has filtering capabilities |
| `Hidden` | **bool* | :heavy_minus_sign: | N/A |
| `Key` | **string* | :heavy_minus_sign: | N/A |
| `Language` | **string* | :heavy_minus_sign: | N/A |
| `Location` | [][components.LibrarySectionLocation](../../models/components/librarysectionlocation.md) | :heavy_minus_sign: | N/A |
| `Refreshing` | **bool* | :heavy_minus_sign: | Indicates whether this library section is currently scanning |
| `ScannedAt` | **int64* | :heavy_minus_sign: | N/A |
| `Scanner` | **string* | :heavy_minus_sign: | N/A |
| `Thumb` | **string* | :heavy_minus_sign: | N/A |
| `UpdatedAt` | **int64* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# LibrarySectionLocation
Represents a top-level location on disk where media in this library section is stored
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
| `ID` | **int64* | :heavy_minus_sign: | N/A |
| `Path` | *any* | :heavy_minus_sign: | The path of where this directory exists on disk |

View File

@@ -0,0 +1,12 @@
# Lineup
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `Title` | **string* | :heavy_minus_sign: | N/A |
| `Type` | **string* | :heavy_minus_sign: | The type of this object (`lineup` in this case) |
| `LineupType` | [*components.LineupType](../../models/components/lineuptype.md) | :heavy_minus_sign: | - `-1`: N/A<br/>- `0`: Over the air<br/>- `1`: Cable<br/>- `2`: Satellite<br/>- `3`: IPTV<br/>- `4`: Virtual<br/> |
| `Location` | **string* | :heavy_minus_sign: | N/A |
| `UUID` | **string* | :heavy_minus_sign: | The uuid of this lineup |

View File

@@ -0,0 +1,21 @@
# LineupType
- `-1`: N/A
- `0`: Over the air
- `1`: Cable
- `2`: Satellite
- `3`: IPTV
- `4`: Virtual
## Values
| Name | Value |
| ------------------ | ------------------ |
| `LineupTypeMinus1` | -1 |
| `LineupTypeZero` | 0 |
| `LineupTypeOne` | 1 |
| `LineupTypeTwo` | 2 |
| `LineupTypeThree` | 3 |
| `LineupTypeFour` | 4 |

View File

@@ -0,0 +1,10 @@
# Location
## Values
| Name | Value |
| ------------------ | ------------------ |
| `LocationLan` | lan |
| `LocationWan` | wan |
| `LocationCellular` | cellular |

View File

@@ -0,0 +1,29 @@
# Media
`Media` represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements since the attributes will vary based on the type. The possible attributes are not documented here, but they typically have self-evident names. High-level media information that can be used for badging and flagging, such as `videoResolution` and codecs, is included on the media element.
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| `AspectRatio` | **float64* | :heavy_minus_sign: | N/A | 2.35 |
| `AudioChannels` | **int64* | :heavy_minus_sign: | N/A | 2 |
| `AudioCodec` | *any* | :heavy_minus_sign: | N/A | aac |
| `AudioProfile` | *any* | :heavy_minus_sign: | N/A | lc |
| `Bitrate` | **int64* | :heavy_minus_sign: | N/A | 5612 |
| `Container` | *any* | :heavy_minus_sign: | N/A | mov |
| `Duration` | **int64* | :heavy_minus_sign: | N/A | 150192 |
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
| `HasVoiceActivity` | **bool* | :heavy_minus_sign: | N/A | true |
| `Height` | **int64* | :heavy_minus_sign: | N/A | 544 |
| `ID` | **int64* | :heavy_minus_sign: | N/A | 1 |
| `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | false |
| `Part` | [][components.Part](../../models/components/part.md) | :heavy_minus_sign: | N/A | |
| `VideoCodec` | *any* | :heavy_minus_sign: | N/A | h264 |
| `VideoFrameRate` | *any* | :heavy_minus_sign: | N/A | 24p |
| `VideoProfile` | *any* | :heavy_minus_sign: | N/A | main |
| `VideoResolution` | *any* | :heavy_minus_sign: | N/A | 720 |
| `Width` | **int64* | :heavy_minus_sign: | N/A | 1280 |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,16 @@
# MediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |

View File

@@ -0,0 +1,8 @@
# MediaContainerWithArtwork
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.MediaContainerWithArtworkMediaContainer](../../models/components/mediacontainerwithartworkmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,17 @@
# MediaContainerWithArtworkMediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `Metadata` | [][components.MediaContainerWithArtworkMetadata](../../models/components/mediacontainerwithartworkmetadata.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# MediaContainerWithArtworkMetadata
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `Title` | **string* | :heavy_minus_sign: | The title of the item |
| `Type` | [*components.MediaContainerWithArtworkType](../../models/components/mediacontainerwithartworktype.md) | :heavy_minus_sign: | N/A |
| `Key` | **string* | :heavy_minus_sign: | The path to the artwork |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,8 @@
# MediaContainerWithArtworkType
## Values
| Name | Value |
| ------------------------------------ | ------------------------------------ |
| `MediaContainerWithArtworkTypeImage` | image |

View File

@@ -0,0 +1,13 @@
# MediaContainerWithDecision
`MediaContainer` is commonly found as the root of a response and is a pretty generic container. Common attributes include `identifier` and things related to paging (`offset`, `size`, `totalSize`).
It is also common for a `MediaContainer` to contain attributes "hoisted" from its children. If every element in the container would have had the same attribute, then that attribute can be present on the container instead of being repeated on every element. For example, an album's list of tracks might include `parentTitle` on the container since all of the tracks have the same album title. A container may have a `source` attribute when all of the items came from the same source. Generally speaking, when looking for an attribute on an item, if the attribute wasn't found then the container should be checked for that attribute as well.
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.MediaContainerWithDecisionMediaContainer](../../models/components/mediacontainerwithdecisionmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,13 @@
# MediaContainerWithDecisionDecision
## Values
| Name | Value |
| ----------------------------------------------- | ----------------------------------------------- |
| `MediaContainerWithDecisionDecisionCopy` | copy |
| `MediaContainerWithDecisionDecisionTranscode` | transcode |
| `MediaContainerWithDecisionDecisionBurn` | burn |
| `MediaContainerWithDecisionDecisionUnavailable` | unavailable |
| `MediaContainerWithDecisionDecisionIgnore` | ignore |
| `MediaContainerWithDecisionDecisionNone` | none |

View File

@@ -0,0 +1,15 @@
# MediaContainerWithDecisionLocation
## Values
| Name | Value |
| ------------------------------------------------- | ------------------------------------------------- |
| `MediaContainerWithDecisionLocationDirect` | direct |
| `MediaContainerWithDecisionLocationSidecarSubs` | sidecar-subs |
| `MediaContainerWithDecisionLocationSegmentsVideo` | segments-video |
| `MediaContainerWithDecisionLocationSegmentsAudio` | segments-audio |
| `MediaContainerWithDecisionLocationSegmentsAv` | segments-av |
| `MediaContainerWithDecisionLocationSegmentsSubs` | segments-subs |
| `MediaContainerWithDecisionLocationEmbedded` | embedded |
| `MediaContainerWithDecisionLocationSidecar` | sidecar |

View File

@@ -0,0 +1,32 @@
# MediaContainerWithDecisionMedia
`Media` represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements since the attributes will vary based on the type. The possible attributes are not documented here, but they typically have self-evident names. High-level media information that can be used for badging and flagging, such as `videoResolution` and codecs, is included on the media element.
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `AspectRatio` | **float64* | :heavy_minus_sign: | N/A | 2.35 |
| `AudioChannels` | **int64* | :heavy_minus_sign: | N/A | 2 |
| `AudioCodec` | *any* | :heavy_minus_sign: | N/A | aac |
| `AudioProfile` | *any* | :heavy_minus_sign: | N/A | lc |
| `Bitrate` | **int64* | :heavy_minus_sign: | N/A | 5612 |
| `Container` | *any* | :heavy_minus_sign: | N/A | mov |
| `Duration` | **int64* | :heavy_minus_sign: | N/A | 150192 |
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
| `HasVoiceActivity` | **bool* | :heavy_minus_sign: | N/A | true |
| `Height` | **int64* | :heavy_minus_sign: | N/A | 544 |
| `ID` | **int64* | :heavy_minus_sign: | N/A | 1 |
| `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | false |
| `Part` | [][components.MediaContainerWithDecisionPart](../../models/components/mediacontainerwithdecisionpart.md) | :heavy_minus_sign: | N/A | |
| `VideoCodec` | *any* | :heavy_minus_sign: | N/A | h264 |
| `VideoFrameRate` | *any* | :heavy_minus_sign: | N/A | 24p |
| `VideoProfile` | *any* | :heavy_minus_sign: | N/A | main |
| `VideoResolution` | *any* | :heavy_minus_sign: | N/A | 720 |
| `Width` | **int64* | :heavy_minus_sign: | N/A | 1280 |
| `Abr` | **bool* | :heavy_minus_sign: | N/A | |
| `ResourceSession` | **string* | :heavy_minus_sign: | N/A | |
| `Selected` | **bool* | :heavy_minus_sign: | N/A | |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,26 @@
# MediaContainerWithDecisionMediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `AvailableBandwidth` | **int64* | :heavy_minus_sign: | The maximum available bitrate when the decision was rendered. |
| `DirectPlayDecisionCode` | **int64* | :heavy_minus_sign: | N/A |
| `DirectPlayDecisionText` | **string* | :heavy_minus_sign: | N/A |
| `GeneralDecisionCode` | **int64* | :heavy_minus_sign: | The overall decision. 1xxx are playback can succeed, 2xxx are a general error (such as insufficient bandwidth), 3xxx are errors in direct play, and 4xxx are errors in transcodes. Same codes are used in all. |
| `GeneralDecisionText` | **string* | :heavy_minus_sign: | N/A |
| `MdeDecisionCode` | **int64* | :heavy_minus_sign: | The code indicating the status of evaluation of playback when client indicates `hasMDE=1` |
| `MdeDecisionText` | **string* | :heavy_minus_sign: | Descriptive text for the above code |
| `Metadata` | [][components.MediaContainerWithDecisionMetadata](../../models/components/mediacontainerwithdecisionmetadata.md) | :heavy_minus_sign: | N/A |
| `TranscodeDecisionCode` | **int64* | :heavy_minus_sign: | N/A |
| `TranscodeDecisionText` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,82 @@
# MediaContainerWithDecisionMetadata
Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Title` | *any* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) |
| `Type` | *any* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. |
| `AbsoluteIndex` | **int64* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. |
| `AddedAt` | **int64* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. |
| `Art` | *any* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. |
| `AudienceRating` | **float64* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings |
| `AudienceRatingImage` | *any* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). |
| `Autotag` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Banner` | *any* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. |
| `ChapterSource` | *any* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). |
| `Composite` | *any* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). |
| `ContentRating` | *any* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. |
| `Country` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Director` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Duration` | **int64* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. |
| `Filter` | [][components.Filter](../../models/components/filter.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level |
| `Genre` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `GrandparentArt` | **string* | :heavy_minus_sign: | The `art` of the grandparent |
| `GrandparentHero` | **string* | :heavy_minus_sign: | The `hero` of the grandparent |
| `GrandparentKey` | **string* | :heavy_minus_sign: | The `key` of the grandparent |
| `GrandparentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the grandparent |
| `GrandparentTheme` | **string* | :heavy_minus_sign: | The `theme` of the grandparent |
| `GrandparentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the grandparent |
| `GrandparentTitle` | **string* | :heavy_minus_sign: | The `title` of the grandparent |
| `GUID` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Hero` | *any* | :heavy_minus_sign: | When present, the URL for a hero image for the item. |
| `Image` | [][components.Image](../../models/components/image.md) | :heavy_minus_sign: | N/A |
| `Index` | **int64* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. |
| `Key` | *any* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. |
| `LastViewedAt` | **int64* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. |
| `LeafCount` | **int64* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. |
| `Media` | [][components.MediaContainerWithDecisionMedia](../../models/components/mediacontainerwithdecisionmedia.md) | :heavy_minus_sign: | N/A |
| `OriginallyAvailableAt` | *any* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. |
| `OriginalTitle` | *any* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. |
| `ParentHero` | **string* | :heavy_minus_sign: | The `hero` of the parent |
| `ParentIndex` | **int64* | :heavy_minus_sign: | The `index` of the parent |
| `ParentKey` | **string* | :heavy_minus_sign: | The `key` of the parent |
| `ParentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the parent |
| `ParentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the parent |
| `ParentTitle` | **string* | :heavy_minus_sign: | The `title` of the parent |
| `PrimaryExtraKey` | *any* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. |
| `Prompt` | **string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) |
| `Rating` | **float64* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. |
| `RatingArray` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `RatingCount` | **int64* | :heavy_minus_sign: | Number of ratings under this metadata |
| `RatingImage` | *any* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. |
| `RatingKey` | *any* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. |
| `Role` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Search` | **bool* | :heavy_minus_sign: | Indicates this is a search directory |
| `Secondary` | **bool* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. |
| `SkipChildren` | **bool* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. |
| `SkipParent` | **bool* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). |
| `Sort` | [][components.Sort](../../models/components/sort.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level |
| `Studio` | *any* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). |
| `Subtype` | *any* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library |
| `Summary` | *any* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). |
| `Tagline` | *any* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). |
| `Theme` | *any* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). |
| `Thumb` | *any* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. |
| `TitleSort` | *any* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). |
| `UpdatedAt` | **int64* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). |
| `UserRating` | **float64* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating |
| `ViewCount` | **int64* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. |
| `ViewedLeafCount` | **int64* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. |
| `ViewOffset` | **int64* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. |
| `Writer` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Year` | **int64* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,24 @@
# MediaContainerWithDecisionPart
`Part` represents a particular file or "part" of a media item. The part is the playable unit of the media hierarchy. Suppose that a movie library contains a movie that is broken up into files, reminiscent of a movie split across two BDs. The metadata item represents information about the movie, the media item represents this instance of the movie at this resolution and quality, and the part items represent the two playable files. If another media were added which contained the joining of these two parts transcoded down to a lower resolution, then this metadata would contain 2 medias, one with 2 parts and one with 1 part.
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `AudioProfile` | *any* | :heavy_minus_sign: | N/A | lc |
| `Container` | *any* | :heavy_minus_sign: | The container of the media file, such as `mp4` or `mkv` | mov |
| `Duration` | **int64* | :heavy_minus_sign: | The duration of the media item, in milliseconds | 150192 |
| `File` | *any* | :heavy_minus_sign: | The local file path at which the part is stored on the server | /home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov |
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
| `ID` | **int64* | :heavy_minus_sign: | N/A | 1 |
| `Key` | *any* | :heavy_minus_sign: | The key from which the media can be streamed | /library/parts/1/1531779263/file.mov |
| `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | false |
| `Size` | **int64* | :heavy_minus_sign: | The size of the media, in bytes | 105355654 |
| `Stream` | [][components.MediaContainerWithDecisionStream](../../models/components/mediacontainerwithdecisionstream.md) | :heavy_minus_sign: | N/A | |
| `VideoProfile` | *any* | :heavy_minus_sign: | N/A | main |
| `Decision` | [*components.Decision](../../models/components/decision.md) | :heavy_minus_sign: | N/A | |
| `Selected` | **bool* | :heavy_minus_sign: | N/A | |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,42 @@
# MediaContainerWithDecisionStream
`Stream` represents a particular stream from a media item, such as the video stream, audio stream, or subtitle stream. The stream may either be part of the file represented by the parent `Part` or, especially for subtitles, an external file. The stream contains more detailed information about the specific stream. For example, a video may include the `aspectRatio` at the `Media` level, but detailed information about the video stream like the color space will be included on the `Stream` for the video stream. Note that photos do not have streams (mostly as an optimization).
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `Default` | **bool* | :heavy_minus_sign: | N/A | true |
| `AudioChannelLayout` | *any* | :heavy_minus_sign: | N/A | stereo |
| `BitDepth` | **int64* | :heavy_minus_sign: | N/A | 8 |
| `Bitrate` | **int64* | :heavy_minus_sign: | N/A | 5466 |
| `CanAutoSync` | **bool* | :heavy_minus_sign: | For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. | true |
| `ChromaLocation` | *any* | :heavy_minus_sign: | N/A | topleft |
| `ChromaSubsampling` | *any* | :heavy_minus_sign: | N/A | 4:2:0 |
| `Codec` | *any* | :heavy_minus_sign: | The codec of the stream, such as `h264` or `aac` | h264 |
| `ColorPrimaries` | *any* | :heavy_minus_sign: | N/A | bt709 |
| `ColorRange` | *any* | :heavy_minus_sign: | N/A | tv |
| `ColorSpace` | *any* | :heavy_minus_sign: | N/A | bt709 |
| `ColorTrc` | *any* | :heavy_minus_sign: | N/A | bt709 |
| `DisplayTitle` | *any* | :heavy_minus_sign: | A friendly name for the stream, often comprised of the language and codec information | English (H.264 Main) |
| `FrameRate` | **float64* | :heavy_minus_sign: | N/A | 23.976 |
| `HasScalingMatrix` | *any* | :heavy_minus_sign: | N/A | false |
| `Height` | **int64* | :heavy_minus_sign: | N/A | 544 |
| `ID` | **int64* | :heavy_minus_sign: | N/A | 1 |
| `Index` | **int64* | :heavy_minus_sign: | If the stream is part of the `Part` and not an external resource, the index of the stream within that part | 0 |
| `Key` | *any* | :heavy_minus_sign: | If the stream is independently streamable, the key from which it can be streamed | /library/streams/1 |
| `Language` | *any* | :heavy_minus_sign: | N/A | English |
| `LanguageCode` | *any* | :heavy_minus_sign: | The three character language code for the stream contents | eng |
| `Level` | **int64* | :heavy_minus_sign: | N/A | 31 |
| `Profile` | *any* | :heavy_minus_sign: | N/A | main |
| `RefFrames` | **int64* | :heavy_minus_sign: | N/A | 2 |
| `SamplingRate` | **int64* | :heavy_minus_sign: | N/A | 48000 |
| `Selected` | **bool* | :heavy_minus_sign: | N/A | |
| `StreamIdentifier` | **int64* | :heavy_minus_sign: | N/A | 1 |
| `StreamType` | **int64* | :heavy_minus_sign: | A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics | 1 |
| `Width` | **int64* | :heavy_minus_sign: | N/A | 1280 |
| `Decision` | [*components.MediaContainerWithDecisionDecision](../../models/components/mediacontainerwithdecisiondecision.md) | :heavy_minus_sign: | N/A | |
| `Location` | [*components.MediaContainerWithDecisionLocation](../../models/components/mediacontainerwithdecisionlocation.md) | :heavy_minus_sign: | N/A | |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# MediaContainerWithDevice
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.MediaContainerWithDeviceMediaContainer](../../models/components/mediacontainerwithdevicemediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,20 @@
# MediaContainerWithDeviceDevice
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `ChannelMapping` | [][components.ChannelMapping](../../models/components/channelmapping.md) | :heavy_minus_sign: | N/A |
| `Key` | **string* | :heavy_minus_sign: | N/A |
| `LastSeenAt` | **int64* | :heavy_minus_sign: | N/A |
| `Make` | **string* | :heavy_minus_sign: | N/A |
| `Model` | **string* | :heavy_minus_sign: | N/A |
| `ModelNumber` | **string* | :heavy_minus_sign: | N/A |
| `Protocol` | **string* | :heavy_minus_sign: | N/A |
| `Sources` | **string* | :heavy_minus_sign: | N/A |
| `State` | **string* | :heavy_minus_sign: | N/A |
| `Status` | **string* | :heavy_minus_sign: | N/A |
| `Tuners` | **string* | :heavy_minus_sign: | N/A |
| `URI` | **string* | :heavy_minus_sign: | N/A |
| `UUID` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,17 @@
# MediaContainerWithDeviceMediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `Device` | [][components.MediaContainerWithDeviceDevice](../../models/components/mediacontainerwithdevicedevice.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,8 @@
# MediaContainerWithDirectory
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.MediaContainerWithDirectoryMediaContainer](../../models/components/mediacontainerwithdirectorymediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,17 @@
# MediaContainerWithDirectoryMediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `Directory` | [][components.Directory](../../models/components/directory.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,10 @@
# MediaContainerWithHubs
OK
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.MediaContainerWithHubsMediaContainer](../../models/components/mediacontainerwithhubsmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,17 @@
# MediaContainerWithHubsMediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `Hub` | [][components.Hub](../../models/components/hub.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,8 @@
# MediaContainerWithLineup
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.MediaContainerWithLineupMediaContainer](../../models/components/mediacontainerwithlineupmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,18 @@
# MediaContainerWithLineupMediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `Lineup` | [][components.Lineup](../../models/components/lineup.md) | :heavy_minus_sign: | N/A |
| `UUID` | **string* | :heavy_minus_sign: | The UUID of this set lineups |

View File

@@ -0,0 +1,8 @@
# MediaContainerWithMetadata
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.MediaContainerWithMetadataMediaContainer](../../models/components/mediacontainerwithmetadatamediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,17 @@
# MediaContainerWithMetadataMediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `Metadata` | [][components.Metadata](../../models/components/metadata.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,8 @@
# MediaContainerWithNestedMetadata
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.MediaContainerWithNestedMetadataMediaContainer](../../models/components/mediacontainerwithnestedmetadatamediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,17 @@
# MediaContainerWithNestedMetadataMediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `MetadataItem` | [][components.MetadataItem](../../models/components/metadataitem.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,8 @@
# MediaContainerWithPlaylistMetadata
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.MediaContainerWithPlaylistMetadataMediaContainer](../../models/components/mediacontainerwithplaylistmetadatamediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,17 @@
# MediaContainerWithPlaylistMetadataMediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `Metadata` | [][components.MediaContainerWithPlaylistMetadataMetadata](../../models/components/mediacontainerwithplaylistmetadatametadata.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,86 @@
# MediaContainerWithPlaylistMetadataMetadata
Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ReadOnly` | **bool* | :heavy_minus_sign: | If we return this as true then this playlist cannot be altered or deleted directly by the client. |
| `Composite` | *any* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). |
| `Duration` | **int64* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. |
| `Key` | *any* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. |
| `LeafCount` | **int64* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. |
| `PlaylistType` | [*components.PlaylistType](../../models/components/playlisttype.md) | :heavy_minus_sign: | The type of the playlist. |
| `Smart` | **bool* | :heavy_minus_sign: | Whether or not the playlist is smart. |
| `SpecialPlaylistType` | **string* | :heavy_minus_sign: | If this is a special playlist, this returns its type (e.g. favorites). |
| `Title` | *any* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) |
| `Type` | *any* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. |
| `AbsoluteIndex` | **int64* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. |
| `AddedAt` | **int64* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. |
| `Art` | *any* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. |
| `AudienceRating` | **float64* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings |
| `AudienceRatingImage` | *any* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). |
| `Autotag` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Banner` | *any* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. |
| `ChapterSource` | *any* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). |
| `ContentRating` | *any* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. |
| `Country` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Director` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Filter` | [][components.Filter](../../models/components/filter.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level |
| `Genre` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `GrandparentArt` | **string* | :heavy_minus_sign: | The `art` of the grandparent |
| `GrandparentHero` | **string* | :heavy_minus_sign: | The `hero` of the grandparent |
| `GrandparentKey` | **string* | :heavy_minus_sign: | The `key` of the grandparent |
| `GrandparentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the grandparent |
| `GrandparentTheme` | **string* | :heavy_minus_sign: | The `theme` of the grandparent |
| `GrandparentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the grandparent |
| `GrandparentTitle` | **string* | :heavy_minus_sign: | The `title` of the grandparent |
| `GUID` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Hero` | *any* | :heavy_minus_sign: | When present, the URL for a hero image for the item. |
| `Image` | [][components.Image](../../models/components/image.md) | :heavy_minus_sign: | N/A |
| `Index` | **int64* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. |
| `LastViewedAt` | **int64* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. |
| `Media` | [][components.Media](../../models/components/media.md) | :heavy_minus_sign: | N/A |
| `OriginallyAvailableAt` | *any* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. |
| `OriginalTitle` | *any* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. |
| `ParentHero` | **string* | :heavy_minus_sign: | The `hero` of the parent |
| `ParentIndex` | **int64* | :heavy_minus_sign: | The `index` of the parent |
| `ParentKey` | **string* | :heavy_minus_sign: | The `key` of the parent |
| `ParentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the parent |
| `ParentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the parent |
| `ParentTitle` | **string* | :heavy_minus_sign: | The `title` of the parent |
| `PrimaryExtraKey` | *any* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. |
| `Prompt` | **string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) |
| `Rating` | **float64* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. |
| `RatingArray` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `RatingCount` | **int64* | :heavy_minus_sign: | Number of ratings under this metadata |
| `RatingImage` | *any* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. |
| `RatingKey` | *any* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. |
| `Role` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Search` | **bool* | :heavy_minus_sign: | Indicates this is a search directory |
| `Secondary` | **bool* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. |
| `SkipChildren` | **bool* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. |
| `SkipParent` | **bool* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). |
| `Sort` | [][components.Sort](../../models/components/sort.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level |
| `Studio` | *any* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). |
| `Subtype` | *any* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library |
| `Summary` | *any* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). |
| `Tagline` | *any* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). |
| `Theme` | *any* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). |
| `Thumb` | *any* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. |
| `TitleSort` | *any* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). |
| `UpdatedAt` | **int64* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). |
| `UserRating` | **float64* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating |
| `ViewCount` | **int64* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. |
| `ViewedLeafCount` | **int64* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. |
| `ViewOffset` | **int64* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. |
| `Writer` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Year` | **int64* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,8 @@
# MediaContainerWithSettings
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.MediaContainerWithSettingsMediaContainer](../../models/components/mediacontainerwithsettingsmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,17 @@
# MediaContainerWithSettingsMediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `Setting` | [][components.Setting](../../models/components/setting.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,8 @@
# MediaContainerWithSubscription
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.MediaContainerWithSubscriptionMediaContainer](../../models/components/mediacontainerwithsubscriptionmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,17 @@
# MediaContainerWithSubscriptionMediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `MediaSubscription` | [][components.MediaSubscription](../../models/components/mediasubscription.md) | :heavy_minus_sign: | N/A |

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# MediaQuery
## Fields
| Field | Type | Required | Description |
| ----------- | ----------- | ----------- | ----------- |

View File

@@ -0,0 +1,26 @@
# MediaSubscription
A media subscription contains a representation of metadata desired to be recorded
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `Title` | **string* | :heavy_minus_sign: | N/A |
| `Type` | **int64* | :heavy_minus_sign: | The metadata type of the root item of the subscription |
| `AiringsType` | [*components.AiringsType](../../models/components/airingstype.md) | :heavy_minus_sign: | N/A |
| `CreatedAt` | **int64* | :heavy_minus_sign: | N/A |
| `Directory` | map[string]*any* | :heavy_minus_sign: | Media Matching Hints |
| `DurationTotal` | **int64* | :heavy_minus_sign: | Only included if `includeStorage` is specified |
| `Key` | **string* | :heavy_minus_sign: | N/A |
| `LibrarySectionTitle` | **string* | :heavy_minus_sign: | N/A |
| `LocationPath` | **string* | :heavy_minus_sign: | N/A |
| `MediaGrabOperation` | [][components.MediaGrabOperation](../../models/components/mediagraboperation.md) | :heavy_minus_sign: | N/A |
| `Playlist` | map[string]*any* | :heavy_minus_sign: | Media Matching Hints |
| `Setting` | [][components.Setting](../../models/components/setting.md) | :heavy_minus_sign: | N/A |
| `StorageTotal` | **int64* | :heavy_minus_sign: | Only included if `includeStorage` is specified |
| `TargetLibrarySectionID` | **int64* | :heavy_minus_sign: | The library section id for where the item is to be recorded |
| `TargetSectionLocationID` | **int64* | :heavy_minus_sign: | The library section location id for where the item is to be recorded |
| `Video` | map[string]*any* | :heavy_minus_sign: | Media Matching Hints |

View File

@@ -0,0 +1,82 @@
# Metadata
Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Title` | *any* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) |
| `Type` | *any* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. |
| `AbsoluteIndex` | **int64* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. |
| `AddedAt` | **int64* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. |
| `Art` | *any* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. |
| `AudienceRating` | **float64* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings |
| `AudienceRatingImage` | *any* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). |
| `Autotag` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Banner` | *any* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. |
| `ChapterSource` | *any* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). |
| `Composite` | *any* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). |
| `ContentRating` | *any* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. |
| `Country` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Director` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Duration` | **int64* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. |
| `Filter` | [][components.Filter](../../models/components/filter.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level |
| `Genre` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `GrandparentArt` | **string* | :heavy_minus_sign: | The `art` of the grandparent |
| `GrandparentHero` | **string* | :heavy_minus_sign: | The `hero` of the grandparent |
| `GrandparentKey` | **string* | :heavy_minus_sign: | The `key` of the grandparent |
| `GrandparentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the grandparent |
| `GrandparentTheme` | **string* | :heavy_minus_sign: | The `theme` of the grandparent |
| `GrandparentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the grandparent |
| `GrandparentTitle` | **string* | :heavy_minus_sign: | The `title` of the grandparent |
| `GUID` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Hero` | *any* | :heavy_minus_sign: | When present, the URL for a hero image for the item. |
| `Image` | [][components.Image](../../models/components/image.md) | :heavy_minus_sign: | N/A |
| `Index` | **int64* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. |
| `Key` | *any* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. |
| `LastViewedAt` | **int64* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. |
| `LeafCount` | **int64* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. |
| `Media` | [][components.Media](../../models/components/media.md) | :heavy_minus_sign: | N/A |
| `OriginallyAvailableAt` | *any* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. |
| `OriginalTitle` | *any* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. |
| `ParentHero` | **string* | :heavy_minus_sign: | The `hero` of the parent |
| `ParentIndex` | **int64* | :heavy_minus_sign: | The `index` of the parent |
| `ParentKey` | **string* | :heavy_minus_sign: | The `key` of the parent |
| `ParentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the parent |
| `ParentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the parent |
| `ParentTitle` | **string* | :heavy_minus_sign: | The `title` of the parent |
| `PrimaryExtraKey` | *any* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. |
| `Prompt` | **string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) |
| `Rating` | **float64* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. |
| `RatingArray` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `RatingCount` | **int64* | :heavy_minus_sign: | Number of ratings under this metadata |
| `RatingImage` | *any* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. |
| `RatingKey` | *any* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. |
| `Role` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Search` | **bool* | :heavy_minus_sign: | Indicates this is a search directory |
| `Secondary` | **bool* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. |
| `SkipChildren` | **bool* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. |
| `SkipParent` | **bool* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). |
| `Sort` | [][components.Sort](../../models/components/sort.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level |
| `Studio` | *any* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). |
| `Subtype` | *any* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library |
| `Summary` | *any* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). |
| `Tagline` | *any* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). |
| `Theme` | *any* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). |
| `Thumb` | *any* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. |
| `TitleSort` | *any* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). |
| `UpdatedAt` | **int64* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). |
| `UserRating` | **float64* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating |
| `ViewCount` | **int64* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. |
| `ViewedLeafCount` | **int64* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. |
| `ViewOffset` | **int64* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. |
| `Writer` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Year` | **int64* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,83 @@
# MetadataItem
Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Title` | *any* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) |
| `Type` | *any* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. |
| `AbsoluteIndex` | **int64* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. |
| `AddedAt` | **int64* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. |
| `Art` | *any* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. |
| `AudienceRating` | **float64* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings |
| `AudienceRatingImage` | *any* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). |
| `Autotag` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Banner` | *any* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. |
| `ChapterSource` | *any* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). |
| `Composite` | *any* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). |
| `ContentRating` | *any* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. |
| `Country` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Director` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Duration` | **int64* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. |
| `Filter` | [][components.Filter](../../models/components/filter.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level |
| `Genre` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `GrandparentArt` | **string* | :heavy_minus_sign: | The `art` of the grandparent |
| `GrandparentHero` | **string* | :heavy_minus_sign: | The `hero` of the grandparent |
| `GrandparentKey` | **string* | :heavy_minus_sign: | The `key` of the grandparent |
| `GrandparentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the grandparent |
| `GrandparentTheme` | **string* | :heavy_minus_sign: | The `theme` of the grandparent |
| `GrandparentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the grandparent |
| `GrandparentTitle` | **string* | :heavy_minus_sign: | The `title` of the grandparent |
| `GUID` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Hero` | *any* | :heavy_minus_sign: | When present, the URL for a hero image for the item. |
| `Image` | [][components.Image](../../models/components/image.md) | :heavy_minus_sign: | N/A |
| `Index` | **int64* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. |
| `Key` | *any* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. |
| `LastViewedAt` | **int64* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. |
| `LeafCount` | **int64* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. |
| `Media` | [][components.Media](../../models/components/media.md) | :heavy_minus_sign: | N/A |
| `OriginallyAvailableAt` | *any* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. |
| `OriginalTitle` | *any* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. |
| `ParentHero` | **string* | :heavy_minus_sign: | The `hero` of the parent |
| `ParentIndex` | **int64* | :heavy_minus_sign: | The `index` of the parent |
| `ParentKey` | **string* | :heavy_minus_sign: | The `key` of the parent |
| `ParentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the parent |
| `ParentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the parent |
| `ParentTitle` | **string* | :heavy_minus_sign: | The `title` of the parent |
| `PrimaryExtraKey` | *any* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. |
| `Prompt` | **string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) |
| `Rating` | **float64* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. |
| `RatingArray` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `RatingCount` | **int64* | :heavy_minus_sign: | Number of ratings under this metadata |
| `RatingImage` | *any* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. |
| `RatingKey` | *any* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. |
| `Role` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Search` | **bool* | :heavy_minus_sign: | Indicates this is a search directory |
| `Secondary` | **bool* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. |
| `SkipChildren` | **bool* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. |
| `SkipParent` | **bool* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). |
| `Sort` | [][components.Sort](../../models/components/sort.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level |
| `Studio` | *any* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). |
| `Subtype` | *any* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library |
| `Summary` | *any* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). |
| `Tagline` | *any* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). |
| `Theme` | *any* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). |
| `Thumb` | *any* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. |
| `TitleSort` | *any* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). |
| `UpdatedAt` | **int64* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). |
| `UserRating` | **float64* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating |
| `ViewCount` | **int64* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. |
| `ViewedLeafCount` | **int64* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. |
| `ViewOffset` | **int64* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. |
| `Writer` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A |
| `Year` | **int64* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). |
| `MetadataItem` | [][components.Items](../../models/components/items.md) | :heavy_minus_sign: | N/A |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,22 @@
# Part
`Part` represents a particular file or "part" of a media item. The part is the playable unit of the media hierarchy. Suppose that a movie library contains a movie that is broken up into files, reminiscent of a movie split across two BDs. The metadata item represents information about the movie, the media item represents this instance of the movie at this resolution and quality, and the part items represent the two playable files. If another media were added which contained the joining of these two parts transcoded down to a lower resolution, then this metadata would contain 2 medias, one with 2 parts and one with 1 part.
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
| `AudioProfile` | *any* | :heavy_minus_sign: | N/A | lc |
| `Container` | *any* | :heavy_minus_sign: | The container of the media file, such as `mp4` or `mkv` | mov |
| `Duration` | **int64* | :heavy_minus_sign: | The duration of the media item, in milliseconds | 150192 |
| `File` | *any* | :heavy_minus_sign: | The local file path at which the part is stored on the server | /home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov |
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
| `ID` | **int64* | :heavy_minus_sign: | N/A | 1 |
| `Key` | *any* | :heavy_minus_sign: | The key from which the media can be streamed | /library/parts/1/1531779263/file.mov |
| `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | false |
| `Size` | **int64* | :heavy_minus_sign: | The size of the media, in bytes | 105355654 |
| `Stream` | [][components.Stream](../../models/components/stream.md) | :heavy_minus_sign: | N/A | |
| `VideoProfile` | *any* | :heavy_minus_sign: | N/A | main |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |

View File

@@ -5,9 +5,9 @@
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `Title` | **string* | :heavy_minus_sign: | N/A |
| `Type` | **string* | :heavy_minus_sign: | N/A |
| `Context` | **string* | :heavy_minus_sign: | N/A |
| `ID` | **string* | :heavy_minus_sign: | N/A |
| `Key` | **string* | :heavy_minus_sign: | N/A |
| `Type` | **string* | :heavy_minus_sign: | N/A |
| `Title` | **string* | :heavy_minus_sign: | N/A |
| `Context` | **string* | :heavy_minus_sign: | N/A |
| `Symbol` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,24 @@
# Player
Information about the player being used for playback
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
| `Title` | **string* | :heavy_minus_sign: | The title of the client |
| `Address` | **string* | :heavy_minus_sign: | The remote address |
| `Local` | **bool* | :heavy_minus_sign: | Indicating if the client is playing from the local LAN |
| `MachineIdentifier` | **string* | :heavy_minus_sign: | The identifier of the client |
| `Model` | **string* | :heavy_minus_sign: | The model of the client |
| `Platform` | **string* | :heavy_minus_sign: | The platform of the client |
| `PlatformVersion` | **string* | :heavy_minus_sign: | The platformVersion of the client |
| `Product` | **string* | :heavy_minus_sign: | The product name of the client |
| `Relayed` | **bool* | :heavy_minus_sign: | Indicating if the client is playing over a relay connection |
| `RemotePublicAddress` | **string* | :heavy_minus_sign: | The client's public address |
| `Secure` | **bool* | :heavy_minus_sign: | Indicating if the client is playing over HTTPS |
| `State` | **string* | :heavy_minus_sign: | The client's last reported state |
| `UserID` | **int64* | :heavy_minus_sign: | The id of the user |
| `Vendor` | **string* | :heavy_minus_sign: | The vendor of the client |
| `Version` | **string* | :heavy_minus_sign: | The version of the client |

View File

@@ -0,0 +1,12 @@
# PlaylistType
The type of the playlist.
## Values
| Name | Value |
| ------------------- | ------------------- |
| `PlaylistTypeAudio` | audio |
| `PlaylistTypeVideo` | video |
| `PlaylistTypePhoto` | photo |

View File

@@ -0,0 +1,10 @@
# PostResponses200
OK
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*components.PostResponses200MediaContainer](../../models/components/postresponses200mediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,23 @@
# PostResponses200MediaContainer
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `Size` | **int64* | :heavy_minus_sign: | N/A |
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
| `Color` | **string* | :heavy_minus_sign: | N/A |
| `EndTimeOffset` | **int64* | :heavy_minus_sign: | N/A |
| `ID` | **int64* | :heavy_minus_sign: | N/A |
| `StartTimeOffset` | **int64* | :heavy_minus_sign: | N/A |
| `Title` | **string* | :heavy_minus_sign: | N/A |
| `Type` | [*components.PostResponses200Type](../../models/components/postresponses200type.md) | :heavy_minus_sign: | N/A |
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,12 @@
# PostResponses200Type
## Values
| Name | Value |
| -------------------------------- | -------------------------------- |
| `PostResponses200TypeIntro` | intro |
| `PostResponses200TypeCommercial` | commercial |
| `PostResponses200TypeBookmark` | bookmark |
| `PostResponses200TypeResume` | resume |
| `PostResponses200TypeCredit` | credit |

View File

@@ -0,0 +1,10 @@
# Protocol
## Values
| Name | Value |
| -------------- | -------------- |
| `ProtocolHTTP` | http |
| `ProtocolHls` | hls |
| `ProtocolDash` | dash |

View File

@@ -0,0 +1,18 @@
# RecommendationsVisibility
The visibility of this hub in recommendations:
- all: Visible to all users
- none: Visible to no users
- admin: Visible to only admin users
- shared: Visible to shared users
## Values
| Name | Value |
| --------------------------------- | --------------------------------- |
| `RecommendationsVisibilityAll` | all |
| `RecommendationsVisibilityNone` | none |
| `RecommendationsVisibilityAdmin` | admin |
| `RecommendationsVisibilityShared` | shared |

Some files were not shown because too many files have changed in this diff Show More