mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 12:37:46 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ae6d27c3c | ||
|
|
3ca57c37e9 | ||
|
|
8642a796e0 | ||
|
|
37988d5081 | ||
|
|
b6e4544107 | ||
|
|
0a712f5595 | ||
|
|
484b48c271 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
.env
|
||||||
|
.env.local
|
||||||
.DS_Store
|
.DS_Store
|
||||||
**/.speakeasy/temp/
|
**/.speakeasy/temp/
|
||||||
**/.speakeasy/logs/
|
**/.speakeasy/logs/
|
||||||
|
|||||||
6729
.speakeasy/gen.lock
6729
.speakeasy/gen.lock
File diff suppressed because one or more lines are too long
@@ -16,12 +16,16 @@ generation:
|
|||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: true
|
oAuth2ClientCredentialsEnabled: true
|
||||||
oAuth2PasswordEnabled: false
|
oAuth2PasswordEnabled: false
|
||||||
|
hoistGlobalSecurity: true
|
||||||
|
schemas:
|
||||||
|
allOfMergeStrategy: shallowMerge
|
||||||
|
requestBodyFieldName: ""
|
||||||
tests:
|
tests:
|
||||||
generateTests: true
|
generateTests: true
|
||||||
generateNewTests: false
|
generateNewTests: false
|
||||||
skipResponseBodyAssertions: false
|
skipResponseBodyAssertions: false
|
||||||
go:
|
go:
|
||||||
version: 0.24.1
|
version: 0.28.0
|
||||||
additionalDependencies: {}
|
additionalDependencies: {}
|
||||||
allowUnknownFieldsInWeakUnions: false
|
allowUnknownFieldsInWeakUnions: false
|
||||||
baseErrorName: PlexAPIError
|
baseErrorName: PlexAPIError
|
||||||
@@ -36,11 +40,17 @@ go:
|
|||||||
operations: models/operations
|
operations: models/operations
|
||||||
shared: models/components
|
shared: models/components
|
||||||
webhooks: models/webhooks
|
webhooks: models/webhooks
|
||||||
|
includeEmptyObjects: false
|
||||||
|
inferUnionDiscriminators: false
|
||||||
inputModelSuffix: input
|
inputModelSuffix: input
|
||||||
maxMethodParams: 4
|
maxMethodParams: 4
|
||||||
methodArguments: require-security-and-request
|
methodArguments: require-security-and-request
|
||||||
modulePath: ""
|
modulePath: ""
|
||||||
|
multipartArrayFormat: legacy
|
||||||
|
nullableOptionalWrapper: false
|
||||||
outputModelSuffix: output
|
outputModelSuffix: output
|
||||||
packageName: github.com/LukeHagar/plexgo
|
packageName: github.com/LukeHagar/plexgo
|
||||||
|
respectRequiredFields: false
|
||||||
responseFormat: envelope
|
responseFormat: envelope
|
||||||
sdkPackageName: ""
|
sdkPackageName: ""
|
||||||
|
unionStrategy: left-to-right
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
speakeasyVersion: 1.598.3
|
speakeasyVersion: 1.665.0
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
my-source:
|
||||||
sourceNamespace: my-source
|
sourceNamespace: my-source
|
||||||
@@ -9,26 +9,29 @@ sources:
|
|||||||
- main
|
- main
|
||||||
plexapi:
|
plexapi:
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:b4fa89a3571fbdcb4228800772a5fe1c292170babcd3e055161ae54402f89577
|
sourceRevisionDigest: sha256:ace004a3b232e8ab9ca3d89f2da8e40470236e6d997073a16c3f8872d67a7383
|
||||||
sourceBlobDigest: sha256:f84dd2bfdaea4074454cea3c7fbc6c9e05515c5e9e961abb4923b77f8faf48f1
|
sourceBlobDigest: sha256:993bfb796a3833b0a3b813ad12469ca34db94f23c2d15ae988a26b4d1ed80fbe
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- speakeasy-sdk-regen-1754525524
|
- speakeasy-sdk-regen-1764548025
|
||||||
|
- 1.1.1
|
||||||
targets:
|
targets:
|
||||||
plexgo:
|
plexgo:
|
||||||
source: plexapi
|
source: plexapi
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:b4fa89a3571fbdcb4228800772a5fe1c292170babcd3e055161ae54402f89577
|
sourceRevisionDigest: sha256:ace004a3b232e8ab9ca3d89f2da8e40470236e6d997073a16c3f8872d67a7383
|
||||||
sourceBlobDigest: sha256:f84dd2bfdaea4074454cea3c7fbc6c9e05515c5e9e961abb4923b77f8faf48f1
|
sourceBlobDigest: sha256:993bfb796a3833b0a3b813ad12469ca34db94f23c2d15ae988a26b4d1ed80fbe
|
||||||
codeSamplesNamespace: code-samples-go-plexgo
|
codeSamplesNamespace: code-samples-go-plexgo
|
||||||
codeSamplesRevisionDigest: sha256:b3b33cad9d51c5c7b91f0fb005d52d487405e8a7a6e60663cec67546202aac78
|
codeSamplesRevisionDigest: sha256:d79ec0f33d0e234749ae5970ad2528646cdd6ec28c7e8d7e29cc39b857f58cde
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: latest
|
speakeasyVersion: latest
|
||||||
sources:
|
sources:
|
||||||
plexapi:
|
plexapi:
|
||||||
inputs:
|
inputs:
|
||||||
- location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main
|
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/refs/heads/main/plex-api-spec.yaml
|
||||||
|
registry:
|
||||||
|
location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi
|
||||||
targets:
|
targets:
|
||||||
plexgo:
|
plexgo:
|
||||||
target: go
|
target: go
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ speakeasyVersion: latest
|
|||||||
sources:
|
sources:
|
||||||
plexapi:
|
plexapi:
|
||||||
inputs:
|
inputs:
|
||||||
- location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main
|
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/refs/heads/main/plex-api-spec.yaml
|
||||||
|
registry:
|
||||||
|
location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi
|
||||||
targets:
|
targets:
|
||||||
plexgo:
|
plexgo:
|
||||||
target: go
|
target: go
|
||||||
|
|||||||
621
README.md
621
README.md
@@ -10,41 +10,13 @@
|
|||||||
<!-- Start Summary [summary] -->
|
<!-- Start Summary [summary] -->
|
||||||
## Summary
|
## Summary
|
||||||
|
|
||||||
Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server
|
|
||||||
|
|
||||||
# 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) | -
|
|
||||||
<!-- End Summary [summary] -->
|
<!-- End Summary [summary] -->
|
||||||
|
|
||||||
<!-- Start Table of Contents [toc] -->
|
<!-- Start Table of Contents [toc] -->
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
<!-- $toc-max-depth=2 -->
|
<!-- $toc-max-depth=2 -->
|
||||||
* [github.com/LukeHagar/plexgo](#githubcomlukehagarplexgo)
|
* [github.com/LukeHagar/plexgo](#githubcomlukehagarplexgo)
|
||||||
* [Plex Media Server OpenAPI Specification](#plex-media-server-openapi-specification)
|
|
||||||
* [Documentation](#documentation)
|
|
||||||
* [SDKs](#sdks)
|
|
||||||
* [SDK Installation](#sdk-installation)
|
* [SDK Installation](#sdk-installation)
|
||||||
* [SDK Example Usage](#sdk-example-usage)
|
* [SDK Example Usage](#sdk-example-usage)
|
||||||
* [Available Resources and Operations](#available-resources-and-operations)
|
* [Available Resources and Operations](#available-resources-and-operations)
|
||||||
@@ -80,6 +52,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/LukeHagar/plexgo"
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"github.com/LukeHagar/plexgo/models/components"
|
||||||
|
"github.com/LukeHagar/plexgo/models/operations"
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -87,14 +61,55 @@ func main() {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
||||||
|
plexgo.WithClientIdentifier("abc123"),
|
||||||
|
plexgo.WithProduct("Plex for Roku"),
|
||||||
|
plexgo.WithVersion("2.4.1"),
|
||||||
|
plexgo.WithPlatform("Roku"),
|
||||||
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
||||||
|
plexgo.WithDevice("Roku 3"),
|
||||||
|
plexgo.WithModel("4200X"),
|
||||||
|
plexgo.WithDeviceVendor("Roku"),
|
||||||
|
plexgo.WithDeviceName("Living Room TV"),
|
||||||
|
plexgo.WithMarketplace("googlePlay"),
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
)
|
)
|
||||||
|
|
||||||
res, err := s.Server.GetServerCapabilities(ctx)
|
res, err := s.Transcoder.StartTranscodeSession(ctx, operations.StartTranscodeSessionRequest{
|
||||||
|
TranscodeType: components.TranscodeTypeMusic,
|
||||||
|
Extension: operations.ExtensionMpd,
|
||||||
|
AdvancedSubtitles: components.AdvancedSubtitlesBurn.ToPointer(),
|
||||||
|
AudioBoost: plexgo.Pointer[int64](50),
|
||||||
|
AudioChannelCount: plexgo.Pointer[int64](5),
|
||||||
|
AutoAdjustQuality: components.BoolIntTrue.ToPointer(),
|
||||||
|
AutoAdjustSubtitle: components.BoolIntTrue.ToPointer(),
|
||||||
|
DirectPlay: components.BoolIntTrue.ToPointer(),
|
||||||
|
DirectStream: components.BoolIntTrue.ToPointer(),
|
||||||
|
DirectStreamAudio: components.BoolIntTrue.ToPointer(),
|
||||||
|
DisableResolutionRotation: components.BoolIntTrue.ToPointer(),
|
||||||
|
HasMDE: components.BoolIntTrue.ToPointer(),
|
||||||
|
Location: operations.StartTranscodeSessionQueryParamLocationWan.ToPointer(),
|
||||||
|
MediaBufferSize: plexgo.Pointer[int64](102400),
|
||||||
|
MediaIndex: plexgo.Pointer[int64](0),
|
||||||
|
MusicBitrate: plexgo.Pointer[int64](5000),
|
||||||
|
Offset: plexgo.Pointer[float64](90.5),
|
||||||
|
PartIndex: plexgo.Pointer[int64](0),
|
||||||
|
Path: plexgo.Pointer("/library/metadata/151671"),
|
||||||
|
PeakBitrate: plexgo.Pointer[int64](12000),
|
||||||
|
PhotoResolution: plexgo.Pointer("1080x1080"),
|
||||||
|
Protocol: operations.StartTranscodeSessionQueryParamProtocolDash.ToPointer(),
|
||||||
|
SecondsPerSegment: plexgo.Pointer[int64](5),
|
||||||
|
SubtitleSize: plexgo.Pointer[int64](50),
|
||||||
|
VideoBitrate: plexgo.Pointer[int64](12000),
|
||||||
|
VideoQuality: plexgo.Pointer[int64](50),
|
||||||
|
VideoResolution: plexgo.Pointer("1080x1080"),
|
||||||
|
XPlexClientProfileExtra: plexgo.Pointer("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)"),
|
||||||
|
XPlexClientProfileName: plexgo.Pointer("generic"),
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
if res.Object != nil {
|
if res.ResponseStream != nil {
|
||||||
// handle response
|
// handle response
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -110,140 +125,338 @@ func main() {
|
|||||||
|
|
||||||
### [Activities](docs/sdks/activities/README.md)
|
### [Activities](docs/sdks/activities/README.md)
|
||||||
|
|
||||||
* [GetServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities
|
* [ListActivities](docs/sdks/activities/README.md#listactivities) - Get all activities
|
||||||
* [CancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities
|
* [CancelActivity](docs/sdks/activities/README.md#cancelactivity) - Cancel a running activity
|
||||||
|
|
||||||
### [Authentication](docs/sdks/authentication/README.md)
|
### [Authentication](docs/sdks/authentication/README.md)
|
||||||
|
|
||||||
* [GetTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token
|
|
||||||
* [GetSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information
|
|
||||||
* [GetTokenDetails](docs/sdks/authentication/README.md#gettokendetails) - Get Token Details
|
* [GetTokenDetails](docs/sdks/authentication/README.md#gettokendetails) - Get Token Details
|
||||||
* [PostUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata) - Get User Sign In Data
|
* [PostUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata) - Get User Sign In Data
|
||||||
|
|
||||||
### [Butler](docs/sdks/butler/README.md)
|
### [Butler](docs/sdks/butler/README.md)
|
||||||
|
|
||||||
* [GetButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks
|
* [StopTasks](docs/sdks/butler/README.md#stoptasks) - Stop all Butler tasks
|
||||||
* [StartAllTasks](docs/sdks/butler/README.md#startalltasks) - Start all Butler tasks
|
* [GetTasks](docs/sdks/butler/README.md#gettasks) - Get all Butler tasks
|
||||||
* [StopAllTasks](docs/sdks/butler/README.md#stopalltasks) - Stop all Butler tasks
|
* [StartTasks](docs/sdks/butler/README.md#starttasks) - Start all Butler tasks
|
||||||
* [StartTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task
|
|
||||||
* [StopTask](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task
|
* [StopTask](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task
|
||||||
|
* [StartTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task
|
||||||
|
|
||||||
|
### [Collections](docs/sdks/collections/README.md)
|
||||||
|
|
||||||
|
* [CreateCollection](docs/sdks/collections/README.md#createcollection) - Create collection
|
||||||
|
|
||||||
|
### [Content](docs/sdks/content/README.md)
|
||||||
|
|
||||||
|
* [GetCollectionItems](docs/sdks/content/README.md#getcollectionitems) - Get items in a collection
|
||||||
|
* [GetMetadataItem](docs/sdks/content/README.md#getmetadataitem) - Get a metadata item
|
||||||
|
* [GetAlbums](docs/sdks/content/README.md#getalbums) - Set section albums
|
||||||
|
* [ListContent](docs/sdks/content/README.md#listcontent) - Get items in the section
|
||||||
|
* [GetAllLeaves](docs/sdks/content/README.md#getallleaves) - Set section leaves
|
||||||
|
* [GetArts](docs/sdks/content/README.md#getarts) - Set section artwork
|
||||||
|
* [GetCategories](docs/sdks/content/README.md#getcategories) - Set section categories
|
||||||
|
* [GetCluster](docs/sdks/content/README.md#getcluster) - Set section clusters
|
||||||
|
* [GetSonicPath](docs/sdks/content/README.md#getsonicpath) - Similar tracks to transition from one to another
|
||||||
|
* [GetFolders](docs/sdks/content/README.md#getfolders) - Get all folder locations
|
||||||
|
* [ListMoments](docs/sdks/content/README.md#listmoments) - Set section moments
|
||||||
|
* [GetSonicallySimilar](docs/sdks/content/README.md#getsonicallysimilar) - The nearest audio tracks
|
||||||
|
* [GetCollectionImage](docs/sdks/content/README.md#getcollectionimage) - Get a collection's image
|
||||||
|
|
||||||
|
### [Devices](docs/sdks/devices/README.md)
|
||||||
|
|
||||||
|
* [GetAvailableGrabbers](docs/sdks/devices/README.md#getavailablegrabbers) - Get available grabbers
|
||||||
|
* [ListDevices](docs/sdks/devices/README.md#listdevices) - Get all devices
|
||||||
|
* [AddDevice](docs/sdks/devices/README.md#adddevice) - Add a device
|
||||||
|
* [DiscoverDevices](docs/sdks/devices/README.md#discoverdevices) - Tell grabbers to discover devices
|
||||||
|
* [RemoveDevice](docs/sdks/devices/README.md#removedevice) - Remove a device
|
||||||
|
* [GetDeviceDetails](docs/sdks/devices/README.md#getdevicedetails) - Get device details
|
||||||
|
* [ModifyDevice](docs/sdks/devices/README.md#modifydevice) - Enable or disable a device
|
||||||
|
* [SetChannelmap](docs/sdks/devices/README.md#setchannelmap) - Set a device's channel mapping
|
||||||
|
* [GetDevicesChannels](docs/sdks/devices/README.md#getdeviceschannels) - Get a device's channels
|
||||||
|
* [SetDevicePreferences](docs/sdks/devices/README.md#setdevicepreferences) - Set device preferences
|
||||||
|
* [StopScan](docs/sdks/devices/README.md#stopscan) - Tell a device to stop scanning for channels
|
||||||
|
* [Scan](docs/sdks/devices/README.md#scan) - Tell a device to scan for channels
|
||||||
|
* [GetThumb](docs/sdks/devices/README.md#getthumb) - Get device thumb
|
||||||
|
|
||||||
|
### [DownloadQueue](docs/sdks/downloadqueue/README.md)
|
||||||
|
|
||||||
|
* [CreateDownloadQueue](docs/sdks/downloadqueue/README.md#createdownloadqueue) - Create download queue
|
||||||
|
* [GetDownloadQueue](docs/sdks/downloadqueue/README.md#getdownloadqueue) - Get a download queue
|
||||||
|
* [AddDownloadQueueItems](docs/sdks/downloadqueue/README.md#adddownloadqueueitems) - Add to download queue
|
||||||
|
* [ListDownloadQueueItems](docs/sdks/downloadqueue/README.md#listdownloadqueueitems) - Get download queue items
|
||||||
|
* [GetItemDecision](docs/sdks/downloadqueue/README.md#getitemdecision) - Grab download queue item decision
|
||||||
|
* [GetDownloadQueueMedia](docs/sdks/downloadqueue/README.md#getdownloadqueuemedia) - Grab download queue media
|
||||||
|
* [RemoveDownloadQueueItems](docs/sdks/downloadqueue/README.md#removedownloadqueueitems) - Delete download queue items
|
||||||
|
* [GetDownloadQueueItems](docs/sdks/downloadqueue/README.md#getdownloadqueueitems) - Get download queue items
|
||||||
|
* [RestartProcessingDownloadQueueItems](docs/sdks/downloadqueue/README.md#restartprocessingdownloadqueueitems) - Restart processing of items from the decision
|
||||||
|
|
||||||
|
### [DVRs](docs/sdks/dvrs/README.md)
|
||||||
|
|
||||||
|
* [ListDVRs](docs/sdks/dvrs/README.md#listdvrs) - Get DVRs
|
||||||
|
* [CreateDVR](docs/sdks/dvrs/README.md#createdvr) - Create a DVR
|
||||||
|
* [DeleteDVR](docs/sdks/dvrs/README.md#deletedvr) - Delete a single DVR
|
||||||
|
* [GetDVR](docs/sdks/dvrs/README.md#getdvr) - Get a single DVR
|
||||||
|
* [DeleteLineup](docs/sdks/dvrs/README.md#deletelineup) - Delete a DVR Lineup
|
||||||
|
* [AddLineup](docs/sdks/dvrs/README.md#addlineup) - Add a DVR Lineup
|
||||||
|
* [SetDVRPreferences](docs/sdks/dvrs/README.md#setdvrpreferences) - Set DVR preferences
|
||||||
|
* [StopDVRReload](docs/sdks/dvrs/README.md#stopdvrreload) - Tell a DVR to stop reloading program guide
|
||||||
|
* [ReloadGuide](docs/sdks/dvrs/README.md#reloadguide) - Tell a DVR to reload program guide
|
||||||
|
* [TuneChannel](docs/sdks/dvrs/README.md#tunechannel) - Tune a channel on a DVR
|
||||||
|
* [RemoveDeviceFromDVR](docs/sdks/dvrs/README.md#removedevicefromdvr) - Remove a device from an existing DVR
|
||||||
|
* [AddDeviceToDVR](docs/sdks/dvrs/README.md#adddevicetodvr) - Add a device to an existing DVR
|
||||||
|
|
||||||
|
### [Epg](docs/sdks/epg/README.md)
|
||||||
|
|
||||||
|
* [ComputeChannelMap](docs/sdks/epg/README.md#computechannelmap) - Compute the best channel map
|
||||||
|
* [GetChannels](docs/sdks/epg/README.md#getchannels) - Get channels for a lineup
|
||||||
|
* [GetCountries](docs/sdks/epg/README.md#getcountries) - Get all countries
|
||||||
|
* [GetAllLanguages](docs/sdks/epg/README.md#getalllanguages) - Get all languages
|
||||||
|
* [GetLineup](docs/sdks/epg/README.md#getlineup) - Compute the best lineup
|
||||||
|
* [GetLineupChannels](docs/sdks/epg/README.md#getlineupchannels) - Get the channels for mulitple lineups
|
||||||
|
* [GetCountriesLineups](docs/sdks/epg/README.md#getcountrieslineups) - Get lineups for a country via postal code
|
||||||
|
* [GetCountryRegions](docs/sdks/epg/README.md#getcountryregions) - Get regions for a country
|
||||||
|
* [ListLineups](docs/sdks/epg/README.md#listlineups) - Get lineups for a region
|
||||||
|
|
||||||
|
### [Events](docs/sdks/events/README.md)
|
||||||
|
|
||||||
|
* [GetNotifications](docs/sdks/events/README.md#getnotifications) - Connect to Eventsource
|
||||||
|
* [ConnectWebSocket](docs/sdks/events/README.md#connectwebsocket) - Connect to WebSocket
|
||||||
|
|
||||||
|
### [General](docs/sdks/general/README.md)
|
||||||
|
|
||||||
|
* [GetServerInfo](docs/sdks/general/README.md#getserverinfo) - Get PMS info
|
||||||
|
* [GetIdentity](docs/sdks/general/README.md#getidentity) - Get PMS identity
|
||||||
|
* [GetSourceConnectionInformation](docs/sdks/general/README.md#getsourceconnectioninformation) - Get Source Connection Information
|
||||||
|
* [GetTransientToken](docs/sdks/general/README.md#gettransienttoken) - Get Transient Tokens
|
||||||
|
|
||||||
### [Hubs](docs/sdks/hubs/README.md)
|
### [Hubs](docs/sdks/hubs/README.md)
|
||||||
|
|
||||||
* [GetGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs
|
* [GetAllHubs](docs/sdks/hubs/README.md#getallhubs) - Get global hubs
|
||||||
* [GetRecentlyAdded](docs/sdks/hubs/README.md#getrecentlyadded) - Get Recently Added
|
* [GetContinueWatching](docs/sdks/hubs/README.md#getcontinuewatching) - Get the continue watching hub
|
||||||
* [GetLibraryHubs](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs
|
* [GetHubItems](docs/sdks/hubs/README.md#gethubitems) - Get a hub's items
|
||||||
|
* [GetPromotedHubs](docs/sdks/hubs/README.md#getpromotedhubs) - Get the hubs which are promoted
|
||||||
|
* [GetMetadataHubs](docs/sdks/hubs/README.md#getmetadatahubs) - Get hubs for section by metadata item
|
||||||
|
* [GetPostplayHubs](docs/sdks/hubs/README.md#getpostplayhubs) - Get postplay hubs
|
||||||
|
* [GetRelatedHubs](docs/sdks/hubs/README.md#getrelatedhubs) - Get related hubs
|
||||||
|
* [GetSectionHubs](docs/sdks/hubs/README.md#getsectionhubs) - Get section hubs
|
||||||
|
* [ResetSectionDefaults](docs/sdks/hubs/README.md#resetsectiondefaults) - Reset hubs to defaults
|
||||||
|
* [ListHubs](docs/sdks/hubs/README.md#listhubs) - Get hubs
|
||||||
|
* [CreateCustomHub](docs/sdks/hubs/README.md#createcustomhub) - Create a custom hub
|
||||||
|
* [MoveHub](docs/sdks/hubs/README.md#movehub) - Move Hub
|
||||||
|
* [DeleteCustomHub](docs/sdks/hubs/README.md#deletecustomhub) - Delete a custom hub
|
||||||
|
* [UpdateHubVisibility](docs/sdks/hubs/README.md#updatehubvisibility) - Change hub visibility
|
||||||
|
|
||||||
### [Library](docs/sdks/library/README.md)
|
### [Library](docs/sdks/library/README.md)
|
||||||
|
|
||||||
* [GetFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value
|
* [GetLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get all items in library
|
||||||
* [GetRecentlyAddedLibrary](docs/sdks/library/README.md#getrecentlyaddedlibrary) - Get Recently Added
|
* [DeleteCaches](docs/sdks/library/README.md#deletecaches) - Delete library caches
|
||||||
* [GetAllLibraries](docs/sdks/library/README.md#getalllibraries) - Get All Libraries
|
* [CleanBundles](docs/sdks/library/README.md#cleanbundles) - Clean bundles
|
||||||
* [GetLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details
|
* [IngestTransientItem](docs/sdks/library/README.md#ingesttransientitem) - Ingest a transient item
|
||||||
* [DeleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section
|
* [GetLibraryMatches](docs/sdks/library/README.md#getlibrarymatches) - Get library matches
|
||||||
* [GetLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
|
* [OptimizeDatabase](docs/sdks/library/README.md#optimizedatabase) - Optimize the Database
|
||||||
* [GetLibrarySectionsAll](docs/sdks/library/README.md#getlibrarysectionsall) - Get Library section media by tag ALL
|
* [GetRandomArtwork](docs/sdks/library/README.md#getrandomartwork) - Get random artwork
|
||||||
* [GetRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
|
* [GetSections](docs/sdks/library/README.md#getsections) - Get library sections (main Media Provider Only)
|
||||||
* [GetSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library
|
* [AddSection](docs/sdks/library/README.md#addsection) - Add a library section
|
||||||
* [GetGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media
|
* [StopAllRefreshes](docs/sdks/library/README.md#stopallrefreshes) - Stop refresh
|
||||||
* [GetCountriesLibrary](docs/sdks/library/README.md#getcountrieslibrary) - Get Countries of library media
|
* [GetSectionsPrefs](docs/sdks/library/README.md#getsectionsprefs) - Get section prefs
|
||||||
* [GetActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media
|
* [RefreshSectionsMetadata](docs/sdks/library/README.md#refreshsectionsmetadata) - Refresh all sections
|
||||||
* [GetSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
|
* [GetTags](docs/sdks/library/README.md#gettags) - Get all library tags of a type
|
||||||
* [GetMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata
|
* [DeleteMetadataItem](docs/sdks/library/README.md#deletemetadataitem) - Delete a metadata item
|
||||||
* [GetMediaArts](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork
|
* [EditMetadataItem](docs/sdks/library/README.md#editmetadataitem) - Edit a metadata item
|
||||||
* [PostMediaArts](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork
|
* [DetectAds](docs/sdks/library/README.md#detectads) - Ad-detect an item
|
||||||
* [GetMediaPosters](docs/sdks/library/README.md#getmediaposters) - Get Media Posters
|
* [GetAllItemLeaves](docs/sdks/library/README.md#getallitemleaves) - Get the leaves of an item
|
||||||
* [PostMediaPoster](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster
|
* [AnalyzeMetadata](docs/sdks/library/README.md#analyzemetadata) - Analyze an item
|
||||||
* [GetMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
* [GenerateThumbs](docs/sdks/library/README.md#generatethumbs) - Generate thumbs of chapters for an item
|
||||||
* [GetTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
* [DetectCredits](docs/sdks/library/README.md#detectcredits) - Credit detect a metadata item
|
||||||
|
* [GetExtras](docs/sdks/library/README.md#getextras) - Get an item's extras
|
||||||
|
* [AddExtras](docs/sdks/library/README.md#addextras) - Add to an item's extras
|
||||||
|
* [GetFile](docs/sdks/library/README.md#getfile) - Get a file from a metadata or media bundle
|
||||||
|
* [StartBifGeneration](docs/sdks/library/README.md#startbifgeneration) - Start BIF generation of an item
|
||||||
|
* [DetectIntros](docs/sdks/library/README.md#detectintros) - Intro detect an item
|
||||||
|
* [CreateMarker](docs/sdks/library/README.md#createmarker) - Create a marker
|
||||||
|
* [MatchItem](docs/sdks/library/README.md#matchitem) - Match a metadata item
|
||||||
|
* [ListMatches](docs/sdks/library/README.md#listmatches) - Get metadata matches for an item
|
||||||
|
* [MergeItems](docs/sdks/library/README.md#mergeitems) - Merge a metadata item
|
||||||
|
* [ListSonicallySimilar](docs/sdks/library/README.md#listsonicallysimilar) - Get nearest tracks to metadata item
|
||||||
|
* [SetItemPreferences](docs/sdks/library/README.md#setitempreferences) - Set metadata preferences
|
||||||
|
* [RefreshItemsMetadata](docs/sdks/library/README.md#refreshitemsmetadata) - Refresh a metadata item
|
||||||
|
* [GetRelatedItems](docs/sdks/library/README.md#getrelateditems) - Get related items
|
||||||
|
* [ListSimilar](docs/sdks/library/README.md#listsimilar) - Get similar items
|
||||||
|
* [SplitItem](docs/sdks/library/README.md#splititem) - Split a metadata item
|
||||||
|
* [AddSubtitles](docs/sdks/library/README.md#addsubtitles) - Add subtitles
|
||||||
|
* [GetItemTree](docs/sdks/library/README.md#getitemtree) - Get metadata items as a tree
|
||||||
|
* [Unmatch](docs/sdks/library/README.md#unmatch) - Unmatch a metadata item
|
||||||
|
* [ListTopUsers](docs/sdks/library/README.md#listtopusers) - Get metadata top users
|
||||||
|
* [DetectVoiceActivity](docs/sdks/library/README.md#detectvoiceactivity) - Detect voice activity
|
||||||
|
* [GetAugmentationStatus](docs/sdks/library/README.md#getaugmentationstatus) - Get augmentation status
|
||||||
|
* [SetStreamSelection](docs/sdks/library/README.md#setstreamselection) - Set stream selection
|
||||||
|
* [GetPerson](docs/sdks/library/README.md#getperson) - Get person details
|
||||||
|
* [ListPersonMedia](docs/sdks/library/README.md#listpersonmedia) - Get media for a person
|
||||||
|
* [DeleteLibrarySection](docs/sdks/library/README.md#deletelibrarysection) - Delete a library section
|
||||||
|
* [GetLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get a library section by id
|
||||||
|
* [EditSection](docs/sdks/library/README.md#editsection) - Edit a library section
|
||||||
|
* [UpdateItems](docs/sdks/library/README.md#updateitems) - Set the fields of the filtered items
|
||||||
|
* [StartAnalysis](docs/sdks/library/README.md#startanalysis) - Analyze a section
|
||||||
|
* [Autocomplete](docs/sdks/library/README.md#autocomplete) - Get autocompletions for search
|
||||||
|
* [GetCollections](docs/sdks/library/README.md#getcollections) - Get collections in a section
|
||||||
|
* [GetCommon](docs/sdks/library/README.md#getcommon) - Get common fields for items
|
||||||
|
* [EmptyTrash](docs/sdks/library/README.md#emptytrash) - Empty section trash
|
||||||
|
* [GetSectionFilters](docs/sdks/library/README.md#getsectionfilters) - Get section filters
|
||||||
|
* [GetFirstCharacters](docs/sdks/library/README.md#getfirstcharacters) - Get list of first characters
|
||||||
|
* [DeleteIndexes](docs/sdks/library/README.md#deleteindexes) - Delete section indexes
|
||||||
|
* [DeleteIntros](docs/sdks/library/README.md#deleteintros) - Delete section intro markers
|
||||||
|
* [GetSectionPreferences](docs/sdks/library/README.md#getsectionpreferences) - Get section prefs
|
||||||
|
* [SetSectionPreferences](docs/sdks/library/README.md#setsectionpreferences) - Set section prefs
|
||||||
|
* [CancelRefresh](docs/sdks/library/README.md#cancelrefresh) - Cancel section refresh
|
||||||
|
* [RefreshSection](docs/sdks/library/README.md#refreshsection) - Refresh section
|
||||||
|
* [GetAvailableSorts](docs/sdks/library/README.md#getavailablesorts) - Get a section sorts
|
||||||
|
* [GetStreamLevels](docs/sdks/library/README.md#getstreamlevels) - Get loudness about a stream in json
|
||||||
|
* [GetStreamLoudness](docs/sdks/library/README.md#getstreamloudness) - Get loudness about a stream
|
||||||
|
* [GetChapterImage](docs/sdks/library/README.md#getchapterimage) - Get a chapter image
|
||||||
|
* [SetItemArtwork](docs/sdks/library/README.md#setitemartwork) - Set an item's artwork, theme, etc
|
||||||
|
* [UpdateItemArtwork](docs/sdks/library/README.md#updateitemartwork) - Set an item's artwork, theme, etc
|
||||||
|
* [DeleteMarker](docs/sdks/library/README.md#deletemarker) - Delete a marker
|
||||||
|
* [EditMarker](docs/sdks/library/README.md#editmarker) - Edit a marker
|
||||||
|
* [DeleteMediaItem](docs/sdks/library/README.md#deletemediaitem) - Delete a media item
|
||||||
|
* [GetPartIndex](docs/sdks/library/README.md#getpartindex) - Get BIF index for a part
|
||||||
|
* [DeleteCollection](docs/sdks/library/README.md#deletecollection) - Delete a collection
|
||||||
|
* [GetSectionImage](docs/sdks/library/README.md#getsectionimage) - Get a section composite image
|
||||||
|
* [DeleteStream](docs/sdks/library/README.md#deletestream) - Delete a stream
|
||||||
|
* [GetStream](docs/sdks/library/README.md#getstream) - Get a stream
|
||||||
|
* [SetStreamOffset](docs/sdks/library/README.md#setstreamoffset) - Set a stream offset
|
||||||
|
* [GetItemArtwork](docs/sdks/library/README.md#getitemartwork) - Get an item's artwork, theme, etc
|
||||||
|
* [GetMediaPart](docs/sdks/library/README.md#getmediapart) - Get a media part
|
||||||
|
* [GetImageFromBif](docs/sdks/library/README.md#getimagefrombif) - Get an image from part BIF
|
||||||
|
|
||||||
|
### [LibraryCollections](docs/sdks/librarycollections/README.md)
|
||||||
|
|
||||||
|
* [AddCollectionItems](docs/sdks/librarycollections/README.md#addcollectionitems) - Add items to a collection
|
||||||
|
* [DeleteCollectionItem](docs/sdks/librarycollections/README.md#deletecollectionitem) - Delete an item from a collection
|
||||||
|
* [MoveCollectionItem](docs/sdks/librarycollections/README.md#movecollectionitem) - Reorder an item in the collection
|
||||||
|
|
||||||
|
### [LibraryPlaylists](docs/sdks/libraryplaylists/README.md)
|
||||||
|
|
||||||
|
* [CreatePlaylist](docs/sdks/libraryplaylists/README.md#createplaylist) - Create a Playlist
|
||||||
|
* [UploadPlaylist](docs/sdks/libraryplaylists/README.md#uploadplaylist) - Upload
|
||||||
|
* [DeletePlaylist](docs/sdks/libraryplaylists/README.md#deleteplaylist) - Delete a Playlist
|
||||||
|
* [UpdatePlaylist](docs/sdks/libraryplaylists/README.md#updateplaylist) - Editing a Playlist
|
||||||
|
* [GetPlaylistGenerators](docs/sdks/libraryplaylists/README.md#getplaylistgenerators) - Get a playlist's generators
|
||||||
|
* [ClearPlaylistItems](docs/sdks/libraryplaylists/README.md#clearplaylistitems) - Clearing a playlist
|
||||||
|
* [AddPlaylistItems](docs/sdks/libraryplaylists/README.md#addplaylistitems) - Adding to a Playlist
|
||||||
|
* [DeletePlaylistItem](docs/sdks/libraryplaylists/README.md#deleteplaylistitem) - Delete a Generator
|
||||||
|
* [GetPlaylistGenerator](docs/sdks/libraryplaylists/README.md#getplaylistgenerator) - Get a playlist generator
|
||||||
|
* [ModifyPlaylistGenerator](docs/sdks/libraryplaylists/README.md#modifyplaylistgenerator) - Modify a Generator
|
||||||
|
* [GetPlaylistGeneratorItems](docs/sdks/libraryplaylists/README.md#getplaylistgeneratoritems) - Get a playlist generator's items
|
||||||
|
* [MovePlaylistItem](docs/sdks/libraryplaylists/README.md#moveplaylistitem) - Moving items in a playlist
|
||||||
|
* [RefreshPlaylist](docs/sdks/libraryplaylists/README.md#refreshplaylist) - Reprocess a generator
|
||||||
|
|
||||||
|
### [LiveTV](docs/sdks/livetv/README.md)
|
||||||
|
|
||||||
|
* [GetSessions](docs/sdks/livetv/README.md#getsessions) - Get all sessions
|
||||||
|
* [GetLiveTVSession](docs/sdks/livetv/README.md#getlivetvsession) - Get a single session
|
||||||
|
* [GetSessionPlaylistIndex](docs/sdks/livetv/README.md#getsessionplaylistindex) - Get a session playlist index
|
||||||
|
* [GetSessionSegment](docs/sdks/livetv/README.md#getsessionsegment) - Get a single session segment
|
||||||
|
|
||||||
### [Log](docs/sdks/log/README.md)
|
### [Log](docs/sdks/log/README.md)
|
||||||
|
|
||||||
* [LogLine](docs/sdks/log/README.md#logline) - Logging a single line message.
|
* [WriteLog](docs/sdks/log/README.md#writelog) - Logging a multi-line message to the Plex Media Server log
|
||||||
* [LogMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message
|
* [WriteMessage](docs/sdks/log/README.md#writemessage) - Logging a single-line message to the Plex Media Server log
|
||||||
* [EnablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail
|
* [EnablePapertrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail
|
||||||
|
|
||||||
### [Media](docs/sdks/media/README.md)
|
### [Playlist](docs/sdks/playlist/README.md)
|
||||||
|
|
||||||
* [MarkPlayed](docs/sdks/media/README.md#markplayed) - Mark Media Played
|
* [ListPlaylists](docs/sdks/playlist/README.md#listplaylists) - List playlists
|
||||||
* [MarkUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed
|
* [GetPlaylist](docs/sdks/playlist/README.md#getplaylist) - Retrieve Playlist
|
||||||
* [UpdatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress
|
* [GetPlaylistItems](docs/sdks/playlist/README.md#getplaylistitems) - Retrieve Playlist Contents
|
||||||
* [GetBannerImage](docs/sdks/media/README.md#getbannerimage) - Get Banner Image
|
|
||||||
* [GetThumbImage](docs/sdks/media/README.md#getthumbimage) - Get Thumb Image
|
|
||||||
|
|
||||||
### [Playlists](docs/sdks/playlists/README.md)
|
### [PlayQueue](docs/sdks/playqueue/README.md)
|
||||||
|
|
||||||
* [CreatePlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist
|
* [CreatePlayQueue](docs/sdks/playqueue/README.md#createplayqueue) - Create a play queue
|
||||||
* [GetPlaylists](docs/sdks/playlists/README.md#getplaylists) - Get All Playlists
|
* [GetPlayQueue](docs/sdks/playqueue/README.md#getplayqueue) - Retrieve a play queue
|
||||||
* [GetPlaylist](docs/sdks/playlists/README.md#getplaylist) - Retrieve Playlist
|
* [AddToPlayQueue](docs/sdks/playqueue/README.md#addtoplayqueue) - Add a generator or playlist to a play queue
|
||||||
* [DeletePlaylist](docs/sdks/playlists/README.md#deleteplaylist) - Deletes a Playlist
|
* [ClearPlayQueue](docs/sdks/playqueue/README.md#clearplayqueue) - Clear a play queue
|
||||||
* [UpdatePlaylist](docs/sdks/playlists/README.md#updateplaylist) - Update a Playlist
|
* [ResetPlayQueue](docs/sdks/playqueue/README.md#resetplayqueue) - Reset a play queue
|
||||||
* [GetPlaylistContents](docs/sdks/playlists/README.md#getplaylistcontents) - Retrieve Playlist Contents
|
* [Shuffle](docs/sdks/playqueue/README.md#shuffle) - Shuffle a play queue
|
||||||
* [ClearPlaylistContents](docs/sdks/playlists/README.md#clearplaylistcontents) - Delete Playlist Contents
|
* [Unshuffle](docs/sdks/playqueue/README.md#unshuffle) - Unshuffle a play queue
|
||||||
* [AddPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist
|
* [DeletePlayQueueItem](docs/sdks/playqueue/README.md#deleteplayqueueitem) - Delete an item from a play queue
|
||||||
* [UploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist
|
* [MovePlayQueueItem](docs/sdks/playqueue/README.md#moveplayqueueitem) - Move an item in a play queue
|
||||||
|
|
||||||
### [Plex](docs/sdks/plex/README.md)
|
### [Plex](docs/sdks/plex/README.md)
|
||||||
|
|
||||||
* [GetCompanionsData](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data
|
|
||||||
* [GetUserFriends](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in
|
|
||||||
* [GetGeoData](docs/sdks/plex/README.md#getgeodata) - Get Geo Data
|
|
||||||
* [GetHomeData](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data
|
|
||||||
* [GetServerResources](docs/sdks/plex/README.md#getserverresources) - Get Server Resources
|
* [GetServerResources](docs/sdks/plex/README.md#getserverresources) - Get Server Resources
|
||||||
* [GetPin](docs/sdks/plex/README.md#getpin) - Get a Pin
|
|
||||||
* [GetTokenByPinID](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId
|
|
||||||
|
|
||||||
|
### [Preferences](docs/sdks/preferences/README.md)
|
||||||
|
|
||||||
|
* [GetAllPreferences](docs/sdks/preferences/README.md#getallpreferences) - Get all preferences
|
||||||
|
* [SetPreferences](docs/sdks/preferences/README.md#setpreferences) - Set preferences
|
||||||
|
* [GetPreference](docs/sdks/preferences/README.md#getpreference) - Get a preferences
|
||||||
|
|
||||||
|
### [Provider](docs/sdks/provider/README.md)
|
||||||
|
|
||||||
|
* [ListProviders](docs/sdks/provider/README.md#listproviders) - Get the list of available media providers
|
||||||
|
* [AddProvider](docs/sdks/provider/README.md#addprovider) - Add a media provider
|
||||||
|
* [RefreshProviders](docs/sdks/provider/README.md#refreshproviders) - Refresh media providers
|
||||||
|
* [DeleteMediaProvider](docs/sdks/provider/README.md#deletemediaprovider) - Delete a media provider
|
||||||
|
|
||||||
|
### [Rate](docs/sdks/rate/README.md)
|
||||||
|
|
||||||
|
* [SetRating](docs/sdks/rate/README.md#setrating) - Rate an item
|
||||||
|
|
||||||
### [Search](docs/sdks/search/README.md)
|
### [Search](docs/sdks/search/README.md)
|
||||||
|
|
||||||
* [PerformSearch](docs/sdks/search/README.md#performsearch) - Perform a search
|
* [SearchHubs](docs/sdks/search/README.md#searchhubs) - Search Hub
|
||||||
* [PerformVoiceSearch](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search
|
* [VoiceSearchHubs](docs/sdks/search/README.md#voicesearchhubs) - Voice Search Hub
|
||||||
* [GetSearchResults](docs/sdks/search/README.md#getsearchresults) - Get Search Results
|
|
||||||
|
|
||||||
### [Server](docs/sdks/server/README.md)
|
### [Status](docs/sdks/status/README.md)
|
||||||
|
|
||||||
* [GetServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities
|
* [ListSessions](docs/sdks/status/README.md#listsessions) - List Sessions
|
||||||
* [GetServerPreferences](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences
|
* [GetBackgroundTasks](docs/sdks/status/README.md#getbackgroundtasks) - Get background tasks
|
||||||
* [GetAvailableClients](docs/sdks/server/README.md#getavailableclients) - Get Available Clients
|
* [ListPlaybackHistory](docs/sdks/status/README.md#listplaybackhistory) - List Playback History
|
||||||
* [GetDevices](docs/sdks/server/README.md#getdevices) - Get Devices
|
* [TerminateSession](docs/sdks/status/README.md#terminatesession) - Terminate a session
|
||||||
* [GetServerIdentity](docs/sdks/server/README.md#getserveridentity) - Get Server Identity
|
* [DeleteHistory](docs/sdks/status/README.md#deletehistory) - Delete Single History Item
|
||||||
* [GetMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account
|
* [GetHistoryItem](docs/sdks/status/README.md#gethistoryitem) - Get Single History Item
|
||||||
* [GetResizedPhoto](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo
|
|
||||||
* [GetMediaProviders](docs/sdks/server/README.md#getmediaproviders) - Get Media Providers
|
|
||||||
* [GetServerList](docs/sdks/server/README.md#getserverlist) - Get Server List
|
|
||||||
|
|
||||||
### [Sessions](docs/sdks/sessions/README.md)
|
### [Subscriptions](docs/sdks/subscriptions/README.md)
|
||||||
|
|
||||||
* [GetSessions](docs/sdks/sessions/README.md#getsessions) - Get Active Sessions
|
* [GetAllSubscriptions](docs/sdks/subscriptions/README.md#getallsubscriptions) - Get all subscriptions
|
||||||
* [GetSessionHistory](docs/sdks/sessions/README.md#getsessionhistory) - Get Session History
|
* [CreateSubscription](docs/sdks/subscriptions/README.md#createsubscription) - Create a subscription
|
||||||
* [GetTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions
|
* [ProcessSubscriptions](docs/sdks/subscriptions/README.md#processsubscriptions) - Process all subscriptions
|
||||||
* [StopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session
|
* [GetScheduledRecordings](docs/sdks/subscriptions/README.md#getscheduledrecordings) - Get all scheduled recordings
|
||||||
|
* [GetTemplate](docs/sdks/subscriptions/README.md#gettemplate) - Get the subscription template
|
||||||
|
* [CancelGrab](docs/sdks/subscriptions/README.md#cancelgrab) - Cancel an existing grab
|
||||||
|
* [DeleteSubscription](docs/sdks/subscriptions/README.md#deletesubscription) - Delete a subscription
|
||||||
|
* [GetSubscription](docs/sdks/subscriptions/README.md#getsubscription) - Get a single subscription
|
||||||
|
* [EditSubscriptionPreferences](docs/sdks/subscriptions/README.md#editsubscriptionpreferences) - Edit a subscription
|
||||||
|
* [ReorderSubscription](docs/sdks/subscriptions/README.md#reordersubscription) - Re-order a subscription
|
||||||
|
|
||||||
### [Statistics](docs/sdks/statistics/README.md)
|
### [Timeline](docs/sdks/timeline/README.md)
|
||||||
|
|
||||||
* [GetStatistics](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics
|
* [MarkPlayed](docs/sdks/timeline/README.md#markplayed) - Mark an item as played
|
||||||
* [GetResourcesStatistics](docs/sdks/statistics/README.md#getresourcesstatistics) - Get Resources Statistics
|
* [Report](docs/sdks/timeline/README.md#report) - Report media timeline
|
||||||
* [GetBandwidthStatistics](docs/sdks/statistics/README.md#getbandwidthstatistics) - Get Bandwidth Statistics
|
* [Unscrobble](docs/sdks/timeline/README.md#unscrobble) - Mark an item as unplayed
|
||||||
|
|
||||||
|
### [Transcoder](docs/sdks/transcoder/README.md)
|
||||||
|
|
||||||
|
* [TranscodeImage](docs/sdks/transcoder/README.md#transcodeimage) - Transcode an image
|
||||||
|
* [MakeDecision](docs/sdks/transcoder/README.md#makedecision) - Make a decision on media playback
|
||||||
|
* [TriggerFallback](docs/sdks/transcoder/README.md#triggerfallback) - Manually trigger a transcoder fallback
|
||||||
|
* [TranscodeSubtitles](docs/sdks/transcoder/README.md#transcodesubtitles) - Transcode subtitles
|
||||||
|
* [StartTranscodeSession](docs/sdks/transcoder/README.md#starttranscodesession) - Start A Transcoding Session
|
||||||
|
|
||||||
|
### [UltraBlur](docs/sdks/ultrablur/README.md)
|
||||||
|
|
||||||
|
* [GetColors](docs/sdks/ultrablur/README.md#getcolors) - Get UltraBlur Colors
|
||||||
|
* [GetImage](docs/sdks/ultrablur/README.md#getimage) - Get UltraBlur Image
|
||||||
|
|
||||||
### [Updater](docs/sdks/updater/README.md)
|
### [Updater](docs/sdks/updater/README.md)
|
||||||
|
|
||||||
* [GetUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates
|
* [ApplyUpdates](docs/sdks/updater/README.md#applyupdates) - Applying updates
|
||||||
* [CheckForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates
|
* [CheckUpdates](docs/sdks/updater/README.md#checkupdates) - Checking for updates
|
||||||
* [ApplyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates
|
* [GetUpdatesStatus](docs/sdks/updater/README.md#getupdatesstatus) - Querying status of updates
|
||||||
|
|
||||||
### [Users](docs/sdks/users/README.md)
|
### [Users](docs/sdks/users/README.md)
|
||||||
|
|
||||||
* [GetUsers](docs/sdks/users/README.md#getusers) - Get list of all connected users
|
* [GetUsers](docs/sdks/users/README.md#getusers) - Get list of all connected users
|
||||||
|
|
||||||
### [Video](docs/sdks/video/README.md)
|
|
||||||
|
|
||||||
* [GetTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item
|
|
||||||
* [StartUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode
|
|
||||||
|
|
||||||
### [Watchlist](docs/sdks/watchlist/README.md)
|
|
||||||
|
|
||||||
* [GetWatchList](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
<!-- End Available Resources and Operations [operations] -->
|
<!-- End Available Resources and Operations [operations] -->
|
||||||
|
|
||||||
@@ -259,6 +472,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/LukeHagar/plexgo"
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"github.com/LukeHagar/plexgo/models/components"
|
||||||
|
"github.com/LukeHagar/plexgo/models/operations"
|
||||||
"github.com/LukeHagar/plexgo/retry"
|
"github.com/LukeHagar/plexgo/retry"
|
||||||
"log"
|
"log"
|
||||||
"models/operations"
|
"models/operations"
|
||||||
@@ -268,10 +483,21 @@ func main() {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
||||||
|
plexgo.WithClientIdentifier("abc123"),
|
||||||
|
plexgo.WithProduct("Plex for Roku"),
|
||||||
|
plexgo.WithVersion("2.4.1"),
|
||||||
|
plexgo.WithPlatform("Roku"),
|
||||||
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
||||||
|
plexgo.WithDevice("Roku 3"),
|
||||||
|
plexgo.WithModel("4200X"),
|
||||||
|
plexgo.WithDeviceVendor("Roku"),
|
||||||
|
plexgo.WithDeviceName("Living Room TV"),
|
||||||
|
plexgo.WithMarketplace("googlePlay"),
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
)
|
)
|
||||||
|
|
||||||
res, err := s.Server.GetServerCapabilities(ctx, operations.WithRetries(
|
res, err := s.General.GetServerInfo(ctx, operations.GetServerInfoRequest{}, operations.WithRetries(
|
||||||
retry.Config{
|
retry.Config{
|
||||||
Strategy: "backoff",
|
Strategy: "backoff",
|
||||||
Backoff: &retry.BackoffStrategy{
|
Backoff: &retry.BackoffStrategy{
|
||||||
@@ -285,7 +511,7 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
if res.Object != nil {
|
if res.MediaContainerWithDirectory != nil {
|
||||||
// handle response
|
// handle response
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -299,6 +525,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/LukeHagar/plexgo"
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"github.com/LukeHagar/plexgo/models/components"
|
||||||
|
"github.com/LukeHagar/plexgo/models/operations"
|
||||||
"github.com/LukeHagar/plexgo/retry"
|
"github.com/LukeHagar/plexgo/retry"
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
@@ -318,14 +546,25 @@ func main() {
|
|||||||
},
|
},
|
||||||
RetryConnectionErrors: false,
|
RetryConnectionErrors: false,
|
||||||
}),
|
}),
|
||||||
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
||||||
|
plexgo.WithClientIdentifier("abc123"),
|
||||||
|
plexgo.WithProduct("Plex for Roku"),
|
||||||
|
plexgo.WithVersion("2.4.1"),
|
||||||
|
plexgo.WithPlatform("Roku"),
|
||||||
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
||||||
|
plexgo.WithDevice("Roku 3"),
|
||||||
|
plexgo.WithModel("4200X"),
|
||||||
|
plexgo.WithDeviceVendor("Roku"),
|
||||||
|
plexgo.WithDeviceName("Living Room TV"),
|
||||||
|
plexgo.WithMarketplace("googlePlay"),
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
)
|
)
|
||||||
|
|
||||||
res, err := s.Server.GetServerCapabilities(ctx)
|
res, err := s.General.GetServerInfo(ctx, operations.GetServerInfoRequest{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
if res.Object != nil {
|
if res.MediaContainerWithDirectory != nil {
|
||||||
// handle response
|
// handle response
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -340,12 +579,12 @@ Handling errors in this SDK should largely match your expectations. All operatio
|
|||||||
|
|
||||||
By Default, an API error will return `sdkerrors.SDKError`. When custom error responses are specified for an operation, the SDK may also return their associated error. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation.
|
By Default, an API error will return `sdkerrors.SDKError`. When custom error responses are specified for an operation, the SDK may also return their associated error. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation.
|
||||||
|
|
||||||
For example, the `GetServerCapabilities` function may return the following errors:
|
For example, the `GetTokenDetails` function may return the following errors:
|
||||||
|
|
||||||
| Error Type | Status Code | Content Type |
|
| Error Type | Status Code | Content Type |
|
||||||
| ------------------------------------------- | ----------- | ---------------- |
|
| ------------------------------------- | ----------- | ---------------- |
|
||||||
| sdkerrors.GetServerCapabilitiesBadRequest | 400 | application/json |
|
| sdkerrors.GetTokenDetailsBadRequest | 400 | application/json |
|
||||||
| sdkerrors.GetServerCapabilitiesUnauthorized | 401 | application/json |
|
| sdkerrors.GetTokenDetailsUnauthorized | 401 | application/json |
|
||||||
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
@@ -357,6 +596,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/LukeHagar/plexgo"
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"github.com/LukeHagar/plexgo/models/components"
|
||||||
|
"github.com/LukeHagar/plexgo/models/operations"
|
||||||
"github.com/LukeHagar/plexgo/models/sdkerrors"
|
"github.com/LukeHagar/plexgo/models/sdkerrors"
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
@@ -365,19 +606,30 @@ func main() {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
||||||
|
plexgo.WithClientIdentifier("abc123"),
|
||||||
|
plexgo.WithProduct("Plex for Roku"),
|
||||||
|
plexgo.WithVersion("2.4.1"),
|
||||||
|
plexgo.WithPlatform("Roku"),
|
||||||
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
||||||
|
plexgo.WithDevice("Roku 3"),
|
||||||
|
plexgo.WithModel("4200X"),
|
||||||
|
plexgo.WithDeviceVendor("Roku"),
|
||||||
|
plexgo.WithDeviceName("Living Room TV"),
|
||||||
|
plexgo.WithMarketplace("googlePlay"),
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
)
|
)
|
||||||
|
|
||||||
res, err := s.Server.GetServerCapabilities(ctx)
|
res, err := s.Authentication.GetTokenDetails(ctx, operations.GetTokenDetailsRequest{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
||||||
var e *sdkerrors.GetServerCapabilitiesBadRequest
|
var e *sdkerrors.GetTokenDetailsBadRequest
|
||||||
if errors.As(err, &e) {
|
if errors.As(err, &e) {
|
||||||
// handle error
|
// handle error
|
||||||
log.Fatal(e.Error())
|
log.Fatal(e.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
var e *sdkerrors.GetServerCapabilitiesUnauthorized
|
var e *sdkerrors.GetTokenDetailsUnauthorized
|
||||||
if errors.As(err, &e) {
|
if errors.As(err, &e) {
|
||||||
// handle error
|
// handle error
|
||||||
log.Fatal(e.Error())
|
log.Fatal(e.Error())
|
||||||
@@ -397,15 +649,26 @@ func main() {
|
|||||||
<!-- Start Server Selection [server] -->
|
<!-- Start Server Selection [server] -->
|
||||||
## Server Selection
|
## Server Selection
|
||||||
|
|
||||||
### Server Variables
|
### Select Server by Index
|
||||||
|
|
||||||
The default server `{protocol}://{ip}:{port}` contains variables and is set to `https://10.10.10.47:32400` by default. To override default values, the following options are available when initializing the SDK client instance:
|
You can override the default server globally using the `WithServerIndex(serverIndex int)` option when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
|
||||||
|
|
||||||
| Variable | Option | Supported Values | Default | Description |
|
| # | Server | Variables | Description |
|
||||||
| ---------- | --------------------------------------- | -------------------------- | --------------- | ---------------------------------------------- |
|
| --- | ---------------------------------------------------------- | -------------------------------------------- | ----------- |
|
||||||
| `protocol` | `WithProtocol(protocol ServerProtocol)` | - `"http"`<br/>- `"https"` | `"https"` | The protocol to use for the server connection |
|
| 0 | `https://{IP-description}.{identifier}.plex.direct:{port}` | `identifier`<br/>`IP-description`<br/>`port` | |
|
||||||
| `ip` | `WithIP(ip string)` | string | `"10.10.10.47"` | The IP address or hostname of your Plex Server |
|
| 1 | `{protocol}://{host}:{port}` | `protocol`<br/>`host`<br/>`port` | |
|
||||||
| `port` | `WithPort(port string)` | string | `"32400"` | The port of your Plex Server |
|
| 2 | `https://{full_server_url}` | `full_server_url` | |
|
||||||
|
|
||||||
|
If the selected server has variables, you may override its default values using the associated option(s):
|
||||||
|
|
||||||
|
| Variable | Option | Default | Description |
|
||||||
|
| ----------------- | ----------------------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `identifier` | `WithIdentifier(identifier string)` | `"0123456789abcdef0123456789abcdef"` | The unique identifier of this particular PMS |
|
||||||
|
| `IP-description` | `WithIPDescription(ipDescription string)` | `"1-2-3-4"` | A `-` separated string of the IPv4 or IPv6 address components |
|
||||||
|
| `port` | `WithPort(port string)` | `"32400"` | The Port number configured on the PMS. Typically (`32400`). <br/>If using a reverse proxy, this would be the port number configured on the proxy.<br/> |
|
||||||
|
| `protocol` | `WithProtocol(protocol string)` | `"http"` | The network protocol to use. Typically (`http` or `https`) |
|
||||||
|
| `host` | `WithHost(host string)` | `"localhost"` | The Host of the PMS.<br/>If using on a local network, this is the internal IP address of the server hosting the PMS.<br/>If using on an external network, this is the external IP address for your network, and requires port forwarding.<br/>If using a reverse proxy, this would be the external DNS domain for your network, and requires the proxy handle port forwarding. <br/> |
|
||||||
|
| `full_server_url` | `WithFullServerURL(fullServerURL string)` | `"http://localhost:32400"` | The full manual URL to access the PMS |
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
@@ -415,6 +678,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/LukeHagar/plexgo"
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"github.com/LukeHagar/plexgo/models/components"
|
||||||
|
"github.com/LukeHagar/plexgo/models/operations"
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -422,17 +687,29 @@ func main() {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithProtocol("https"),
|
plexgo.WithServerIndex(0),
|
||||||
plexgo.WithIP("4982:bc2a:b4f8:efb5:2394:5bc3:ab4f:0e6d"),
|
plexgo.WithIdentifier("0123456789abcdef0123456789abcdef"),
|
||||||
plexgo.WithPort("44765"),
|
plexgo.WithIPDescription("1-2-3-4"),
|
||||||
|
plexgo.WithPort("32400"),
|
||||||
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
||||||
|
plexgo.WithClientIdentifier("abc123"),
|
||||||
|
plexgo.WithProduct("Plex for Roku"),
|
||||||
|
plexgo.WithVersion("2.4.1"),
|
||||||
|
plexgo.WithPlatform("Roku"),
|
||||||
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
||||||
|
plexgo.WithDevice("Roku 3"),
|
||||||
|
plexgo.WithModel("4200X"),
|
||||||
|
plexgo.WithDeviceVendor("Roku"),
|
||||||
|
plexgo.WithDeviceName("Living Room TV"),
|
||||||
|
plexgo.WithMarketplace("googlePlay"),
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
)
|
)
|
||||||
|
|
||||||
res, err := s.Server.GetServerCapabilities(ctx)
|
res, err := s.General.GetServerInfo(ctx, operations.GetServerInfoRequest{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
if res.Object != nil {
|
if res.MediaContainerWithDirectory != nil {
|
||||||
// handle response
|
// handle response
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -441,13 +718,15 @@ func main() {
|
|||||||
|
|
||||||
### Override Server URL Per-Client
|
### Override Server URL Per-Client
|
||||||
|
|
||||||
The default server can be overridden globally using the `WithServerURL(serverURL string)` option when initializing the SDK client instance. For example:
|
The default server can also be overridden globally using the `WithServerURL(serverURL string)` option when initializing the SDK client instance. For example:
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/LukeHagar/plexgo"
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"github.com/LukeHagar/plexgo/models/components"
|
||||||
|
"github.com/LukeHagar/plexgo/models/operations"
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -455,15 +734,26 @@ func main() {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithServerURL("https://10.10.10.47:32400"),
|
plexgo.WithServerURL("https://http://localhost:32400"),
|
||||||
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
||||||
|
plexgo.WithClientIdentifier("abc123"),
|
||||||
|
plexgo.WithProduct("Plex for Roku"),
|
||||||
|
plexgo.WithVersion("2.4.1"),
|
||||||
|
plexgo.WithPlatform("Roku"),
|
||||||
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
||||||
|
plexgo.WithDevice("Roku 3"),
|
||||||
|
plexgo.WithModel("4200X"),
|
||||||
|
plexgo.WithDeviceVendor("Roku"),
|
||||||
|
plexgo.WithDeviceName("Living Room TV"),
|
||||||
|
plexgo.WithMarketplace("googlePlay"),
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
)
|
)
|
||||||
|
|
||||||
res, err := s.Server.GetServerCapabilities(ctx)
|
res, err := s.General.GetServerInfo(ctx, operations.GetServerInfoRequest{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
if res.Object != nil {
|
if res.MediaContainerWithDirectory != nil {
|
||||||
// handle response
|
// handle response
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -479,6 +769,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/LukeHagar/plexgo"
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"github.com/LukeHagar/plexgo/models/components"
|
||||||
"github.com/LukeHagar/plexgo/models/operations"
|
"github.com/LukeHagar/plexgo/models/operations"
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
@@ -487,14 +778,25 @@ func main() {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
||||||
|
plexgo.WithClientIdentifier("abc123"),
|
||||||
|
plexgo.WithProduct("Plex for Roku"),
|
||||||
|
plexgo.WithVersion("2.4.1"),
|
||||||
|
plexgo.WithPlatform("Roku"),
|
||||||
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
||||||
|
plexgo.WithDevice("Roku 3"),
|
||||||
|
plexgo.WithModel("4200X"),
|
||||||
|
plexgo.WithDeviceVendor("Roku"),
|
||||||
|
plexgo.WithDeviceName("Living Room TV"),
|
||||||
|
plexgo.WithMarketplace("googlePlay"),
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
)
|
)
|
||||||
|
|
||||||
res, err := s.Plex.GetCompanionsData(ctx, operations.WithServerURL("https://plex.tv/api/v2"))
|
res, err := s.Authentication.GetTokenDetails(ctx, operations.GetTokenDetailsRequest{}, operations.WithServerURL("https://plex.tv/api/v2"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
if res.ResponseBodies != nil {
|
if res.UserPlexAccount != nil {
|
||||||
// handle response
|
// handle response
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -540,8 +842,8 @@ This can be a convenient way to configure timeouts, cookies, proxies, custom hea
|
|||||||
This SDK supports the following security scheme globally:
|
This SDK supports the following security scheme globally:
|
||||||
|
|
||||||
| Name | Type | Scheme |
|
| Name | Type | Scheme |
|
||||||
| ------------- | ------ | ------- |
|
| ------- | ------ | ------- |
|
||||||
| `AccessToken` | apiKey | API key |
|
| `Token` | apiKey | API key |
|
||||||
|
|
||||||
You can configure it using the `WithSecurity` option when initializing the SDK client instance. For example:
|
You can configure it using the `WithSecurity` option when initializing the SDK client instance. For example:
|
||||||
```go
|
```go
|
||||||
@@ -550,6 +852,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/LukeHagar/plexgo"
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"github.com/LukeHagar/plexgo/models/components"
|
||||||
|
"github.com/LukeHagar/plexgo/models/operations"
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -558,13 +862,24 @@ func main() {
|
|||||||
|
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
||||||
|
plexgo.WithClientIdentifier("abc123"),
|
||||||
|
plexgo.WithProduct("Plex for Roku"),
|
||||||
|
plexgo.WithVersion("2.4.1"),
|
||||||
|
plexgo.WithPlatform("Roku"),
|
||||||
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
||||||
|
plexgo.WithDevice("Roku 3"),
|
||||||
|
plexgo.WithModel("4200X"),
|
||||||
|
plexgo.WithDeviceVendor("Roku"),
|
||||||
|
plexgo.WithDeviceName("Living Room TV"),
|
||||||
|
plexgo.WithMarketplace("googlePlay"),
|
||||||
)
|
)
|
||||||
|
|
||||||
res, err := s.Server.GetServerCapabilities(ctx)
|
res, err := s.General.GetServerInfo(ctx, operations.GetServerInfoRequest{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
if res.Object != nil {
|
if res.MediaContainerWithDirectory != nil {
|
||||||
// handle response
|
// handle response
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
60
RELEASES.md
60
RELEASES.md
@@ -1193,3 +1193,63 @@ Based on:
|
|||||||
- [go v0.24.1] .
|
- [go v0.24.1] .
|
||||||
### Releases
|
### Releases
|
||||||
- [Go v0.24.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.24.1 - .
|
- [Go v0.24.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.24.1 - .
|
||||||
|
|
||||||
|
## 2025-09-16 00:09:55
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.615.2 (2.698.4) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.24.2] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.24.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.24.2 - .
|
||||||
|
|
||||||
|
## 2025-10-07 00:10:14
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.635.1 (2.722.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.25.0] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.25.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.25.0 - .
|
||||||
|
|
||||||
|
## 2025-10-12 05:52:17
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.636.3 (2.723.11) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.26.0] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.26.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.26.0 - .
|
||||||
|
|
||||||
|
## 2025-10-13 00:10:42
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.636.3 (2.723.11) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.26.1] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.26.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.26.1 - .
|
||||||
|
|
||||||
|
## 2025-11-13 00:10:35
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.656.1 (2.753.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.27.0] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.27.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.27.0 - .
|
||||||
|
|
||||||
|
## 2025-12-01 00:13:26
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.665.0 (2.767.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.28.0] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.28.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.28.0 - .
|
||||||
47
USAGE.md
47
USAGE.md
@@ -5,6 +5,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/LukeHagar/plexgo"
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"github.com/LukeHagar/plexgo/models/components"
|
||||||
|
"github.com/LukeHagar/plexgo/models/operations"
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -12,14 +14,55 @@ func main() {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
|
plexgo.WithAccepts(components.AcceptsApplicationXML),
|
||||||
|
plexgo.WithClientIdentifier("abc123"),
|
||||||
|
plexgo.WithProduct("Plex for Roku"),
|
||||||
|
plexgo.WithVersion("2.4.1"),
|
||||||
|
plexgo.WithPlatform("Roku"),
|
||||||
|
plexgo.WithPlatformVersion("4.3 build 1057"),
|
||||||
|
plexgo.WithDevice("Roku 3"),
|
||||||
|
plexgo.WithModel("4200X"),
|
||||||
|
plexgo.WithDeviceVendor("Roku"),
|
||||||
|
plexgo.WithDeviceName("Living Room TV"),
|
||||||
|
plexgo.WithMarketplace("googlePlay"),
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
)
|
)
|
||||||
|
|
||||||
res, err := s.Server.GetServerCapabilities(ctx)
|
res, err := s.Transcoder.StartTranscodeSession(ctx, operations.StartTranscodeSessionRequest{
|
||||||
|
TranscodeType: components.TranscodeTypeMusic,
|
||||||
|
Extension: operations.ExtensionMpd,
|
||||||
|
AdvancedSubtitles: components.AdvancedSubtitlesBurn.ToPointer(),
|
||||||
|
AudioBoost: plexgo.Pointer[int64](50),
|
||||||
|
AudioChannelCount: plexgo.Pointer[int64](5),
|
||||||
|
AutoAdjustQuality: components.BoolIntTrue.ToPointer(),
|
||||||
|
AutoAdjustSubtitle: components.BoolIntTrue.ToPointer(),
|
||||||
|
DirectPlay: components.BoolIntTrue.ToPointer(),
|
||||||
|
DirectStream: components.BoolIntTrue.ToPointer(),
|
||||||
|
DirectStreamAudio: components.BoolIntTrue.ToPointer(),
|
||||||
|
DisableResolutionRotation: components.BoolIntTrue.ToPointer(),
|
||||||
|
HasMDE: components.BoolIntTrue.ToPointer(),
|
||||||
|
Location: operations.StartTranscodeSessionQueryParamLocationWan.ToPointer(),
|
||||||
|
MediaBufferSize: plexgo.Pointer[int64](102400),
|
||||||
|
MediaIndex: plexgo.Pointer[int64](0),
|
||||||
|
MusicBitrate: plexgo.Pointer[int64](5000),
|
||||||
|
Offset: plexgo.Pointer[float64](90.5),
|
||||||
|
PartIndex: plexgo.Pointer[int64](0),
|
||||||
|
Path: plexgo.Pointer("/library/metadata/151671"),
|
||||||
|
PeakBitrate: plexgo.Pointer[int64](12000),
|
||||||
|
PhotoResolution: plexgo.Pointer("1080x1080"),
|
||||||
|
Protocol: operations.StartTranscodeSessionQueryParamProtocolDash.ToPointer(),
|
||||||
|
SecondsPerSegment: plexgo.Pointer[int64](5),
|
||||||
|
SubtitleSize: plexgo.Pointer[int64](50),
|
||||||
|
VideoBitrate: plexgo.Pointer[int64](12000),
|
||||||
|
VideoQuality: plexgo.Pointer[int64](50),
|
||||||
|
VideoResolution: plexgo.Pointer("1080x1080"),
|
||||||
|
XPlexClientProfileExtra: plexgo.Pointer("add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)"),
|
||||||
|
XPlexClientProfileName: plexgo.Pointer("generic"),
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
if res.Object != nil {
|
if res.ResponseStream != nil {
|
||||||
// handle response
|
// handle response
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
150
activities.go
150
activities.go
@@ -16,13 +16,11 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
|
// Activities provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
|
||||||
|
//
|
||||||
// Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity.
|
// Activities are 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.
|
// Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint.
|
||||||
// - 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.
|
|
||||||
type Activities struct {
|
type Activities struct {
|
||||||
rootSDK *PlexAPI
|
rootSDK *PlexAPI
|
||||||
sdkConfiguration config.SDKConfiguration
|
sdkConfiguration config.SDKConfiguration
|
||||||
@@ -37,9 +35,9 @@ func newActivities(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *h
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetServerActivities - Get Server Activities
|
// ListActivities - Get all activities
|
||||||
// Get Server Activities
|
// List all activities on the server. Admins can see all activities but other users can only see their own
|
||||||
func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations.Option) (*operations.GetServerActivitiesResponse, error) {
|
func (s *Activities) ListActivities(ctx context.Context, opts ...operations.Option) (*operations.ListActivitiesResponse, error) {
|
||||||
o := operations.Options{}
|
o := operations.Options{}
|
||||||
supportedOptions := []string{
|
supportedOptions := []string{
|
||||||
operations.SupportedOptionRetries,
|
operations.SupportedOptionRetries,
|
||||||
@@ -68,8 +66,8 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
|
|||||||
SDKConfiguration: s.sdkConfiguration,
|
SDKConfiguration: s.sdkConfiguration,
|
||||||
BaseURL: baseURL,
|
BaseURL: baseURL,
|
||||||
Context: ctx,
|
Context: ctx,
|
||||||
OperationID: "getServerActivities",
|
OperationID: "listActivities",
|
||||||
OAuth2Scopes: []string{},
|
OAuth2Scopes: nil,
|
||||||
SecuritySource: s.sdkConfiguration.Security,
|
SecuritySource: s.sdkConfiguration.Security,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,7 +173,7 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
|
|||||||
|
|
||||||
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
_httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -190,7 +188,7 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
res := &operations.GetServerActivitiesResponse{
|
res := &operations.ListActivitiesResponse{
|
||||||
StatusCode: httpRes.StatusCode,
|
StatusCode: httpRes.StatusCode,
|
||||||
ContentType: httpRes.Header.Get("Content-Type"),
|
ContentType: httpRes.Header.Get("Content-Type"),
|
||||||
RawResponse: httpRes,
|
RawResponse: httpRes,
|
||||||
@@ -205,7 +203,7 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
var out operations.GetServerActivitiesResponseBody
|
var out operations.ListActivitiesResponseBody
|
||||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -218,50 +216,6 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
|
|||||||
}
|
}
|
||||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
}
|
}
|
||||||
case httpRes.StatusCode == 400:
|
|
||||||
switch {
|
|
||||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var out sdkerrors.GetServerActivitiesBadRequest
|
|
||||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
out.RawResponse = httpRes
|
|
||||||
return nil, &out
|
|
||||||
default:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
}
|
|
||||||
case httpRes.StatusCode == 401:
|
|
||||||
switch {
|
|
||||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var out sdkerrors.GetServerActivitiesUnauthorized
|
|
||||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
out.RawResponse = httpRes
|
|
||||||
return nil, &out
|
|
||||||
default:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
}
|
|
||||||
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -286,11 +240,21 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// CancelServerActivities - Cancel Server Activities
|
// CancelActivity - Cancel a running activity
|
||||||
// Cancel Server Activities
|
// Cancel a running activity. Admins can cancel all activities but other users can only cancel their own
|
||||||
func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID string, opts ...operations.Option) (*operations.CancelServerActivitiesResponse, error) {
|
func (s *Activities) CancelActivity(ctx context.Context, request operations.CancelActivityRequest, opts ...operations.Option) (*operations.CancelActivityResponse, error) {
|
||||||
request := operations.CancelServerActivitiesRequest{
|
globals := operations.CancelActivityGlobals{
|
||||||
ActivityUUID: activityUUID,
|
Accepts: s.sdkConfiguration.Globals.Accepts,
|
||||||
|
ClientIdentifier: s.sdkConfiguration.Globals.ClientIdentifier,
|
||||||
|
Product: s.sdkConfiguration.Globals.Product,
|
||||||
|
Version: s.sdkConfiguration.Globals.Version,
|
||||||
|
Platform: s.sdkConfiguration.Globals.Platform,
|
||||||
|
PlatformVersion: s.sdkConfiguration.Globals.PlatformVersion,
|
||||||
|
Device: s.sdkConfiguration.Globals.Device,
|
||||||
|
Model: s.sdkConfiguration.Globals.Model,
|
||||||
|
DeviceVendor: s.sdkConfiguration.Globals.DeviceVendor,
|
||||||
|
DeviceName: s.sdkConfiguration.Globals.DeviceName,
|
||||||
|
Marketplace: s.sdkConfiguration.Globals.Marketplace,
|
||||||
}
|
}
|
||||||
|
|
||||||
o := operations.Options{}
|
o := operations.Options{}
|
||||||
@@ -311,7 +275,7 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
|
|||||||
} else {
|
} else {
|
||||||
baseURL = *o.ServerURL
|
baseURL = *o.ServerURL
|
||||||
}
|
}
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/activities/{activityUUID}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/activities/{activityId}", request, globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -321,8 +285,8 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
|
|||||||
SDKConfiguration: s.sdkConfiguration,
|
SDKConfiguration: s.sdkConfiguration,
|
||||||
BaseURL: baseURL,
|
BaseURL: baseURL,
|
||||||
Context: ctx,
|
Context: ctx,
|
||||||
OperationID: "cancelServerActivities",
|
OperationID: "cancelActivity",
|
||||||
OAuth2Scopes: []string{},
|
OAuth2Scopes: nil,
|
||||||
SecuritySource: s.sdkConfiguration.Security,
|
SecuritySource: s.sdkConfiguration.Security,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,9 +305,11 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error creating request: %w", err)
|
return nil, fmt.Errorf("error creating request: %w", err)
|
||||||
}
|
}
|
||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "*/*")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
|
utils.PopulateHeaders(ctx, req, request, globals)
|
||||||
|
|
||||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -428,7 +394,7 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
|
|||||||
|
|
||||||
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "404", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
_httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -443,7 +409,7 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
res := &operations.CancelServerActivitiesResponse{
|
res := &operations.CancelActivityResponse{
|
||||||
StatusCode: httpRes.StatusCode,
|
StatusCode: httpRes.StatusCode,
|
||||||
ContentType: httpRes.Header.Get("Content-Type"),
|
ContentType: httpRes.Header.Get("Content-Type"),
|
||||||
RawResponse: httpRes,
|
RawResponse: httpRes,
|
||||||
@@ -452,49 +418,9 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
|
|||||||
switch {
|
switch {
|
||||||
case httpRes.StatusCode == 200:
|
case httpRes.StatusCode == 200:
|
||||||
case httpRes.StatusCode == 400:
|
case httpRes.StatusCode == 400:
|
||||||
switch {
|
fallthrough
|
||||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
case httpRes.StatusCode == 404:
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
fallthrough
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var out sdkerrors.CancelServerActivitiesBadRequest
|
|
||||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
out.RawResponse = httpRes
|
|
||||||
return nil, &out
|
|
||||||
default:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
}
|
|
||||||
case httpRes.StatusCode == 401:
|
|
||||||
switch {
|
|
||||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var out sdkerrors.CancelServerActivitiesUnauthorized
|
|
||||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
out.RawResponse = httpRes
|
|
||||||
return nil, &out
|
|
||||||
default:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
}
|
|
||||||
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import (
|
|||||||
"github.com/LukeHagar/plexgo/internal/config"
|
"github.com/LukeHagar/plexgo/internal/config"
|
||||||
"github.com/LukeHagar/plexgo/internal/hooks"
|
"github.com/LukeHagar/plexgo/internal/hooks"
|
||||||
"github.com/LukeHagar/plexgo/internal/utils"
|
"github.com/LukeHagar/plexgo/internal/utils"
|
||||||
|
"github.com/LukeHagar/plexgo/models/components"
|
||||||
"github.com/LukeHagar/plexgo/models/operations"
|
"github.com/LukeHagar/plexgo/models/operations"
|
||||||
"github.com/LukeHagar/plexgo/models/sdkerrors"
|
"github.com/LukeHagar/plexgo/models/sdkerrors"
|
||||||
"github.com/LukeHagar/plexgo/retry"
|
"github.com/LukeHagar/plexgo/retry"
|
||||||
@@ -16,7 +17,6 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Authentication - API Calls regarding authentication for Plex Media Server
|
|
||||||
type Authentication struct {
|
type Authentication struct {
|
||||||
rootSDK *PlexAPI
|
rootSDK *PlexAPI
|
||||||
sdkConfiguration config.SDKConfiguration
|
sdkConfiguration config.SDKConfiguration
|
||||||
@@ -31,485 +31,23 @@ func newAuthentication(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hook
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetTransientToken - Get a Transient Token
|
|
||||||
// This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
|
|
||||||
func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations.GetTransientTokenQueryParamType, scope operations.Scope, opts ...operations.Option) (*operations.GetTransientTokenResponse, error) {
|
|
||||||
request := operations.GetTransientTokenRequest{
|
|
||||||
Type: type_,
|
|
||||||
Scope: scope,
|
|
||||||
}
|
|
||||||
|
|
||||||
o := operations.Options{}
|
|
||||||
supportedOptions := []string{
|
|
||||||
operations.SupportedOptionRetries,
|
|
||||||
operations.SupportedOptionTimeout,
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, opt := range opts {
|
|
||||||
if err := opt(&o, supportedOptions...); err != nil {
|
|
||||||
return nil, fmt.Errorf("error applying option: %w", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var baseURL string
|
|
||||||
if o.ServerURL == nil {
|
|
||||||
baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
|
||||||
} else {
|
|
||||||
baseURL = *o.ServerURL
|
|
||||||
}
|
|
||||||
opURL, err := url.JoinPath(baseURL, "/security/token")
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
hookCtx := hooks.HookContext{
|
|
||||||
SDK: s.rootSDK,
|
|
||||||
SDKConfiguration: s.sdkConfiguration,
|
|
||||||
BaseURL: baseURL,
|
|
||||||
Context: ctx,
|
|
||||||
OperationID: "getTransientToken",
|
|
||||||
OAuth2Scopes: []string{},
|
|
||||||
SecuritySource: s.sdkConfiguration.Security,
|
|
||||||
}
|
|
||||||
|
|
||||||
timeout := o.Timeout
|
|
||||||
if timeout == nil {
|
|
||||||
timeout = s.sdkConfiguration.Timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
if timeout != nil {
|
|
||||||
var cancel context.CancelFunc
|
|
||||||
ctx, cancel = context.WithTimeout(ctx, *timeout)
|
|
||||||
defer cancel()
|
|
||||||
}
|
|
||||||
|
|
||||||
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("error creating request: %w", err)
|
|
||||||
}
|
|
||||||
req.Header.Set("Accept", "application/json")
|
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
for k, v := range o.SetHeaders {
|
|
||||||
req.Header.Set(k, v)
|
|
||||||
}
|
|
||||||
|
|
||||||
globalRetryConfig := s.sdkConfiguration.RetryConfig
|
|
||||||
retryConfig := o.Retries
|
|
||||||
if retryConfig == nil {
|
|
||||||
if globalRetryConfig != nil {
|
|
||||||
retryConfig = globalRetryConfig
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var httpRes *http.Response
|
|
||||||
if retryConfig != nil {
|
|
||||||
httpRes, err = utils.Retry(ctx, utils.Retries{
|
|
||||||
Config: retryConfig,
|
|
||||||
StatusCodes: []string{
|
|
||||||
"429",
|
|
||||||
"500",
|
|
||||||
"502",
|
|
||||||
"503",
|
|
||||||
"504",
|
|
||||||
},
|
|
||||||
}, func() (*http.Response, error) {
|
|
||||||
if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil {
|
|
||||||
copyBody, err := req.GetBody()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
req.Body = copyBody
|
|
||||||
}
|
|
||||||
|
|
||||||
req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
|
||||||
if err != nil {
|
|
||||||
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil, retry.Permanent(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
httpRes, err := s.sdkConfiguration.Client.Do(req)
|
|
||||||
if err != nil || httpRes == nil {
|
|
||||||
if err != nil {
|
|
||||||
err = fmt.Errorf("error sending request: %w", err)
|
|
||||||
} else {
|
|
||||||
err = fmt.Errorf("error sending request: no response")
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
|
||||||
}
|
|
||||||
return httpRes, err
|
|
||||||
})
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
} else {
|
|
||||||
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
httpRes, err = s.sdkConfiguration.Client.Do(req)
|
|
||||||
if err != nil || httpRes == nil {
|
|
||||||
if err != nil {
|
|
||||||
err = fmt.Errorf("error sending request: %w", err)
|
|
||||||
} else {
|
|
||||||
err = fmt.Errorf("error sending request: no response")
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
|
||||||
return nil, err
|
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
|
||||||
_httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
} else if _httpRes != nil {
|
|
||||||
httpRes = _httpRes
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
res := &operations.GetTransientTokenResponse{
|
|
||||||
StatusCode: httpRes.StatusCode,
|
|
||||||
ContentType: httpRes.Header.Get("Content-Type"),
|
|
||||||
RawResponse: httpRes,
|
|
||||||
}
|
|
||||||
|
|
||||||
switch {
|
|
||||||
case httpRes.StatusCode == 200:
|
|
||||||
case httpRes.StatusCode == 400:
|
|
||||||
switch {
|
|
||||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var out sdkerrors.GetTransientTokenBadRequest
|
|
||||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
out.RawResponse = httpRes
|
|
||||||
return nil, &out
|
|
||||||
default:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
}
|
|
||||||
case httpRes.StatusCode == 401:
|
|
||||||
switch {
|
|
||||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var out sdkerrors.GetTransientTokenUnauthorized
|
|
||||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
out.RawResponse = httpRes
|
|
||||||
return nil, &out
|
|
||||||
default:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
}
|
|
||||||
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
default:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
}
|
|
||||||
|
|
||||||
return res, nil
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetSourceConnectionInformation - Get Source Connection Information
|
|
||||||
// If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
|
|
||||||
// Note: requires Plex Media Server >= 1.15.4.
|
|
||||||
func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, source string, opts ...operations.Option) (*operations.GetSourceConnectionInformationResponse, error) {
|
|
||||||
request := operations.GetSourceConnectionInformationRequest{
|
|
||||||
Source: source,
|
|
||||||
}
|
|
||||||
|
|
||||||
o := operations.Options{}
|
|
||||||
supportedOptions := []string{
|
|
||||||
operations.SupportedOptionRetries,
|
|
||||||
operations.SupportedOptionTimeout,
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, opt := range opts {
|
|
||||||
if err := opt(&o, supportedOptions...); err != nil {
|
|
||||||
return nil, fmt.Errorf("error applying option: %w", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var baseURL string
|
|
||||||
if o.ServerURL == nil {
|
|
||||||
baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
|
||||||
} else {
|
|
||||||
baseURL = *o.ServerURL
|
|
||||||
}
|
|
||||||
opURL, err := url.JoinPath(baseURL, "/security/resources")
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
hookCtx := hooks.HookContext{
|
|
||||||
SDK: s.rootSDK,
|
|
||||||
SDKConfiguration: s.sdkConfiguration,
|
|
||||||
BaseURL: baseURL,
|
|
||||||
Context: ctx,
|
|
||||||
OperationID: "getSourceConnectionInformation",
|
|
||||||
OAuth2Scopes: []string{},
|
|
||||||
SecuritySource: s.sdkConfiguration.Security,
|
|
||||||
}
|
|
||||||
|
|
||||||
timeout := o.Timeout
|
|
||||||
if timeout == nil {
|
|
||||||
timeout = s.sdkConfiguration.Timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
if timeout != nil {
|
|
||||||
var cancel context.CancelFunc
|
|
||||||
ctx, cancel = context.WithTimeout(ctx, *timeout)
|
|
||||||
defer cancel()
|
|
||||||
}
|
|
||||||
|
|
||||||
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("error creating request: %w", err)
|
|
||||||
}
|
|
||||||
req.Header.Set("Accept", "application/json")
|
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
for k, v := range o.SetHeaders {
|
|
||||||
req.Header.Set(k, v)
|
|
||||||
}
|
|
||||||
|
|
||||||
globalRetryConfig := s.sdkConfiguration.RetryConfig
|
|
||||||
retryConfig := o.Retries
|
|
||||||
if retryConfig == nil {
|
|
||||||
if globalRetryConfig != nil {
|
|
||||||
retryConfig = globalRetryConfig
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var httpRes *http.Response
|
|
||||||
if retryConfig != nil {
|
|
||||||
httpRes, err = utils.Retry(ctx, utils.Retries{
|
|
||||||
Config: retryConfig,
|
|
||||||
StatusCodes: []string{
|
|
||||||
"429",
|
|
||||||
"500",
|
|
||||||
"502",
|
|
||||||
"503",
|
|
||||||
"504",
|
|
||||||
},
|
|
||||||
}, func() (*http.Response, error) {
|
|
||||||
if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil {
|
|
||||||
copyBody, err := req.GetBody()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
req.Body = copyBody
|
|
||||||
}
|
|
||||||
|
|
||||||
req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
|
||||||
if err != nil {
|
|
||||||
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil, retry.Permanent(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
httpRes, err := s.sdkConfiguration.Client.Do(req)
|
|
||||||
if err != nil || httpRes == nil {
|
|
||||||
if err != nil {
|
|
||||||
err = fmt.Errorf("error sending request: %w", err)
|
|
||||||
} else {
|
|
||||||
err = fmt.Errorf("error sending request: no response")
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
|
||||||
}
|
|
||||||
return httpRes, err
|
|
||||||
})
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
} else {
|
|
||||||
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
httpRes, err = s.sdkConfiguration.Client.Do(req)
|
|
||||||
if err != nil || httpRes == nil {
|
|
||||||
if err != nil {
|
|
||||||
err = fmt.Errorf("error sending request: %w", err)
|
|
||||||
} else {
|
|
||||||
err = fmt.Errorf("error sending request: no response")
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
|
||||||
return nil, err
|
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
|
||||||
_httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
} else if _httpRes != nil {
|
|
||||||
httpRes = _httpRes
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
res := &operations.GetSourceConnectionInformationResponse{
|
|
||||||
StatusCode: httpRes.StatusCode,
|
|
||||||
ContentType: httpRes.Header.Get("Content-Type"),
|
|
||||||
RawResponse: httpRes,
|
|
||||||
}
|
|
||||||
|
|
||||||
switch {
|
|
||||||
case httpRes.StatusCode == 200:
|
|
||||||
case httpRes.StatusCode == 400:
|
|
||||||
switch {
|
|
||||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var out sdkerrors.GetSourceConnectionInformationBadRequest
|
|
||||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
out.RawResponse = httpRes
|
|
||||||
return nil, &out
|
|
||||||
default:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
}
|
|
||||||
case httpRes.StatusCode == 401:
|
|
||||||
switch {
|
|
||||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var out sdkerrors.GetSourceConnectionInformationUnauthorized
|
|
||||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
out.RawResponse = httpRes
|
|
||||||
return nil, &out
|
|
||||||
default:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
}
|
|
||||||
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
default:
|
|
||||||
rawBody, err := utils.ConsumeRawBody(httpRes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
|
|
||||||
}
|
|
||||||
|
|
||||||
return res, nil
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetTokenDetails - Get Token Details
|
// GetTokenDetails - Get Token Details
|
||||||
// Get the User data from the provided X-Plex-Token
|
// Get the User data from the provided X-Plex-Token
|
||||||
func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations.Option) (*operations.GetTokenDetailsResponse, error) {
|
func (s *Authentication) GetTokenDetails(ctx context.Context, request operations.GetTokenDetailsRequest, opts ...operations.Option) (*operations.GetTokenDetailsResponse, error) {
|
||||||
|
globals := operations.GetTokenDetailsGlobals{
|
||||||
|
Accepts: s.sdkConfiguration.Globals.Accepts,
|
||||||
|
ClientIdentifier: s.sdkConfiguration.Globals.ClientIdentifier,
|
||||||
|
Product: s.sdkConfiguration.Globals.Product,
|
||||||
|
Version: s.sdkConfiguration.Globals.Version,
|
||||||
|
Platform: s.sdkConfiguration.Globals.Platform,
|
||||||
|
PlatformVersion: s.sdkConfiguration.Globals.PlatformVersion,
|
||||||
|
Device: s.sdkConfiguration.Globals.Device,
|
||||||
|
Model: s.sdkConfiguration.Globals.Model,
|
||||||
|
DeviceVendor: s.sdkConfiguration.Globals.DeviceVendor,
|
||||||
|
DeviceName: s.sdkConfiguration.Globals.DeviceName,
|
||||||
|
Marketplace: s.sdkConfiguration.Globals.Marketplace,
|
||||||
|
}
|
||||||
|
|
||||||
o := operations.Options{}
|
o := operations.Options{}
|
||||||
supportedOptions := []string{
|
supportedOptions := []string{
|
||||||
operations.SupportedOptionRetries,
|
operations.SupportedOptionRetries,
|
||||||
@@ -538,7 +76,7 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations
|
|||||||
BaseURL: baseURL,
|
BaseURL: baseURL,
|
||||||
Context: ctx,
|
Context: ctx,
|
||||||
OperationID: "getTokenDetails",
|
OperationID: "getTokenDetails",
|
||||||
OAuth2Scopes: []string{},
|
OAuth2Scopes: nil,
|
||||||
SecuritySource: s.sdkConfiguration.Security,
|
SecuritySource: s.sdkConfiguration.Security,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -560,6 +98,8 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
|
utils.PopulateHeaders(ctx, req, request, globals)
|
||||||
|
|
||||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -674,7 +214,7 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
var out operations.GetTokenDetailsUserPlexAccount
|
var out components.UserPlexAccount
|
||||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -758,6 +298,20 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations
|
|||||||
// PostUsersSignInData - Get User Sign In Data
|
// PostUsersSignInData - Get User Sign In Data
|
||||||
// Sign in user with username and password and return user data with Plex authentication token
|
// Sign in user with username and password and return user data with Plex authentication token
|
||||||
func (s *Authentication) PostUsersSignInData(ctx context.Context, request operations.PostUsersSignInDataRequest, opts ...operations.Option) (*operations.PostUsersSignInDataResponse, error) {
|
func (s *Authentication) PostUsersSignInData(ctx context.Context, request operations.PostUsersSignInDataRequest, opts ...operations.Option) (*operations.PostUsersSignInDataResponse, error) {
|
||||||
|
globals := operations.PostUsersSignInDataGlobals{
|
||||||
|
Accepts: s.sdkConfiguration.Globals.Accepts,
|
||||||
|
ClientIdentifier: s.sdkConfiguration.Globals.ClientIdentifier,
|
||||||
|
Product: s.sdkConfiguration.Globals.Product,
|
||||||
|
Version: s.sdkConfiguration.Globals.Version,
|
||||||
|
Platform: s.sdkConfiguration.Globals.Platform,
|
||||||
|
PlatformVersion: s.sdkConfiguration.Globals.PlatformVersion,
|
||||||
|
Device: s.sdkConfiguration.Globals.Device,
|
||||||
|
Model: s.sdkConfiguration.Globals.Model,
|
||||||
|
DeviceVendor: s.sdkConfiguration.Globals.DeviceVendor,
|
||||||
|
DeviceName: s.sdkConfiguration.Globals.DeviceName,
|
||||||
|
Marketplace: s.sdkConfiguration.Globals.Marketplace,
|
||||||
|
}
|
||||||
|
|
||||||
o := operations.Options{}
|
o := operations.Options{}
|
||||||
supportedOptions := []string{
|
supportedOptions := []string{
|
||||||
operations.SupportedOptionRetries,
|
operations.SupportedOptionRetries,
|
||||||
@@ -786,7 +340,7 @@ func (s *Authentication) PostUsersSignInData(ctx context.Context, request operat
|
|||||||
BaseURL: baseURL,
|
BaseURL: baseURL,
|
||||||
Context: ctx,
|
Context: ctx,
|
||||||
OperationID: "post-users-sign-in-data",
|
OperationID: "post-users-sign-in-data",
|
||||||
OAuth2Scopes: []string{},
|
OAuth2Scopes: nil,
|
||||||
SecuritySource: nil,
|
SecuritySource: nil,
|
||||||
}
|
}
|
||||||
bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "form", `request:"mediaType=application/x-www-form-urlencoded"`)
|
bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "form", `request:"mediaType=application/x-www-form-urlencoded"`)
|
||||||
@@ -815,7 +369,7 @@ func (s *Authentication) PostUsersSignInData(ctx context.Context, request operat
|
|||||||
req.Header.Set("Content-Type", reqContentType)
|
req.Header.Set("Content-Type", reqContentType)
|
||||||
}
|
}
|
||||||
|
|
||||||
utils.PopulateHeaders(ctx, req, request, nil)
|
utils.PopulateHeaders(ctx, req, request, globals)
|
||||||
|
|
||||||
for k, v := range o.SetHeaders {
|
for k, v := range o.SetHeaders {
|
||||||
req.Header.Set(k, v)
|
req.Header.Set(k, v)
|
||||||
|
|||||||
10639
codeSamples.yaml
10639
codeSamples.yaml
File diff suppressed because it is too large
Load Diff
260
collections.go
Normal file
260
collections.go
Normal file
@@ -0,0 +1,260 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||||
|
|
||||||
|
package plexgo
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"github.com/LukeHagar/plexgo/internal/config"
|
||||||
|
"github.com/LukeHagar/plexgo/internal/hooks"
|
||||||
|
"github.com/LukeHagar/plexgo/internal/utils"
|
||||||
|
"github.com/LukeHagar/plexgo/models/components"
|
||||||
|
"github.com/LukeHagar/plexgo/models/operations"
|
||||||
|
"github.com/LukeHagar/plexgo/models/sdkerrors"
|
||||||
|
"github.com/LukeHagar/plexgo/retry"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Collections - API Operations against the Collections
|
||||||
|
type Collections struct {
|
||||||
|
rootSDK *PlexAPI
|
||||||
|
sdkConfiguration config.SDKConfiguration
|
||||||
|
hooks *hooks.Hooks
|
||||||
|
}
|
||||||
|
|
||||||
|
func newCollections(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Collections {
|
||||||
|
return &Collections{
|
||||||
|
rootSDK: rootSDK,
|
||||||
|
sdkConfiguration: sdkConfig,
|
||||||
|
hooks: hooks,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateCollection - Create collection
|
||||||
|
// Create a collection in the library
|
||||||
|
func (s *Collections) CreateCollection(ctx context.Context, request operations.CreateCollectionRequest, opts ...operations.Option) (*operations.CreateCollectionResponse, error) {
|
||||||
|
globals := operations.CreateCollectionGlobals{
|
||||||
|
Accepts: s.sdkConfiguration.Globals.Accepts,
|
||||||
|
ClientIdentifier: s.sdkConfiguration.Globals.ClientIdentifier,
|
||||||
|
Product: s.sdkConfiguration.Globals.Product,
|
||||||
|
Version: s.sdkConfiguration.Globals.Version,
|
||||||
|
Platform: s.sdkConfiguration.Globals.Platform,
|
||||||
|
PlatformVersion: s.sdkConfiguration.Globals.PlatformVersion,
|
||||||
|
Device: s.sdkConfiguration.Globals.Device,
|
||||||
|
Model: s.sdkConfiguration.Globals.Model,
|
||||||
|
DeviceVendor: s.sdkConfiguration.Globals.DeviceVendor,
|
||||||
|
DeviceName: s.sdkConfiguration.Globals.DeviceName,
|
||||||
|
Marketplace: s.sdkConfiguration.Globals.Marketplace,
|
||||||
|
}
|
||||||
|
|
||||||
|
o := operations.Options{}
|
||||||
|
supportedOptions := []string{
|
||||||
|
operations.SupportedOptionRetries,
|
||||||
|
operations.SupportedOptionTimeout,
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, opt := range opts {
|
||||||
|
if err := opt(&o, supportedOptions...); err != nil {
|
||||||
|
return nil, fmt.Errorf("error applying option: %w", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var baseURL string
|
||||||
|
if o.ServerURL == nil {
|
||||||
|
baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
|
} else {
|
||||||
|
baseURL = *o.ServerURL
|
||||||
|
}
|
||||||
|
opURL, err := url.JoinPath(baseURL, "/library/collections")
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
hookCtx := hooks.HookContext{
|
||||||
|
SDK: s.rootSDK,
|
||||||
|
SDKConfiguration: s.sdkConfiguration,
|
||||||
|
BaseURL: baseURL,
|
||||||
|
Context: ctx,
|
||||||
|
OperationID: "createCollection",
|
||||||
|
OAuth2Scopes: nil,
|
||||||
|
SecuritySource: s.sdkConfiguration.Security,
|
||||||
|
}
|
||||||
|
|
||||||
|
timeout := o.Timeout
|
||||||
|
if timeout == nil {
|
||||||
|
timeout = s.sdkConfiguration.Timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
if timeout != nil {
|
||||||
|
var cancel context.CancelFunc
|
||||||
|
ctx, cancel = context.WithTimeout(ctx, *timeout)
|
||||||
|
defer cancel()
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := http.NewRequestWithContext(ctx, "POST", opURL, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error creating request: %w", err)
|
||||||
|
}
|
||||||
|
req.Header.Set("Accept", "application/json")
|
||||||
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
|
utils.PopulateHeaders(ctx, req, request, globals)
|
||||||
|
|
||||||
|
if err := utils.PopulateQueryParams(ctx, req, request, globals, nil); err != nil {
|
||||||
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
for k, v := range o.SetHeaders {
|
||||||
|
req.Header.Set(k, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
globalRetryConfig := s.sdkConfiguration.RetryConfig
|
||||||
|
retryConfig := o.Retries
|
||||||
|
if retryConfig == nil {
|
||||||
|
if globalRetryConfig != nil {
|
||||||
|
retryConfig = globalRetryConfig
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var httpRes *http.Response
|
||||||
|
if retryConfig != nil {
|
||||||
|
httpRes, err = utils.Retry(ctx, utils.Retries{
|
||||||
|
Config: retryConfig,
|
||||||
|
StatusCodes: []string{
|
||||||
|
"429",
|
||||||
|
"500",
|
||||||
|
"502",
|
||||||
|
"503",
|
||||||
|
"504",
|
||||||
|
},
|
||||||
|
}, func() (*http.Response, error) {
|
||||||
|
if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil {
|
||||||
|
copyBody, err := req.GetBody()
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
req.Body = copyBody
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||||
|
if err != nil {
|
||||||
|
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil, retry.Permanent(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
httpRes, err := s.sdkConfiguration.Client.Do(req)
|
||||||
|
if err != nil || httpRes == nil {
|
||||||
|
if err != nil {
|
||||||
|
err = fmt.Errorf("error sending request: %w", err)
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("error sending request: no response")
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
|
}
|
||||||
|
return httpRes, err
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
} else {
|
||||||
|
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
httpRes, err = s.sdkConfiguration.Client.Do(req)
|
||||||
|
if err != nil || httpRes == nil {
|
||||||
|
if err != nil {
|
||||||
|
err = fmt.Errorf("error sending request: %w", err)
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("error sending request: no response")
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
|
return nil, err
|
||||||
|
} else if utils.MatchStatusCodes([]string{"400", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
|
_httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
res := &operations.CreateCollectionResponse{
|
||||||
|
StatusCode: httpRes.StatusCode,
|
||||||
|
ContentType: httpRes.Header.Get("Content-Type"),
|
||||||
|
RawResponse: httpRes,
|
||||||
|
}
|
||||||
|
|
||||||
|
switch {
|
||||||
|
case httpRes.StatusCode == 200:
|
||||||
|
switch {
|
||||||
|
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||||
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var out components.MediaContainerWithMetadata
|
||||||
|
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
res.MediaContainerWithMetadata = &out
|
||||||
|
default:
|
||||||
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
}
|
||||||
|
case httpRes.StatusCode == 400:
|
||||||
|
fallthrough
|
||||||
|
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
||||||
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
|
||||||
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
default:
|
||||||
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
}
|
||||||
|
|
||||||
|
return res, nil
|
||||||
|
|
||||||
|
}
|
||||||
2925
content.go
Normal file
2925
content.go
Normal file
File diff suppressed because it is too large
Load Diff
2918
devices.go
Normal file
2918
devices.go
Normal file
File diff suppressed because it is too large
Load Diff
9
docs/models/components/accepts.md
Normal file
9
docs/models/components/accepts.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Accepts
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------------ | ------------------------ |
|
||||||
|
| `AcceptsApplicationJSON` | application/json |
|
||||||
|
| `AcceptsApplicationXML` | application/xml |
|
||||||
10
docs/models/components/advancedsubtitles.md
Normal file
10
docs/models/components/advancedsubtitles.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# AdvancedSubtitles
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| -------------------------- | -------------------------- |
|
||||||
|
| `AdvancedSubtitlesBurn` | burn |
|
||||||
|
| `AdvancedSubtitlesText` | text |
|
||||||
|
| `AdvancedSubtitlesUnknown` | unknown |
|
||||||
9
docs/models/components/airingstype.md
Normal file
9
docs/models/components/airingstype.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# AiringsType
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| -------------------------------- | -------------------------------- |
|
||||||
|
| `AiringsTypeNewAiringsOnly` | New Airings Only |
|
||||||
|
| `AiringsTypeNewAndRepeatAirings` | New and Repeat Airings |
|
||||||
12
docs/models/components/autoselectsubtitle.md
Normal file
12
docs/models/components/autoselectsubtitle.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# AutoSelectSubtitle
|
||||||
|
|
||||||
|
The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ----------------------------------------- | ----------------------------------------- |
|
||||||
|
| `AutoSelectSubtitleManuallySelected` | 0 |
|
||||||
|
| `AutoSelectSubtitleShownWithForeignAudio` | 1 |
|
||||||
|
| `AutoSelectSubtitleAlwaysEnabled` | 2 |
|
||||||
9
docs/models/components/boolint.md
Normal file
9
docs/models/components/boolint.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# BoolInt
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| -------------- | -------------- |
|
||||||
|
| `BoolIntFalse` | 0 |
|
||||||
|
| `BoolIntTrue` | 1 |
|
||||||
15
docs/models/components/channel.md
Normal file
15
docs/models/components/channel.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Channel
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `CallSign` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `ChannelVcn` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Hd` | **bool* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Language` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Thumb` | **string* | :heavy_minus_sign: | N/A |
|
||||||
11
docs/models/components/channelmapping.md
Normal file
11
docs/models/components/channelmapping.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# ChannelMapping
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||||
|
| `ChannelKey` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `DeviceIdentifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Enabled` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `LineupIdentifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
18
docs/models/components/composite.md
Normal file
18
docs/models/components/composite.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Composite
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||||
|
| `Type` | **int64* | :heavy_minus_sign: | Limit composite to specified metadata types |
|
||||||
|
| `Format` | [*components.Format](../../models/components/format.md) | :heavy_minus_sign: | The image type |
|
||||||
|
| `BackgroundColor` | **string* | :heavy_minus_sign: | 6 character hex RGB value for background color for image |
|
||||||
|
| `Border` | **int64* | :heavy_minus_sign: | The width of the intra-image border |
|
||||||
|
| `Cols` | **int64* | :heavy_minus_sign: | Number of columns to construct in the composite image |
|
||||||
|
| `Crop` | [*components.Crop](../../models/components/crop.md) | :heavy_minus_sign: | Where to crop source images to fit into composite image proportions |
|
||||||
|
| `Height` | **int64* | :heavy_minus_sign: | The height of the image |
|
||||||
|
| `Media` | [*components.CompositeMedia](../../models/components/compositemedia.md) | :heavy_minus_sign: | The default image type to use as the sources |
|
||||||
|
| `Repeat` | **bool* | :heavy_minus_sign: | Allow repetion of images if there are not enough source images to fill grid |
|
||||||
|
| `Rows` | **int64* | :heavy_minus_sign: | Number of rows to construct in the composite image |
|
||||||
|
| `Width` | **int64* | :heavy_minus_sign: | The width of the image |
|
||||||
12
docs/models/components/compositemedia.md
Normal file
12
docs/models/components/compositemedia.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# CompositeMedia
|
||||||
|
|
||||||
|
The default image type to use as the sources
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------------------- | ---------------------- |
|
||||||
|
| `CompositeMediaThumb` | thumb |
|
||||||
|
| `CompositeMediaArt` | art |
|
||||||
|
| `CompositeMediaBanner` | banner |
|
||||||
14
docs/models/components/connections.md
Normal file
14
docs/models/components/connections.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Connections
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
||||||
|
| `Protocol` | [components.PlexDeviceProtocol](../../models/components/plexdeviceprotocol.md) | :heavy_check_mark: | The protocol used for the connection (http, https, etc) | http |
|
||||||
|
| `Address` | *string* | :heavy_check_mark: | The (ip) address or domain name used for the connection | |
|
||||||
|
| `Port` | *int* | :heavy_check_mark: | The port used for the connection | |
|
||||||
|
| `URI` | *string* | :heavy_check_mark: | The full URI of the connection | |
|
||||||
|
| `Local` | *bool* | :heavy_check_mark: | If the connection is local address | |
|
||||||
|
| `Relay` | *bool* | :heavy_check_mark: | If the connection is relayed through plex.direct | |
|
||||||
|
| `IPv6` | *bool* | :heavy_check_mark: | If the connection is using IPv6 | |
|
||||||
11
docs/models/components/crop.md
Normal file
11
docs/models/components/crop.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Crop
|
||||||
|
|
||||||
|
Where to crop source images to fit into composite image proportions
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------ | ------------ |
|
||||||
|
| `CropCenter` | center |
|
||||||
|
| `CropTop` | top |
|
||||||
10
docs/models/components/decision.md
Normal file
10
docs/models/components/decision.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Decision
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| -------------------- | -------------------- |
|
||||||
|
| `DecisionDirectplay` | directplay |
|
||||||
|
| `DecisionTranscode` | transcode |
|
||||||
|
| `DecisionNone` | none |
|
||||||
25
docs/models/components/default.md
Normal file
25
docs/models/components/default.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Default
|
||||||
|
|
||||||
|
The default value of this setting
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
```go
|
||||||
|
default := components.CreateDefaultStr(string{/* values here */})
|
||||||
|
```
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
```go
|
||||||
|
default := components.CreateDefaultNumber(float64{/* values here */})
|
||||||
|
```
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
```go
|
||||||
|
default := components.CreateDefaultBoolean(bool{/* values here */})
|
||||||
|
```
|
||||||
|
|
||||||
13
docs/models/components/defaultaudioaccessibility.md
Normal file
13
docs/models/components/defaultaudioaccessibility.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# DefaultAudioAccessibility
|
||||||
|
|
||||||
|
The audio accessibility mode (0 = Prefer non-accessibility audio, 1 = Prefer accessibility audio, 2 = Only show accessibility audio, 3 = Only show non-accessibility audio)
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------------------------------------- | ------------------------------------------------- |
|
||||||
|
| `DefaultAudioAccessibilityPreferNonAccessibility` | 0 |
|
||||||
|
| `DefaultAudioAccessibilityPreferAccessibility` | 1 |
|
||||||
|
| `DefaultAudioAccessibilityOnlyAccessibility` | 2 |
|
||||||
|
| `DefaultAudioAccessibilityOnlyNonAccessibility` | 3 |
|
||||||
11
docs/models/components/defaultdirection.md
Normal file
11
docs/models/components/defaultdirection.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# DefaultDirection
|
||||||
|
|
||||||
|
This default diction of this sort
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------------------- | ---------------------- |
|
||||||
|
| `DefaultDirectionAsc` | asc |
|
||||||
|
| `DefaultDirectionDesc` | desc |
|
||||||
13
docs/models/components/defaultsubtitleaccessibility.md
Normal file
13
docs/models/components/defaultsubtitleaccessibility.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# DefaultSubtitleAccessibility
|
||||||
|
|
||||||
|
The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------------------------------ | ------------------------------------------ |
|
||||||
|
| `DefaultSubtitleAccessibilityPreferNonSdh` | 0 |
|
||||||
|
| `DefaultSubtitleAccessibilityPreferSdh` | 1 |
|
||||||
|
| `DefaultSubtitleAccessibilityOnlySdh` | 2 |
|
||||||
|
| `DefaultSubtitleAccessibilityOnlyNonSdh` | 3 |
|
||||||
13
docs/models/components/defaultsubtitleforced.md
Normal file
13
docs/models/components/defaultsubtitleforced.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# DefaultSubtitleForced
|
||||||
|
|
||||||
|
The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| -------------------------------------- | -------------------------------------- |
|
||||||
|
| `DefaultSubtitleForcedPreferNonForced` | 0 |
|
||||||
|
| `DefaultSubtitleForcedPreferForced` | 1 |
|
||||||
|
| `DefaultSubtitleForcedOnlyForced` | 2 |
|
||||||
|
| `DefaultSubtitleForcedOnlyNonForced` | 3 |
|
||||||
20
docs/models/components/device.md
Normal file
20
docs/models/components/device.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Device
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
||||||
|
| `ChannelMapping` | [][components.ChannelMapping](../../models/components/channelmapping.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `LastSeenAt` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Make` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Model` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `ModelNumber` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Protocol` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Sources` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `State` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Status` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Tuners` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `URI` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `UUID` | **string* | :heavy_minus_sign: | N/A |
|
||||||
23
docs/models/components/directory.md
Normal file
23
docs/models/components/directory.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Directory
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Type` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Art` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Content` | **bool* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Filter` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `HasPrefs` | **bool* | :heavy_minus_sign: | N/A |
|
||||||
|
| `HasStoreServices` | **bool* | :heavy_minus_sign: | N/A |
|
||||||
|
| `HubKey` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `LastAccessedAt` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Pivot` | [][components.Pivot](../../models/components/pivot.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `Share` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Thumb` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TitleBar` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A |
|
||||||
12
docs/models/components/dvr.md
Normal file
12
docs/models/components/dvr.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Dvr
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
|
||||||
|
| `Device` | [][components.Device](../../models/components/device.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Language` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Lineup` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `UUID` | **string* | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# DvrRequestHandlerSlashGetResponses200
|
||||||
|
|
||||||
|
OK
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.DvrRequestHandlerSlashGetResponses200MediaContainer](../../models/components/dvrrequesthandlerslashgetresponses200mediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# DvrRequestHandlerSlashGetResponses200MediaContainer
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer](../../models/components/dvrrequesthandlerslashgetresponses200mediacontainermediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `Dvr` | [][components.Dvr](../../models/components/dvr.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `Status` | **int64* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error |
|
||||||
27
docs/models/components/filter.md
Normal file
27
docs/models/components/filter.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# Filter
|
||||||
|
|
||||||
|
Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an important subset useful for top-level API.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | The title for the filter. |
|
||||||
|
| `Type` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Art` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Content` | **bool* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Filter` | **string* | :heavy_minus_sign: | This represents the filter name used for the filter, which can be used to construct complex media queries with. |
|
||||||
|
| `HasPrefs` | **bool* | :heavy_minus_sign: | N/A |
|
||||||
|
| `HasStoreServices` | **bool* | :heavy_minus_sign: | N/A |
|
||||||
|
| `HubKey` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. |
|
||||||
|
| `LastAccessedAt` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Pivot` | [][components.FilterPivot](../../models/components/filterpivot.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `Share` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Thumb` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TitleBar` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `FilterType` | **string* | :heavy_minus_sign: | This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. |
|
||||||
|
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A |
|
||||||
13
docs/models/components/filterpivot.md
Normal file
13
docs/models/components/filterpivot.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# FilterPivot
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Type` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Context` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `ID` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Symbol` | **string* | :heavy_minus_sign: | N/A |
|
||||||
11
docs/models/components/format.md
Normal file
11
docs/models/components/format.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Format
|
||||||
|
|
||||||
|
The image type
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ----------- | ----------- |
|
||||||
|
| `FormatJpg` | jpg |
|
||||||
|
| `FormatPng` | png |
|
||||||
10
docs/models/components/getresponses200.md
Normal file
10
docs/models/components/getresponses200.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# GetResponses200
|
||||||
|
|
||||||
|
OK
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.GetResponses200MediaContainer](../../models/components/getresponses200mediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
14
docs/models/components/getresponses200hub.md
Normal file
14
docs/models/components/getresponses200hub.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# GetResponses200Hub
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `HomeVisibility` | [*components.HomeVisibility](../../models/components/homevisibility.md) | :heavy_minus_sign: | Whether this hub is visible on the home screen<br/> - all: Visible to all users<br/> - none: Visible to no users<br/> - admin: Visible to only admin users<br/> - shared: Visible to shared users<br/> |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | The identifier for this hub |
|
||||||
|
| `PromotedToOwnHome` | **bool* | :heavy_minus_sign: | Whether this hub is visible to admin user home |
|
||||||
|
| `PromotedToRecommended` | **bool* | :heavy_minus_sign: | Whether this hub is promoted to all for recommendations |
|
||||||
|
| `PromotedToSharedHome` | **bool* | :heavy_minus_sign: | Whether this hub is visible to shared user's home |
|
||||||
|
| `RecommendationsVisibility` | [*components.RecommendationsVisibility](../../models/components/recommendationsvisibility.md) | :heavy_minus_sign: | The visibility of this hub in recommendations:<br/> - all: Visible to all users<br/> - none: Visible to no users<br/> - admin: Visible to only admin users<br/> - shared: Visible to shared users<br/> |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | The title of this hub |
|
||||||
17
docs/models/components/getresponses200mediacontainer.md
Normal file
17
docs/models/components/getresponses200mediacontainer.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# GetResponses200MediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `Hub` | [][components.GetResponses200Hub](../../models/components/getresponses200hub.md) | :heavy_minus_sign: | N/A |
|
||||||
8
docs/models/components/guids.md
Normal file
8
docs/models/components/guids.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Guids
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `ID` | *string* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://<br/> | {<br/>"imdbExample": {<br/>"summary": "IMDB example",<br/>"value": "imdb://tt13015952"<br/>},<br/>"tmdbExample": {<br/>"summary": "TMDB example",<br/>"value": "tmdb://2434012"<br/>},<br/>"tvdbExample": {<br/>"summary": "TVDB example",<br/>"value": "tvdb://7945991"<br/>}<br/>} |
|
||||||
10
docs/models/components/historyallgetresponses200.md
Normal file
10
docs/models/components/historyallgetresponses200.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# HistoryAllGetResponses200
|
||||||
|
|
||||||
|
OK
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.HistoryAllGetResponses200MediaContainer](../../models/components/historyallgetresponses200mediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# HistoryAllGetResponses200MediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `Metadata` | [][components.HistoryAllGetResponses200Metadata](../../models/components/historyallgetresponses200metadata.md) | :heavy_minus_sign: | N/A |
|
||||||
18
docs/models/components/historyallgetresponses200metadata.md
Normal file
18
docs/models/components/historyallgetresponses200metadata.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# HistoryAllGetResponses200Metadata
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- |
|
||||||
|
| `AccountID` | **int64* | :heavy_minus_sign: | The account id of this playback |
|
||||||
|
| `DeviceID` | **int64* | :heavy_minus_sign: | The device id which played the item |
|
||||||
|
| `HistoryKey` | **string* | :heavy_minus_sign: | The key for this individual history item |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | The metadata key for the item played |
|
||||||
|
| `LibrarySectionID` | **string* | :heavy_minus_sign: | The library section id containing the item played |
|
||||||
|
| `OriginallyAvailableAt` | **string* | :heavy_minus_sign: | The originally available at of the item played |
|
||||||
|
| `RatingKey` | **string* | :heavy_minus_sign: | The rating key for the item played |
|
||||||
|
| `Thumb` | **string* | :heavy_minus_sign: | The thumb of the item played |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | The title of the item played |
|
||||||
|
| `Type` | **string* | :heavy_minus_sign: | The metadata type of the item played |
|
||||||
|
| `ViewedAt` | **int64* | :heavy_minus_sign: | The time when the item was played |
|
||||||
18
docs/models/components/homevisibility.md
Normal file
18
docs/models/components/homevisibility.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# HomeVisibility
|
||||||
|
|
||||||
|
Whether this hub is visible on the home screen
|
||||||
|
- all: Visible to all users
|
||||||
|
- none: Visible to no users
|
||||||
|
- admin: Visible to only admin users
|
||||||
|
- shared: Visible to shared users
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------------------- | ---------------------- |
|
||||||
|
| `HomeVisibilityAll` | all |
|
||||||
|
| `HomeVisibilityNone` | none |
|
||||||
|
| `HomeVisibilityAdmin` | admin |
|
||||||
|
| `HomeVisibilityShared` | shared |
|
||||||
22
docs/models/components/hub.md
Normal file
22
docs/models/components/hub.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Hub
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | A title for this grouping of content | |
|
||||||
|
| `Type` | **string* | :heavy_minus_sign: | The type of the items contained in this hub, or possibly `mixed` if there are multiple types | track |
|
||||||
|
| `Context` | **string* | :heavy_minus_sign: | N/A | hub.home.onDeck |
|
||||||
|
| `HubIdentifier` | **string* | :heavy_minus_sign: | A unique identifier for the hub | home.onDeck |
|
||||||
|
| `HubKey` | **string* | :heavy_minus_sign: | A key at which the exact content currently displayed can be fetched again. This is particularly important when a hub is marked as random and requesting the `key` may get different results. It's otherwise optional.<br/> | |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | The key at which all of the content for this hub can be retrieved | /hubs/sections/home/onDeck |
|
||||||
|
| `Metadata` | [][components.Metadata](../../models/components/metadata.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `More` | **bool* | :heavy_minus_sign: | "A boolean indicating that the hub contains more than what's included in the current response."<br/> | |
|
||||||
|
| `Promoted` | **bool* | :heavy_minus_sign: | Indicating if the hub should be promoted to the user's homescreen | |
|
||||||
|
| `Random` | **bool* | :heavy_minus_sign: | Indicating that the contents of the hub may change on each request | |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A | 1 |
|
||||||
|
| `Style` | **string* | :heavy_minus_sign: | A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell` | |
|
||||||
|
| `Subtype` | **string* | :heavy_minus_sign: | The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types | podcast |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | N/A | 8 |
|
||||||
|
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |
|
||||||
13
docs/models/components/image.md
Normal file
13
docs/models/components/image.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Image
|
||||||
|
|
||||||
|
Images such as movie posters and background artwork are represented by Image elements.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||||
|
| `Type` | [*components.ImageType](../../models/components/imagetype.md) | :heavy_minus_sign: | Describes both the purpose and intended presentation of the image. |
|
||||||
|
| `Alt` | **string* | :heavy_minus_sign: | Title to use for accessibility. |
|
||||||
|
| `URL` | **string* | :heavy_minus_sign: | The relative path or absolute url for the image. |
|
||||||
14
docs/models/components/imagetype.md
Normal file
14
docs/models/components/imagetype.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# ImageType
|
||||||
|
|
||||||
|
Describes both the purpose and intended presentation of the image.
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------------------- | ---------------------- |
|
||||||
|
| `ImageTypeBackground` | background |
|
||||||
|
| `ImageTypeBanner` | banner |
|
||||||
|
| `ImageTypeClearLogo` | clearLogo |
|
||||||
|
| `ImageTypeCoverPoster` | coverPoster |
|
||||||
|
| `ImageTypeSnapshot` | snapshot |
|
||||||
87
docs/models/components/items.md
Normal file
87
docs/models/components/items.md
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
# Items
|
||||||
|
|
||||||
|
Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
|
||||||
|
|
||||||
|
Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
|
||||||
|
|
||||||
|
Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Title` | *string* | :heavy_check_mark: | The title of the item (e.g. “300” or “The Simpsons”) | |
|
||||||
|
| `Type` | *string* | :heavy_check_mark: | The type of the video item, such as `movie`, `episode`, or `clip`. | |
|
||||||
|
| `AbsoluteIndex` | **int* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | |
|
||||||
|
| `AddedAt` | *int64* | :heavy_check_mark: | In units of seconds since the epoch, returns the time at which the item was added to the library. | |
|
||||||
|
| `Art` | **string* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | /library/metadata/58683/art/1703239236 |
|
||||||
|
| `AudienceRating` | **float32* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | |
|
||||||
|
| `AudienceRatingImage` | **string* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | |
|
||||||
|
| `Autotag` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Banner` | **string* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | |
|
||||||
|
| `ChapterSource` | **string* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | media |
|
||||||
|
| `ChildCount` | **int* | :heavy_minus_sign: | The number of child items associated with this media item. | 1 |
|
||||||
|
| `Composite` | **string* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | |
|
||||||
|
| `ContentRating` | **string* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | |
|
||||||
|
| `Country` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Director` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Duration` | **int* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | |
|
||||||
|
| `Filter` | [][components.Filter](../../models/components/filter.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | |
|
||||||
|
| `Genre` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `GrandparentArt` | **string* | :heavy_minus_sign: | The `art` of the grandparent | |
|
||||||
|
| `GrandparentGUID` | **string* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 |
|
||||||
|
| `GrandparentHero` | **string* | :heavy_minus_sign: | The `hero` of the grandparent | |
|
||||||
|
| `GrandparentKey` | **string* | :heavy_minus_sign: | The `key` of the grandparent | |
|
||||||
|
| `GrandparentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the grandparent | |
|
||||||
|
| `GrandparentTheme` | **string* | :heavy_minus_sign: | The `theme` of the grandparent | |
|
||||||
|
| `GrandparentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the grandparent | |
|
||||||
|
| `GrandparentTitle` | **string* | :heavy_minus_sign: | The `title` of the grandparent | |
|
||||||
|
| `GUID` | **string* | :heavy_minus_sign: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 |
|
||||||
|
| `Guids` | [][components.ItemsGuids](../../models/components/itemsguids.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Hero` | **string* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | |
|
||||||
|
| `Image` | [][components.Image](../../models/components/image.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Index` | **int* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | |
|
||||||
|
| `Key` | *string* | :heavy_check_mark: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | |
|
||||||
|
| `LastViewedAt` | **int64* | :heavy_minus_sign: | N/A | 1556281940 |
|
||||||
|
| `LeafCount` | **int* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | |
|
||||||
|
| `Media` | [][components.Media](../../models/components/media.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `OriginallyAvailableAt` | [*types.Date](../../types/date.md) | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | 2022-12-14 |
|
||||||
|
| `OriginalTitle` | **string* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | |
|
||||||
|
| `ParentGUID` | **string* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 |
|
||||||
|
| `ParentHero` | **string* | :heavy_minus_sign: | The `hero` of the parent | |
|
||||||
|
| `ParentIndex` | **int* | :heavy_minus_sign: | The `index` of the parent | |
|
||||||
|
| `ParentKey` | **string* | :heavy_minus_sign: | The `key` of the parent | |
|
||||||
|
| `ParentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the parent | |
|
||||||
|
| `ParentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the parent | |
|
||||||
|
| `ParentTitle` | **string* | :heavy_minus_sign: | The `title` of the parent | |
|
||||||
|
| `PrimaryExtraKey` | **string* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | |
|
||||||
|
| `Prompt` | **string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | |
|
||||||
|
| `Rating` | **float32* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | |
|
||||||
|
| `RatingArray` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `RatingCount` | **int* | :heavy_minus_sign: | Number of ratings under this metadata | |
|
||||||
|
| `RatingImage` | **string* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | |
|
||||||
|
| `RatingKey` | **string* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | |
|
||||||
|
| `Role` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Search` | **bool* | :heavy_minus_sign: | Indicates this is a search directory | |
|
||||||
|
| `Secondary` | **bool* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | |
|
||||||
|
| `SkipChildren` | **bool* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | |
|
||||||
|
| `SkipParent` | **bool* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | |
|
||||||
|
| `Sort` | [][components.Sort](../../models/components/sort.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | |
|
||||||
|
| `Studio` | **string* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | |
|
||||||
|
| `Subtype` | **string* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | |
|
||||||
|
| `Summary` | **string* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | |
|
||||||
|
| `Tagline` | **string* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | |
|
||||||
|
| `Theme` | **string* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | /library/metadata/1/theme/1705636920 |
|
||||||
|
| `Thumb` | **string* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | /library/metadata/58683/thumb/1703239236 |
|
||||||
|
| `TitleSort` | **string* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | |
|
||||||
|
| `UpdatedAt` | **int64* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | |
|
||||||
|
| `UserRating` | **float32* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | |
|
||||||
|
| `ViewCount` | **int* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | |
|
||||||
|
| `ViewedLeafCount` | **int* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | |
|
||||||
|
| `ViewOffset` | **int* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | |
|
||||||
|
| `Writer` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Year` | **int* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | |
|
||||||
|
| `MetadataItem` | [][components.Items](../../models/components/items.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |
|
||||||
8
docs/models/components/itemsguids.md
Normal file
8
docs/models/components/itemsguids.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# ItemsGuids
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `ID` | *string* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://<br/> | {<br/>"imdbExample": {<br/>"summary": "IMDB example",<br/>"value": "imdb://tt13015952"<br/>},<br/>"tmdbExample": {<br/>"summary": "TMDB example",<br/>"value": "tmdb://2434012"<br/>},<br/>"tvdbExample": {<br/>"summary": "TVDB example",<br/>"value": "tvdb://7945991"<br/>}<br/>} |
|
||||||
28
docs/models/components/librarysection.md
Normal file
28
docs/models/components/librarysection.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# LibrarySection
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | The title of the library | Movies |
|
||||||
|
| `Type` | [components.MediaTypeString](../../models/components/mediatypestring.md) | :heavy_check_mark: | The type of media content in the Plex library. This can represent videos, music, or photos.<br/> | movie |
|
||||||
|
| `Agent` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Art` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Composite` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Content` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `ContentChangedAt` | **int64* | :heavy_minus_sign: | N/A | 1556281940 |
|
||||||
|
| `CreatedAt` | **int64* | :heavy_minus_sign: | N/A | 1556281940 |
|
||||||
|
| `Directory` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Filters` | **bool* | :heavy_minus_sign: | Indicates whether this section has filtering capabilities | |
|
||||||
|
| `Hidden` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Language` | *string* | :heavy_check_mark: | N/A | |
|
||||||
|
| `UUID` | *string* | :heavy_check_mark: | The universally unique identifier for the library. | e69655a2-ef48-4aba-bb19-d3cc3401e7d6 |
|
||||||
|
| `Location` | [][components.LibrarySectionLocation](../../models/components/librarysectionlocation.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Refreshing` | **bool* | :heavy_minus_sign: | Indicates whether this library section is currently scanning | |
|
||||||
|
| `ScannedAt` | **int64* | :heavy_minus_sign: | N/A | 1556281940 |
|
||||||
|
| `Scanner` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Thumb` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `UpdatedAt` | **int64* | :heavy_minus_sign: | N/A | 1556281940 |
|
||||||
11
docs/models/components/librarysectionlocation.md
Normal file
11
docs/models/components/librarysectionlocation.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# LibrarySectionLocation
|
||||||
|
|
||||||
|
Represents a top-level location on disk where media in this library section is stored
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
|
||||||
|
| `ID` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Path` | *any* | :heavy_minus_sign: | The path of where this directory exists on disk |
|
||||||
10
docs/models/components/librarysections.md
Normal file
10
docs/models/components/librarysections.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# LibrarySections
|
||||||
|
|
||||||
|
OK
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.LibrarySectionsMediaContainer](../../models/components/librarysectionsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
10
docs/models/components/librarysectionsdirectory.md
Normal file
10
docs/models/components/librarysectionsdirectory.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# LibrarySectionsDirectory
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
|
||||||
|
| `Count` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | The key where this directory is found |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | N/A |
|
||||||
65
docs/models/components/librarysectionsmediacontainer.md
Normal file
65
docs/models/components/librarysectionsmediacontainer.md
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
# LibrarySectionsMediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> | |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> | |
|
||||||
|
| `AllowCameraUpload` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `AllowChannelAccess` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `AllowMediaDeletion` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `AllowSharing` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `AllowTuners` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `BackgroundProcessing` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Certificate` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `CompanionProxy` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `CountryCode` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Diagnostics` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `EventStream` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `FriendlyName` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `HubSearch` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `ItemClusters` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Livetv` | **int64* | :heavy_minus_sign: | N/A | 7 |
|
||||||
|
| `MachineIdentifier` | *any* | :heavy_minus_sign: | N/A | 0123456789abcdef0123456789abcdef012345678 |
|
||||||
|
| `MediaProviders` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Multiuser` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `MusicAnalysis` | **int64* | :heavy_minus_sign: | N/A | 2 |
|
||||||
|
| `MyPlex` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `MyPlexMappingState` | *any* | :heavy_minus_sign: | N/A | mapped |
|
||||||
|
| `MyPlexSigninState` | *any* | :heavy_minus_sign: | N/A | ok |
|
||||||
|
| `MyPlexSubscription` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `MyPlexUsername` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `OfflineTranscode` | *any* | :heavy_minus_sign: | N/A | 1 |
|
||||||
|
| `OwnerFeatures` | **string* | :heavy_minus_sign: | A comma-separated list of features which are enabled for the server owner | |
|
||||||
|
| `Platform` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `PlatformVersion` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `PluginHost` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `PushNotifications` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `ReadOnlyLibraries` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `StreamingBrainABRVersion` | **int64* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `StreamingBrainVersion` | **int64* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Sync` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `TranscoderActiveVideoSessions` | **int64* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `TranscoderAudio` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `TranscoderLyrics` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `TranscoderPhoto` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `TranscoderSubtitles` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `TranscoderVideo` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `TranscoderVideoBitrates` | *any* | :heavy_minus_sign: | The suggested video quality bitrates to present to the user | |
|
||||||
|
| `TranscoderVideoQualities` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `TranscoderVideoResolutions` | *any* | :heavy_minus_sign: | The suggested video resolutions to the above quality bitrates | |
|
||||||
|
| `UpdatedAt` | **int64* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Updater` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Version` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `VoiceSearch` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Directory` | [][components.LibrarySectionsDirectory](../../models/components/librarysectionsdirectory.md) | :heavy_minus_sign: | N/A | |
|
||||||
12
docs/models/components/lineup.md
Normal file
12
docs/models/components/lineup.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Lineup
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Type` | **string* | :heavy_minus_sign: | The type of this object (`lineup` in this case) |
|
||||||
|
| `LineupType` | [*components.LineupType](../../models/components/lineuptype.md) | :heavy_minus_sign: | - `-1`: N/A<br/>- `0`: Over the air<br/>- `1`: Cable<br/>- `2`: Satellite<br/>- `3`: IPTV<br/>- `4`: Virtual<br/> |
|
||||||
|
| `Location` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `UUID` | **string* | :heavy_minus_sign: | The uuid of this lineup |
|
||||||
21
docs/models/components/lineuptype.md
Normal file
21
docs/models/components/lineuptype.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# LineupType
|
||||||
|
|
||||||
|
- `-1`: N/A
|
||||||
|
- `0`: Over the air
|
||||||
|
- `1`: Cable
|
||||||
|
- `2`: Satellite
|
||||||
|
- `3`: IPTV
|
||||||
|
- `4`: Virtual
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------ | ------------------ |
|
||||||
|
| `LineupTypeMinus1` | -1 |
|
||||||
|
| `LineupTypeZero` | 0 |
|
||||||
|
| `LineupTypeOne` | 1 |
|
||||||
|
| `LineupTypeTwo` | 2 |
|
||||||
|
| `LineupTypeThree` | 3 |
|
||||||
|
| `LineupTypeFour` | 4 |
|
||||||
10
docs/models/components/location.md
Normal file
10
docs/models/components/location.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Location
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------ | ------------------ |
|
||||||
|
| `LocationLan` | lan |
|
||||||
|
| `LocationWan` | wan |
|
||||||
|
| `LocationCellular` | cellular |
|
||||||
12
docs/models/components/mailingliststatus.md
Normal file
12
docs/models/components/mailingliststatus.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# MailingListStatus
|
||||||
|
|
||||||
|
Your current mailing list status
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------------------- | ------------------------------- |
|
||||||
|
| `MailingListStatusActive` | active |
|
||||||
|
| `MailingListStatusUnsubscribed` | unsubscribed |
|
||||||
|
| `MailingListStatusRemoved` | removed |
|
||||||
29
docs/models/components/media.md
Normal file
29
docs/models/components/media.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Media
|
||||||
|
|
||||||
|
`Media` represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements since the attributes will vary based on the type. The possible attributes are not documented here, but they typically have self-evident names. High-level media information that can be used for badging and flagging, such as `videoResolution` and codecs, is included on the media element.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||||
|
| `AspectRatio` | **float32* | :heavy_minus_sign: | N/A | 2.35 |
|
||||||
|
| `AudioChannels` | **int* | :heavy_minus_sign: | N/A | 2 |
|
||||||
|
| `AudioCodec` | **string* | :heavy_minus_sign: | N/A | aac |
|
||||||
|
| `AudioProfile` | **string* | :heavy_minus_sign: | N/A | lc |
|
||||||
|
| `Bitrate` | **int* | :heavy_minus_sign: | N/A | 5612 |
|
||||||
|
| `Container` | **string* | :heavy_minus_sign: | N/A | mov |
|
||||||
|
| `Duration` | **int* | :heavy_minus_sign: | N/A | 150192 |
|
||||||
|
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||||
|
| `HasVoiceActivity` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `Height` | **int* | :heavy_minus_sign: | N/A | 544 |
|
||||||
|
| `ID` | *int64* | :heavy_check_mark: | N/A | 1 |
|
||||||
|
| `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||||
|
| `Part` | [][components.Part](../../models/components/part.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `VideoCodec` | **string* | :heavy_minus_sign: | N/A | h264 |
|
||||||
|
| `VideoFrameRate` | **string* | :heavy_minus_sign: | N/A | 24p |
|
||||||
|
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main |
|
||||||
|
| `VideoResolution` | **string* | :heavy_minus_sign: | N/A | 720 |
|
||||||
|
| `Width` | **int* | :heavy_minus_sign: | N/A | 1280 |
|
||||||
|
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |
|
||||||
16
docs/models/components/mediacontainer.md
Normal file
16
docs/models/components/mediacontainer.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# MediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
8
docs/models/components/mediacontainerwithartwork.md
Normal file
8
docs/models/components/mediacontainerwithartwork.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# MediaContainerWithArtwork
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.MediaContainerWithArtworkMediaContainer](../../models/components/mediacontainerwithartworkmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# MediaContainerWithArtworkMediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `Metadata` | [][components.MediaContainerWithArtworkMetadata](../../models/components/mediacontainerwithartworkmetadata.md) | :heavy_minus_sign: | N/A |
|
||||||
11
docs/models/components/mediacontainerwithartworkmetadata.md
Normal file
11
docs/models/components/mediacontainerwithartworkmetadata.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# MediaContainerWithArtworkMetadata
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | The title of the item |
|
||||||
|
| `Type` | [*components.MediaContainerWithArtworkType](../../models/components/mediacontainerwithartworktype.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | The path to the artwork |
|
||||||
|
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A |
|
||||||
8
docs/models/components/mediacontainerwithartworktype.md
Normal file
8
docs/models/components/mediacontainerwithartworktype.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# MediaContainerWithArtworkType
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------------------------ | ------------------------------------ |
|
||||||
|
| `MediaContainerWithArtworkTypeImage` | image |
|
||||||
13
docs/models/components/mediacontainerwithdecision.md
Normal file
13
docs/models/components/mediacontainerwithdecision.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# MediaContainerWithDecision
|
||||||
|
|
||||||
|
`MediaContainer` is commonly found as the root of a response and is a pretty generic container. Common attributes include `identifier` and things related to paging (`offset`, `size`, `totalSize`).
|
||||||
|
|
||||||
|
It is also common for a `MediaContainer` to contain attributes "hoisted" from its children. If every element in the container would have had the same attribute, then that attribute can be present on the container instead of being repeated on every element. For example, an album's list of tracks might include `parentTitle` on the container since all of the tracks have the same album title. A container may have a `source` attribute when all of the items came from the same source. Generally speaking, when looking for an attribute on an item, if the attribute wasn't found then the container should be checked for that attribute as well.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.MediaContainerWithDecisionMediaContainer](../../models/components/mediacontainerwithdecisionmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
13
docs/models/components/mediacontainerwithdecisiondecision.md
Normal file
13
docs/models/components/mediacontainerwithdecisiondecision.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# MediaContainerWithDecisionDecision
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ----------------------------------------------- | ----------------------------------------------- |
|
||||||
|
| `MediaContainerWithDecisionDecisionCopy` | copy |
|
||||||
|
| `MediaContainerWithDecisionDecisionTranscode` | transcode |
|
||||||
|
| `MediaContainerWithDecisionDecisionBurn` | burn |
|
||||||
|
| `MediaContainerWithDecisionDecisionUnavailable` | unavailable |
|
||||||
|
| `MediaContainerWithDecisionDecisionIgnore` | ignore |
|
||||||
|
| `MediaContainerWithDecisionDecisionNone` | none |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# MediaContainerWithDecisionGuids
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `ID` | *string* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://<br/> | {<br/>"imdbExample": {<br/>"summary": "IMDB example",<br/>"value": "imdb://tt13015952"<br/>},<br/>"tmdbExample": {<br/>"summary": "TMDB example",<br/>"value": "tmdb://2434012"<br/>},<br/>"tvdbExample": {<br/>"summary": "TVDB example",<br/>"value": "tvdb://7945991"<br/>}<br/>} |
|
||||||
15
docs/models/components/mediacontainerwithdecisionlocation.md
Normal file
15
docs/models/components/mediacontainerwithdecisionlocation.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# MediaContainerWithDecisionLocation
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------------------------------------- | ------------------------------------------------- |
|
||||||
|
| `MediaContainerWithDecisionLocationDirect` | direct |
|
||||||
|
| `MediaContainerWithDecisionLocationSidecarSubs` | sidecar-subs |
|
||||||
|
| `MediaContainerWithDecisionLocationSegmentsVideo` | segments-video |
|
||||||
|
| `MediaContainerWithDecisionLocationSegmentsAudio` | segments-audio |
|
||||||
|
| `MediaContainerWithDecisionLocationSegmentsAv` | segments-av |
|
||||||
|
| `MediaContainerWithDecisionLocationSegmentsSubs` | segments-subs |
|
||||||
|
| `MediaContainerWithDecisionLocationEmbedded` | embedded |
|
||||||
|
| `MediaContainerWithDecisionLocationSidecar` | sidecar |
|
||||||
32
docs/models/components/mediacontainerwithdecisionmedia.md
Normal file
32
docs/models/components/mediacontainerwithdecisionmedia.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# MediaContainerWithDecisionMedia
|
||||||
|
|
||||||
|
`Media` represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements since the attributes will vary based on the type. The possible attributes are not documented here, but they typically have self-evident names. High-level media information that can be used for badging and flagging, such as `videoResolution` and codecs, is included on the media element.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `AspectRatio` | **float32* | :heavy_minus_sign: | N/A | 2.35 |
|
||||||
|
| `AudioChannels` | **int* | :heavy_minus_sign: | N/A | 2 |
|
||||||
|
| `AudioCodec` | **string* | :heavy_minus_sign: | N/A | aac |
|
||||||
|
| `AudioProfile` | **string* | :heavy_minus_sign: | N/A | lc |
|
||||||
|
| `Bitrate` | **int* | :heavy_minus_sign: | N/A | 5612 |
|
||||||
|
| `Container` | **string* | :heavy_minus_sign: | N/A | mov |
|
||||||
|
| `Duration` | **int* | :heavy_minus_sign: | N/A | 150192 |
|
||||||
|
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||||
|
| `HasVoiceActivity` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `Height` | **int* | :heavy_minus_sign: | N/A | 544 |
|
||||||
|
| `ID` | *int64* | :heavy_check_mark: | N/A | 1 |
|
||||||
|
| `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||||
|
| `Part` | [][components.MediaContainerWithDecisionPart](../../models/components/mediacontainerwithdecisionpart.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `VideoCodec` | **string* | :heavy_minus_sign: | N/A | h264 |
|
||||||
|
| `VideoFrameRate` | **string* | :heavy_minus_sign: | N/A | 24p |
|
||||||
|
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main |
|
||||||
|
| `VideoResolution` | **string* | :heavy_minus_sign: | N/A | 720 |
|
||||||
|
| `Width` | **int* | :heavy_minus_sign: | N/A | 1280 |
|
||||||
|
| `Abr` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `ResourceSession` | **string* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Selected` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# MediaContainerWithDecisionMediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `AvailableBandwidth` | **int64* | :heavy_minus_sign: | The maximum available bitrate when the decision was rendered. |
|
||||||
|
| `DirectPlayDecisionCode` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `DirectPlayDecisionText` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `GeneralDecisionCode` | **int64* | :heavy_minus_sign: | The overall decision. 1xxx are playback can succeed, 2xxx are a general error (such as insufficient bandwidth), 3xxx are errors in direct play, and 4xxx are errors in transcodes. Same codes are used in all. |
|
||||||
|
| `GeneralDecisionText` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `MdeDecisionCode` | **int64* | :heavy_minus_sign: | The code indicating the status of evaluation of playback when client indicates `hasMDE=1` |
|
||||||
|
| `MdeDecisionText` | **string* | :heavy_minus_sign: | Descriptive text for the above code |
|
||||||
|
| `Metadata` | [][components.MediaContainerWithDecisionMetadata](../../models/components/mediacontainerwithdecisionmetadata.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `TranscodeDecisionCode` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TranscodeDecisionText` | **string* | :heavy_minus_sign: | N/A |
|
||||||
86
docs/models/components/mediacontainerwithdecisionmetadata.md
Normal file
86
docs/models/components/mediacontainerwithdecisionmetadata.md
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
# MediaContainerWithDecisionMetadata
|
||||||
|
|
||||||
|
Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
|
||||||
|
|
||||||
|
Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
|
||||||
|
|
||||||
|
Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Title` | *string* | :heavy_check_mark: | The title of the item (e.g. “300” or “The Simpsons”) | |
|
||||||
|
| `Type` | *string* | :heavy_check_mark: | The type of the video item, such as `movie`, `episode`, or `clip`. | |
|
||||||
|
| `AbsoluteIndex` | **int* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | |
|
||||||
|
| `AddedAt` | *int64* | :heavy_check_mark: | In units of seconds since the epoch, returns the time at which the item was added to the library. | |
|
||||||
|
| `Art` | **string* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | /library/metadata/58683/art/1703239236 |
|
||||||
|
| `AudienceRating` | **float32* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | |
|
||||||
|
| `AudienceRatingImage` | **string* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | |
|
||||||
|
| `Autotag` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Banner` | **string* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | |
|
||||||
|
| `ChapterSource` | **string* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | media |
|
||||||
|
| `ChildCount` | **int* | :heavy_minus_sign: | The number of child items associated with this media item. | 1 |
|
||||||
|
| `Composite` | **string* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | |
|
||||||
|
| `ContentRating` | **string* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | |
|
||||||
|
| `Country` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Director` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Duration` | **int* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | |
|
||||||
|
| `Filter` | [][components.Filter](../../models/components/filter.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | |
|
||||||
|
| `Genre` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `GrandparentArt` | **string* | :heavy_minus_sign: | The `art` of the grandparent | |
|
||||||
|
| `GrandparentGUID` | **string* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 |
|
||||||
|
| `GrandparentHero` | **string* | :heavy_minus_sign: | The `hero` of the grandparent | |
|
||||||
|
| `GrandparentKey` | **string* | :heavy_minus_sign: | The `key` of the grandparent | |
|
||||||
|
| `GrandparentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the grandparent | |
|
||||||
|
| `GrandparentTheme` | **string* | :heavy_minus_sign: | The `theme` of the grandparent | |
|
||||||
|
| `GrandparentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the grandparent | |
|
||||||
|
| `GrandparentTitle` | **string* | :heavy_minus_sign: | The `title` of the grandparent | |
|
||||||
|
| `GUID` | **string* | :heavy_minus_sign: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 |
|
||||||
|
| `Guids` | [][components.MediaContainerWithDecisionGuids](../../models/components/mediacontainerwithdecisionguids.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Hero` | **string* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | |
|
||||||
|
| `Image` | [][components.Image](../../models/components/image.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Index` | **int* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | |
|
||||||
|
| `Key` | *string* | :heavy_check_mark: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | |
|
||||||
|
| `LastViewedAt` | **int64* | :heavy_minus_sign: | N/A | 1556281940 |
|
||||||
|
| `LeafCount` | **int* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | |
|
||||||
|
| `Media` | [][components.MediaContainerWithDecisionMedia](../../models/components/mediacontainerwithdecisionmedia.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `OriginallyAvailableAt` | [*types.Date](../../types/date.md) | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | 2022-12-14 |
|
||||||
|
| `OriginalTitle` | **string* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | |
|
||||||
|
| `ParentGUID` | **string* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 |
|
||||||
|
| `ParentHero` | **string* | :heavy_minus_sign: | The `hero` of the parent | |
|
||||||
|
| `ParentIndex` | **int* | :heavy_minus_sign: | The `index` of the parent | |
|
||||||
|
| `ParentKey` | **string* | :heavy_minus_sign: | The `key` of the parent | |
|
||||||
|
| `ParentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the parent | |
|
||||||
|
| `ParentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the parent | |
|
||||||
|
| `ParentTitle` | **string* | :heavy_minus_sign: | The `title` of the parent | |
|
||||||
|
| `PrimaryExtraKey` | **string* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | |
|
||||||
|
| `Prompt` | **string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | |
|
||||||
|
| `Rating` | **float32* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | |
|
||||||
|
| `RatingArray` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `RatingCount` | **int* | :heavy_minus_sign: | Number of ratings under this metadata | |
|
||||||
|
| `RatingImage` | **string* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | |
|
||||||
|
| `RatingKey` | **string* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | |
|
||||||
|
| `Role` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Search` | **bool* | :heavy_minus_sign: | Indicates this is a search directory | |
|
||||||
|
| `Secondary` | **bool* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | |
|
||||||
|
| `SkipChildren` | **bool* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | |
|
||||||
|
| `SkipParent` | **bool* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | |
|
||||||
|
| `Sort` | [][components.Sort](../../models/components/sort.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | |
|
||||||
|
| `Studio` | **string* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | |
|
||||||
|
| `Subtype` | **string* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | |
|
||||||
|
| `Summary` | **string* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | |
|
||||||
|
| `Tagline` | **string* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | |
|
||||||
|
| `Theme` | **string* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | /library/metadata/1/theme/1705636920 |
|
||||||
|
| `Thumb` | **string* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | /library/metadata/58683/thumb/1703239236 |
|
||||||
|
| `TitleSort` | **string* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | |
|
||||||
|
| `UpdatedAt` | **int64* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | |
|
||||||
|
| `UserRating` | **float32* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | |
|
||||||
|
| `ViewCount` | **int* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | |
|
||||||
|
| `ViewedLeafCount` | **int* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | |
|
||||||
|
| `ViewOffset` | **int* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | |
|
||||||
|
| `Writer` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Year` | **int* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | |
|
||||||
|
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |
|
||||||
27
docs/models/components/mediacontainerwithdecisionpart.md
Normal file
27
docs/models/components/mediacontainerwithdecisionpart.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# MediaContainerWithDecisionPart
|
||||||
|
|
||||||
|
`Part` represents a particular file or "part" of a media item. The part is the playable unit of the media hierarchy. Suppose that a movie library contains a movie that is broken up into files, reminiscent of a movie split across two BDs. The metadata item represents information about the movie, the media item represents this instance of the movie at this resolution and quality, and the part items represent the two playable files. If another media were added which contained the joining of these two parts transcoded down to a lower resolution, then this metadata would contain 2 medias, one with 2 parts and one with 1 part.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `Accessible` | **bool* | :heavy_minus_sign: | Indicates if the part is accessible. | true |
|
||||||
|
| `AudioProfile` | **string* | :heavy_minus_sign: | N/A | lc |
|
||||||
|
| `Container` | **string* | :heavy_minus_sign: | The container of the media file, such as `mp4` or `mkv` | mov |
|
||||||
|
| `Duration` | **int* | :heavy_minus_sign: | The duration of the media item, in milliseconds | 150192 |
|
||||||
|
| `Exists` | **bool* | :heavy_minus_sign: | Indicates if the part exists. | true |
|
||||||
|
| `File` | **string* | :heavy_minus_sign: | The local file path at which the part is stored on the server | /home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov |
|
||||||
|
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||||
|
| `ID` | *int64* | :heavy_check_mark: | N/A | 1 |
|
||||||
|
| `Indexes` | **string* | :heavy_minus_sign: | N/A | sd |
|
||||||
|
| `Key` | *string* | :heavy_check_mark: | The key from which the media can be streamed | /library/parts/1/1531779263/file.mov |
|
||||||
|
| `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | The size of the media, in bytes | 105355654 |
|
||||||
|
| `Stream` | [][components.MediaContainerWithDecisionStream](../../models/components/mediacontainerwithdecisionstream.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main |
|
||||||
|
| `Decision` | [*components.Decision](../../models/components/decision.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Selected` | **bool* | :heavy_minus_sign: | N/A | |
|
||||||
|
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |
|
||||||
65
docs/models/components/mediacontainerwithdecisionstream.md
Normal file
65
docs/models/components/mediacontainerwithdecisionstream.md
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
# MediaContainerWithDecisionStream
|
||||||
|
|
||||||
|
`Stream` represents a particular stream from a media item, such as the video stream, audio stream, or subtitle stream. The stream may either be part of the file represented by the parent `Part` or, especially for subtitles, an external file. The stream contains more detailed information about the specific stream. For example, a video may include the `aspectRatio` at the `Media` level, but detailed information about the video stream like the color space will be included on the `Stream` for the video stream. Note that photos do not have streams (mostly as an optimization).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Default` | **bool* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
||||||
|
| `AudioChannelLayout` | **string* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) |
|
||||||
|
| `Channels` | **int* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 |
|
||||||
|
| `BitDepth` | **int* | :heavy_minus_sign: | Bit depth of the video stream. | 10 |
|
||||||
|
| `DOVIBLCompatID` | **int* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 |
|
||||||
|
| `DOVIBLPresent` | **bool* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true |
|
||||||
|
| `DOVIELPresent` | **bool* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false |
|
||||||
|
| `DOVILevel` | **int* | :heavy_minus_sign: | Dolby Vision level. | 6 |
|
||||||
|
| `DOVIPresent` | **bool* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true |
|
||||||
|
| `DOVIProfile` | **int* | :heavy_minus_sign: | Dolby Vision profile. | 8 |
|
||||||
|
| `DOVIRPUPresent` | **bool* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true |
|
||||||
|
| `DOVIVersion` | **string* | :heavy_minus_sign: | Dolby Vision version. | 1.0 |
|
||||||
|
| `Bitrate` | **int* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
||||||
|
| `CanAutoSync` | **bool* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false |
|
||||||
|
| `ChromaLocation` | **string* | :heavy_minus_sign: | Chroma sample location. | topleft |
|
||||||
|
| `ChromaSubsampling` | **string* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 |
|
||||||
|
| `CodedHeight` | **int* | :heavy_minus_sign: | Coded video height. | 1608 |
|
||||||
|
| `CodedWidth` | **int* | :heavy_minus_sign: | Coded video width. | 3840 |
|
||||||
|
| `ClosedCaptions` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `Codec` | *string* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
||||||
|
| `ColorPrimaries` | **string* | :heavy_minus_sign: | Color primaries used. | bt2020 |
|
||||||
|
| `ColorRange` | **string* | :heavy_minus_sign: | Color range (e.g., tv). | tv |
|
||||||
|
| `ColorSpace` | **string* | :heavy_minus_sign: | Color space. | bt2020nc |
|
||||||
|
| `ColorTrc` | **string* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
||||||
|
| `DisplayTitle` | *string* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||||
|
| `ExtendedDisplayTitle` | **string* | :heavy_minus_sign: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||||
|
| `FrameRate` | **float32* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
||||||
|
| `HasScalingMatrix` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||||
|
| `Height` | **int* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
||||||
|
| `ID` | *int* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
||||||
|
| `Index` | **int* | :heavy_minus_sign: | Index of the stream. | 0 |
|
||||||
|
| `Key` | *string* | :heavy_check_mark: | Key to access this stream part. | /library/streams/216389 |
|
||||||
|
| `Language` | **string* | :heavy_minus_sign: | Language of the stream. | English |
|
||||||
|
| `LanguageCode` | **string* | :heavy_minus_sign: | ISO language code. | eng |
|
||||||
|
| `LanguageTag` | **string* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
||||||
|
| `Format` | **string* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt |
|
||||||
|
| `HeaderCompression` | **bool* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true |
|
||||||
|
| `Level` | **int* | :heavy_minus_sign: | Video level. | 150 |
|
||||||
|
| `Original` | **bool* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
||||||
|
| `Profile` | **string* | :heavy_minus_sign: | Video profile. | main 10 |
|
||||||
|
| `RefFrames` | **int* | :heavy_minus_sign: | Number of reference frames. | 1 |
|
||||||
|
| `SamplingRate` | **int* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 |
|
||||||
|
| `ScanType` | **string* | :heavy_minus_sign: | N/A | progressive |
|
||||||
|
| `EmbeddedInVideo` | **string* | :heavy_minus_sign: | N/A | progressive |
|
||||||
|
| `Selected` | **bool* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true |
|
||||||
|
| `Forced` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `HearingImpaired` | **bool* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true |
|
||||||
|
| `Dub` | **bool* | :heavy_minus_sign: | Indicates if the stream is a dub. | true |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH |
|
||||||
|
| `StreamIdentifier` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||||
|
| `StreamType` | *int64* | :heavy_check_mark: | Stream type:<br/> - VIDEO = 1<br/> - AUDIO = 2<br/> - SUBTITLE = 3<br/> | |
|
||||||
|
| `Width` | **int* | :heavy_minus_sign: | Width of the video stream. | 3840 |
|
||||||
|
| `Decision` | [*components.MediaContainerWithDecisionDecision](../../models/components/mediacontainerwithdecisiondecision.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Location` | [*components.MediaContainerWithDecisionLocation](../../models/components/mediacontainerwithdecisionlocation.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |
|
||||||
8
docs/models/components/mediacontainerwithdevice.md
Normal file
8
docs/models/components/mediacontainerwithdevice.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# MediaContainerWithDevice
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.MediaContainerWithDeviceMediaContainer](../../models/components/mediacontainerwithdevicemediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
20
docs/models/components/mediacontainerwithdevicedevice.md
Normal file
20
docs/models/components/mediacontainerwithdevicedevice.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# MediaContainerWithDeviceDevice
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
||||||
|
| `ChannelMapping` | [][components.ChannelMapping](../../models/components/channelmapping.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `LastSeenAt` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Make` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Model` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `ModelNumber` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Protocol` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Sources` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `State` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Status` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Tuners` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `URI` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `UUID` | **string* | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# MediaContainerWithDeviceMediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `Device` | [][components.MediaContainerWithDeviceDevice](../../models/components/mediacontainerwithdevicedevice.md) | :heavy_minus_sign: | N/A |
|
||||||
8
docs/models/components/mediacontainerwithdirectory.md
Normal file
8
docs/models/components/mediacontainerwithdirectory.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# MediaContainerWithDirectory
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.MediaContainerWithDirectoryMediaContainer](../../models/components/mediacontainerwithdirectorymediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# MediaContainerWithDirectoryMediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `Directory` | [][components.Directory](../../models/components/directory.md) | :heavy_minus_sign: | N/A |
|
||||||
10
docs/models/components/mediacontainerwithhubs.md
Normal file
10
docs/models/components/mediacontainerwithhubs.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# MediaContainerWithHubs
|
||||||
|
|
||||||
|
OK
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.MediaContainerWithHubsMediaContainer](../../models/components/mediacontainerwithhubsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# MediaContainerWithHubsMediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `Hub` | [][components.Hub](../../models/components/hub.md) | :heavy_minus_sign: | N/A |
|
||||||
8
docs/models/components/mediacontainerwithlineup.md
Normal file
8
docs/models/components/mediacontainerwithlineup.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# MediaContainerWithLineup
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.MediaContainerWithLineupMediaContainer](../../models/components/mediacontainerwithlineupmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# MediaContainerWithLineupMediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `Lineup` | [][components.Lineup](../../models/components/lineup.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `UUID` | **string* | :heavy_minus_sign: | The UUID of this set lineups |
|
||||||
8
docs/models/components/mediacontainerwithmetadata.md
Normal file
8
docs/models/components/mediacontainerwithmetadata.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# MediaContainerWithMetadata
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.MediaContainerWithMetadataMediaContainer](../../models/components/mediacontainerwithmetadatamediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# MediaContainerWithMetadataMediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `Metadata` | [][components.Metadata](../../models/components/metadata.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# MediaContainerWithNestedMetadata
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.MediaContainerWithNestedMetadataMediaContainer](../../models/components/mediacontainerwithnestedmetadatamediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# MediaContainerWithNestedMetadataGuids
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `ID` | *string* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://<br/> | {<br/>"imdbExample": {<br/>"summary": "IMDB example",<br/>"value": "imdb://tt13015952"<br/>},<br/>"tmdbExample": {<br/>"summary": "TMDB example",<br/>"value": "tmdb://2434012"<br/>},<br/>"tvdbExample": {<br/>"summary": "TVDB example",<br/>"value": "tvdb://7945991"<br/>}<br/>} |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# MediaContainerWithNestedMetadataMediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `MetadataItem` | [][components.MetadataItem](../../models/components/metadataitem.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# MediaContainerWithPlaylistMetadata
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.MediaContainerWithPlaylistMetadataMediaContainer](../../models/components/mediacontainerwithplaylistmetadatamediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# MediaContainerWithPlaylistMetadataGuids
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `ID` | *string* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://<br/> | {<br/>"imdbExample": {<br/>"summary": "IMDB example",<br/>"value": "imdb://tt13015952"<br/>},<br/>"tmdbExample": {<br/>"summary": "TMDB example",<br/>"value": "tmdb://2434012"<br/>},<br/>"tvdbExample": {<br/>"summary": "TVDB example",<br/>"value": "tvdb://7945991"<br/>}<br/>} |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# MediaContainerWithPlaylistMetadataMediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `Metadata` | [][components.MediaContainerWithPlaylistMetadataMetadata](../../models/components/mediacontainerwithplaylistmetadatametadata.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
# MediaContainerWithPlaylistMetadataMetadata
|
||||||
|
|
||||||
|
Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
|
||||||
|
|
||||||
|
Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
|
||||||
|
|
||||||
|
Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `ReadOnly` | **bool* | :heavy_minus_sign: | If we return this as true then this playlist cannot be altered or deleted directly by the client. | |
|
||||||
|
| `Composite` | **string* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | |
|
||||||
|
| `Duration` | **int* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | |
|
||||||
|
| `Key` | *string* | :heavy_check_mark: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | |
|
||||||
|
| `LeafCount` | **int* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | |
|
||||||
|
| `PlaylistType` | [*components.PlaylistType](../../models/components/playlisttype.md) | :heavy_minus_sign: | The type of the playlist. | |
|
||||||
|
| `Smart` | **bool* | :heavy_minus_sign: | Whether or not the playlist is smart. | |
|
||||||
|
| `SpecialPlaylistType` | **string* | :heavy_minus_sign: | If this is a special playlist, this returns its type (e.g. favorites). | |
|
||||||
|
| `Title` | *string* | :heavy_check_mark: | The title of the item (e.g. “300” or “The Simpsons”) | |
|
||||||
|
| `Type` | *string* | :heavy_check_mark: | The type of the video item, such as `movie`, `episode`, or `clip`. | |
|
||||||
|
| `AbsoluteIndex` | **int* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | |
|
||||||
|
| `AddedAt` | *int64* | :heavy_check_mark: | In units of seconds since the epoch, returns the time at which the item was added to the library. | |
|
||||||
|
| `Art` | **string* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | /library/metadata/58683/art/1703239236 |
|
||||||
|
| `AudienceRating` | **float32* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | |
|
||||||
|
| `AudienceRatingImage` | **string* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | |
|
||||||
|
| `Autotag` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Banner` | **string* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | |
|
||||||
|
| `ChapterSource` | **string* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | media |
|
||||||
|
| `ChildCount` | **int* | :heavy_minus_sign: | The number of child items associated with this media item. | 1 |
|
||||||
|
| `ContentRating` | **string* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | |
|
||||||
|
| `Country` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Director` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Filter` | [][components.Filter](../../models/components/filter.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | |
|
||||||
|
| `Genre` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `GrandparentArt` | **string* | :heavy_minus_sign: | The `art` of the grandparent | |
|
||||||
|
| `GrandparentGUID` | **string* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 |
|
||||||
|
| `GrandparentHero` | **string* | :heavy_minus_sign: | The `hero` of the grandparent | |
|
||||||
|
| `GrandparentKey` | **string* | :heavy_minus_sign: | The `key` of the grandparent | |
|
||||||
|
| `GrandparentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the grandparent | |
|
||||||
|
| `GrandparentTheme` | **string* | :heavy_minus_sign: | The `theme` of the grandparent | |
|
||||||
|
| `GrandparentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the grandparent | |
|
||||||
|
| `GrandparentTitle` | **string* | :heavy_minus_sign: | The `title` of the grandparent | |
|
||||||
|
| `GUID` | **string* | :heavy_minus_sign: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 |
|
||||||
|
| `Guids` | [][components.MediaContainerWithPlaylistMetadataGuids](../../models/components/mediacontainerwithplaylistmetadataguids.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Hero` | **string* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | |
|
||||||
|
| `Image` | [][components.Image](../../models/components/image.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Index` | **int* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | |
|
||||||
|
| `LastViewedAt` | **int64* | :heavy_minus_sign: | N/A | 1556281940 |
|
||||||
|
| `Media` | [][components.Media](../../models/components/media.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `OriginallyAvailableAt` | [*types.Date](../../types/date.md) | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | 2022-12-14 |
|
||||||
|
| `OriginalTitle` | **string* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | |
|
||||||
|
| `ParentGUID` | **string* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 |
|
||||||
|
| `ParentHero` | **string* | :heavy_minus_sign: | The `hero` of the parent | |
|
||||||
|
| `ParentIndex` | **int* | :heavy_minus_sign: | The `index` of the parent | |
|
||||||
|
| `ParentKey` | **string* | :heavy_minus_sign: | The `key` of the parent | |
|
||||||
|
| `ParentRatingKey` | **string* | :heavy_minus_sign: | The `ratingKey` of the parent | |
|
||||||
|
| `ParentThumb` | **string* | :heavy_minus_sign: | The `thumb` of the parent | |
|
||||||
|
| `ParentTitle` | **string* | :heavy_minus_sign: | The `title` of the parent | |
|
||||||
|
| `PrimaryExtraKey` | **string* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | |
|
||||||
|
| `Prompt` | **string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | |
|
||||||
|
| `Rating` | **float32* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | |
|
||||||
|
| `RatingArray` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `RatingCount` | **int* | :heavy_minus_sign: | Number of ratings under this metadata | |
|
||||||
|
| `RatingImage` | **string* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | |
|
||||||
|
| `RatingKey` | **string* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | |
|
||||||
|
| `Role` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Search` | **bool* | :heavy_minus_sign: | Indicates this is a search directory | |
|
||||||
|
| `Secondary` | **bool* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | |
|
||||||
|
| `SkipChildren` | **bool* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | |
|
||||||
|
| `SkipParent` | **bool* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | |
|
||||||
|
| `Sort` | [][components.Sort](../../models/components/sort.md) | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | |
|
||||||
|
| `Studio` | **string* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | |
|
||||||
|
| `Subtype` | **string* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | |
|
||||||
|
| `Summary` | **string* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | |
|
||||||
|
| `Tagline` | **string* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | |
|
||||||
|
| `Theme` | **string* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | /library/metadata/1/theme/1705636920 |
|
||||||
|
| `Thumb` | **string* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | /library/metadata/58683/thumb/1703239236 |
|
||||||
|
| `TitleSort` | **string* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | |
|
||||||
|
| `UpdatedAt` | **int64* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | |
|
||||||
|
| `UserRating` | **float32* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | |
|
||||||
|
| `ViewCount` | **int* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | |
|
||||||
|
| `ViewedLeafCount` | **int* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | |
|
||||||
|
| `ViewOffset` | **int* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | |
|
||||||
|
| `Writer` | [][components.Tag](../../models/components/tag.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Year` | **int* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | |
|
||||||
|
| `AdditionalProperties` | map[string]*any* | :heavy_minus_sign: | N/A | |
|
||||||
8
docs/models/components/mediacontainerwithsettings.md
Normal file
8
docs/models/components/mediacontainerwithsettings.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# MediaContainerWithSettings
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.MediaContainerWithSettingsMediaContainer](../../models/components/mediacontainerwithsettingsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# MediaContainerWithSettingsMediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `Setting` | [][components.Setting](../../models/components/setting.md) | :heavy_minus_sign: | N/A |
|
||||||
8
docs/models/components/mediacontainerwithsubscription.md
Normal file
8
docs/models/components/mediacontainerwithsubscription.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# MediaContainerWithSubscription
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*components.MediaContainerWithSubscriptionMediaContainer](../../models/components/mediacontainerwithsubscriptionmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# MediaContainerWithSubscriptionMediaContainer
|
||||||
|
|
||||||
|
`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
|
||||||
|
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
|
||||||
|
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A |
|
||||||
|
| `Offset` | **int64* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | N/A |
|
||||||
|
| `TotalSize` | **int64* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/> |
|
||||||
|
| `MediaSubscription` | [][components.MediaSubscription](../../models/components/mediasubscription.md) | :heavy_minus_sign: | N/A |
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user