mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 20:47:49 +00:00
## Csharp 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.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** ⚠️
This commit is contained in:
@@ -3,82 +3,94 @@
|
||||
|
||||
## Overview
|
||||
|
||||
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.
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetServerActivities](#getserveractivities) - Get Server Activities
|
||||
* [CancelServerActivities](#cancelserveractivities) - Cancel Server Activities
|
||||
* [ListActivities](#listactivities) - Get all activities
|
||||
* [CancelActivity](#cancelactivity) - Cancel a running activity
|
||||
|
||||
## GetServerActivities
|
||||
## ListActivities
|
||||
|
||||
Get Server Activities
|
||||
List all activities on the server. Admins can see all activities but other users can only see their own
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getServerActivities" method="get" path="/activities" -->
|
||||
<!-- UsageSnippet language="csharp" operationID="listActivities" method="get" path="/activities" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Activities.GetServerActivitiesAsync();
|
||||
var res = await sdk.Activities.ListActivitiesAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetServerActivitiesResponse](../../Models/Requests/GetServerActivitiesResponse.md)**
|
||||
**[ListActivitiesResponse](../../Models/Requests/ListActivitiesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetServerActivitiesBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetServerActivitiesUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## CancelServerActivities
|
||||
## CancelActivity
|
||||
|
||||
Cancel Server Activities
|
||||
Cancel a running activity. Admins can cancel all activities but other users can only cancel their own
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="cancelServerActivities" method="delete" path="/activities/{activityUUID}" -->
|
||||
<!-- UsageSnippet language="csharp" operationID="cancelActivity" method="delete" path="/activities/{activityId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
var res = await sdk.Activities.CancelServerActivitiesAsync(activityUUID: "25b71ed5-0f9d-461c-baa7-d404e9e10d3e");
|
||||
CancelActivityRequest req = new CancelActivityRequest() {
|
||||
ActivityId = "d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e",
|
||||
};
|
||||
|
||||
var res = await sdk.Activities.CancelActivityAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
|
||||
| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e |
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [CancelActivityRequest](../../Models/Requests/CancelActivityRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[CancelServerActivitiesResponse](../../Models/Requests/CancelServerActivitiesResponse.md)**
|
||||
**[CancelActivityResponse](../../Models/Requests/CancelActivityResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.CancelServerActivitiesBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.CancelServerActivitiesUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -1,180 +0,0 @@
|
||||
# Authentication
|
||||
(*Authentication*)
|
||||
|
||||
## Overview
|
||||
|
||||
API Calls regarding authentication for Plex Media Server
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetTransientToken](#gettransienttoken) - Get a Transient Token
|
||||
* [GetSourceConnectionInformation](#getsourceconnectioninformation) - Get Source Connection Information
|
||||
* [GetTokenDetails](#gettokendetails) - Get Token Details
|
||||
* [PostUsersSignInData](#postuserssignindata) - Get User Sign In Data
|
||||
|
||||
## GetTransientToken
|
||||
|
||||
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.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getTransientToken" method="get" path="/security/token" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Authentication.GetTransientTokenAsync(
|
||||
type: GetTransientTokenQueryParamType.Delegation,
|
||||
scope: Scope.All
|
||||
);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
||||
| `Type` | [GetTransientTokenQueryParamType](../../Models/Requests/GetTransientTokenQueryParamType.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. |
|
||||
| `Scope` | [Scope](../../Models/Requests/Scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetTransientTokenResponse](../../Models/Requests/GetTransientTokenResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTransientTokenBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTransientTokenUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetSourceConnectionInformation
|
||||
|
||||
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.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getSourceConnectionInformation" method="get" path="/security/resources" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Authentication.GetSourceConnectionInformationAsync(source: "server://client-identifier");
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
|
||||
| `Source` | *string* | :heavy_check_mark: | The source identifier with an included prefix. | server://client-identifier |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetSourceConnectionInformationResponse](../../Models/Requests/GetSourceConnectionInformationResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetSourceConnectionInformationBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetSourceConnectionInformationUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetTokenDetails
|
||||
|
||||
Get the User data from the provided X-Plex-Token
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getTokenDetails" method="get" path="/user" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Authentication.GetTokenDetailsAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetTokenDetailsResponse](../../Models/Requests/GetTokenDetailsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTokenDetailsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTokenDetailsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## PostUsersSignInData
|
||||
|
||||
Sign in user with username and password and return user data with Plex authentication token
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="post-users-sign-in-data" method="post" path="/users/signin" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI();
|
||||
|
||||
PostUsersSignInDataRequest req = new PostUsersSignInDataRequest() {
|
||||
ClientID = "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
ClientName = "Plex for Roku",
|
||||
DeviceNickname = "Roku 3",
|
||||
ClientVersion = "2.4.1",
|
||||
Platform = "Roku",
|
||||
RequestBody = new PostUsersSignInDataRequestBody() {
|
||||
Login = "username@email.com",
|
||||
Password = "password123",
|
||||
VerificationCode = "123456",
|
||||
},
|
||||
};
|
||||
|
||||
var res = await sdk.Authentication.PostUsersSignInDataAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| `request` | [PostUsersSignInDataRequest](../../Models/Requests/PostUsersSignInDataRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
**[PostUsersSignInDataResponse](../../Models/Requests/PostUsersSignInDataResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.PostUsersSignInDataBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.PostUsersSignInDataUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -3,180 +3,149 @@
|
||||
|
||||
## Overview
|
||||
|
||||
Butler is the task manager of the Plex Media Server Ecosystem.
|
||||
|
||||
The butler is responsible for running periodic tasks. Some tasks run daily, others every few days, and some weekly. These includes database maintenance, metadata updating, thumbnail generation, media analysis, and other tasks.
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetButlerTasks](#getbutlertasks) - Get Butler tasks
|
||||
* [StartAllTasks](#startalltasks) - Start all Butler tasks
|
||||
* [StopAllTasks](#stopalltasks) - Stop all Butler tasks
|
||||
* [StartTask](#starttask) - Start a single Butler task
|
||||
* [StopTasks](#stoptasks) - Stop all Butler tasks
|
||||
* [GetTasks](#gettasks) - Get all Butler tasks
|
||||
* [StartTasks](#starttasks) - Start all Butler tasks
|
||||
* [StopTask](#stoptask) - Stop a single Butler task
|
||||
* [StartTask](#starttask) - Start a single Butler task
|
||||
|
||||
## GetButlerTasks
|
||||
|
||||
Returns a list of butler tasks
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getButlerTasks" method="get" path="/butler" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Butler.GetButlerTasksAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetButlerTasksResponse](../../Models/Requests/GetButlerTasksResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetButlerTasksBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetButlerTasksUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## StartAllTasks
|
||||
|
||||
This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
|
||||
1. Any tasks not scheduled to run on the current day will be skipped.
|
||||
2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.
|
||||
3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
|
||||
4. If we are outside the configured window, the task will start immediately.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="startAllTasks" method="post" path="/butler" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Butler.StartAllTasksAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[StartAllTasksResponse](../../Models/Requests/StartAllTasksResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.StartAllTasksBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.StartAllTasksUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## StopAllTasks
|
||||
## StopTasks
|
||||
|
||||
This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="stopAllTasks" method="delete" path="/butler" -->
|
||||
<!-- UsageSnippet language="csharp" operationID="stopTasks" method="delete" path="/butler" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Butler.StopAllTasksAsync();
|
||||
var res = await sdk.Butler.StopTasksAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[StopAllTasksResponse](../../Models/Requests/StopAllTasksResponse.md)**
|
||||
**[StopTasksResponse](../../Models/Requests/StopTasksResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.StopAllTasksBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.StopAllTasksUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## StartTask
|
||||
## GetTasks
|
||||
|
||||
This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
|
||||
1. Any tasks not scheduled to run on the current day will be skipped.
|
||||
2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.
|
||||
3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
|
||||
4. If we are outside the configured window, the task will start immediately.
|
||||
Get the list of butler tasks and their scheduling
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="startTask" method="post" path="/butler/{taskName}" -->
|
||||
<!-- UsageSnippet language="csharp" operationID="getTasks" method="get" path="/butler" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Butler.StartTaskAsync(taskName: TaskName.RefreshPeriodicMetadata);
|
||||
var res = await sdk.Butler.GetTasksAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `TaskName` | [TaskName](../../Models/Requests/TaskName.md) | :heavy_check_mark: | the name of the task to be started. |
|
||||
|
||||
### Response
|
||||
|
||||
**[StartTaskResponse](../../Models/Requests/StartTaskResponse.md)**
|
||||
**[GetTasksResponse](../../Models/Requests/GetTasksResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.StartTaskBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.StartTaskUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## StartTasks
|
||||
|
||||
This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
|
||||
|
||||
1. Any tasks not scheduled to run on the current day will be skipped.
|
||||
2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.
|
||||
3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
|
||||
4. If we are outside the configured window, the task will start immediately.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="startTasks" method="post" path="/butler" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Butler.StartTasksAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[StartTasksResponse](../../Models/Requests/StartTasksResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## StopTask
|
||||
|
||||
This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
|
||||
This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="stopTask" method="delete" path="/butler/{taskName}" -->
|
||||
<!-- UsageSnippet language="csharp" operationID="stopTask" method="delete" path="/butler/{task}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
var res = await sdk.Butler.StopTaskAsync(taskName: PathParamTaskName.CleanOldCacheFiles);
|
||||
StopTaskRequest req = new StopTaskRequest() {
|
||||
Task = Task.CleanOldBundles,
|
||||
};
|
||||
|
||||
var res = await sdk.Butler.StopTaskAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `TaskName` | [PathParamTaskName](../../Models/Requests/PathParamTaskName.md) | :heavy_check_mark: | The name of the task to be started. |
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `request` | [StopTaskRequest](../../Models/Requests/StopTaskRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
@@ -184,8 +153,59 @@ var res = await sdk.Butler.StopTaskAsync(taskName: PathParamTaskName.CleanOldCac
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.StopTaskBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.StopTaskUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## StartTask
|
||||
|
||||
This endpoint will attempt to start a specific Butler task by name.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="startTask" method="post" path="/butler/{task}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
StartTaskRequest req = new StartTaskRequest() {
|
||||
Task = PathParamTask.RefreshLocalMedia,
|
||||
};
|
||||
|
||||
var res = await sdk.Butler.StartTaskAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| `request` | [StartTaskRequest](../../Models/Requests/StartTaskRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[StartTaskResponse](../../Models/Requests/StartTaskResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
62
docs/sdks/collections/README.md
Normal file
62
docs/sdks/collections/README.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# Collections
|
||||
(*Collections*)
|
||||
|
||||
## Overview
|
||||
|
||||
API Operations against the Collections
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [CreateCollection](#createcollection) - Create collection
|
||||
|
||||
## CreateCollection
|
||||
|
||||
Create a collection in the library
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="createCollection" method="post" path="/library/collections" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
CreateCollectionRequest req = new CreateCollectionRequest() {
|
||||
SectionId = "<id>",
|
||||
};
|
||||
|
||||
var res = await sdk.Collections.CreateCollectionAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `request` | [CreateCollectionRequest](../../Models/Requests/CreateCollectionRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[CreateCollectionResponse](../../Models/Requests/CreateCollectionResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
712
docs/sdks/content/README.md
Normal file
712
docs/sdks/content/README.md
Normal file
@@ -0,0 +1,712 @@
|
||||
# Content
|
||||
(*Content*)
|
||||
|
||||
## Overview
|
||||
|
||||
The actual content of the media provider
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetCollectionItems](#getcollectionitems) - Get items in a collection
|
||||
* [GetMetadataItem](#getmetadataitem) - Get a metadata item
|
||||
* [GetAlbums](#getalbums) - Set section albums
|
||||
* [ListContent](#listcontent) - Get items in the section
|
||||
* [GetAllLeaves](#getallleaves) - Set section leaves
|
||||
* [GetArts](#getarts) - Set section artwork
|
||||
* [GetCategories](#getcategories) - Set section categories
|
||||
* [GetCluster](#getcluster) - Set section clusters
|
||||
* [GetSonicPath](#getsonicpath) - Similar tracks to transition from one to another
|
||||
* [GetFolders](#getfolders) - Get all folder locations
|
||||
* [ListMoments](#listmoments) - Set section moments
|
||||
* [GetSonicallySimilar](#getsonicallysimilar) - The nearest audio tracks
|
||||
* [GetCollectionImage](#getcollectionimage) - Get a collection's image
|
||||
|
||||
## GetCollectionItems
|
||||
|
||||
Get items in a collection. Note if this collection contains more than 100 items, paging must be used.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getCollectionItems" method="get" path="/library/collections/{collectionId}/items" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetCollectionItemsRequest req = new GetCollectionItemsRequest() {
|
||||
CollectionId = 314585,
|
||||
};
|
||||
|
||||
var res = await sdk.Content.GetCollectionItemsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| `request` | [GetCollectionItemsRequest](../../Models/Requests/GetCollectionItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetCollectionItemsResponse](../../Models/Requests/GetCollectionItemsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetMetadataItem
|
||||
|
||||
Get one or more metadata items.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getMetadataItem" method="get" path="/library/metadata/{ids}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetMetadataItemRequest req = new GetMetadataItemRequest() {
|
||||
Ids = new List<string>() {},
|
||||
AsyncCheckFiles = BoolInt.One,
|
||||
AsyncRefreshLocalMediaAgent = BoolInt.One,
|
||||
AsyncRefreshAnalysis = BoolInt.One,
|
||||
CheckFiles = BoolInt.One,
|
||||
SkipRefresh = BoolInt.One,
|
||||
CheckFileAvailability = BoolInt.One,
|
||||
AsyncAugmentMetadata = BoolInt.One,
|
||||
AugmentCount = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.Content.GetMetadataItemAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [GetMetadataItemRequest](../../Models/Requests/GetMetadataItemRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetMetadataItemResponse](../../Models/Requests/GetMetadataItemResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetAlbums
|
||||
|
||||
Get all albums in a music section
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getAlbums" method="get" path="/library/sections/{sectionId}/albums" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetAlbumsRequest req = new GetAlbumsRequest() {
|
||||
SectionId = 817133,
|
||||
};
|
||||
|
||||
var res = await sdk.Content.GetAlbumsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| `request` | [GetAlbumsRequest](../../Models/Requests/GetAlbumsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetAlbumsResponse](../../Models/Requests/GetAlbumsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ListContent
|
||||
|
||||
Get the items in a section, potentially filtering them
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="listContent" method="get" path="/library/sections/{sectionId}/all" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ListContentRequest req = new ListContentRequest() {
|
||||
SectionId = "<id>",
|
||||
};
|
||||
|
||||
var res = await sdk.Content.ListContentAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `request` | [ListContentRequest](../../Models/Requests/ListContentRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ListContentResponse](../../Models/Requests/ListContentResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetAllLeaves
|
||||
|
||||
Get all leaves in a section (such as episodes in a show section)
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getAllLeaves" method="get" path="/library/sections/{sectionId}/allLeaves" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetAllLeavesRequest req = new GetAllLeavesRequest() {
|
||||
SectionId = 633197,
|
||||
};
|
||||
|
||||
var res = await sdk.Content.GetAllLeavesAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `request` | [GetAllLeavesRequest](../../Models/Requests/GetAllLeavesRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetAllLeavesResponse](../../Models/Requests/GetAllLeavesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetArts
|
||||
|
||||
Get artwork for a library section
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getArts" method="get" path="/library/sections/{sectionId}/arts" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetArtsRequest req = new GetArtsRequest() {
|
||||
SectionId = 859200,
|
||||
};
|
||||
|
||||
var res = await sdk.Content.GetArtsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
|
||||
| `request` | [GetArtsRequest](../../Models/Requests/GetArtsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetArtsResponse](../../Models/Requests/GetArtsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetCategories
|
||||
|
||||
Get categories in a library section
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getCategories" method="get" path="/library/sections/{sectionId}/categories" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetCategoriesRequest req = new GetCategoriesRequest() {
|
||||
SectionId = 21841,
|
||||
};
|
||||
|
||||
var res = await sdk.Content.GetCategoriesAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `request` | [GetCategoriesRequest](../../Models/Requests/GetCategoriesRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetCategoriesResponse](../../Models/Requests/GetCategoriesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetCluster
|
||||
|
||||
Get clusters in a library section (typically for photos)
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getCluster" method="get" path="/library/sections/{sectionId}/cluster" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetClusterRequest req = new GetClusterRequest() {
|
||||
SectionId = 138560,
|
||||
};
|
||||
|
||||
var res = await sdk.Content.GetClusterAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `request` | [GetClusterRequest](../../Models/Requests/GetClusterRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetClusterResponse](../../Models/Requests/GetClusterResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetSonicPath
|
||||
|
||||
Get a list of audio tracks starting at one and ending at another which are similar across the path
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getSonicPath" method="get" path="/library/sections/{sectionId}/computePath" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetSonicPathRequest req = new GetSonicPathRequest() {
|
||||
SectionId = 914549,
|
||||
StartID = 629990,
|
||||
EndID = 687740,
|
||||
};
|
||||
|
||||
var res = await sdk.Content.GetSonicPathAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `request` | [GetSonicPathRequest](../../Models/Requests/GetSonicPathRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetSonicPathResponse](../../Models/Requests/GetSonicPathResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetFolders
|
||||
|
||||
Get all folder locations of the media in a section
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getFolders" method="get" path="/library/sections/{sectionId}/location" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetFoldersRequest req = new GetFoldersRequest() {
|
||||
SectionId = 892532,
|
||||
};
|
||||
|
||||
var res = await sdk.Content.GetFoldersAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `request` | [GetFoldersRequest](../../Models/Requests/GetFoldersRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetFoldersResponse](../../Models/Requests/GetFoldersResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ListMoments
|
||||
|
||||
Get moments in a library section (typically for photos)
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="listMoments" method="get" path="/library/sections/{sectionId}/moment" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ListMomentsRequest req = new ListMomentsRequest() {
|
||||
SectionId = 403239,
|
||||
};
|
||||
|
||||
var res = await sdk.Content.ListMomentsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `request` | [ListMomentsRequest](../../Models/Requests/ListMomentsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ListMomentsResponse](../../Models/Requests/ListMomentsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetSonicallySimilar
|
||||
|
||||
Get the nearest audio tracks to a particular analysis
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getSonicallySimilar" method="get" path="/library/sections/{sectionId}/nearest" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetSonicallySimilarRequest req = new GetSonicallySimilarRequest() {
|
||||
SectionId = 525956,
|
||||
Values = new List<long>() {},
|
||||
};
|
||||
|
||||
var res = await sdk.Content.GetSonicallySimilarAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| `request` | [GetSonicallySimilarRequest](../../Models/Requests/GetSonicallySimilarRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetSonicallySimilarResponse](../../Models/Requests/GetSonicallySimilarResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetCollectionImage
|
||||
|
||||
Get an image for the collection based on the items within
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getCollectionImage" method="get" path="/library/collections/{collectionId}/composite/{updatedAt}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetCollectionImageRequest req = new GetCollectionImageRequest() {
|
||||
CollectionId = 474227,
|
||||
UpdatedAt = 759379,
|
||||
};
|
||||
|
||||
var res = await sdk.Content.GetCollectionImageAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| `request` | [GetCollectionImageRequest](../../Models/Requests/GetCollectionImageRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetCollectionImageResponse](../../Models/Requests/GetCollectionImageResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
706
docs/sdks/devices/README.md
Normal file
706
docs/sdks/devices/README.md
Normal file
@@ -0,0 +1,706 @@
|
||||
# Devices
|
||||
(*Devices*)
|
||||
|
||||
## Overview
|
||||
|
||||
Media grabbers provide ways for media to be obtained for a given protocol. The simplest ones are `stream` and `download`. More complex grabbers can have associated devices
|
||||
|
||||
Network tuners can present themselves on the network using the Simple Service Discovery Protocol and Plex Media Server will discover them. The following XML is an example of the data returned from SSDP. The `deviceType`, `serviceType`, and `serviceId` values must remain as they are in the example in order for PMS to properly discover the device. Other less-obvious fields are described in the parameters section below.
|
||||
|
||||
Example SSDP output
|
||||
```
|
||||
<root xmlns="urn:schemas-upnp-org:device-1-0">
|
||||
<specVersion>
|
||||
<major>1</major>
|
||||
<minor>0</minor>
|
||||
</specVersion>
|
||||
<device>
|
||||
<deviceType>urn:plex-tv:device:Media:1</deviceType>
|
||||
<friendlyName>Turing Hopper 3000</friendlyName>
|
||||
<manufacturer>Plex, Inc.</manufacturer>
|
||||
<manufacturerURL>https://plex.tv/</manufacturerURL>
|
||||
<modelDescription>Turing Hopper 3000 Media Grabber</modelDescription>
|
||||
<modelName>Plex Media Grabber</modelName>
|
||||
<modelNumber>1</modelNumber>
|
||||
<modelURL>https://plex.tv</modelURL>
|
||||
<UDN>uuid:42fde8e4-93b6-41e5-8a63-12d848655811</UDN>
|
||||
<serviceList>
|
||||
<service>
|
||||
<URLBase>http://10.0.0.5:8088</URLBase>
|
||||
<serviceType>urn:plex-tv:service:MediaGrabber:1</serviceType>
|
||||
<serviceId>urn:plex-tv:serviceId:MediaGrabber</serviceId>
|
||||
</service>
|
||||
</serviceList>
|
||||
</device>
|
||||
</root>
|
||||
```
|
||||
|
||||
- UDN: (string) A UUID for the device. This should be unique across models of a device at minimum.
|
||||
- URLBase: (string) The base HTTP URL for the device from which all of the other endpoints are hosted.
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetAvailableGrabbers](#getavailablegrabbers) - Get available grabbers
|
||||
* [ListDevices](#listdevices) - Get all devices
|
||||
* [AddDevice](#adddevice) - Add a device
|
||||
* [DiscoverDevices](#discoverdevices) - Tell grabbers to discover devices
|
||||
* [RemoveDevice](#removedevice) - Remove a device
|
||||
* [GetDeviceDetails](#getdevicedetails) - Get device details
|
||||
* [ModifyDevice](#modifydevice) - Enable or disable a device
|
||||
* [SetChannelmap](#setchannelmap) - Set a device's channel mapping
|
||||
* [GetDevicesChannels](#getdeviceschannels) - Get a device's channels
|
||||
* [SetDevicePreferences](#setdevicepreferences) - Set device preferences
|
||||
* [StopScan](#stopscan) - Tell a device to stop scanning for channels
|
||||
* [Scan](#scan) - Tell a device to scan for channels
|
||||
* [GetThumb](#getthumb) - Get device thumb
|
||||
|
||||
## GetAvailableGrabbers
|
||||
|
||||
Get available grabbers visible to the server
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getAvailableGrabbers" method="get" path="/media/grabbers" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetAvailableGrabbersRequest req = new GetAvailableGrabbersRequest() {
|
||||
Protocol = "livetv",
|
||||
};
|
||||
|
||||
var res = await sdk.Devices.GetAvailableGrabbersAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
||||
| `request` | [GetAvailableGrabbersRequest](../../Models/Requests/GetAvailableGrabbersRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetAvailableGrabbersResponse](../../Models/Requests/GetAvailableGrabbersResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ListDevices
|
||||
|
||||
Get the list of all devices present
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="listDevices" method="get" path="/media/grabbers/devices" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Devices.ListDevicesAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[ListDevicesResponse](../../Models/Requests/ListDevicesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## AddDevice
|
||||
|
||||
This endpoint adds a device to an existing grabber. The device is identified, and added to the correct grabber.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="addDevice" method="post" path="/media/grabbers/devices" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
AddDeviceRequest req = new AddDeviceRequest() {
|
||||
Uri = "http://10.0.0.5",
|
||||
};
|
||||
|
||||
var res = await sdk.Devices.AddDeviceAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| `request` | [AddDeviceRequest](../../Models/Requests/AddDeviceRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[AddDeviceResponse](../../Models/Requests/AddDeviceResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## DiscoverDevices
|
||||
|
||||
Tell grabbers to discover devices
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="discoverDevices" method="post" path="/media/grabbers/devices/discover" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Devices.DiscoverDevicesAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[DiscoverDevicesResponse](../../Models/Requests/DiscoverDevicesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## RemoveDevice
|
||||
|
||||
Remove a devices by its id along with its channel mappings
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="removeDevice" method="delete" path="/media/grabbers/devices/{deviceId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
RemoveDeviceRequest req = new RemoveDeviceRequest() {
|
||||
DeviceId = 685908,
|
||||
};
|
||||
|
||||
var res = await sdk.Devices.RemoveDeviceAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `request` | [RemoveDeviceRequest](../../Models/Requests/RemoveDeviceRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[RemoveDeviceResponse](../../Models/Requests/RemoveDeviceResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetDeviceDetails
|
||||
|
||||
Get a device's details by its id
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getDeviceDetails" method="get" path="/media/grabbers/devices/{deviceId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetDeviceDetailsRequest req = new GetDeviceDetailsRequest() {
|
||||
DeviceId = 170949,
|
||||
};
|
||||
|
||||
var res = await sdk.Devices.GetDeviceDetailsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `request` | [GetDeviceDetailsRequest](../../Models/Requests/GetDeviceDetailsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetDeviceDetailsResponse](../../Models/Requests/GetDeviceDetailsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ModifyDevice
|
||||
|
||||
Enable or disable a device by its id
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="modifyDevice" method="put" path="/media/grabbers/devices/{deviceId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ModifyDeviceRequest req = new ModifyDeviceRequest() {
|
||||
DeviceId = 879135,
|
||||
Enabled = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.Devices.ModifyDeviceAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `request` | [ModifyDeviceRequest](../../Models/Requests/ModifyDeviceRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ModifyDeviceResponse](../../Models/Requests/ModifyDeviceResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## SetChannelmap
|
||||
|
||||
Set a device's channel mapping
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="setChannelmap" method="put" path="/media/grabbers/devices/{deviceId}/channelmap" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
SetChannelmapRequest req = new SetChannelmapRequest() {
|
||||
DeviceId = 937661,
|
||||
ChannelMapping = new LukeHagar.PlexAPI.SDK.Models.Requests.ChannelMapping() {},
|
||||
ChannelMappingByKey = new ChannelMappingByKey() {},
|
||||
ChannelsEnabled = new List<string>() {
|
||||
"4",
|
||||
"6",
|
||||
".",
|
||||
"1",
|
||||
",",
|
||||
"4",
|
||||
"4",
|
||||
".",
|
||||
"1",
|
||||
",",
|
||||
"4",
|
||||
"5",
|
||||
".",
|
||||
"1",
|
||||
},
|
||||
};
|
||||
|
||||
var res = await sdk.Devices.SetChannelmapAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `request` | [SetChannelmapRequest](../../Models/Requests/SetChannelmapRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[SetChannelmapResponse](../../Models/Requests/SetChannelmapResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetDevicesChannels
|
||||
|
||||
Get a device's channels by its id
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getDevicesChannels" method="get" path="/media/grabbers/devices/{deviceId}/channels" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetDevicesChannelsRequest req = new GetDevicesChannelsRequest() {
|
||||
DeviceId = 517209,
|
||||
};
|
||||
|
||||
var res = await sdk.Devices.GetDevicesChannelsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| `request` | [GetDevicesChannelsRequest](../../Models/Requests/GetDevicesChannelsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetDevicesChannelsResponse](../../Models/Requests/GetDevicesChannelsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## SetDevicePreferences
|
||||
|
||||
Set device preferences by its id
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="setDevicePreferences" method="put" path="/media/grabbers/devices/{deviceId}/prefs" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
SetDevicePreferencesRequest req = new SetDevicePreferencesRequest() {
|
||||
DeviceId = 420973,
|
||||
};
|
||||
|
||||
var res = await sdk.Devices.SetDevicePreferencesAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
||||
| `request` | [SetDevicePreferencesRequest](../../Models/Requests/SetDevicePreferencesRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[SetDevicePreferencesResponse](../../Models/Requests/SetDevicePreferencesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## StopScan
|
||||
|
||||
Tell a device to stop scanning for channels
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="stopScan" method="delete" path="/media/grabbers/devices/{deviceId}/scan" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
StopScanRequest req = new StopScanRequest() {
|
||||
DeviceId = 576494,
|
||||
};
|
||||
|
||||
var res = await sdk.Devices.StopScanAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `request` | [StopScanRequest](../../Models/Requests/StopScanRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[StopScanResponse](../../Models/Requests/StopScanResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## Scan
|
||||
|
||||
Tell a device to scan for channels
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="scan" method="post" path="/media/grabbers/devices/{deviceId}/scan" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ScanRequest req = new ScanRequest() {
|
||||
DeviceId = 57391,
|
||||
Source = "Cable",
|
||||
};
|
||||
|
||||
var res = await sdk.Devices.ScanAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
|
||||
| `request` | [ScanRequest](../../Models/Requests/ScanRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ScanResponse](../../Models/Requests/ScanResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetThumb
|
||||
|
||||
Get a device's thumb for display to the user
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getThumb" method="get" path="/media/grabbers/devices/{deviceId}/thumb/{version}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetThumbRequest req = new GetThumbRequest() {
|
||||
DeviceId = 960617,
|
||||
VersionPathParameter = 1025,
|
||||
};
|
||||
|
||||
var res = await sdk.Devices.GetThumbAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `request` | [GetThumbRequest](../../Models/Requests/GetThumbRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetThumbResponse](../../Models/Requests/GetThumbResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
536
docs/sdks/downloadqueue/README.md
Normal file
536
docs/sdks/downloadqueue/README.md
Normal file
@@ -0,0 +1,536 @@
|
||||
# DownloadQueue
|
||||
(*DownloadQueue*)
|
||||
|
||||
## Overview
|
||||
|
||||
API Operations against the Download Queue
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [CreateDownloadQueue](#createdownloadqueue) - Create download queue
|
||||
* [GetDownloadQueue](#getdownloadqueue) - Get a download queue
|
||||
* [AddDownloadQueueItems](#adddownloadqueueitems) - Add to download queue
|
||||
* [ListDownloadQueueItems](#listdownloadqueueitems) - Get download queue items
|
||||
* [GetItemDecision](#getitemdecision) - Grab download queue item decision
|
||||
* [GetDownloadQueueMedia](#getdownloadqueuemedia) - Grab download queue media
|
||||
* [RemoveDownloadQueueItems](#removedownloadqueueitems) - Delete download queue items
|
||||
* [GetDownloadQueueItems](#getdownloadqueueitems) - Get download queue items
|
||||
* [RestartProcessingDownloadQueueItems](#restartprocessingdownloadqueueitems) - Restart processing of items from the decision
|
||||
|
||||
## CreateDownloadQueue
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Creates a download queue for this client if one doesn't exist, or returns the existing queue for this client and user.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="createDownloadQueue" method="post" path="/downloadQueue" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.DownloadQueue.CreateDownloadQueueAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[CreateDownloadQueueResponse](../../Models/Requests/CreateDownloadQueueResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetDownloadQueue
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Get a download queue by its id
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getDownloadQueue" method="get" path="/downloadQueue/{queueId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetDownloadQueueRequest req = new GetDownloadQueueRequest() {
|
||||
QueueId = 922802,
|
||||
};
|
||||
|
||||
var res = await sdk.DownloadQueue.GetDownloadQueueAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `request` | [GetDownloadQueueRequest](../../Models/Requests/GetDownloadQueueRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetDownloadQueueResponse](../../Models/Requests/GetDownloadQueueResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## AddDownloadQueueItems
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Add items to the download queue
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="addDownloadQueueItems" method="post" path="/downloadQueue/{queueId}/add" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
AddDownloadQueueItemsRequest req = new AddDownloadQueueItemsRequest() {
|
||||
QueueId = 984925,
|
||||
Keys = new List<string>() {
|
||||
"/library/metadata/3",
|
||||
"/library/metadata/6",
|
||||
},
|
||||
AdvancedSubtitles = LukeHagar.PlexAPI.SDK.Models.Components.AdvancedSubtitles.Burn,
|
||||
AudioBoost = 50,
|
||||
AudioChannelCount = 5,
|
||||
AutoAdjustQuality = BoolInt.One,
|
||||
AutoAdjustSubtitle = BoolInt.One,
|
||||
DirectPlay = BoolInt.One,
|
||||
DirectStream = BoolInt.One,
|
||||
DirectStreamAudio = BoolInt.One,
|
||||
DisableResolutionRotation = BoolInt.One,
|
||||
HasMDE = BoolInt.One,
|
||||
Location = LukeHagar.PlexAPI.SDK.Models.Components.Location.Wan,
|
||||
MediaBufferSize = 102400,
|
||||
MediaIndex = 0,
|
||||
MusicBitrate = 5000,
|
||||
Offset = 90.5D,
|
||||
PartIndex = 0,
|
||||
Path = "/library/metadata/151671",
|
||||
PeakBitrate = 12000,
|
||||
PhotoResolution = "1080x1080",
|
||||
Protocol = LukeHagar.PlexAPI.SDK.Models.Components.Protocol.Dash,
|
||||
SecondsPerSegment = 5,
|
||||
SubtitleSize = 50,
|
||||
VideoBitrate = 12000,
|
||||
VideoQuality = 50,
|
||||
VideoResolution = "1080x1080",
|
||||
};
|
||||
|
||||
var res = await sdk.DownloadQueue.AddDownloadQueueItemsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||
| `request` | [AddDownloadQueueItemsRequest](../../Models/Requests/AddDownloadQueueItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[AddDownloadQueueItemsResponse](../../Models/Requests/AddDownloadQueueItemsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ListDownloadQueueItems
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Get items from a download queue
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="listDownloadQueueItems" method="get" path="/downloadQueue/{queueId}/items" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ListDownloadQueueItemsRequest req = new ListDownloadQueueItemsRequest() {
|
||||
QueueId = 524138,
|
||||
};
|
||||
|
||||
var res = await sdk.DownloadQueue.ListDownloadQueueItemsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||
| `request` | [ListDownloadQueueItemsRequest](../../Models/Requests/ListDownloadQueueItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ListDownloadQueueItemsResponse](../../Models/Requests/ListDownloadQueueItemsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetItemDecision
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Grab the decision for a download queue item
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getItemDecision" method="get" path="/downloadQueue/{queueId}/item/{itemId}/decision" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetItemDecisionRequest req = new GetItemDecisionRequest() {
|
||||
QueueId = 231605,
|
||||
ItemId = 32,
|
||||
};
|
||||
|
||||
var res = await sdk.DownloadQueue.GetItemDecisionAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [GetItemDecisionRequest](../../Models/Requests/GetItemDecisionRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetItemDecisionResponse](../../Models/Requests/GetItemDecisionResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetDownloadQueueMedia
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Grab the media for a download queue item
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getDownloadQueueMedia" method="get" path="/downloadQueue/{queueId}/item/{itemId}/media" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetDownloadQueueMediaRequest req = new GetDownloadQueueMediaRequest() {
|
||||
QueueId = 663184,
|
||||
ItemId = 32,
|
||||
};
|
||||
|
||||
var res = await sdk.DownloadQueue.GetDownloadQueueMediaAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||
| `request` | [GetDownloadQueueMediaRequest](../../Models/Requests/GetDownloadQueueMediaRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetDownloadQueueMediaResponse](../../Models/Requests/GetDownloadQueueMediaResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## RemoveDownloadQueueItems
|
||||
|
||||
delete items from a download queue
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="removeDownloadQueueItems" method="delete" path="/downloadQueue/{queueId}/items/{itemId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
RemoveDownloadQueueItemsRequest req = new RemoveDownloadQueueItemsRequest() {
|
||||
QueueId = 946275,
|
||||
ItemId = new List<long>() {
|
||||
32,
|
||||
345,
|
||||
23,
|
||||
},
|
||||
};
|
||||
|
||||
var res = await sdk.DownloadQueue.RemoveDownloadQueueItemsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
||||
| `request` | [RemoveDownloadQueueItemsRequest](../../Models/Requests/RemoveDownloadQueueItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[RemoveDownloadQueueItemsResponse](../../Models/Requests/RemoveDownloadQueueItemsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetDownloadQueueItems
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Get items from a download queue
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getDownloadQueueItems" method="get" path="/downloadQueue/{queueId}/items/{itemId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetDownloadQueueItemsRequest req = new GetDownloadQueueItemsRequest() {
|
||||
QueueId = 809886,
|
||||
ItemId = new List<long>() {
|
||||
32,
|
||||
345,
|
||||
23,
|
||||
},
|
||||
};
|
||||
|
||||
var res = await sdk.DownloadQueue.GetDownloadQueueItemsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||
| `request` | [GetDownloadQueueItemsRequest](../../Models/Requests/GetDownloadQueueItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetDownloadQueueItemsResponse](../../Models/Requests/GetDownloadQueueItemsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## RestartProcessingDownloadQueueItems
|
||||
|
||||
Available: 0.2.0
|
||||
|
||||
Reprocess download queue items with previous decision parameters
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="restartProcessingDownloadQueueItems" method="post" path="/downloadQueue/{queueId}/items/{itemId}/restart" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
RestartProcessingDownloadQueueItemsRequest req = new RestartProcessingDownloadQueueItemsRequest() {
|
||||
QueueId = 713001,
|
||||
ItemId = new List<long>() {
|
||||
32,
|
||||
345,
|
||||
23,
|
||||
},
|
||||
};
|
||||
|
||||
var res = await sdk.DownloadQueue.RestartProcessingDownloadQueueItemsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
||||
| `request` | [RestartProcessingDownloadQueueItemsRequest](../../Models/Requests/RestartProcessingDownloadQueueItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[RestartProcessingDownloadQueueItemsResponse](../../Models/Requests/RestartProcessingDownloadQueueItemsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
684
docs/sdks/dvrs/README.md
Normal file
684
docs/sdks/dvrs/README.md
Normal file
@@ -0,0 +1,684 @@
|
||||
# DVRs
|
||||
(*DVRs*)
|
||||
|
||||
## Overview
|
||||
|
||||
The DVR provides means to watch and record live TV. This section of endpoints describes how to setup the DVR itself
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [ListDVRs](#listdvrs) - Get DVRs
|
||||
* [CreateDVR](#createdvr) - Create a DVR
|
||||
* [DeleteDVR](#deletedvr) - Delete a single DVR
|
||||
* [GetDVR](#getdvr) - Get a single DVR
|
||||
* [DeleteLineup](#deletelineup) - Delete a DVR Lineup
|
||||
* [AddLineup](#addlineup) - Add a DVR Lineup
|
||||
* [SetDVRPreferences](#setdvrpreferences) - Set DVR preferences
|
||||
* [StopDVRReload](#stopdvrreload) - Tell a DVR to stop reloading program guide
|
||||
* [ReloadGuide](#reloadguide) - Tell a DVR to reload program guide
|
||||
* [TuneChannel](#tunechannel) - Tune a channel on a DVR
|
||||
* [RemoveDeviceFromDVR](#removedevicefromdvr) - Remove a device from an existing DVR
|
||||
* [AddDeviceToDVR](#adddevicetodvr) - Add a device to an existing DVR
|
||||
|
||||
## ListDVRs
|
||||
|
||||
Get the list of all available DVRs
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="listDVRs" method="get" path="/livetv/dvrs" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.DVRs.ListDVRsAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[ListDVRsResponse](../../Models/Requests/ListDVRsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## CreateDVR
|
||||
|
||||
Creation of a DVR, after creation of a devcie and a lineup is selected
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="createDVR" method="post" path="/livetv/dvrs" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
CreateDVRRequest req = new CreateDVRRequest() {
|
||||
Lineup = "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT",
|
||||
DeviceQueryParameter = new List<string>() {
|
||||
"d",
|
||||
"e",
|
||||
"v",
|
||||
"i",
|
||||
"c",
|
||||
"e",
|
||||
"[",
|
||||
"]",
|
||||
"=",
|
||||
"d",
|
||||
"e",
|
||||
"v",
|
||||
"i",
|
||||
"c",
|
||||
"e",
|
||||
":",
|
||||
"/",
|
||||
"/",
|
||||
"t",
|
||||
"v",
|
||||
".",
|
||||
"p",
|
||||
"l",
|
||||
"e",
|
||||
"x",
|
||||
".",
|
||||
"g",
|
||||
"r",
|
||||
"a",
|
||||
"b",
|
||||
"b",
|
||||
"e",
|
||||
"r",
|
||||
"s",
|
||||
".",
|
||||
"h",
|
||||
"d",
|
||||
"h",
|
||||
"o",
|
||||
"m",
|
||||
"e",
|
||||
"r",
|
||||
"u",
|
||||
"n",
|
||||
"/",
|
||||
"1",
|
||||
"0",
|
||||
"5",
|
||||
"3",
|
||||
"C",
|
||||
"0",
|
||||
"C",
|
||||
"A",
|
||||
},
|
||||
Language = "eng",
|
||||
};
|
||||
|
||||
var res = await sdk.DVRs.CreateDVRAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| `request` | [CreateDVRRequest](../../Models/Requests/CreateDVRRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[CreateDVRResponse](../../Models/Requests/CreateDVRResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## DeleteDVR
|
||||
|
||||
Delete a single DVR by its id (key)
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="deleteDVR" method="delete" path="/livetv/dvrs/{dvrId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
DeleteDVRRequest req = new DeleteDVRRequest() {
|
||||
DvrId = 855088,
|
||||
};
|
||||
|
||||
var res = await sdk.DVRs.DeleteDVRAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| `request` | [DeleteDVRRequest](../../Models/Requests/DeleteDVRRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[DeleteDVRResponse](../../Models/Requests/DeleteDVRResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetDVR
|
||||
|
||||
Get a single DVR by its id (key)
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getDVR" method="get" path="/livetv/dvrs/{dvrId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetDVRRequest req = new GetDVRRequest() {
|
||||
DvrId = 973518,
|
||||
};
|
||||
|
||||
var res = await sdk.DVRs.GetDVRAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| `request` | [GetDVRRequest](../../Models/Requests/GetDVRRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetDVRResponse](../../Models/Requests/GetDVRResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## DeleteLineup
|
||||
|
||||
Deletes a DVR device's lineup.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="deleteLineup" method="delete" path="/livetv/dvrs/{dvrId}/lineups" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
DeleteLineupRequest req = new DeleteLineupRequest() {
|
||||
DvrId = 454470,
|
||||
Lineup = "<value>",
|
||||
};
|
||||
|
||||
var res = await sdk.DVRs.DeleteLineupAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `request` | [DeleteLineupRequest](../../Models/Requests/DeleteLineupRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[DeleteLineupResponse](../../Models/Requests/DeleteLineupResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## AddLineup
|
||||
|
||||
Add a lineup to a DVR device's set of lineups.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="addLineup" method="put" path="/livetv/dvrs/{dvrId}/lineups" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
AddLineupRequest req = new AddLineupRequest() {
|
||||
DvrId = 945235,
|
||||
Lineup = "<value>",
|
||||
};
|
||||
|
||||
var res = await sdk.DVRs.AddLineupAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| `request` | [AddLineupRequest](../../Models/Requests/AddLineupRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[AddLineupResponse](../../Models/Requests/AddLineupResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## SetDVRPreferences
|
||||
|
||||
Set DVR preferences by name avd value
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="setDVRPreferences" method="put" path="/livetv/dvrs/{dvrId}/prefs" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
SetDVRPreferencesRequest req = new SetDVRPreferencesRequest() {
|
||||
DvrId = 116357,
|
||||
};
|
||||
|
||||
var res = await sdk.DVRs.SetDVRPreferencesAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `request` | [SetDVRPreferencesRequest](../../Models/Requests/SetDVRPreferencesRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[SetDVRPreferencesResponse](../../Models/Requests/SetDVRPreferencesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## StopDVRReload
|
||||
|
||||
Tell a DVR to stop reloading program guide
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="stopDVRReload" method="delete" path="/livetv/dvrs/{dvrId}/reloadGuide" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
StopDVRReloadRequest req = new StopDVRReloadRequest() {
|
||||
DvrId = 348053,
|
||||
};
|
||||
|
||||
var res = await sdk.DVRs.StopDVRReloadAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `request` | [StopDVRReloadRequest](../../Models/Requests/StopDVRReloadRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[StopDVRReloadResponse](../../Models/Requests/StopDVRReloadResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ReloadGuide
|
||||
|
||||
Tell a DVR to reload program guide
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="reloadGuide" method="post" path="/livetv/dvrs/{dvrId}/reloadGuide" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ReloadGuideRequest req = new ReloadGuideRequest() {
|
||||
DvrId = 140753,
|
||||
};
|
||||
|
||||
var res = await sdk.DVRs.ReloadGuideAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `request` | [ReloadGuideRequest](../../Models/Requests/ReloadGuideRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ReloadGuideResponse](../../Models/Requests/ReloadGuideResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## TuneChannel
|
||||
|
||||
Tune a channel on a DVR to the provided channel
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="tuneChannel" method="post" path="/livetv/dvrs/{dvrId}/channels/{channel}/tune" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
TuneChannelRequest req = new TuneChannelRequest() {
|
||||
DvrId = 834281,
|
||||
Channel = "2.1",
|
||||
};
|
||||
|
||||
var res = await sdk.DVRs.TuneChannelAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `request` | [TuneChannelRequest](../../Models/Requests/TuneChannelRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[TuneChannelResponse](../../Models/Requests/TuneChannelResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## RemoveDeviceFromDVR
|
||||
|
||||
Remove a device from an existing DVR
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="removeDeviceFromDVR" method="delete" path="/livetv/dvrs/{dvrId}/devices/{deviceId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
RemoveDeviceFromDVRRequest req = new RemoveDeviceFromDVRRequest() {
|
||||
DvrId = 945416,
|
||||
DeviceId = 260761,
|
||||
};
|
||||
|
||||
var res = await sdk.DVRs.RemoveDeviceFromDVRAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| `request` | [RemoveDeviceFromDVRRequest](../../Models/Requests/RemoveDeviceFromDVRRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[RemoveDeviceFromDVRResponse](../../Models/Requests/RemoveDeviceFromDVRResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## AddDeviceToDVR
|
||||
|
||||
Add a device to an existing DVR
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="addDeviceToDVR" method="put" path="/livetv/dvrs/{dvrId}/devices/{deviceId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
AddDeviceToDVRRequest req = new AddDeviceToDVRRequest() {
|
||||
DvrId = 334755,
|
||||
DeviceId = 852930,
|
||||
};
|
||||
|
||||
var res = await sdk.DVRs.AddDeviceToDVRAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [AddDeviceToDVRRequest](../../Models/Requests/AddDeviceToDVRRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[AddDeviceToDVRResponse](../../Models/Requests/AddDeviceToDVRResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
449
docs/sdks/epg/README.md
Normal file
449
docs/sdks/epg/README.md
Normal file
@@ -0,0 +1,449 @@
|
||||
# Epg
|
||||
(*Epg*)
|
||||
|
||||
## Overview
|
||||
|
||||
The EPG (Electronic Program Guide) is responsible for obtaining metadata for what is airing on each channel and when
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [ComputeChannelMap](#computechannelmap) - Compute the best channel map
|
||||
* [GetChannels](#getchannels) - Get channels for a lineup
|
||||
* [GetCountries](#getcountries) - Get all countries
|
||||
* [GetAllLanguages](#getalllanguages) - Get all languages
|
||||
* [GetLineup](#getlineup) - Compute the best lineup
|
||||
* [GetLineupChannels](#getlineupchannels) - Get the channels for mulitple lineups
|
||||
* [GetCountriesLineups](#getcountrieslineups) - Get lineups for a country via postal code
|
||||
* [GetCountryRegions](#getcountryregions) - Get regions for a country
|
||||
* [ListLineups](#listlineups) - Get lineups for a region
|
||||
|
||||
## ComputeChannelMap
|
||||
|
||||
Compute the best channel map, given device and lineup
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="computeChannelMap" method="get" path="/livetv/epg/channelmap" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ComputeChannelMapRequest req = new ComputeChannelMapRequest() {
|
||||
DeviceQueryParameter = "<value>",
|
||||
Lineup = "<value>",
|
||||
};
|
||||
|
||||
var res = await sdk.Epg.ComputeChannelMapAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `request` | [ComputeChannelMapRequest](../../Models/Requests/ComputeChannelMapRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ComputeChannelMapResponse](../../Models/Requests/ComputeChannelMapResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetChannels
|
||||
|
||||
Get channels for a lineup within an EPG provider
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getChannels" method="get" path="/livetv/epg/channels" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetChannelsRequest req = new GetChannelsRequest() {
|
||||
Lineup = "<value>",
|
||||
};
|
||||
|
||||
var res = await sdk.Epg.GetChannelsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `request` | [GetChannelsRequest](../../Models/Requests/GetChannelsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetChannelsResponse](../../Models/Requests/GetChannelsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetCountries
|
||||
|
||||
This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the `flavor` attribute
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getCountries" method="get" path="/livetv/epg/countries" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Epg.GetCountriesAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetCountriesResponse](../../Models/Requests/GetCountriesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetAllLanguages
|
||||
|
||||
Returns a list of all possible languages for EPG data.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getAllLanguages" method="get" path="/livetv/epg/languages" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Epg.GetAllLanguagesAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetAllLanguagesResponse](../../Models/Requests/GetAllLanguagesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetLineup
|
||||
|
||||
Compute the best lineup, given lineup group and device
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getLineup" method="get" path="/livetv/epg/lineup" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetLineupRequest req = new GetLineupRequest() {
|
||||
DeviceQueryParameter = "<value>",
|
||||
LineupGroup = "<value>",
|
||||
};
|
||||
|
||||
var res = await sdk.Epg.GetLineupAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| `request` | [GetLineupRequest](../../Models/Requests/GetLineupRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetLineupResponse](../../Models/Requests/GetLineupResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetLineupChannels
|
||||
|
||||
Get the channels across multiple lineups
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getLineupChannels" method="get" path="/livetv/epg/lineupchannels" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetLineupChannelsRequest req = new GetLineupChannelsRequest() {
|
||||
Lineup = new List<string>() {
|
||||
"<value 1>",
|
||||
"<value 2>",
|
||||
},
|
||||
};
|
||||
|
||||
var res = await sdk.Epg.GetLineupChannelsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `request` | [GetLineupChannelsRequest](../../Models/Requests/GetLineupChannelsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetLineupChannelsResponse](../../Models/Requests/GetLineupChannelsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetCountriesLineups
|
||||
|
||||
Returns a list of lineups for a given country, EPG provider and postal code
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getCountriesLineups" method="get" path="/livetv/epg/countries/{country}/{epgId}/lineups" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetCountriesLineupsRequest req = new GetCountriesLineupsRequest() {
|
||||
Country = "Malawi",
|
||||
EpgId = "<id>",
|
||||
};
|
||||
|
||||
var res = await sdk.Epg.GetCountriesLineupsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| `request` | [GetCountriesLineupsRequest](../../Models/Requests/GetCountriesLineupsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetCountriesLineupsResponse](../../Models/Requests/GetCountriesLineupsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetCountryRegions
|
||||
|
||||
Get regions for a country within an EPG provider
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getCountryRegions" method="get" path="/livetv/epg/countries/{country}/{epgId}/regions" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetCountryRegionsRequest req = new GetCountryRegionsRequest() {
|
||||
Country = "Morocco",
|
||||
EpgId = "<id>",
|
||||
};
|
||||
|
||||
var res = await sdk.Epg.GetCountryRegionsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `request` | [GetCountryRegionsRequest](../../Models/Requests/GetCountryRegionsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetCountryRegionsResponse](../../Models/Requests/GetCountryRegionsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ListLineups
|
||||
|
||||
Get lineups for a region within an EPG provider
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="listLineups" method="get" path="/livetv/epg/countries/{country}/{epgId}/regions/{region}/lineups" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ListLineupsRequest req = new ListLineupsRequest() {
|
||||
Country = "Vanuatu",
|
||||
EpgId = "<id>",
|
||||
Region = "<value>",
|
||||
};
|
||||
|
||||
var res = await sdk.Epg.ListLineupsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `request` | [ListLineupsRequest](../../Models/Requests/ListLineupsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ListLineupsResponse](../../Models/Requests/ListLineupsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
114
docs/sdks/events/README.md
Normal file
114
docs/sdks/events/README.md
Normal file
@@ -0,0 +1,114 @@
|
||||
# Events
|
||||
(*Events*)
|
||||
|
||||
## Overview
|
||||
|
||||
The server can notify clients in real-time of a wide range of events, from library scanning, to preferences being modified, to changes to media, and many other things. This is also the mechanism by which activity progress is reported.
|
||||
|
||||
Two protocols for receiving the events are available: EventSource (also known as SSE), and WebSocket.
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetNotifications](#getnotifications) - Connect to Eventsource
|
||||
* [ConnectWebSocket](#connectwebsocket) - Connect to WebSocket
|
||||
|
||||
## GetNotifications
|
||||
|
||||
Connect to the event source to get a stream of events
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getNotifications" method="get" path="/:/eventsource/notifications" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetNotificationsRequest req = new GetNotificationsRequest() {};
|
||||
|
||||
var res = await sdk.Events.GetNotificationsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `request` | [GetNotificationsRequest](../../Models/Requests/GetNotificationsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetNotificationsResponse](../../Models/Requests/GetNotificationsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ConnectWebSocket
|
||||
|
||||
Connect to the web socket to get a stream of events
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="connectWebSocket" method="get" path="/:/websocket/notifications" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ConnectWebSocketRequest req = new ConnectWebSocketRequest() {};
|
||||
|
||||
var res = await sdk.Events.ConnectWebSocketAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `request` | [ConnectWebSocketRequest](../../Models/Requests/ConnectWebSocketRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ConnectWebSocketResponse](../../Models/Requests/ConnectWebSocketResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
197
docs/sdks/general/README.md
Normal file
197
docs/sdks/general/README.md
Normal file
@@ -0,0 +1,197 @@
|
||||
# General
|
||||
(*General*)
|
||||
|
||||
## Overview
|
||||
|
||||
General endpoints for basic PMS operation not specific to any media provider
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetServerInfo](#getserverinfo) - Get PMS info
|
||||
* [GetIdentity](#getidentity) - Get PMS identity
|
||||
* [GetSourceConnectionInformation](#getsourceconnectioninformation) - Get Source Connection Information
|
||||
* [GetTransientToken](#gettransienttoken) - Get Transient Tokens
|
||||
|
||||
## GetServerInfo
|
||||
|
||||
Information about this PMS setup and configuration
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getServerInfo" method="get" path="/" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetServerInfoRequest req = new GetServerInfoRequest() {};
|
||||
|
||||
var res = await sdk.General.GetServerInfoAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `request` | [GetServerInfoRequest](../../Models/Requests/GetServerInfoRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetServerInfoResponse](../../Models/Requests/GetServerInfoResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetIdentity
|
||||
|
||||
Get details about this PMS's identity
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getIdentity" method="get" path="/identity" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
|
||||
var sdk = new PlexAPI();
|
||||
|
||||
var res = await sdk.General.GetIdentityAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetIdentityResponse](../../Models/Requests/GetIdentityResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetSourceConnectionInformation
|
||||
|
||||
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.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getSourceConnectionInformation" method="get" path="/security/resources" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetSourceConnectionInformationRequest req = new GetSourceConnectionInformationRequest() {
|
||||
Source = "server://client-identifier",
|
||||
Refresh = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.General.GetSourceConnectionInformationAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
||||
| `request` | [GetSourceConnectionInformationRequest](../../Models/Requests/GetSourceConnectionInformationRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetSourceConnectionInformationResponse](../../Models/Requests/GetSourceConnectionInformationResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetTransientToken
|
||||
|
||||
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.
|
||||
Note: This endpoint responds to all HTTP verbs but POST in preferred
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getTransientToken" method="post" path="/security/token" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetTransientTokenRequest req = new GetTransientTokenRequest() {
|
||||
Type = QueryParamType.Delegation,
|
||||
Scope = Scope.All,
|
||||
};
|
||||
|
||||
var res = await sdk.General.GetTransientTokenAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `request` | [GetTransientTokenRequest](../../Models/Requests/GetTransientTokenRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetTransientTokenResponse](../../Models/Requests/GetTransientTokenResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -3,88 +3,70 @@
|
||||
|
||||
## Overview
|
||||
|
||||
Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
|
||||
|
||||
The hubs within a media provider
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetGlobalHubs](#getglobalhubs) - Get Global Hubs
|
||||
* [GetRecentlyAdded](#getrecentlyadded) - Get Recently Added
|
||||
* [GetLibraryHubs](#getlibraryhubs) - Get library specific hubs
|
||||
* [GetAllHubs](#getallhubs) - Get global hubs
|
||||
* [GetContinueWatching](#getcontinuewatching) - Get the continue watching hub
|
||||
* [GetHubItems](#gethubitems) - Get a hub's items
|
||||
* [GetPromotedHubs](#getpromotedhubs) - Get the hubs which are promoted
|
||||
* [GetMetadataHubs](#getmetadatahubs) - Get hubs for section by metadata item
|
||||
* [GetPostplayHubs](#getpostplayhubs) - Get postplay hubs
|
||||
* [GetRelatedHubs](#getrelatedhubs) - Get related hubs
|
||||
* [GetSectionHubs](#getsectionhubs) - Get section hubs
|
||||
* [ResetSectionDefaults](#resetsectiondefaults) - Reset hubs to defaults
|
||||
* [ListHubs](#listhubs) - Get hubs
|
||||
* [CreateCustomHub](#createcustomhub) - Create a custom hub
|
||||
* [MoveHub](#movehub) - Move Hub
|
||||
* [DeleteCustomHub](#deletecustomhub) - Delete a custom hub
|
||||
* [UpdateHubVisibility](#updatehubvisibility) - Change hub visibility
|
||||
|
||||
## GetGlobalHubs
|
||||
## GetAllHubs
|
||||
|
||||
Get Global Hubs filtered by the parameters provided.
|
||||
Get the global hubs in this PMS
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getGlobalHubs" method="get" path="/hubs" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Hubs.GetGlobalHubsAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Count` | *double* | :heavy_minus_sign: | The number of items to return with each hub. |
|
||||
| `OnlyTransient` | [OnlyTransient](../../Models/Requests/OnlyTransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetGlobalHubsResponse](../../Models/Requests/GetGlobalHubsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetGlobalHubsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetGlobalHubsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetRecentlyAdded
|
||||
|
||||
This endpoint will return the recently added content.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="get-recently-added" method="get" path="/hubs/home/recentlyAdded" -->
|
||||
<!-- UsageSnippet language="csharp" operationID="getAllHubs" method="get" path="/hubs" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetRecentlyAddedRequest req = new GetRecentlyAddedRequest() {
|
||||
ContentDirectoryID = 39486,
|
||||
SectionID = 2,
|
||||
Type = LukeHagar.PlexAPI.SDK.Models.Requests.Type.TvShow,
|
||||
IncludeMeta = IncludeMeta.Enable,
|
||||
GetAllHubsRequest req = new GetAllHubsRequest() {
|
||||
OnlyTransient = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.Hubs.GetRecentlyAddedAsync(req);
|
||||
var res = await sdk.Hubs.GetAllHubsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `request` | [GetRecentlyAddedRequest](../../Models/Requests/GetRecentlyAddedRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `request` | [GetAllHubsRequest](../../Models/Requests/GetAllHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetRecentlyAddedResponse](../../Models/Requests/GetRecentlyAddedResponse.md)**
|
||||
**[GetAllHubsResponse](../../Models/Requests/GetAllHubsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
@@ -92,41 +74,693 @@ var res = await sdk.Hubs.GetRecentlyAddedAsync(req);
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetLibraryHubs
|
||||
|
||||
This endpoint will return a list of library specific hubs
|
||||
## GetContinueWatching
|
||||
|
||||
Get the global continue watching hub
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getLibraryHubs" method="get" path="/hubs/sections/{sectionId}" -->
|
||||
<!-- UsageSnippet language="csharp" operationID="getContinueWatching" method="get" path="/hubs/continueWatching" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
var res = await sdk.Hubs.GetLibraryHubsAsync(sectionId: 492.74D);
|
||||
GetContinueWatchingRequest req = new GetContinueWatchingRequest() {};
|
||||
|
||||
var res = await sdk.Hubs.GetContinueWatchingAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `SectionId` | *double* | :heavy_check_mark: | the Id of the library to query |
|
||||
| `Count` | *double* | :heavy_minus_sign: | The number of items to return with each hub. |
|
||||
| `OnlyTransient` | [QueryParamOnlyTransient](../../Models/Requests/QueryParamOnlyTransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). |
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| `request` | [GetContinueWatchingRequest](../../Models/Requests/GetContinueWatchingRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetLibraryHubsResponse](../../Models/Requests/GetLibraryHubsResponse.md)**
|
||||
**[GetContinueWatchingResponse](../../Models/Requests/GetContinueWatchingResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetLibraryHubsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetLibraryHubsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetHubItems
|
||||
|
||||
Get the items within a single hub specified by identifier
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getHubItems" method="get" path="/hubs/items" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetHubItemsRequest req = new GetHubItemsRequest() {
|
||||
Identifier = new List<string>() {
|
||||
"<value 1>",
|
||||
"<value 2>",
|
||||
"<value 3>",
|
||||
},
|
||||
};
|
||||
|
||||
var res = await sdk.Hubs.GetHubItemsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `request` | [GetHubItemsRequest](../../Models/Requests/GetHubItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetHubItemsResponse](../../Models/Requests/GetHubItemsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetPromotedHubs
|
||||
|
||||
Get the global hubs which are promoted (should be displayed on the home screen)
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getPromotedHubs" method="get" path="/hubs/promoted" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetPromotedHubsRequest req = new GetPromotedHubsRequest() {};
|
||||
|
||||
var res = await sdk.Hubs.GetPromotedHubsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [GetPromotedHubsRequest](../../Models/Requests/GetPromotedHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetPromotedHubsResponse](../../Models/Requests/GetPromotedHubsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetMetadataHubs
|
||||
|
||||
Get the hubs for a section by metadata item. Currently only for music sections
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getMetadataHubs" method="get" path="/hubs/metadata/{metadataId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetMetadataHubsRequest req = new GetMetadataHubsRequest() {
|
||||
MetadataId = 605482,
|
||||
OnlyTransient = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.Hubs.GetMetadataHubsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [GetMetadataHubsRequest](../../Models/Requests/GetMetadataHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetMetadataHubsResponse](../../Models/Requests/GetMetadataHubsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetPostplayHubs
|
||||
|
||||
Get the hubs for a metadata to be displayed in post play
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getPostplayHubs" method="get" path="/hubs/metadata/{metadataId}/postplay" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetPostplayHubsRequest req = new GetPostplayHubsRequest() {
|
||||
MetadataId = 441419,
|
||||
OnlyTransient = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.Hubs.GetPostplayHubsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [GetPostplayHubsRequest](../../Models/Requests/GetPostplayHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetPostplayHubsResponse](../../Models/Requests/GetPostplayHubsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetRelatedHubs
|
||||
|
||||
Get the hubs for a metadata related to the provided metadata item
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getRelatedHubs" method="get" path="/hubs/metadata/{metadataId}/related" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetRelatedHubsRequest req = new GetRelatedHubsRequest() {
|
||||
MetadataId = 8858,
|
||||
OnlyTransient = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.Hubs.GetRelatedHubsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [GetRelatedHubsRequest](../../Models/Requests/GetRelatedHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetRelatedHubsResponse](../../Models/Requests/GetRelatedHubsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetSectionHubs
|
||||
|
||||
Get the hubs for a single section
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getSectionHubs" method="get" path="/hubs/sections/{sectionId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetSectionHubsRequest req = new GetSectionHubsRequest() {
|
||||
SectionId = 336924,
|
||||
OnlyTransient = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.Hubs.GetSectionHubsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [GetSectionHubsRequest](../../Models/Requests/GetSectionHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetSectionHubsResponse](../../Models/Requests/GetSectionHubsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ResetSectionDefaults
|
||||
|
||||
Reset hubs for this section to defaults and delete custom hubs
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="resetSectionDefaults" method="delete" path="/hubs/sections/{sectionId}/manage" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ResetSectionDefaultsRequest req = new ResetSectionDefaultsRequest() {
|
||||
SectionId = 383022,
|
||||
};
|
||||
|
||||
var res = await sdk.Hubs.ResetSectionDefaultsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
||||
| `request` | [ResetSectionDefaultsRequest](../../Models/Requests/ResetSectionDefaultsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ResetSectionDefaultsResponse](../../Models/Requests/ResetSectionDefaultsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ListHubs
|
||||
|
||||
Get the list of hubs including both built-in and custom
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="listHubs" method="get" path="/hubs/sections/{sectionId}/manage" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ListHubsRequest req = new ListHubsRequest() {
|
||||
SectionId = 442546,
|
||||
};
|
||||
|
||||
var res = await sdk.Hubs.ListHubsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `request` | [ListHubsRequest](../../Models/Requests/ListHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ListHubsResponse](../../Models/Requests/ListHubsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## CreateCustomHub
|
||||
|
||||
Create a custom hub based on a metadata item
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="createCustomHub" method="post" path="/hubs/sections/{sectionId}/manage" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
CreateCustomHubRequest req = new CreateCustomHubRequest() {
|
||||
SectionId = 869922,
|
||||
MetadataItemId = 703843,
|
||||
PromotedToRecommended = BoolInt.One,
|
||||
PromotedToOwnHome = BoolInt.One,
|
||||
PromotedToSharedHome = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.Hubs.CreateCustomHubAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [CreateCustomHubRequest](../../Models/Requests/CreateCustomHubRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[CreateCustomHubResponse](../../Models/Requests/CreateCustomHubResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## MoveHub
|
||||
|
||||
Changed the ordering of a hub among others hubs
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="moveHub" method="put" path="/hubs/sections/{sectionId}/manage/move" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
MoveHubRequest req = new MoveHubRequest() {
|
||||
SectionId = 755710,
|
||||
Identifier = "<value>",
|
||||
};
|
||||
|
||||
var res = await sdk.Hubs.MoveHubAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
|
||||
| `request` | [MoveHubRequest](../../Models/Requests/MoveHubRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[MoveHubResponse](../../Models/Requests/MoveHubResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## DeleteCustomHub
|
||||
|
||||
Delete a custom hub from the server
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="deleteCustomHub" method="delete" path="/hubs/sections/{sectionId}/manage/{identifier}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
DeleteCustomHubRequest req = new DeleteCustomHubRequest() {
|
||||
SectionId = 625677,
|
||||
Identifier = "<value>",
|
||||
};
|
||||
|
||||
var res = await sdk.Hubs.DeleteCustomHubAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [DeleteCustomHubRequest](../../Models/Requests/DeleteCustomHubRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[DeleteCustomHubResponse](../../Models/Requests/DeleteCustomHubResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## UpdateHubVisibility
|
||||
|
||||
Changed the visibility of a hub for both the admin and shared users
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="updateHubVisibility" method="put" path="/hubs/sections/{sectionId}/manage/{identifier}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
UpdateHubVisibilityRequest req = new UpdateHubVisibilityRequest() {
|
||||
SectionId = 341650,
|
||||
Identifier = "<value>",
|
||||
PromotedToRecommended = BoolInt.One,
|
||||
PromotedToOwnHome = BoolInt.One,
|
||||
PromotedToSharedHome = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.Hubs.UpdateHubVisibilityAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| `request` | [UpdateHubVisibilityRequest](../../Models/Requests/UpdateHubVisibilityRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[UpdateHubVisibilityResponse](../../Models/Requests/UpdateHubVisibilityResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
File diff suppressed because it is too large
Load Diff
171
docs/sdks/librarycollections/README.md
Normal file
171
docs/sdks/librarycollections/README.md
Normal file
@@ -0,0 +1,171 @@
|
||||
# LibraryCollections
|
||||
(*LibraryCollections*)
|
||||
|
||||
## Overview
|
||||
|
||||
Endpoints for manipulating collections. In addition to these endpoints, `/library/collections/:collectionId/X` will be rerouted to `/library/metadata/:collectionId/X` and respond to those endpoints as well.
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [AddCollectionItems](#addcollectionitems) - Add items to a collection
|
||||
* [DeleteCollectionItem](#deletecollectionitem) - Delete an item from a collection
|
||||
* [MoveCollectionItem](#movecollectionitem) - Reorder an item in the collection
|
||||
|
||||
## AddCollectionItems
|
||||
|
||||
Add items to a collection by uri
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="addCollectionItems" method="put" path="/library/collections/{collectionId}/items" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
AddCollectionItemsRequest req = new AddCollectionItemsRequest() {
|
||||
CollectionId = 338144,
|
||||
Uri = "https://expensive-bakeware.com",
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryCollections.AddCollectionItemsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| `request` | [AddCollectionItemsRequest](../../Models/Requests/AddCollectionItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[AddCollectionItemsResponse](../../Models/Requests/AddCollectionItemsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## DeleteCollectionItem
|
||||
|
||||
Delete an item from a collection
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="deleteCollectionItem" method="put" path="/library/collections/{collectionId}/items/{itemId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
DeleteCollectionItemRequest req = new DeleteCollectionItemRequest() {
|
||||
CollectionId = 320928,
|
||||
ItemId = 406983,
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryCollections.DeleteCollectionItemAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
||||
| `request` | [DeleteCollectionItemRequest](../../Models/Requests/DeleteCollectionItemRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[DeleteCollectionItemResponse](../../Models/Requests/DeleteCollectionItemResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## MoveCollectionItem
|
||||
|
||||
Reorder items in a collection with one item after another
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="moveCollectionItem" method="put" path="/library/collections/{collectionId}/items/{itemId}/move" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
MoveCollectionItemRequest req = new MoveCollectionItemRequest() {
|
||||
CollectionId = 239532,
|
||||
ItemId = 513864,
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryCollections.MoveCollectionItemAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| `request` | [MoveCollectionItemRequest](../../Models/Requests/MoveCollectionItemRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[MoveCollectionItemResponse](../../Models/Requests/MoveCollectionItemResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
653
docs/sdks/libraryplaylists/README.md
Normal file
653
docs/sdks/libraryplaylists/README.md
Normal file
@@ -0,0 +1,653 @@
|
||||
# LibraryPlaylists
|
||||
(*LibraryPlaylists*)
|
||||
|
||||
## Overview
|
||||
|
||||
Endpoints for manipulating playlists.
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [CreatePlaylist](#createplaylist) - Create a Playlist
|
||||
* [UploadPlaylist](#uploadplaylist) - Upload
|
||||
* [DeletePlaylist](#deleteplaylist) - Delete a Playlist
|
||||
* [UpdatePlaylist](#updateplaylist) - Editing a Playlist
|
||||
* [GetPlaylistGenerators](#getplaylistgenerators) - Get a playlist's generators
|
||||
* [ClearPlaylistItems](#clearplaylistitems) - Clearing a playlist
|
||||
* [AddPlaylistItems](#addplaylistitems) - Adding to a Playlist
|
||||
* [DeletePlaylistItem](#deleteplaylistitem) - Delete a Generator
|
||||
* [GetPlaylistGenerator](#getplaylistgenerator) - Get a playlist generator
|
||||
* [GetPlaylistGeneratorItems](#getplaylistgeneratoritems) - Get a playlist generator's items
|
||||
* [MovePlaylistItem](#moveplaylistitem) - Moving items in a playlist
|
||||
* [RefreshPlaylist](#refreshplaylist) - Reprocess a generator
|
||||
|
||||
## CreatePlaylist
|
||||
|
||||
Create a new playlist. By default the playlist is blank.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="createPlaylist" method="post" path="/playlists" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
CreatePlaylistRequest req = new CreatePlaylistRequest() {
|
||||
Uri = "https://short-term-disconnection.name/",
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryPlaylists.CreatePlaylistAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [CreatePlaylistRequest](../../Models/Requests/CreatePlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[CreatePlaylistResponse](../../Models/Requests/CreatePlaylistResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## UploadPlaylist
|
||||
|
||||
Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="uploadPlaylist" method="post" path="/playlists/upload" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
UploadPlaylistRequest req = new UploadPlaylistRequest() {
|
||||
Path = "/home/barkley/playlist.m3u",
|
||||
Force = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryPlaylists.UploadPlaylistAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [UploadPlaylistRequest](../../Models/Requests/UploadPlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[UploadPlaylistResponse](../../Models/Requests/UploadPlaylistResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## DeletePlaylist
|
||||
|
||||
Deletes a playlist by provided id
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="deletePlaylist" method="delete" path="/playlists/{playlistId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
DeletePlaylistRequest req = new DeletePlaylistRequest() {
|
||||
PlaylistId = 343293,
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryPlaylists.DeletePlaylistAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [DeletePlaylistRequest](../../Models/Requests/DeletePlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[DeletePlaylistResponse](../../Models/Requests/DeletePlaylistResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## UpdatePlaylist
|
||||
|
||||
Edits a playlist in the same manner as [editing metadata](#tag/Provider/operation/metadataPutItem)
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="updatePlaylist" method="put" path="/playlists/{playlistId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
UpdatePlaylistRequest req = new UpdatePlaylistRequest() {
|
||||
PlaylistId = 157966,
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryPlaylists.UpdatePlaylistAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [UpdatePlaylistRequest](../../Models/Requests/UpdatePlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[UpdatePlaylistResponse](../../Models/Requests/UpdatePlaylistResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetPlaylistGenerators
|
||||
|
||||
Get all the generators in a playlist
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getPlaylistGenerators" method="get" path="/playlists/{playlistId}/generators" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetPlaylistGeneratorsRequest req = new GetPlaylistGeneratorsRequest() {
|
||||
PlaylistId = 162342,
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryPlaylists.GetPlaylistGeneratorsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||
| `request` | [GetPlaylistGeneratorsRequest](../../Models/Requests/GetPlaylistGeneratorsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetPlaylistGeneratorsResponse](../../Models/Requests/GetPlaylistGeneratorsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ClearPlaylistItems
|
||||
|
||||
Clears a playlist, only works with dumb playlists. Returns the playlist.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="clearPlaylistItems" method="delete" path="/playlists/{playlistId}/items" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ClearPlaylistItemsRequest req = new ClearPlaylistItemsRequest() {
|
||||
PlaylistId = 552140,
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryPlaylists.ClearPlaylistItemsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| `request` | [ClearPlaylistItemsRequest](../../Models/Requests/ClearPlaylistItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ClearPlaylistItemsResponse](../../Models/Requests/ClearPlaylistItemsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## AddPlaylistItems
|
||||
|
||||
Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="addPlaylistItems" method="put" path="/playlists/{playlistId}/items" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
AddPlaylistItemsRequest req = new AddPlaylistItemsRequest() {
|
||||
PlaylistId = 533723,
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryPlaylists.AddPlaylistItemsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `request` | [AddPlaylistItemsRequest](../../Models/Requests/AddPlaylistItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[AddPlaylistItemsResponse](../../Models/Requests/AddPlaylistItemsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## DeletePlaylistItem
|
||||
|
||||
Deletes an item from a playlist. Only works with dumb playlists.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="deletePlaylistItem" method="delete" path="/playlists/{playlistId}/items/{generatorId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
DeletePlaylistItemRequest req = new DeletePlaylistItemRequest() {
|
||||
PlaylistId = 981646,
|
||||
GeneratorId = 194010,
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryPlaylists.DeletePlaylistItemAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| `request` | [DeletePlaylistItemRequest](../../Models/Requests/DeletePlaylistItemRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[DeletePlaylistItemResponse](../../Models/Requests/DeletePlaylistItemResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetPlaylistGenerator
|
||||
|
||||
Get a playlist's generator. Only used for optimized versions
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getPlaylistGenerator" method="get" path="/playlists/{playlistId}/items/{generatorId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetPlaylistGeneratorRequest req = new GetPlaylistGeneratorRequest() {
|
||||
PlaylistId = 744880,
|
||||
GeneratorId = 322168,
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryPlaylists.GetPlaylistGeneratorAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
||||
| `request` | [GetPlaylistGeneratorRequest](../../Models/Requests/GetPlaylistGeneratorRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetPlaylistGeneratorResponse](../../Models/Requests/GetPlaylistGeneratorResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetPlaylistGeneratorItems
|
||||
|
||||
Get a playlist generator's items
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getPlaylistGeneratorItems" method="get" path="/playlists/{playlistId}/items/{generatorId}/items" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetPlaylistGeneratorItemsRequest req = new GetPlaylistGeneratorItemsRequest() {
|
||||
PlaylistId = 77230,
|
||||
GeneratorId = 979714,
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryPlaylists.GetPlaylistGeneratorItemsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `request` | [GetPlaylistGeneratorItemsRequest](../../Models/Requests/GetPlaylistGeneratorItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetPlaylistGeneratorItemsResponse](../../Models/Requests/GetPlaylistGeneratorItemsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## MovePlaylistItem
|
||||
|
||||
Moves an item in a playlist. Only works with dumb playlists.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="movePlaylistItem" method="put" path="/playlists/{playlistId}/items/{playlistItemId}/move" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
MovePlaylistItemRequest req = new MovePlaylistItemRequest() {
|
||||
PlaylistId = 940298,
|
||||
PlaylistItemId = 375626,
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryPlaylists.MovePlaylistItemAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `request` | [MovePlaylistItemRequest](../../Models/Requests/MovePlaylistItemRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[MovePlaylistItemResponse](../../Models/Requests/MovePlaylistItemResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## RefreshPlaylist
|
||||
|
||||
Make a generator reprocess (refresh)
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="refreshPlaylist" method="put" path="/playlists/{playlistId}/items/{generatorId}/{metadataId}/{action}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
RefreshPlaylistRequest req = new RefreshPlaylistRequest() {
|
||||
PlaylistId = 895314,
|
||||
GeneratorId = 629742,
|
||||
MetadataId = 724422,
|
||||
Action = Action.Disable,
|
||||
};
|
||||
|
||||
var res = await sdk.LibraryPlaylists.RefreshPlaylistAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [RefreshPlaylistRequest](../../Models/Requests/RefreshPlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[RefreshPlaylistResponse](../../Models/Requests/RefreshPlaylistResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
201
docs/sdks/livetv/README.md
Normal file
201
docs/sdks/livetv/README.md
Normal file
@@ -0,0 +1,201 @@
|
||||
# LiveTV
|
||||
(*LiveTV*)
|
||||
|
||||
## Overview
|
||||
|
||||
LiveTV contains the playback sessions of a channel from a DVR device
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetSessions](#getsessions) - Get all sessions
|
||||
* [GetLiveTVSession](#getlivetvsession) - Get a single session
|
||||
* [GetSessionPlaylistIndex](#getsessionplaylistindex) - Get a session playlist index
|
||||
* [GetSessionSegment](#getsessionsegment) - Get a single session segment
|
||||
|
||||
## GetSessions
|
||||
|
||||
Get all livetv sessions and metadata
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getSessions" method="get" path="/livetv/sessions" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.LiveTV.GetSessionsAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetSessionsResponse](../../Models/Requests/GetSessionsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetLiveTVSession
|
||||
|
||||
Get a single livetv session and metadata
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getLiveTVSession" method="get" path="/livetv/sessions/{sessionId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetLiveTVSessionRequest req = new GetLiveTVSessionRequest() {
|
||||
SessionId = "<id>",
|
||||
};
|
||||
|
||||
var res = await sdk.LiveTV.GetLiveTVSessionAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `request` | [GetLiveTVSessionRequest](../../Models/Requests/GetLiveTVSessionRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetLiveTVSessionResponse](../../Models/Requests/GetLiveTVSessionResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetSessionPlaylistIndex
|
||||
|
||||
Get a playlist index for playing this session
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getSessionPlaylistIndex" method="get" path="/livetv/sessions/{sessionId}/{consumerId}/index.m3u8" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetSessionPlaylistIndexRequest req = new GetSessionPlaylistIndexRequest() {
|
||||
SessionId = "<id>",
|
||||
ConsumerId = "<id>",
|
||||
};
|
||||
|
||||
var res = await sdk.LiveTV.GetSessionPlaylistIndexAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `request` | [GetSessionPlaylistIndexRequest](../../Models/Requests/GetSessionPlaylistIndexRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetSessionPlaylistIndexResponse](../../Models/Requests/GetSessionPlaylistIndexResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetSessionSegment
|
||||
|
||||
Get a single LiveTV session segment
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getSessionSegment" method="get" path="/livetv/sessions/{sessionId}/{consumerId}/{segmentId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetSessionSegmentRequest req = new GetSessionSegmentRequest() {
|
||||
SessionId = "<id>",
|
||||
ConsumerId = "<id>",
|
||||
SegmentId = "<id>",
|
||||
};
|
||||
|
||||
var res = await sdk.LiveTV.GetSessionSegmentAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `request` | [GetSessionSegmentRequest](../../Models/Requests/GetSessionSegmentRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetSessionSegmentResponse](../../Models/Requests/GetSessionSegmentResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -3,98 +3,32 @@
|
||||
|
||||
## Overview
|
||||
|
||||
Submit logs to the Log Handler for Plex Media Server
|
||||
|
||||
Logging mechanism to allow clients to log to the server
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [LogLine](#logline) - Logging a single line message.
|
||||
* [LogMultiLine](#logmultiline) - Logging a multi-line message
|
||||
* [EnablePaperTrail](#enablepapertrail) - Enabling Papertrail
|
||||
* [WriteLog](#writelog) - Logging a multi-line message to the Plex Media Server log
|
||||
* [WriteMessage](#writemessage) - Logging a single-line message to the Plex Media Server log
|
||||
* [EnablePapertrail](#enablepapertrail) - Enabling Papertrail
|
||||
|
||||
## LogLine
|
||||
## WriteLog
|
||||
|
||||
This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
|
||||
This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above PUT endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="logLine" method="get" path="/log" -->
|
||||
<!-- UsageSnippet language="csharp" operationID="writeLog" method="post" path="/log" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using System;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Log.LogLineAsync(
|
||||
level: Level.Three,
|
||||
message: "Test log message",
|
||||
source: "Postman"
|
||||
);
|
||||
byte[] req = System.Text.Encoding.UTF8.GetBytes("0x0Ce2fFcEBF");
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
||||
| `Level` | [Level](../../Models/Requests/Level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.<br/>0: Error<br/>1: Warning<br/>2: Info<br/>3: Debug<br/>4: Verbose<br/> | |
|
||||
| `Message` | *string* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
|
||||
| `Source` | *string* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
|
||||
|
||||
### Response
|
||||
|
||||
**[LogLineResponse](../../Models/Requests/LogLineResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.LogLineBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.LogLineUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## LogMultiLine
|
||||
|
||||
This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
|
||||
It accepts a text/plain request body, where each line represents a distinct log entry.
|
||||
Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.
|
||||
|
||||
Log entries are separated by a newline character (`\n`).
|
||||
Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters.
|
||||
This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.
|
||||
|
||||
The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
|
||||
- `0`: Error - Critical issues that require immediate attention.
|
||||
- `1`: Warning - Important events that are not critical but may indicate potential issues.
|
||||
- `2`: Info - General informational messages about system operation.
|
||||
- `3`: Debug - Detailed information useful for debugging purposes.
|
||||
- `4`: Verbose - Highly detailed diagnostic information for in-depth analysis.
|
||||
|
||||
The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module).
|
||||
|
||||
Example of a single log entry format:
|
||||
`level=4&message=Sample%20log%20entry&source=applicationName`
|
||||
|
||||
Ensure each parameter is properly URL-encoded to avoid interpretation issues.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="logMultiLine" method="post" path="/log" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
string req = @"level=4&message=Test%20message%201&source=postman
|
||||
level=3&message=Test%20message%202&source=postman
|
||||
level=1&message=Test%20message%203&source=postman";
|
||||
|
||||
var res = await sdk.Log.LogMultiLineAsync(req);
|
||||
var res = await sdk.Log.WriteLogAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
@@ -103,47 +37,120 @@ var res = await sdk.Log.LogMultiLineAsync(req);
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
|
||||
| `request` | *string* | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `request` | *byte[]* | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[LogMultiLineResponse](../../Models/Requests/LogMultiLineResponse.md)**
|
||||
**[WriteLogResponse](../../Models/Requests/WriteLogResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.LogMultiLineBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.LogMultiLineUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## EnablePaperTrail
|
||||
## WriteMessage
|
||||
|
||||
This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time.
|
||||
This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
|
||||
|
||||
Note: This endpoint responds to all HTTP verbs **except POST** but PUT is preferred
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="enablePaperTrail" method="get" path="/log/networked" -->
|
||||
<!-- UsageSnippet language="csharp" operationID="writeMessage" method="put" path="/log" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
var res = await sdk.Log.EnablePaperTrailAsync();
|
||||
WriteMessageRequest req = new WriteMessageRequest() {};
|
||||
|
||||
var res = await sdk.Log.WriteMessageAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `request` | [WriteMessageRequest](../../Models/Requests/WriteMessageRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[EnablePaperTrailResponse](../../Models/Requests/EnablePaperTrailResponse.md)**
|
||||
**[WriteMessageResponse](../../Models/Requests/WriteMessageResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.EnablePaperTrailBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.EnablePaperTrailUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## EnablePapertrail
|
||||
|
||||
This endpoint will enable all Plex Media Server logs to be sent to the Papertrail networked logging site for a period of time
|
||||
|
||||
Note: This endpoint responds to all HTTP verbs but POST is preferred
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="enablePapertrail" method="post" path="/log/networked" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
EnablePapertrailRequest req = new EnablePapertrailRequest() {};
|
||||
|
||||
var res = await sdk.Log.EnablePapertrailAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `request` | [EnablePapertrailRequest](../../Models/Requests/EnablePapertrailRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[EnablePapertrailResponse](../../Models/Requests/EnablePapertrailResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -1,222 +0,0 @@
|
||||
# Media
|
||||
(*Media*)
|
||||
|
||||
## Overview
|
||||
|
||||
API Calls interacting with Plex Media Server Media
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [MarkPlayed](#markplayed) - Mark Media Played
|
||||
* [MarkUnplayed](#markunplayed) - Mark Media Unplayed
|
||||
* [UpdatePlayProgress](#updateplayprogress) - Update Media Play Progress
|
||||
* [GetBannerImage](#getbannerimage) - Get Banner Image
|
||||
* [GetThumbImage](#getthumbimage) - Get Thumb Image
|
||||
|
||||
## MarkPlayed
|
||||
|
||||
This will mark the provided media key as Played.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="markPlayed" method="get" path="/:/scrobble" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Media.MarkPlayedAsync(key: 59398D);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
||||
| `Key` | *double* | :heavy_check_mark: | The media key to mark as played | 59398 |
|
||||
|
||||
### Response
|
||||
|
||||
**[MarkPlayedResponse](../../Models/Requests/MarkPlayedResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.MarkPlayedBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.MarkPlayedUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## MarkUnplayed
|
||||
|
||||
This will mark the provided media key as Unplayed.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="markUnplayed" method="get" path="/:/unscrobble" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Media.MarkUnplayedAsync(key: 59398D);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- |
|
||||
| `Key` | *double* | :heavy_check_mark: | The media key to mark as Unplayed | 59398 |
|
||||
|
||||
### Response
|
||||
|
||||
**[MarkUnplayedResponse](../../Models/Requests/MarkUnplayedResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.MarkUnplayedBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.MarkUnplayedUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## UpdatePlayProgress
|
||||
|
||||
This API command can be used to update the play progress of a media item.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="updatePlayProgress" method="post" path="/:/progress" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Media.UpdatePlayProgressAsync(
|
||||
key: "<key>",
|
||||
time: 90000D,
|
||||
state: "played"
|
||||
);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `Key` | *string* | :heavy_check_mark: | the media key | |
|
||||
| `Time` | *double* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 |
|
||||
| `State` | *string* | :heavy_check_mark: | The playback state of the media item. | played |
|
||||
|
||||
### Response
|
||||
|
||||
**[UpdatePlayProgressResponse](../../Models/Requests/UpdatePlayProgressResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.UpdatePlayProgressBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.UpdatePlayProgressUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetBannerImage
|
||||
|
||||
Gets the banner image of the media item
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="get-banner-image" method="get" path="/library/metadata/{ratingKey}/banner" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
GetBannerImageRequest req = new GetBannerImageRequest() {
|
||||
RatingKey = 9518,
|
||||
Width = 396,
|
||||
Height = 396,
|
||||
MinSize = 1,
|
||||
Upscale = 1,
|
||||
XPlexToken = "CV5xoxjTpFKUzBTShsaf",
|
||||
};
|
||||
|
||||
var res = await sdk.Media.GetBannerImageAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [GetBannerImageRequest](../../Models/Requests/GetBannerImageRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetBannerImageResponse](../../Models/Requests/GetBannerImageResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetBannerImageBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetBannerImageUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetThumbImage
|
||||
|
||||
Gets the thumbnail image of the media item
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="get-thumb-image" method="get" path="/library/metadata/{ratingKey}/thumb" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
GetThumbImageRequest req = new GetThumbImageRequest() {
|
||||
RatingKey = 9518,
|
||||
Width = 396,
|
||||
Height = 396,
|
||||
MinSize = 1,
|
||||
Upscale = 1,
|
||||
XPlexToken = "CV5xoxjTpFKUzBTShsaf",
|
||||
};
|
||||
|
||||
var res = await sdk.Media.GetThumbImageAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `request` | [GetThumbImageRequest](../../Models/Requests/GetThumbImageRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetThumbImageResponse](../../Models/Requests/GetThumbImageResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetThumbImageBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetThumbImageUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
167
docs/sdks/playlist/README.md
Normal file
167
docs/sdks/playlist/README.md
Normal file
@@ -0,0 +1,167 @@
|
||||
# Playlist
|
||||
(*Playlist*)
|
||||
|
||||
## Overview
|
||||
|
||||
Media playlists that can be created and played back
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [ListPlaylists](#listplaylists) - List playlists
|
||||
* [GetPlaylist](#getplaylist) - Retrieve Playlist
|
||||
* [GetPlaylistItems](#getplaylistitems) - Retrieve Playlist Contents
|
||||
|
||||
## ListPlaylists
|
||||
|
||||
Gets a list of playlists and playlist folders for a user. General filters are permitted, such as `sort=lastViewedAt:desc`. A flat playlist list can be retrieved using `type=15` to limit the collection to just playlists.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="listPlaylists" method="get" path="/playlists" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ListPlaylistsRequest req = new ListPlaylistsRequest() {};
|
||||
|
||||
var res = await sdk.Playlist.ListPlaylistsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `request` | [ListPlaylistsRequest](../../Models/Requests/ListPlaylistsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ListPlaylistsResponse](../../Models/Requests/ListPlaylistsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetPlaylist
|
||||
|
||||
Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item:
|
||||
Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getPlaylist" method="get" path="/playlists/{playlistId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetPlaylistRequest req = new GetPlaylistRequest() {
|
||||
PlaylistId = 841953,
|
||||
};
|
||||
|
||||
var res = await sdk.Playlist.GetPlaylistAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `request` | [GetPlaylistRequest](../../Models/Requests/GetPlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetPlaylistResponse](../../Models/Requests/GetPlaylistResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetPlaylistItems
|
||||
|
||||
Gets the contents of a playlist. Should be paged by clients via standard mechanisms. By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. For example, you could use this to display a list of recently added albums vis a smart playlist. Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getPlaylistItems" method="get" path="/playlists/{playlistId}/items" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetPlaylistItemsRequest req = new GetPlaylistItemsRequest() {
|
||||
PlaylistId = 118195,
|
||||
};
|
||||
|
||||
var res = await sdk.Playlist.GetPlaylistItemsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `request` | [GetPlaylistItemsRequest](../../Models/Requests/GetPlaylistItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetPlaylistItemsResponse](../../Models/Requests/GetPlaylistItemsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -1,390 +0,0 @@
|
||||
# Playlists
|
||||
(*Playlists*)
|
||||
|
||||
## Overview
|
||||
|
||||
Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
|
||||
They can be organized in (optionally nesting) folders.
|
||||
Retrieving a playlist, or its items, will trigger a refresh of its metadata.
|
||||
This may cause the duration and number of items to change.
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [CreatePlaylist](#createplaylist) - Create a Playlist
|
||||
* [GetPlaylists](#getplaylists) - Get All Playlists
|
||||
* [GetPlaylist](#getplaylist) - Retrieve Playlist
|
||||
* [DeletePlaylist](#deleteplaylist) - Deletes a Playlist
|
||||
* [UpdatePlaylist](#updateplaylist) - Update a Playlist
|
||||
* [GetPlaylistContents](#getplaylistcontents) - Retrieve Playlist Contents
|
||||
* [ClearPlaylistContents](#clearplaylistcontents) - Delete Playlist Contents
|
||||
* [AddPlaylistContents](#addplaylistcontents) - Adding to a Playlist
|
||||
* [UploadPlaylist](#uploadplaylist) - Upload Playlist
|
||||
|
||||
## CreatePlaylist
|
||||
|
||||
Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass:
|
||||
- `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`).
|
||||
- `playQueueID` - To create a playlist from an existing play queue.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="createPlaylist" method="post" path="/playlists" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
CreatePlaylistRequest req = new CreatePlaylistRequest() {
|
||||
Title = "<value>",
|
||||
Type = CreatePlaylistQueryParamType.Audio,
|
||||
Smart = Smart.One,
|
||||
Uri = "https://short-term-disconnection.name/",
|
||||
};
|
||||
|
||||
var res = await sdk.Playlists.CreatePlaylistAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [CreatePlaylistRequest](../../Models/Requests/CreatePlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[CreatePlaylistResponse](../../Models/Requests/CreatePlaylistResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.CreatePlaylistBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.CreatePlaylistUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetPlaylists
|
||||
|
||||
Get All Playlists given the specified filters.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getPlaylists" method="get" path="/playlists" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Playlists.GetPlaylistsAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `PlaylistType` | [PlaylistType](../../Models/Requests/PlaylistType.md) | :heavy_minus_sign: | limit to a type of playlist. |
|
||||
| `Smart` | [QueryParamSmart](../../Models/Requests/QueryParamSmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetPlaylistsResponse](../../Models/Requests/GetPlaylistsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetPlaylistsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetPlaylistsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetPlaylist
|
||||
|
||||
Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item:
|
||||
Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getPlaylist" method="get" path="/playlists/{playlistID}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Playlists.GetPlaylistAsync(playlistID: 8419.53D);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ---------------------- | ---------------------- | ---------------------- | ---------------------- |
|
||||
| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetPlaylistResponse](../../Models/Requests/GetPlaylistResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetPlaylistBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetPlaylistUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## DeletePlaylist
|
||||
|
||||
This endpoint will delete a playlist
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="deletePlaylist" method="delete" path="/playlists/{playlistID}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Playlists.DeletePlaylistAsync(playlistID: 3432.93D);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ---------------------- | ---------------------- | ---------------------- | ---------------------- |
|
||||
| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist |
|
||||
|
||||
### Response
|
||||
|
||||
**[DeletePlaylistResponse](../../Models/Requests/DeletePlaylistResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.DeletePlaylistBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.DeletePlaylistUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## UpdatePlaylist
|
||||
|
||||
From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="updatePlaylist" method="put" path="/playlists/{playlistID}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Playlists.UpdatePlaylistAsync(playlistID: 1579.66D);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist |
|
||||
| `Title` | *string* | :heavy_minus_sign: | name of the playlist |
|
||||
| `Summary` | *string* | :heavy_minus_sign: | summary description of the playlist |
|
||||
|
||||
### Response
|
||||
|
||||
**[UpdatePlaylistResponse](../../Models/Requests/UpdatePlaylistResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.UpdatePlaylistBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.UpdatePlaylistUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetPlaylistContents
|
||||
|
||||
Gets the contents of a playlist. Should be paged by clients via standard mechanisms.
|
||||
By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter.
|
||||
For example, you could use this to display a list of recently added albums vis a smart playlist.
|
||||
Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getPlaylistContents" method="get" path="/playlists/{playlistID}/items" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Playlists.GetPlaylistContentsAsync(
|
||||
playlistID: 5535.42D,
|
||||
type: GetPlaylistContentsQueryParamType.TvShow
|
||||
);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist | |
|
||||
| `Type` | [GetPlaylistContentsQueryParamType](../../Models/Requests/GetPlaylistContentsQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve or filter by.<br/>1 = movie<br/>2 = show<br/>3 = season<br/>4 = episode<br/>E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/> | 2 |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetPlaylistContentsResponse](../../Models/Requests/GetPlaylistContentsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetPlaylistContentsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetPlaylistContentsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ClearPlaylistContents
|
||||
|
||||
Clears a playlist, only works with dumb playlists. Returns the playlist.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="clearPlaylistContents" method="delete" path="/playlists/{playlistID}/items" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Playlists.ClearPlaylistContentsAsync(playlistID: 4137.37D);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ---------------------- | ---------------------- | ---------------------- | ---------------------- |
|
||||
| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist |
|
||||
|
||||
### Response
|
||||
|
||||
**[ClearPlaylistContentsResponse](../../Models/Requests/ClearPlaylistContentsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.ClearPlaylistContentsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.ClearPlaylistContentsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## AddPlaylistContents
|
||||
|
||||
Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist.
|
||||
With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="addPlaylistContents" method="put" path="/playlists/{playlistID}/items" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Playlists.AddPlaylistContentsAsync(
|
||||
playlistID: 7013.44D,
|
||||
uri: "server://12345/com.plexapp.plugins.library/library/metadata/1",
|
||||
playQueueID: 123D
|
||||
);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist | |
|
||||
| `Uri` | *string* | :heavy_check_mark: | the content URI for the playlist | server://12345/com.plexapp.plugins.library/library/metadata/1 |
|
||||
| `PlayQueueID` | *double* | :heavy_minus_sign: | the play queue to add to a playlist | 123 |
|
||||
|
||||
### Response
|
||||
|
||||
**[AddPlaylistContentsResponse](../../Models/Requests/AddPlaylistContentsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.AddPlaylistContentsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.AddPlaylistContentsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## UploadPlaylist
|
||||
|
||||
Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="uploadPlaylist" method="post" path="/playlists/upload" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Playlists.UploadPlaylistAsync(
|
||||
path: "/home/barkley/playlist.m3u",
|
||||
force: QueryParamForce.One,
|
||||
sectionID: 1
|
||||
);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.<br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed.<br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
|
||||
| `Force` | [QueryParamForce](../../Models/Requests/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.<br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist.<br/>The `force` argument is used to disable overwriting.<br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
|
||||
| `SectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
|
||||
|
||||
### Response
|
||||
|
||||
**[UploadPlaylistResponse](../../Models/Requests/UploadPlaylistResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.UploadPlaylistBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.UploadPlaylistUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
503
docs/sdks/playqueue/README.md
Normal file
503
docs/sdks/playqueue/README.md
Normal file
@@ -0,0 +1,503 @@
|
||||
# PlayQueue
|
||||
(*PlayQueue*)
|
||||
|
||||
## Overview
|
||||
|
||||
The playqueue feature within a media provider
|
||||
A play queue represents the current list of media for playback. Although queues are persisted by the server, they should be regarded by the user as a fairly lightweight, an ephemeral list of items queued up for playback in a session. There is generally one active queue for each type of media (music, video, photos) that can be added to or destroyed and replaced with a fresh queue.
|
||||
Play Queues has a region, which we refer to in this doc (partially for historical reasons) as "Up Next". This region is defined by `playQueueLastAddedItemID` existing on the media container. This follows iTunes' terminology. It is a special region after the currently playing item but before the originally-played items. This enables "Party Mode" listening/viewing, where items can be added on-the-fly, and normal queue playback resumed when completed.
|
||||
You can visualize the play queue as a sliding window in the complete list of media queued for playback. This model is important when scaling to larger play queues (e.g. shuffling 40,000 audio tracks). The client only needs visibility into small areas of the queue at any given time, and the server can optimize access in this fashion.
|
||||
All created play queues will have an empty "Up Next" area - unless the item is an album and no `key` is provided. In this case the "Up Next" area will be populated by the contents of the album. This is to allow queueing of multiple albums - since the 'Add to Up Next' will insert after all the tracks. This means that If you're creating a PQ from an album, you can only shuffle it if you set `key`. This is due to the above implicit queueing of albums when no `key` is provided as well as the current limitation that you cannot shuffle a PQ with an "Up Next" area.
|
||||
The play queue window advances as the server receives timeline requests. The client needs to retrieve the play queue as the “now playing” item changes. There is no play queue API to update the playing item.
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [CreatePlayQueue](#createplayqueue) - Create a play queue
|
||||
* [GetPlayQueue](#getplayqueue) - Retrieve a play queue
|
||||
* [AddToPlayQueue](#addtoplayqueue) - Add a generator or playlist to a play queue
|
||||
* [ClearPlayQueue](#clearplayqueue) - Clear a play queue
|
||||
* [ResetPlayQueue](#resetplayqueue) - Reset a play queue
|
||||
* [Shuffle](#shuffle) - Shuffle a play queue
|
||||
* [Unshuffle](#unshuffle) - Unshuffle a play queue
|
||||
* [DeletePlayQueueItem](#deleteplayqueueitem) - Delete an item from a play queue
|
||||
* [MovePlayQueueItem](#moveplayqueueitem) - Move an item in a play queue
|
||||
|
||||
## CreatePlayQueue
|
||||
|
||||
Makes a new play queue for a device. The source of the playqueue can either be a URI, or a playlist. The response is a media container with the initial items in the queue. Each item in the queue will be a regular item but with `playQueueItemID` - a unique ID since the queue could have repeated items with the same `ratingKey`.
|
||||
Note: Either `uri` or `playlistID` must be specified
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="createPlayQueue" method="post" path="/playQueues" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
CreatePlayQueueRequest req = new CreatePlayQueueRequest() {
|
||||
Type = LukeHagar.PlexAPI.SDK.Models.Requests.Type.Audio,
|
||||
Shuffle = BoolInt.One,
|
||||
Repeat = BoolInt.One,
|
||||
Continuous = BoolInt.One,
|
||||
Recursive = BoolInt.One,
|
||||
OnDeck = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.PlayQueue.CreatePlayQueueAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [CreatePlayQueueRequest](../../Models/Requests/CreatePlayQueueRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[CreatePlayQueueResponse](../../Models/Requests/CreatePlayQueueResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetPlayQueue
|
||||
|
||||
Retrieves the play queue, centered at current item. This can be treated as a regular container by play queue-oblivious clients, but they may wish to request a large window onto the queue since they won't know to refresh.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getPlayQueue" method="get" path="/playQueues/{playQueueId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetPlayQueueRequest req = new GetPlayQueueRequest() {
|
||||
PlayQueueId = 210646,
|
||||
Own = BoolInt.One,
|
||||
IncludeBefore = BoolInt.One,
|
||||
IncludeAfter = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.PlayQueue.GetPlayQueueAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `request` | [GetPlayQueueRequest](../../Models/Requests/GetPlayQueueRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetPlayQueueResponse](../../Models/Requests/GetPlayQueueResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## AddToPlayQueue
|
||||
|
||||
Adds an item to a play queue (e.g. party mode). Increments the version of the play queue. Takes the following parameters (`uri` and `playlistID` are mutually exclusive). Returns the modified play queue.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="addToPlayQueue" method="put" path="/playQueues/{playQueueId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
AddToPlayQueueRequest req = new AddToPlayQueueRequest() {
|
||||
PlayQueueId = 919248,
|
||||
Next = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.PlayQueue.AddToPlayQueueAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [AddToPlayQueueRequest](../../Models/Requests/AddToPlayQueueRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[AddToPlayQueueResponse](../../Models/Requests/AddToPlayQueueResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ClearPlayQueue
|
||||
|
||||
Deletes all items in the play queue, and increases the version of the play queue.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="clearPlayQueue" method="delete" path="/playQueues/{playQueueId}/items" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ClearPlayQueueRequest req = new ClearPlayQueueRequest() {
|
||||
PlayQueueId = 86357,
|
||||
};
|
||||
|
||||
var res = await sdk.PlayQueue.ClearPlayQueueAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [ClearPlayQueueRequest](../../Models/Requests/ClearPlayQueueRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ClearPlayQueueResponse](../../Models/Requests/ClearPlayQueueResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ResetPlayQueue
|
||||
|
||||
Reset a play queue to the first item being the current item
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="resetPlayQueue" method="put" path="/playQueues/{playQueueId}/reset" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ResetPlayQueueRequest req = new ResetPlayQueueRequest() {
|
||||
PlayQueueId = 581891,
|
||||
};
|
||||
|
||||
var res = await sdk.PlayQueue.ResetPlayQueueAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [ResetPlayQueueRequest](../../Models/Requests/ResetPlayQueueRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ResetPlayQueueResponse](../../Models/Requests/ResetPlayQueueResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## Shuffle
|
||||
|
||||
Shuffle a play queue (or reshuffles if already shuffled). The currently selected item is maintained. Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="shuffle" method="put" path="/playQueues/{playQueueId}/shuffle" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ShuffleRequest req = new ShuffleRequest() {
|
||||
PlayQueueId = 316150,
|
||||
};
|
||||
|
||||
var res = await sdk.PlayQueue.ShuffleAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
|
||||
| `request` | [ShuffleRequest](../../Models/Requests/ShuffleRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ShuffleResponse](../../Models/Requests/ShuffleResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## Unshuffle
|
||||
|
||||
Unshuffles a play queue and restores "natural order". Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="unshuffle" method="put" path="/playQueues/{playQueueId}/unshuffle" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
UnshuffleRequest req = new UnshuffleRequest() {
|
||||
PlayQueueId = 484388,
|
||||
};
|
||||
|
||||
var res = await sdk.PlayQueue.UnshuffleAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| `request` | [UnshuffleRequest](../../Models/Requests/UnshuffleRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[UnshuffleResponse](../../Models/Requests/UnshuffleResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## DeletePlayQueueItem
|
||||
|
||||
Deletes an item in a play queue. Increments the version of the play queue. Returns the modified play queue.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="deletePlayQueueItem" method="delete" path="/playQueues/{playQueueId}/items/{playQueueItemId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
DeletePlayQueueItemRequest req = new DeletePlayQueueItemRequest() {
|
||||
PlayQueueId = 285738,
|
||||
PlayQueueItemId = 464354,
|
||||
};
|
||||
|
||||
var res = await sdk.PlayQueue.DeletePlayQueueItemAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| `request` | [DeletePlayQueueItemRequest](../../Models/Requests/DeletePlayQueueItemRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[DeletePlayQueueItemResponse](../../Models/Requests/DeletePlayQueueItemResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## MovePlayQueueItem
|
||||
|
||||
Moves an item in a play queue, and increases the version of the play queue. Returns the modified play queue.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="movePlayQueueItem" method="put" path="/playQueues/{playQueueId}/items/{playQueueItemId}/move" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
MovePlayQueueItemRequest req = new MovePlayQueueItemRequest() {
|
||||
PlayQueueId = 31341,
|
||||
PlayQueueItemId = 495865,
|
||||
};
|
||||
|
||||
var res = await sdk.PlayQueue.MovePlayQueueItemAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `request` | [MovePlayQueueItemRequest](../../Models/Requests/MovePlayQueueItemRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[MovePlayQueueItemResponse](../../Models/Requests/MovePlayQueueItemResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -1,290 +0,0 @@
|
||||
# Plex
|
||||
(*Plex*)
|
||||
|
||||
## Overview
|
||||
|
||||
API Calls that perform operations directly against https://Plex.tv
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetCompanionsData](#getcompanionsdata) - Get Companions Data
|
||||
* [GetUserFriends](#getuserfriends) - Get list of friends of the user logged in
|
||||
* [GetGeoData](#getgeodata) - Get Geo Data
|
||||
* [GetHomeData](#gethomedata) - Get Plex Home Data
|
||||
* [GetServerResources](#getserverresources) - Get Server Resources
|
||||
* [GetPin](#getpin) - Get a Pin
|
||||
* [GetTokenByPinId](#gettokenbypinid) - Get Access Token by PinId
|
||||
|
||||
## GetCompanionsData
|
||||
|
||||
Get Companions Data
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getCompanionsData" method="get" path="/companions" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Plex.GetCompanionsDataAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetCompanionsDataResponse](../../Models/Requests/GetCompanionsDataResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetCompanionsDataBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetCompanionsDataUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetUserFriends
|
||||
|
||||
Get friends of provided auth token.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getUserFriends" method="get" path="/friends" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Plex.GetUserFriendsAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetUserFriendsResponse](../../Models/Requests/GetUserFriendsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetUserFriendsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetUserFriendsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetGeoData
|
||||
|
||||
Returns the geolocation and locale data of the caller
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getGeoData" method="get" path="/geoip" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
|
||||
var sdk = new PlexAPI();
|
||||
|
||||
var res = await sdk.Plex.GetGeoDataAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetGeoDataResponse](../../Models/Requests/GetGeoDataResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetGeoDataBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetGeoDataUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetHomeData
|
||||
|
||||
Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getHomeData" method="get" path="/home" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Plex.GetHomeDataAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetHomeDataResponse](../../Models/Requests/GetHomeDataResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetHomeDataBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetHomeDataUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetServerResources
|
||||
|
||||
Get Plex server access tokens and server connections
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="get-server-resources" method="get" path="/resources" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Plex.GetServerResourcesAsync(
|
||||
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
includeHttps: IncludeHttps.Enable,
|
||||
includeRelay: IncludeRelay.Enable,
|
||||
includeIPv6: IncludeIPv6.Enable
|
||||
);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ClientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
|
||||
| `IncludeHttps` | [IncludeHttps](../../Models/Requests/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
|
||||
| `IncludeRelay` | [IncludeRelay](../../Models/Requests/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
|
||||
| `IncludeIPv6` | [IncludeIPv6](../../Models/Requests/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetServerResourcesResponse](../../Models/Requests/GetServerResourcesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetServerResourcesBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetServerResourcesUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetPin
|
||||
|
||||
Retrieve a Pin ID from Plex.tv to use for authentication flows
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getPin" method="post" path="/pins" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI();
|
||||
|
||||
GetPinRequest req = new GetPinRequest() {
|
||||
ClientID = "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
ClientName = "Plex for Roku",
|
||||
DeviceNickname = "Roku 3",
|
||||
ClientVersion = "2.4.1",
|
||||
Platform = "Roku",
|
||||
};
|
||||
|
||||
var res = await sdk.Plex.GetPinAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| `request` | [GetPinRequest](../../Models/Requests/GetPinRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetPinResponse](../../Models/Requests/GetPinResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetPinBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetTokenByPinId
|
||||
|
||||
Retrieve an Access Token from Plex.tv after the Pin has been authenticated
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getTokenByPinId" method="get" path="/pins/{pinID}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI();
|
||||
|
||||
GetTokenByPinIdRequest req = new GetTokenByPinIdRequest() {
|
||||
PinID = 232248,
|
||||
ClientID = "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
ClientName = "Plex for Roku",
|
||||
DeviceNickname = "Roku 3",
|
||||
ClientVersion = "2.4.1",
|
||||
Platform = "Roku",
|
||||
};
|
||||
|
||||
var res = await sdk.Plex.GetTokenByPinIdAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [GetTokenByPinIdRequest](../../Models/Requests/GetTokenByPinIdRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetTokenByPinIdResponse](../../Models/Requests/GetTokenByPinIdResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTokenByPinIdBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTokenByPinIdResponseBody | 404 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -1,31 +0,0 @@
|
||||
# PlexAPI SDK
|
||||
|
||||
## Overview
|
||||
|
||||
# Plex Media Server OpenAPI Specification
|
||||
|
||||
An Open Source OpenAPI Specification for Plex Media Server
|
||||
|
||||
Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/)
|
||||
|
||||
## Documentation
|
||||
|
||||
[API Documentation](https://plexapi.dev)
|
||||
|
||||
## SDKs
|
||||
|
||||
The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec).
|
||||
|
||||
| Language | Repository | Releases | Other |
|
||||
| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| Python | [GitHub](https://github.com/LukeHagar/plexpy) | [PyPI](https://pypi.org/project/plex-api-client/) | - |
|
||||
| JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs) | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \ [JSR](https://jsr.io/@lukehagar/plexjs) | - |
|
||||
| Go | [GitHub](https://github.com/LukeHagar/plexgo) | [Releases](https://github.com/LukeHagar/plexgo/releases) | [GoDoc](https://pkg.go.dev/github.com/LukeHagar/plexgo) |
|
||||
| Ruby | [GitHub](https://github.com/LukeHagar/plexruby) | [Releases](https://github.com/LukeHagar/plexruby/releases) | - |
|
||||
| Swift | [GitHub](https://github.com/LukeHagar/plexswift) | [Releases](https://github.com/LukeHagar/plexswift/releases) | - |
|
||||
| PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - |
|
||||
| Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - |
|
||||
| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | -
|
||||
|
||||
|
||||
### Available Operations
|
||||
142
docs/sdks/preferences/README.md
Normal file
142
docs/sdks/preferences/README.md
Normal file
@@ -0,0 +1,142 @@
|
||||
# Preferences
|
||||
(*Preferences*)
|
||||
|
||||
## Overview
|
||||
|
||||
API Operations against the Preferences
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetAllPreferences](#getallpreferences) - Get all preferences
|
||||
* [SetPreferences](#setpreferences) - Set preferences
|
||||
* [GetPreference](#getpreference) - Get a preferences
|
||||
|
||||
## GetAllPreferences
|
||||
|
||||
Get the list of all preferences
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getAllPreferences" method="get" path="/:/prefs" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Preferences.GetAllPreferencesAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetAllPreferencesResponse](../../Models/Requests/GetAllPreferencesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## SetPreferences
|
||||
|
||||
Set a set of preferences in query parameters
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="setPreferences" method="put" path="/:/prefs" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
SetPreferencesRequest req = new SetPreferencesRequest() {
|
||||
Prefs = new Prefs() {},
|
||||
};
|
||||
|
||||
var res = await sdk.Preferences.SetPreferencesAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [SetPreferencesRequest](../../Models/Requests/SetPreferencesRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[SetPreferencesResponse](../../Models/Requests/SetPreferencesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetPreference
|
||||
|
||||
Get a single preference and value
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getPreference" method="get" path="/:/prefs/get" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetPreferenceRequest req = new GetPreferenceRequest() {};
|
||||
|
||||
var res = await sdk.Preferences.GetPreferenceAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `request` | [GetPreferenceRequest](../../Models/Requests/GetPreferenceRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetPreferenceResponse](../../Models/Requests/GetPreferenceResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
173
docs/sdks/provider/README.md
Normal file
173
docs/sdks/provider/README.md
Normal file
@@ -0,0 +1,173 @@
|
||||
# Provider
|
||||
(*Provider*)
|
||||
|
||||
## Overview
|
||||
|
||||
Media providers are the starting points for the entire Plex Media Server media library API. It defines the paths for the groups of endpoints. The `/media/providers` should be the only hard-coded path in clients when accessing the media library. Non-media library endpoints are outside the scope of the media provider. See the description in See [the section in API Info](#section/API-Info/Media-Providers) for more information on how to use media providers.
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [ListProviders](#listproviders) - Get the list of available media providers
|
||||
* [AddProvider](#addprovider) - Add a media provider
|
||||
* [RefreshProviders](#refreshproviders) - Refresh media providers
|
||||
* [DeleteMediaProvider](#deletemediaprovider) - Delete a media provider
|
||||
|
||||
## ListProviders
|
||||
|
||||
Get the list of all available media providers for this PMS. This will generally include the library provider and possibly EPG if DVR is set up.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="listProviders" method="get" path="/media/providers" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Provider.ListProvidersAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[ListProvidersResponse](../../Models/Requests/ListProvidersResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## AddProvider
|
||||
|
||||
This endpoint registers a media provider with the server. Once registered, the media server acts as a reverse proxy to the provider, allowing both local and remote providers to work.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="addProvider" method="post" path="/media/providers" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
AddProviderRequest req = new AddProviderRequest() {
|
||||
Url = "https://steep-obedience.name/",
|
||||
};
|
||||
|
||||
var res = await sdk.Provider.AddProviderAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `request` | [AddProviderRequest](../../Models/Requests/AddProviderRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[AddProviderResponse](../../Models/Requests/AddProviderResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## RefreshProviders
|
||||
|
||||
Refresh all known media providers. This is useful in case a provider has updated features.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="refreshProviders" method="post" path="/media/providers/refresh" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Provider.RefreshProvidersAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[RefreshProvidersResponse](../../Models/Requests/RefreshProvidersResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## DeleteMediaProvider
|
||||
|
||||
Deletes a media provider with the given id
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="deleteMediaProvider" method="delete" path="/media/providers/{provider}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
DeleteMediaProviderRequest req = new DeleteMediaProviderRequest() {
|
||||
Provider = "<value>",
|
||||
};
|
||||
|
||||
var res = await sdk.Provider.DeleteMediaProviderAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| `request` | [DeleteMediaProviderRequest](../../Models/Requests/DeleteMediaProviderRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[DeleteMediaProviderResponse](../../Models/Requests/DeleteMediaProviderResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
65
docs/sdks/rate/README.md
Normal file
65
docs/sdks/rate/README.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# Rate
|
||||
(*Rate*)
|
||||
|
||||
## Overview
|
||||
|
||||
Operations for rating media items (thumbs up/down, star ratings, etc.)
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [SetRating](#setrating) - Rate an item
|
||||
|
||||
## SetRating
|
||||
|
||||
Set the rating on an item.
|
||||
This API does respond to the GET verb but applications should use PUT
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="setRating" method="put" path="/:/rate" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
SetRatingRequest req = new SetRatingRequest() {
|
||||
Identifier = "<value>",
|
||||
Key = "<key>",
|
||||
Rating = 8722.46D,
|
||||
};
|
||||
|
||||
var res = await sdk.Rate.SetRatingAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| `request` | [SetRatingRequest](../../Models/Requests/SetRatingRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[SetRatingResponse](../../Models/Requests/SetRatingResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -3,16 +3,16 @@
|
||||
|
||||
## Overview
|
||||
|
||||
API Calls that perform search operations with Plex Media Server
|
||||
|
||||
The search feature within a media provider
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [PerformSearch](#performsearch) - Perform a search
|
||||
* [PerformVoiceSearch](#performvoicesearch) - Perform a voice search
|
||||
* [GetSearchResults](#getsearchresults) - Get Search Results
|
||||
* [SearchHubs](#searchhubs) - Search Hub
|
||||
* [VoiceSearchHubs](#voicesearchhubs) - Voice Search Hub
|
||||
|
||||
## PerformSearch
|
||||
## SearchHubs
|
||||
|
||||
Perform a search and get the result as hubs
|
||||
|
||||
This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor).
|
||||
|
||||
@@ -30,118 +30,106 @@ This request is intended to be very fast, and called as the user types.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="performSearch" method="get" path="/hubs/search" -->
|
||||
<!-- UsageSnippet language="csharp" operationID="searchHubs" method="get" path="/hubs/search" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Search.PerformSearchAsync(
|
||||
query: "arnold",
|
||||
limit: 5D
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
SearchHubsRequest req = new SearchHubsRequest() {
|
||||
Query = "<value>",
|
||||
SectionId = 1,
|
||||
};
|
||||
|
||||
var res = await sdk.Search.SearchHubsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||
| `Query` | *string* | :heavy_check_mark: | The query term | arnold |
|
||||
| `SectionId` | *double* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | |
|
||||
| `Limit` | *double* | :heavy_minus_sign: | The number of items to return per hub | 5 |
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `request` | [SearchHubsRequest](../../Models/Requests/SearchHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[PerformSearchResponse](../../Models/Requests/PerformSearchResponse.md)**
|
||||
**[SearchHubsResponse](../../Models/Requests/SearchHubsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.PerformSearchBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.PerformSearchUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## PerformVoiceSearch
|
||||
## VoiceSearchHubs
|
||||
|
||||
Perform a search tailored to voice input and get the result as hubs
|
||||
|
||||
This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. Whenever possible, clients should limit the search to the appropriate type.
|
||||
|
||||
This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint.
|
||||
It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint.
|
||||
Whenever possible, clients should limit the search to the appropriate type.
|
||||
Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="performVoiceSearch" method="get" path="/hubs/search/voice" -->
|
||||
<!-- UsageSnippet language="csharp" operationID="voiceSearchHubs" method="get" path="/hubs/search/voice" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Search.PerformVoiceSearchAsync(
|
||||
query: "dead+poop",
|
||||
limit: 5D
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
// handle response
|
||||
```
|
||||
VoiceSearchHubsRequest req = new VoiceSearchHubsRequest() {
|
||||
Query = "<value>",
|
||||
};
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||
| `Query` | *string* | :heavy_check_mark: | The query term | dead+poop |
|
||||
| `SectionId` | *double* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | |
|
||||
| `Limit` | *double* | :heavy_minus_sign: | The number of items to return per hub | 5 |
|
||||
|
||||
### Response
|
||||
|
||||
**[PerformVoiceSearchResponse](../../Models/Requests/PerformVoiceSearchResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.PerformVoiceSearchBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.PerformVoiceSearchUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetSearchResults
|
||||
|
||||
This will search the database for the string provided.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getSearchResults" method="get" path="/search" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Search.GetSearchResultsAsync(query: "110");
|
||||
var res = await sdk.Search.VoiceSearchHubsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| `Query` | *string* | :heavy_check_mark: | The search query string to use | 110 |
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [VoiceSearchHubsRequest](../../Models/Requests/VoiceSearchHubsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetSearchResultsResponse](../../Models/Requests/GetSearchResultsResponse.md)**
|
||||
**[VoiceSearchHubsResponse](../../Models/Requests/VoiceSearchHubsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetSearchResultsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetSearchResultsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -1,310 +0,0 @@
|
||||
# Server
|
||||
(*Server*)
|
||||
|
||||
## Overview
|
||||
|
||||
Operations against the Plex Media Server System.
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetServerCapabilities](#getservercapabilities) - Get Server Capabilities
|
||||
* [GetServerPreferences](#getserverpreferences) - Get Server Preferences
|
||||
* [GetAvailableClients](#getavailableclients) - Get Available Clients
|
||||
* [GetDevices](#getdevices) - Get Devices
|
||||
* [GetServerIdentity](#getserveridentity) - Get Server Identity
|
||||
* [GetMyPlexAccount](#getmyplexaccount) - Get MyPlex Account
|
||||
* [GetResizedPhoto](#getresizedphoto) - Get a Resized Photo
|
||||
* [GetMediaProviders](#getmediaproviders) - Get Media Providers
|
||||
* [GetServerList](#getserverlist) - Get Server List
|
||||
|
||||
## GetServerCapabilities
|
||||
|
||||
Get Server Capabilities
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getServerCapabilities" method="get" path="/" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Server.GetServerCapabilitiesAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetServerCapabilitiesResponse](../../Models/Requests/GetServerCapabilitiesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetServerCapabilitiesBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetServerCapabilitiesUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetServerPreferences
|
||||
|
||||
Get Server Preferences
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getServerPreferences" method="get" path="/:/prefs" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Server.GetServerPreferencesAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetServerPreferencesResponse](../../Models/Requests/GetServerPreferencesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetServerPreferencesBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetServerPreferencesUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetAvailableClients
|
||||
|
||||
Get Available Clients
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getAvailableClients" method="get" path="/clients" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Server.GetAvailableClientsAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetAvailableClientsResponse](../../Models/Requests/GetAvailableClientsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetAvailableClientsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetAvailableClientsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetDevices
|
||||
|
||||
Get Devices
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getDevices" method="get" path="/devices" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Server.GetDevicesAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetDevicesResponse](../../Models/Requests/GetDevicesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetDevicesBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetDevicesUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetServerIdentity
|
||||
|
||||
This request is useful to determine if the server is online or offline
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="get-server-identity" method="get" path="/identity" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
|
||||
var sdk = new PlexAPI();
|
||||
|
||||
var res = await sdk.Server.GetServerIdentityAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetServerIdentityResponse](../../Models/Requests/GetServerIdentityResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetServerIdentityRequestTimeout | 408 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetMyPlexAccount
|
||||
|
||||
Returns MyPlex Account Information
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getMyPlexAccount" method="get" path="/myplex/account" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Server.GetMyPlexAccountAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetMyPlexAccountResponse](../../Models/Requests/GetMyPlexAccountResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetMyPlexAccountBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetMyPlexAccountUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetResizedPhoto
|
||||
|
||||
Plex's Photo transcoder is used throughout the service to serve images at specified sizes.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getResizedPhoto" method="get" path="/photo/:/transcode" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
GetResizedPhotoRequest req = new GetResizedPhotoRequest() {
|
||||
Width = 110D,
|
||||
Height = 165D,
|
||||
Blur = 0D,
|
||||
MinSize = MinSize.Zero,
|
||||
Upscale = Upscale.Zero,
|
||||
Url = "/library/metadata/49564/thumb/1654258204",
|
||||
};
|
||||
|
||||
var res = await sdk.Server.GetResizedPhotoAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [GetResizedPhotoRequest](../../Models/Requests/GetResizedPhotoRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetResizedPhotoResponse](../../Models/Requests/GetResizedPhotoResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetResizedPhotoBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetResizedPhotoUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetMediaProviders
|
||||
|
||||
Retrieves media providers and their features from the Plex server.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="get-media-providers" method="get" path="/media/providers" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Server.GetMediaProvidersAsync(xPlexToken: "CV5xoxjTpFKUzBTShsaf");
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
|
||||
| `XPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetMediaProvidersResponse](../../Models/Requests/GetMediaProvidersResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetMediaProvidersBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetMediaProvidersUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetServerList
|
||||
|
||||
Get Server List
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getServerList" method="get" path="/servers" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Server.GetServerListAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetServerListResponse](../../Models/Requests/GetServerListResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetServerListBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetServerListUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -1,155 +0,0 @@
|
||||
# Sessions
|
||||
(*Sessions*)
|
||||
|
||||
## Overview
|
||||
|
||||
API Calls that perform search operations with Plex Media Server Sessions
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetSessions](#getsessions) - Get Active Sessions
|
||||
* [GetSessionHistory](#getsessionhistory) - Get Session History
|
||||
* [GetTranscodeSessions](#gettranscodesessions) - Get Transcode Sessions
|
||||
* [StopTranscodeSession](#stoptranscodesession) - Stop a Transcode Session
|
||||
|
||||
## GetSessions
|
||||
|
||||
This will retrieve the "Now Playing" Information of the PMS.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getSessions" method="get" path="/status/sessions" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Sessions.GetSessionsAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetSessionsResponse](../../Models/Requests/GetSessionsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetSessionsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetSessionsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetSessionHistory
|
||||
|
||||
This will Retrieve a listing of all history views.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getSessionHistory" method="get" path="/status/sessions/history/all" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Sessions.GetSessionHistoryAsync(
|
||||
sort: "viewedAt:desc",
|
||||
accountId: 1,
|
||||
filter: new QueryParamFilter() {},
|
||||
librarySectionID: 12
|
||||
);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Sort` | *string* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)<br/> | |
|
||||
| `AccountId` | *long* | :heavy_minus_sign: | Filter results by those that are related to a specific users id<br/> | 1 |
|
||||
| `Filter` | [QueryParamFilter](../../Models/Requests/QueryParamFilter.md) | :heavy_minus_sign: | Filters content by field and direction/equality<br/>(Unknown if viewedAt is the only supported column)<br/> | {<br/>"viewed-at-greater-than": {<br/>"value": "viewedAt\u003e"<br/>},<br/>"viewed-at-greater-than-or-equal-to": {<br/>"value": "viewedAt\u003e=\u003e"<br/>},<br/>"viewed-at-less-than": {<br/>"value": "viewedAt\u003c"<br/>}<br/>} |
|
||||
| `LibrarySectionID` | *long* | :heavy_minus_sign: | Filters the results based on the id of a valid library section<br/> | 12 |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetSessionHistoryResponse](../../Models/Requests/GetSessionHistoryResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetSessionHistoryBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetSessionHistoryUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetTranscodeSessions
|
||||
|
||||
Get Transcode Sessions
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getTranscodeSessions" method="get" path="/transcode/sessions" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Sessions.GetTranscodeSessionsAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetTranscodeSessionsResponse](../../Models/Requests/GetTranscodeSessionsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTranscodeSessionsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTranscodeSessionsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## StopTranscodeSession
|
||||
|
||||
Stop a Transcode Session
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="stopTranscodeSession" method="delete" path="/transcode/sessions/{sessionKey}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Sessions.StopTranscodeSessionAsync(sessionKey: "zz7llzqlx8w9vnrsbnwhbmep");
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||
| `SessionKey` | *string* | :heavy_check_mark: | the Key of the transcode session to stop | zz7llzqlx8w9vnrsbnwhbmep |
|
||||
|
||||
### Response
|
||||
|
||||
**[StopTranscodeSessionResponse](../../Models/Requests/StopTranscodeSessionResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.StopTranscodeSessionBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.StopTranscodeSessionUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -1,121 +0,0 @@
|
||||
# Statistics
|
||||
(*Statistics*)
|
||||
|
||||
## Overview
|
||||
|
||||
API Calls that perform operations with Plex Media Server Statistics
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetStatistics](#getstatistics) - Get Media Statistics
|
||||
* [GetResourcesStatistics](#getresourcesstatistics) - Get Resources Statistics
|
||||
* [GetBandwidthStatistics](#getbandwidthstatistics) - Get Bandwidth Statistics
|
||||
|
||||
## GetStatistics
|
||||
|
||||
This will return the media statistics for the server
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getStatistics" method="get" path="/statistics/media" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Statistics.GetStatisticsAsync(timespan: 4);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `Timespan` | *long* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetStatisticsResponse](../../Models/Requests/GetStatisticsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetStatisticsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetStatisticsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetResourcesStatistics
|
||||
|
||||
This will return the resources for the server
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getResourcesStatistics" method="get" path="/statistics/resources" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Statistics.GetResourcesStatisticsAsync(timespan: 4);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `Timespan` | *long* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetResourcesStatisticsResponse](../../Models/Requests/GetResourcesStatisticsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetResourcesStatisticsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetResourcesStatisticsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetBandwidthStatistics
|
||||
|
||||
This will return the bandwidth statistics for the server
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getBandwidthStatistics" method="get" path="/statistics/bandwidth" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Statistics.GetBandwidthStatisticsAsync(timespan: 4);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `Timespan` | *long* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetBandwidthStatisticsResponse](../../Models/Requests/GetBandwidthStatisticsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetBandwidthStatisticsBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetBandwidthStatisticsUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
306
docs/sdks/status/README.md
Normal file
306
docs/sdks/status/README.md
Normal file
@@ -0,0 +1,306 @@
|
||||
# Status
|
||||
(*Status*)
|
||||
|
||||
## Overview
|
||||
|
||||
The status endpoints give you information about current playbacks, play history, and even terminating sessions.
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [ListSessions](#listsessions) - List Sessions
|
||||
* [GetBackgroundTasks](#getbackgroundtasks) - Get background tasks
|
||||
* [ListPlaybackHistory](#listplaybackhistory) - List Playback History
|
||||
* [TerminateSession](#terminatesession) - Terminate a session
|
||||
* [DeleteHistory](#deletehistory) - Delete Single History Item
|
||||
* [GetHistoryItem](#gethistoryitem) - Get Single History Item
|
||||
|
||||
## ListSessions
|
||||
|
||||
List all current playbacks on this server
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="listSessions" method="get" path="/status/sessions" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Status.ListSessionsAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[ListSessionsResponse](../../Models/Requests/ListSessionsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetBackgroundTasks
|
||||
|
||||
Get the list of all background tasks
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getBackgroundTasks" method="get" path="/status/sessions/background" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Status.GetBackgroundTasksAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetBackgroundTasksResponse](../../Models/Requests/GetBackgroundTasksResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ListPlaybackHistory
|
||||
|
||||
List all playback history (Admin can see all users, others can only see their own).
|
||||
Pagination should be used on this endpoint. Additionally this endpoint supports `includeFields`, `excludeFields`, `includeElements`, and `excludeElements` parameters.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="listPlaybackHistory" method="get" path="/status/sessions/history/all" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ListPlaybackHistoryRequest req = new ListPlaybackHistoryRequest() {
|
||||
Sort = new List<string>() {
|
||||
"v",
|
||||
"i",
|
||||
"e",
|
||||
"w",
|
||||
"e",
|
||||
"d",
|
||||
"A",
|
||||
"t",
|
||||
":",
|
||||
"d",
|
||||
"e",
|
||||
"s",
|
||||
"c",
|
||||
",",
|
||||
"a",
|
||||
"c",
|
||||
"c",
|
||||
"o",
|
||||
"u",
|
||||
"n",
|
||||
"t",
|
||||
"I",
|
||||
"D",
|
||||
},
|
||||
};
|
||||
|
||||
var res = await sdk.Status.ListPlaybackHistoryAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| `request` | [ListPlaybackHistoryRequest](../../Models/Requests/ListPlaybackHistoryRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ListPlaybackHistoryResponse](../../Models/Requests/ListPlaybackHistoryResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## TerminateSession
|
||||
|
||||
Terminate a playback session kicking off the user
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="terminateSession" method="post" path="/status/sessions/terminate" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
TerminateSessionRequest req = new TerminateSessionRequest() {
|
||||
SessionId = "cdefghijklmnopqrstuvwxyz",
|
||||
Reason = "Stop Playing",
|
||||
};
|
||||
|
||||
var res = await sdk.Status.TerminateSessionAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `request` | [TerminateSessionRequest](../../Models/Requests/TerminateSessionRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[TerminateSessionResponse](../../Models/Requests/TerminateSessionResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## DeleteHistory
|
||||
|
||||
Delete a single history item by id
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="deleteHistory" method="delete" path="/status/sessions/history/{historyId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
DeleteHistoryRequest req = new DeleteHistoryRequest() {
|
||||
HistoryId = 953579,
|
||||
};
|
||||
|
||||
var res = await sdk.Status.DeleteHistoryAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `request` | [DeleteHistoryRequest](../../Models/Requests/DeleteHistoryRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[DeleteHistoryResponse](../../Models/Requests/DeleteHistoryResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetHistoryItem
|
||||
|
||||
Get a single history item by id
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getHistoryItem" method="get" path="/status/sessions/history/{historyId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetHistoryItemRequest req = new GetHistoryItemRequest() {
|
||||
HistoryId = 832213,
|
||||
};
|
||||
|
||||
var res = await sdk.Status.GetHistoryItemAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [GetHistoryItemRequest](../../Models/Requests/GetHistoryItemRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetHistoryItemResponse](../../Models/Requests/GetHistoryItemResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
502
docs/sdks/subscriptions/README.md
Normal file
502
docs/sdks/subscriptions/README.md
Normal file
@@ -0,0 +1,502 @@
|
||||
# Subscriptions
|
||||
(*Subscriptions*)
|
||||
|
||||
## Overview
|
||||
|
||||
Subscriptions determine which media will be recorded and the criteria for selecting an airing when multiple are available
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetAllSubscriptions](#getallsubscriptions) - Get all subscriptions
|
||||
* [CreateSubscription](#createsubscription) - Create a subscription
|
||||
* [ProcessSubscriptions](#processsubscriptions) - Process all subscriptions
|
||||
* [GetScheduledRecordings](#getscheduledrecordings) - Get all scheduled recordings
|
||||
* [GetTemplate](#gettemplate) - Get the subscription template
|
||||
* [CancelGrab](#cancelgrab) - Cancel an existing grab
|
||||
* [DeleteSubscription](#deletesubscription) - Delete a subscription
|
||||
* [GetSubscription](#getsubscription) - Get a single subscription
|
||||
* [EditSubscriptionPreferences](#editsubscriptionpreferences) - Edit a subscription
|
||||
* [ReorderSubscription](#reordersubscription) - Re-order a subscription
|
||||
|
||||
## GetAllSubscriptions
|
||||
|
||||
Get all subscriptions and potentially the grabs too
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getAllSubscriptions" method="get" path="/media/subscriptions" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetAllSubscriptionsRequest req = new GetAllSubscriptionsRequest() {
|
||||
IncludeGrabs = BoolInt.One,
|
||||
IncludeStorage = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.Subscriptions.GetAllSubscriptionsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| `request` | [GetAllSubscriptionsRequest](../../Models/Requests/GetAllSubscriptionsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetAllSubscriptionsResponse](../../Models/Requests/GetAllSubscriptionsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## CreateSubscription
|
||||
|
||||
Create a subscription. The query parameters should be mostly derived from the [template](#tag/Subscriptions/operation/mediaSubscriptionsGetTemplate)
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="createSubscription" method="post" path="/media/subscriptions" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
CreateSubscriptionRequest req = new CreateSubscriptionRequest() {
|
||||
TargetLibrarySectionID = 1,
|
||||
TargetSectionLocationID = 3,
|
||||
Type = 2,
|
||||
Hints = new Hints() {},
|
||||
Prefs = new CreateSubscriptionQueryParamPrefs() {},
|
||||
Params = new Params() {},
|
||||
};
|
||||
|
||||
var res = await sdk.Subscriptions.CreateSubscriptionAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| `request` | [CreateSubscriptionRequest](../../Models/Requests/CreateSubscriptionRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[CreateSubscriptionResponse](../../Models/Requests/CreateSubscriptionResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ProcessSubscriptions
|
||||
|
||||
Process all subscriptions asynchronously
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="processSubscriptions" method="post" path="/media/subscriptions/process" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Subscriptions.ProcessSubscriptionsAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[ProcessSubscriptionsResponse](../../Models/Requests/ProcessSubscriptionsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetScheduledRecordings
|
||||
|
||||
Get all scheduled recordings across all subscriptions
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getScheduledRecordings" method="get" path="/media/subscriptions/scheduled" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Subscriptions.GetScheduledRecordingsAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetScheduledRecordingsResponse](../../Models/Requests/GetScheduledRecordingsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetTemplate
|
||||
|
||||
Get the templates for a piece of media which could include fetching one airing, season, the whole show, etc.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getTemplate" method="get" path="/media/subscriptions/template" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetTemplateRequest req = new GetTemplateRequest() {
|
||||
Guid = "plex://episode/5fc70265c40548002d539d23",
|
||||
};
|
||||
|
||||
var res = await sdk.Subscriptions.GetTemplateAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `request` | [GetTemplateRequest](../../Models/Requests/GetTemplateRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetTemplateResponse](../../Models/Requests/GetTemplateResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## CancelGrab
|
||||
|
||||
Cancels an existing media grab (recording). It can be used to resolve a conflict which exists for a rolling subscription.
|
||||
Note: This cancellation does not persist across a server restart, but neither does a rolling subscription itself.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="cancelGrab" method="delete" path="/media/grabbers/operations/{operationId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
CancelGrabRequest req = new CancelGrabRequest() {
|
||||
OperationId = "<id>",
|
||||
};
|
||||
|
||||
var res = await sdk.Subscriptions.CancelGrabAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `request` | [CancelGrabRequest](../../Models/Requests/CancelGrabRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[CancelGrabResponse](../../Models/Requests/CancelGrabResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## DeleteSubscription
|
||||
|
||||
Delete a subscription, cancelling all of its grabs as well
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="deleteSubscription" method="delete" path="/media/subscriptions/{subscriptionId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
DeleteSubscriptionRequest req = new DeleteSubscriptionRequest() {
|
||||
SubscriptionId = 974618,
|
||||
};
|
||||
|
||||
var res = await sdk.Subscriptions.DeleteSubscriptionAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| `request` | [DeleteSubscriptionRequest](../../Models/Requests/DeleteSubscriptionRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[DeleteSubscriptionResponse](../../Models/Requests/DeleteSubscriptionResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetSubscription
|
||||
|
||||
Get a single subscription and potentially the grabs too
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getSubscription" method="get" path="/media/subscriptions/{subscriptionId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetSubscriptionRequest req = new GetSubscriptionRequest() {
|
||||
SubscriptionId = 186713,
|
||||
IncludeGrabs = BoolInt.One,
|
||||
IncludeStorage = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.Subscriptions.GetSubscriptionAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [GetSubscriptionRequest](../../Models/Requests/GetSubscriptionRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetSubscriptionResponse](../../Models/Requests/GetSubscriptionResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## EditSubscriptionPreferences
|
||||
|
||||
Edit a subscription's preferences
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="editSubscriptionPreferences" method="put" path="/media/subscriptions/{subscriptionId}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
EditSubscriptionPreferencesRequest req = new EditSubscriptionPreferencesRequest() {
|
||||
SubscriptionId = 673918,
|
||||
Prefs = new EditSubscriptionPreferencesQueryParamPrefs() {},
|
||||
};
|
||||
|
||||
var res = await sdk.Subscriptions.EditSubscriptionPreferencesAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| `request` | [EditSubscriptionPreferencesRequest](../../Models/Requests/EditSubscriptionPreferencesRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[EditSubscriptionPreferencesResponse](../../Models/Requests/EditSubscriptionPreferencesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## ReorderSubscription
|
||||
|
||||
Re-order a subscription to change its priority
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="reorderSubscription" method="put" path="/media/subscriptions/{subscriptionId}/move" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ReorderSubscriptionRequest req = new ReorderSubscriptionRequest() {
|
||||
SubscriptionId = 440634,
|
||||
};
|
||||
|
||||
var res = await sdk.Subscriptions.ReorderSubscriptionAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| `request` | [ReorderSubscriptionRequest](../../Models/Requests/ReorderSubscriptionRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ReorderSubscriptionResponse](../../Models/Requests/ReorderSubscriptionResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
185
docs/sdks/timeline/README.md
Normal file
185
docs/sdks/timeline/README.md
Normal file
@@ -0,0 +1,185 @@
|
||||
# Timeline
|
||||
(*Timeline*)
|
||||
|
||||
## Overview
|
||||
|
||||
The actions feature within a media provider
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [MarkPlayed](#markplayed) - Mark an item as played
|
||||
* [Report](#report) - Report media timeline
|
||||
* [Unscrobble](#unscrobble) - Mark an item as unplayed
|
||||
|
||||
## MarkPlayed
|
||||
|
||||
Mark an item as played. Note, this does not create any view history of this item but rather just sets the state as played. The client must provide either the `key` or `uri` query parameter
|
||||
This API does respond to the GET verb but applications should use PUT
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="markPlayed" method="put" path="/:/scrobble" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
MarkPlayedRequest req = new MarkPlayedRequest() {
|
||||
Identifier = "<value>",
|
||||
Key = "59398",
|
||||
};
|
||||
|
||||
var res = await sdk.Timeline.MarkPlayedAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `request` | [MarkPlayedRequest](../../Models/Requests/MarkPlayedRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[MarkPlayedResponse](../../Models/Requests/MarkPlayedResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## Report
|
||||
|
||||
This endpoint is hit during media playback for an item. It must be hit whenever the play state changes, or in the absence of a play state change, in a regular fashion (generally this means every 10 seconds on a LAN/WAN, and every 20 seconds over cellular).
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="report" method="post" path="/:/timeline" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ReportRequest req = new ReportRequest() {
|
||||
Key = "/foo",
|
||||
RatingKey = "xyz",
|
||||
State = State.Playing,
|
||||
PlayQueueItemID = "123",
|
||||
Time = 0,
|
||||
Duration = 10000,
|
||||
Continuing = BoolInt.One,
|
||||
Updated = 14200000,
|
||||
Offline = BoolInt.One,
|
||||
TimeToFirstFrame = 1000,
|
||||
TimeStalled = 1000,
|
||||
Bandwidth = 100,
|
||||
BufferedTime = 100,
|
||||
BufferedSize = 1024,
|
||||
};
|
||||
|
||||
var res = await sdk.Timeline.ReportAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| `request` | [ReportRequest](../../Models/Requests/ReportRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[ReportResponse](../../Models/Requests/ReportResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## Unscrobble
|
||||
|
||||
Mark an item as unplayed. The client must provide either the `key` or `uri` query parameter
|
||||
This API does respond to the GET verb but applications should use PUT
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="unscrobble" method="put" path="/:/unscrobble" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
UnscrobbleRequest req = new UnscrobbleRequest() {
|
||||
Identifier = "<value>",
|
||||
};
|
||||
|
||||
var res = await sdk.Timeline.UnscrobbleAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `request` | [UnscrobbleRequest](../../Models/Requests/UnscrobbleRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[UnscrobbleResponse](../../Models/Requests/UnscrobbleResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
361
docs/sdks/transcoder/README.md
Normal file
361
docs/sdks/transcoder/README.md
Normal file
@@ -0,0 +1,361 @@
|
||||
# Transcoder
|
||||
(*Transcoder*)
|
||||
|
||||
## Overview
|
||||
|
||||
API Operations against the Transcoder
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [TranscodeImage](#transcodeimage) - Transcode an image
|
||||
* [MakeDecision](#makedecision) - Make a decision on media playback
|
||||
* [TriggerFallback](#triggerfallback) - Manually trigger a transcoder fallback
|
||||
* [TranscodeSubtitles](#transcodesubtitles) - Transcode subtitles
|
||||
* [StartTranscodeSession](#starttranscodesession) - Start A Transcoding Session
|
||||
|
||||
## TranscodeImage
|
||||
|
||||
Transcode an image, possibly changing format or size
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="transcodeImage" method="get" path="/photo/:/transcode" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
TranscodeImageRequest req = new TranscodeImageRequest() {
|
||||
Url = "/library/metadata/265/thumb/1715112705",
|
||||
Background = "#ff5522",
|
||||
Upscale = BoolInt.One,
|
||||
MinSize = BoolInt.One,
|
||||
Rotate = BoolInt.One,
|
||||
BlendColor = "#ff5522",
|
||||
};
|
||||
|
||||
var res = await sdk.Transcoder.TranscodeImageAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `request` | [TranscodeImageRequest](../../Models/Requests/TranscodeImageRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[TranscodeImageResponse](../../Models/Requests/TranscodeImageResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## MakeDecision
|
||||
|
||||
Make a decision on media playback based on client profile, and requested settings such as bandwidth and resolution.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="makeDecision" method="get" path="/{transcodeType}/:/transcode/universal/decision" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
MakeDecisionRequest req = new MakeDecisionRequest() {
|
||||
TranscodeType = TranscodeType.Music,
|
||||
AdvancedSubtitles = LukeHagar.PlexAPI.SDK.Models.Components.AdvancedSubtitles.Burn,
|
||||
AudioBoost = 50,
|
||||
AudioChannelCount = 5,
|
||||
AutoAdjustQuality = BoolInt.One,
|
||||
AutoAdjustSubtitle = BoolInt.One,
|
||||
DirectPlay = BoolInt.One,
|
||||
DirectStream = BoolInt.One,
|
||||
DirectStreamAudio = BoolInt.One,
|
||||
DisableResolutionRotation = BoolInt.One,
|
||||
HasMDE = BoolInt.One,
|
||||
Location = LukeHagar.PlexAPI.SDK.Models.Requests.Location.Wan,
|
||||
MediaBufferSize = 102400,
|
||||
MediaIndex = 0,
|
||||
MusicBitrate = 5000,
|
||||
Offset = 90.5D,
|
||||
PartIndex = 0,
|
||||
Path = "/library/metadata/151671",
|
||||
PeakBitrate = 12000,
|
||||
PhotoResolution = "1080x1080",
|
||||
Protocol = LukeHagar.PlexAPI.SDK.Models.Requests.Protocol.Dash,
|
||||
SecondsPerSegment = 5,
|
||||
SubtitleSize = 50,
|
||||
VideoBitrate = 12000,
|
||||
VideoQuality = 50,
|
||||
VideoResolution = "1080x1080",
|
||||
XPlexClientProfileExtra = "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 = "generic",
|
||||
};
|
||||
|
||||
var res = await sdk.Transcoder.MakeDecisionAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `request` | [MakeDecisionRequest](../../Models/Requests/MakeDecisionRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[MakeDecisionResponse](../../Models/Requests/MakeDecisionResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## TriggerFallback
|
||||
|
||||
Manually trigger a transcoder fallback ex: HEVC to h.264 or hw to sw
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="triggerFallback" method="post" path="/{transcodeType}/:/transcode/universal/fallback" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
TriggerFallbackRequest req = new TriggerFallbackRequest() {
|
||||
TranscodeType = TranscodeType.Audio,
|
||||
};
|
||||
|
||||
var res = await sdk.Transcoder.TriggerFallbackAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `request` | [TriggerFallbackRequest](../../Models/Requests/TriggerFallbackRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[TriggerFallbackResponse](../../Models/Requests/TriggerFallbackResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## TranscodeSubtitles
|
||||
|
||||
Only transcode subtitle streams.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="transcodeSubtitles" method="get" path="/{transcodeType}/:/transcode/universal/subtitles" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
TranscodeSubtitlesRequest req = new TranscodeSubtitlesRequest() {
|
||||
TranscodeType = TranscodeType.Audio,
|
||||
AdvancedSubtitles = LukeHagar.PlexAPI.SDK.Models.Components.AdvancedSubtitles.Burn,
|
||||
AudioBoost = 50,
|
||||
AudioChannelCount = 5,
|
||||
AutoAdjustQuality = BoolInt.One,
|
||||
AutoAdjustSubtitle = BoolInt.One,
|
||||
DirectPlay = BoolInt.One,
|
||||
DirectStream = BoolInt.One,
|
||||
DirectStreamAudio = BoolInt.One,
|
||||
DisableResolutionRotation = BoolInt.One,
|
||||
HasMDE = BoolInt.One,
|
||||
Location = QueryParamLocation.Wan,
|
||||
MediaBufferSize = 102400,
|
||||
MediaIndex = 0,
|
||||
MusicBitrate = 5000,
|
||||
Offset = 90.5D,
|
||||
PartIndex = 0,
|
||||
Path = "/library/metadata/151671",
|
||||
PeakBitrate = 12000,
|
||||
PhotoResolution = "1080x1080",
|
||||
Protocol = QueryParamProtocol.Dash,
|
||||
SecondsPerSegment = 5,
|
||||
SubtitleSize = 50,
|
||||
VideoBitrate = 12000,
|
||||
VideoQuality = 50,
|
||||
VideoResolution = "1080x1080",
|
||||
XPlexClientProfileExtra = "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 = "generic",
|
||||
};
|
||||
|
||||
var res = await sdk.Transcoder.TranscodeSubtitlesAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| `request` | [TranscodeSubtitlesRequest](../../Models/Requests/TranscodeSubtitlesRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[TranscodeSubtitlesResponse](../../Models/Requests/TranscodeSubtitlesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## StartTranscodeSession
|
||||
|
||||
Starts the transcoder and returns the corresponding streaming resource document.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="startTranscodeSession" method="get" path="/{transcodeType}/:/transcode/universal/start.{extension}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
StartTranscodeSessionRequest req = new StartTranscodeSessionRequest() {
|
||||
TranscodeType = TranscodeType.Music,
|
||||
Extension = Extension.Mpd,
|
||||
AdvancedSubtitles = LukeHagar.PlexAPI.SDK.Models.Components.AdvancedSubtitles.Burn,
|
||||
AudioBoost = 50,
|
||||
AudioChannelCount = 5,
|
||||
AutoAdjustQuality = BoolInt.One,
|
||||
AutoAdjustSubtitle = BoolInt.One,
|
||||
DirectPlay = BoolInt.One,
|
||||
DirectStream = BoolInt.One,
|
||||
DirectStreamAudio = BoolInt.One,
|
||||
DisableResolutionRotation = BoolInt.One,
|
||||
HasMDE = BoolInt.One,
|
||||
Location = StartTranscodeSessionQueryParamLocation.Wan,
|
||||
MediaBufferSize = 102400,
|
||||
MediaIndex = 0,
|
||||
MusicBitrate = 5000,
|
||||
Offset = 90.5D,
|
||||
PartIndex = 0,
|
||||
Path = "/library/metadata/151671",
|
||||
PeakBitrate = 12000,
|
||||
PhotoResolution = "1080x1080",
|
||||
Protocol = StartTranscodeSessionQueryParamProtocol.Dash,
|
||||
SecondsPerSegment = 5,
|
||||
SubtitleSize = 50,
|
||||
VideoBitrate = 12000,
|
||||
VideoQuality = 50,
|
||||
VideoResolution = "1080x1080",
|
||||
XPlexClientProfileExtra = "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 = "generic",
|
||||
};
|
||||
|
||||
var res = await sdk.Transcoder.StartTranscodeSessionAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||
| `request` | [StartTranscodeSessionRequest](../../Models/Requests/StartTranscodeSessionRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[StartTranscodeSessionResponse](../../Models/Requests/StartTranscodeSessionResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
121
docs/sdks/ultrablur/README.md
Normal file
121
docs/sdks/ultrablur/README.md
Normal file
@@ -0,0 +1,121 @@
|
||||
# UltraBlur
|
||||
(*UltraBlur*)
|
||||
|
||||
## Overview
|
||||
|
||||
Service provided to compute UltraBlur colors and images.
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetColors](#getcolors) - Get UltraBlur Colors
|
||||
* [GetImage](#getimage) - Get UltraBlur Image
|
||||
|
||||
## GetColors
|
||||
|
||||
Retrieves the four colors extracted from an image for clients to use to generate an ultrablur image.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getColors" method="get" path="/services/ultrablur/colors" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetColorsRequest req = new GetColorsRequest() {
|
||||
Url = "/library/metadata/217745/art/1718931408",
|
||||
};
|
||||
|
||||
var res = await sdk.UltraBlur.GetColorsAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| `request` | [GetColorsRequest](../../Models/Requests/GetColorsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetColorsResponse](../../Models/Requests/GetColorsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetImage
|
||||
|
||||
Retrieves a server-side generated UltraBlur image based on the provided color inputs. Clients should always call this via the photo transcoder endpoint.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getImage" method="get" path="/services/ultrablur/image" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
GetImageRequest req = new GetImageRequest() {
|
||||
TopLeft = "3f280a",
|
||||
TopRight = "6b4713",
|
||||
BottomRight = "0f2a43",
|
||||
BottomLeft = "1c425d",
|
||||
Width = 1920,
|
||||
Height = 1080,
|
||||
Noise = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.UltraBlur.GetImageAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `request` | [GetImageRequest](../../Models/Requests/GetImageRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetImageResponse](../../Models/Requests/GetImageResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -9,81 +9,13 @@ Updates to the status can be observed via the Event API.
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetUpdateStatus](#getupdatestatus) - Querying status of updates
|
||||
* [CheckForUpdates](#checkforupdates) - Checking for updates
|
||||
* [ApplyUpdates](#applyupdates) - Apply Updates
|
||||
|
||||
## GetUpdateStatus
|
||||
|
||||
Querying status of updates
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getUpdateStatus" method="get" path="/updater/status" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Updater.GetUpdateStatusAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetUpdateStatusResponse](../../Models/Requests/GetUpdateStatusResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetUpdateStatusBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetUpdateStatusUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## CheckForUpdates
|
||||
|
||||
Checking for updates
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="checkForUpdates" method="put" path="/updater/check" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Updater.CheckForUpdatesAsync(download: Download.One);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `Download` | [Download](../../Models/Requests/Download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 |
|
||||
|
||||
### Response
|
||||
|
||||
**[CheckForUpdatesResponse](../../Models/Requests/CheckForUpdatesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.CheckForUpdatesBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.CheckForUpdatesUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
* [ApplyUpdates](#applyupdates) - Applying updates
|
||||
* [CheckUpdates](#checkupdates) - Checking for updates
|
||||
* [GetUpdatesStatus](#getupdatesstatus) - Querying status of updates
|
||||
|
||||
## ApplyUpdates
|
||||
|
||||
Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
|
||||
|
||||
Apply any downloaded updates. Note that the two parameters `tonight` and `skip` are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed.
|
||||
|
||||
### Example Usage
|
||||
|
||||
@@ -93,22 +25,36 @@ using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Updater.ApplyUpdatesAsync(
|
||||
tonight: Tonight.One,
|
||||
skip: Skip.One
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
ApplyUpdatesRequest req = new ApplyUpdatesRequest() {
|
||||
Tonight = BoolInt.One,
|
||||
Skip = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.Updater.ApplyUpdatesAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Tonight` | [Tonight](../../Models/Requests/Tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 |
|
||||
| `Skip` | [Skip](../../Models/Requests/Skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. | 1 |
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `request` | [ApplyUpdatesRequest](../../Models/Requests/ApplyUpdatesRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
@@ -116,8 +62,86 @@ var res = await sdk.Updater.ApplyUpdatesAsync(
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.ApplyUpdatesBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.ApplyUpdatesUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## CheckUpdates
|
||||
|
||||
Perform an update check and potentially download
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="checkUpdates" method="put" path="/updater/check" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml,
|
||||
clientIdentifier: "abc123",
|
||||
product: "Plex for Roku",
|
||||
version: "2.4.1",
|
||||
platform: "Roku",
|
||||
platformVersion: "4.3 build 1057",
|
||||
device: "Roku 3",
|
||||
model: "4200X",
|
||||
deviceVendor: "Roku",
|
||||
deviceName: "Living Room TV",
|
||||
marketplace: "googlePlay",
|
||||
token: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
CheckUpdatesRequest req = new CheckUpdatesRequest() {
|
||||
Download = BoolInt.One,
|
||||
};
|
||||
|
||||
var res = await sdk.Updater.CheckUpdatesAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `request` | [CheckUpdatesRequest](../../Models/Requests/CheckUpdatesRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[CheckUpdatesResponse](../../Models/Requests/CheckUpdatesResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## GetUpdatesStatus
|
||||
|
||||
Get the status of updating the server
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getUpdatesStatus" method="get" path="/updater/status" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(token: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
var res = await sdk.Updater.GetUpdatesStatusAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
**[GetUpdatesStatusResponse](../../Models/Requests/GetUpdatesStatusResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -1,61 +0,0 @@
|
||||
# Users
|
||||
(*Users*)
|
||||
|
||||
## Overview
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetUsers](#getusers) - Get list of all connected users
|
||||
|
||||
## GetUsers
|
||||
|
||||
Get list of all users that are friends and have library access with the provided Plex authentication token
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="get-users" method="get" path="/users" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI();
|
||||
|
||||
GetUsersRequest req = new GetUsersRequest() {
|
||||
ClientID = "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
ClientName = "Plex for Roku",
|
||||
DeviceNickname = "Roku 3",
|
||||
DeviceName = "Chrome",
|
||||
DeviceScreenResolution = "1487x1165,2560x1440",
|
||||
ClientVersion = "2.4.1",
|
||||
Platform = "Roku",
|
||||
ClientFeatures = "external-media,indirect-media,hub-style-list",
|
||||
Model = "4200X",
|
||||
XPlexSessionId = "97e136ef-4ddd-4ff3-89a7-a5820c96c2ca",
|
||||
XPlexLanguage = "en",
|
||||
PlatformVersion = "4.3 build 1057",
|
||||
XPlexToken = "CV5xoxjTpFKUzBTShsaf",
|
||||
};
|
||||
|
||||
var res = await sdk.Users.GetUsersAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `request` | [GetUsersRequest](../../Models/Requests/GetUsersRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetUsersResponse](../../Models/Requests/GetUsersResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetUsersBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetUsersUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -1,118 +0,0 @@
|
||||
# Video
|
||||
(*Video*)
|
||||
|
||||
## Overview
|
||||
|
||||
API Calls that perform operations with Plex Media Server Videos
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetTimeline](#gettimeline) - Get the timeline for a media item
|
||||
* [StartUniversalTranscode](#startuniversaltranscode) - Start Universal Transcode
|
||||
|
||||
## GetTimeline
|
||||
|
||||
Get the timeline for a media item
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="getTimeline" method="get" path="/:/timeline" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
GetTimelineRequest req = new GetTimelineRequest() {
|
||||
RatingKey = 23409D,
|
||||
Key = "/library/metadata/23409",
|
||||
State = State.Playing,
|
||||
HasMDE = 1D,
|
||||
Time = 2000D,
|
||||
Duration = 10000D,
|
||||
Context = "home:hub.continueWatching",
|
||||
PlayQueueItemID = 1D,
|
||||
PlayBackTime = 2000D,
|
||||
Row = 1D,
|
||||
};
|
||||
|
||||
var res = await sdk.Video.GetTimelineAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `request` | [GetTimelineRequest](../../Models/Requests/GetTimelineRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetTimelineResponse](../../Models/Requests/GetTimelineResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTimelineBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTimelineUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## StartUniversalTranscode
|
||||
|
||||
Begin a Universal Transcode Session
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="startUniversalTranscode" method="get" path="/video/:/transcode/universal/start.mpd" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
StartUniversalTranscodeRequest req = new StartUniversalTranscodeRequest() {
|
||||
HasMDE = 1D,
|
||||
Path = "/library/metadata/23409",
|
||||
MediaIndex = 0D,
|
||||
PartIndex = 0D,
|
||||
Protocol = "hls",
|
||||
FastSeek = 0D,
|
||||
DirectPlay = 0D,
|
||||
DirectStream = 0D,
|
||||
SubtitleSize = 100D,
|
||||
Subtites = "burn",
|
||||
AudioBoost = 100D,
|
||||
Location = "lan",
|
||||
MediaBufferSize = 102400D,
|
||||
Session = "zvcage8b7rkioqcm8f4uns4c",
|
||||
AddDebugOverlay = 0D,
|
||||
AutoAdjustQuality = 0D,
|
||||
};
|
||||
|
||||
var res = await sdk.Video.StartUniversalTranscodeAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `request` | [StartUniversalTranscodeRequest](../../Models/Requests/StartUniversalTranscodeRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[StartUniversalTranscodeResponse](../../Models/Requests/StartUniversalTranscodeResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.StartUniversalTranscodeBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.StartUniversalTranscodeUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
@@ -1,54 +0,0 @@
|
||||
# Watchlist
|
||||
(*Watchlist*)
|
||||
|
||||
## Overview
|
||||
|
||||
API Calls that perform operations with Plex Media Server Watchlists
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetWatchList](#getwatchlist) - Get User Watchlist
|
||||
|
||||
## GetWatchList
|
||||
|
||||
Get User Watchlist
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="csharp" operationID="get-watch-list" method="get" path="/library/sections/watchlist/{filter}" -->
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
|
||||
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
|
||||
|
||||
GetWatchListRequest req = new GetWatchListRequest() {
|
||||
Filter = Filter.Released,
|
||||
XPlexToken = "CV5xoxjTpFKUzBTShsaf",
|
||||
};
|
||||
|
||||
var res = await sdk.Watchlist.GetWatchListAsync(req);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `request` | [GetWatchListRequest](../../Models/Requests/GetWatchListRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
### Response
|
||||
|
||||
**[GetWatchListResponse](../../Models/Requests/GetWatchListResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetWatchListBadRequest | 400 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.GetWatchListUnauthorized | 401 | application/json |
|
||||
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |
|
||||
Reference in New Issue
Block a user