mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 12:37:46 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b882120dd | ||
|
|
673a771f04 | ||
|
|
216a94fe7d | ||
|
|
88d690ffc2 | ||
|
|
48a739d923 | ||
|
|
8b50020e1e | ||
|
|
4bcd080211 | ||
|
|
2e0f3b64ea |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,2 +1,5 @@
|
|||||||
|
.DS_Store
|
||||||
|
**/.speakeasy/temp/
|
||||||
|
**/.speakeasy/logs/
|
||||||
.speakeasy/reports
|
.speakeasy/reports
|
||||||
# .gitignore
|
# .gitignore
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -11,11 +11,12 @@ generation:
|
|||||||
parameterOrderingFeb2024: true
|
parameterOrderingFeb2024: true
|
||||||
requestResponseComponentNamesFeb2024: true
|
requestResponseComponentNamesFeb2024: true
|
||||||
securityFeb2025: false
|
securityFeb2025: false
|
||||||
|
sharedErrorComponentsApr2025: false
|
||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: true
|
oAuth2ClientCredentialsEnabled: true
|
||||||
oAuth2PasswordEnabled: false
|
oAuth2PasswordEnabled: false
|
||||||
go:
|
go:
|
||||||
version: 0.19.2
|
version: 0.21.1
|
||||||
additionalDependencies: {}
|
additionalDependencies: {}
|
||||||
allowUnknownFieldsInWeakUnions: false
|
allowUnknownFieldsInWeakUnions: false
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
speakeasyVersion: 1.513.4
|
speakeasyVersion: 1.542.0
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
my-source:
|
||||||
sourceNamespace: my-source
|
sourceNamespace: my-source
|
||||||
@@ -9,19 +9,19 @@ sources:
|
|||||||
- main
|
- main
|
||||||
plexapi:
|
plexapi:
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:2066ba94b55e21d651c79003e3cf402fb77c52a0969fc52310b3383fbed038f4
|
sourceRevisionDigest: sha256:31ab7b2e65ccf1e0349bcd8b35791d1ce80091313481874749163fc0c80fd8ed
|
||||||
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
|
sourceBlobDigest: sha256:d971fff9723c626fe70403a2a83d813c396a20b06ccd6b899263762038cfdbb0
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- speakeasy-sdk-regen-1741565327
|
- speakeasy-sdk-regen-1746144629
|
||||||
targets:
|
targets:
|
||||||
plexgo:
|
plexgo:
|
||||||
source: plexapi
|
source: plexapi
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:2066ba94b55e21d651c79003e3cf402fb77c52a0969fc52310b3383fbed038f4
|
sourceRevisionDigest: sha256:31ab7b2e65ccf1e0349bcd8b35791d1ce80091313481874749163fc0c80fd8ed
|
||||||
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
|
sourceBlobDigest: sha256:d971fff9723c626fe70403a2a83d813c396a20b06ccd6b899263762038cfdbb0
|
||||||
codeSamplesNamespace: code-samples-go-plexgo
|
codeSamplesNamespace: code-samples-go-plexgo
|
||||||
codeSamplesRevisionDigest: sha256:1c039b4b936c2e504fdce037068ca992efeb22b94f6fc013db92ed1923c0bc33
|
codeSamplesRevisionDigest: sha256:97f93f583a41a36f02cac7fe2eefd6ec836588f71204c75d400621ee85326974
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: latest
|
speakeasyVersion: latest
|
||||||
@@ -37,3 +37,5 @@ workflow:
|
|||||||
output: codeSamples.yaml
|
output: codeSamples.yaml
|
||||||
registry:
|
registry:
|
||||||
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-go-plexgo
|
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-go-plexgo
|
||||||
|
labelOverride:
|
||||||
|
fixedValue: PlexGO
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ targets:
|
|||||||
output: codeSamples.yaml
|
output: codeSamples.yaml
|
||||||
registry:
|
registry:
|
||||||
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-go-plexgo
|
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-go-plexgo
|
||||||
|
labelOverride:
|
||||||
|
fixedValue: PlexGO
|
||||||
|
|||||||
@@ -150,6 +150,10 @@ func main() {
|
|||||||
* [GetActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media
|
* [GetActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media
|
||||||
* [GetSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
|
* [GetSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
|
||||||
* [GetMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata
|
* [GetMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata
|
||||||
|
* [GetMediaArts](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork
|
||||||
|
* [PostMediaArts](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork
|
||||||
|
* [GetMediaPosters](docs/sdks/library/README.md#getmediaposters) - Get Media Posters
|
||||||
|
* [PostMediaPoster](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster
|
||||||
* [GetMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
* [GetMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
||||||
* [GetTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
* [GetTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
||||||
|
|
||||||
|
|||||||
70
RELEASES.md
70
RELEASES.md
@@ -1073,3 +1073,73 @@ Based on:
|
|||||||
- [go v0.19.2] .
|
- [go v0.19.2] .
|
||||||
### Releases
|
### Releases
|
||||||
- [Go v0.19.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.19.2 - .
|
- [Go v0.19.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.19.2 - .
|
||||||
|
|
||||||
|
## 2025-03-31 17:29:50
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.526.6 (2.563.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.19.3] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.19.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.19.3 - .
|
||||||
|
|
||||||
|
## 2025-04-03 21:55:33
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.528.1 (2.565.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.20.0] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.20.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.20.0 - .
|
||||||
|
|
||||||
|
## 2025-04-07 00:10:20
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.529.1 (2.566.5) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.20.1] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.20.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.20.1 - .
|
||||||
|
|
||||||
|
## 2025-04-15 00:10:03
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.531.4 (2.570.4) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.20.2] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.20.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.20.2 - .
|
||||||
|
|
||||||
|
## 2025-04-18 22:59:48
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.535.1 (2.585.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.20.3] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.20.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.20.3 - .
|
||||||
|
|
||||||
|
## 2025-04-19 17:12:25
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.535.1 (2.585.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.21.0] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.21.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.21.0 - .
|
||||||
|
|
||||||
|
## 2025-05-02 00:10:13
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.542.0 (2.596.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.21.1] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.21.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.21.1 - .
|
||||||
276
codeSamples.yaml
276
codeSamples.yaml
@@ -7,7 +7,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getServerCapabilities
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getServerPreferences
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: updatePlayProgress
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: markPlayed
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getTimeline
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: markUnplayed
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getServerActivities
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: cancelServerActivities
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: stopAllTasks
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getButlerTasks
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -309,7 +309,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: startAllTasks
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -338,7 +338,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: stopTask
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -368,7 +368,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: startTask
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -398,7 +398,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getAvailableClients
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -427,7 +427,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getCompanionsData
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -456,7 +456,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getDevices
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -485,7 +485,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getUserFriends
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -514,7 +514,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getGeoData
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -541,7 +541,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getHomeData
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -570,7 +570,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getGlobalHubs
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -599,7 +599,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-recently-added
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -633,7 +633,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: performSearch
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -662,7 +662,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: performVoiceSearch
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -691,7 +691,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getLibraryHubs
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -720,7 +720,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-server-identity
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -747,7 +747,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getTopWatchedContent
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -777,7 +777,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getFileHash
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -806,7 +806,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-media-meta-data
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -847,11 +847,69 @@ actions:
|
|||||||
// handle response
|
// handle response
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
- target: $["paths"]["/library/metadata/{ratingKey}/arts"]["get"]
|
||||||
|
update:
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: go
|
||||||
|
label: PlexGO
|
||||||
|
source: |-
|
||||||
|
package main
|
||||||
|
|
||||||
|
import(
|
||||||
|
"context"
|
||||||
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"log"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
ctx := context.Background()
|
||||||
|
|
||||||
|
s := plexgo.New(
|
||||||
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
|
)
|
||||||
|
|
||||||
|
res, err := s.Library.GetMediaArts(ctx, 16099)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
if res.Object != nil {
|
||||||
|
// handle response
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- target: $["paths"]["/library/metadata/{ratingKey}/arts"]["post"]
|
||||||
|
update:
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: go
|
||||||
|
label: PlexGO
|
||||||
|
source: |-
|
||||||
|
package main
|
||||||
|
|
||||||
|
import(
|
||||||
|
"context"
|
||||||
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"log"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
ctx := context.Background()
|
||||||
|
|
||||||
|
s := plexgo.New(
|
||||||
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
|
)
|
||||||
|
|
||||||
|
res, err := s.Library.PostMediaArts(ctx, 2268, plexgo.String("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"), nil)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
if res != nil {
|
||||||
|
// handle response
|
||||||
|
}
|
||||||
|
}
|
||||||
- target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"]
|
- target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"]
|
||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-banner-image
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -888,7 +946,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getMetadataChildren
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -913,11 +971,69 @@ actions:
|
|||||||
// handle response
|
// handle response
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
- target: $["paths"]["/library/metadata/{ratingKey}/posters"]["get"]
|
||||||
|
update:
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: go
|
||||||
|
label: PlexGO
|
||||||
|
source: |-
|
||||||
|
package main
|
||||||
|
|
||||||
|
import(
|
||||||
|
"context"
|
||||||
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"log"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
ctx := context.Background()
|
||||||
|
|
||||||
|
s := plexgo.New(
|
||||||
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
|
)
|
||||||
|
|
||||||
|
res, err := s.Library.GetMediaPosters(ctx, 16099)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
if res.Object != nil {
|
||||||
|
// handle response
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- target: $["paths"]["/library/metadata/{ratingKey}/posters"]["post"]
|
||||||
|
update:
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: go
|
||||||
|
label: PlexGO
|
||||||
|
source: |-
|
||||||
|
package main
|
||||||
|
|
||||||
|
import(
|
||||||
|
"context"
|
||||||
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"log"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
ctx := context.Background()
|
||||||
|
|
||||||
|
s := plexgo.New(
|
||||||
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
|
)
|
||||||
|
|
||||||
|
res, err := s.Library.PostMediaPoster(ctx, 2268, plexgo.String("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"), nil)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
if res != nil {
|
||||||
|
// handle response
|
||||||
|
}
|
||||||
|
}
|
||||||
- target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"]
|
- target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"]
|
||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-thumb-image
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -954,7 +1070,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-recently-added-library
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1002,7 +1118,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-search-all-libraries
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1038,7 +1154,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-all-libraries
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1067,7 +1183,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-watch-list
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1100,7 +1216,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: deleteLibrary
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1129,7 +1245,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-library-details
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1158,7 +1274,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-actors-library
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1188,7 +1304,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-all-media-library
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1221,7 +1337,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-countries-library
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1251,7 +1367,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-genres-library
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1281,7 +1397,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-refresh-library-metadata
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1311,7 +1427,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-search-library
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1341,7 +1457,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-library-items
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1375,7 +1491,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: logLine
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1405,7 +1521,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: logMultiLine
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1436,7 +1552,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: enablePaperTrail
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1465,7 +1581,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-media-providers
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1494,7 +1610,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getMyPlexAccount
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1523,7 +1639,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getResizedPhoto
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1561,7 +1677,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getPin
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1595,7 +1711,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getTokenByPinId
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1630,7 +1746,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getPlaylists
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1659,7 +1775,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: createPlaylist
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1694,7 +1810,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: uploadPlaylist
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1724,7 +1840,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: deletePlaylist
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1753,7 +1869,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getPlaylist
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1782,7 +1898,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: updatePlaylist
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1811,7 +1927,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: clearPlaylistContents
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1840,7 +1956,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getPlaylistContents
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1870,7 +1986,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: addPlaylistContents
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1899,7 +2015,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-server-resources
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1928,7 +2044,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getSearchResults
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1957,7 +2073,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getSourceConnectionInformation
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1986,7 +2102,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getTransientToken
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2016,7 +2132,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getServerList
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2045,7 +2161,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getBandwidthStatistics
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2074,7 +2190,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getStatistics
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2103,7 +2219,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getResourcesStatistics
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2132,7 +2248,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getSessions
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2161,7 +2277,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getSessionHistory
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2191,7 +2307,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getTranscodeSessions
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2220,7 +2336,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: stopTranscodeSession
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2249,7 +2365,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: applyUpdates
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2279,7 +2395,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: checkForUpdates
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2309,7 +2425,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getUpdateStatus
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2338,7 +2454,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: getTokenDetails
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2367,7 +2483,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: get-users
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2409,7 +2525,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: post-users-sign-in-data
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -2448,7 +2564,7 @@ actions:
|
|||||||
update:
|
update:
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: go
|
- lang: go
|
||||||
label: startUniversalTranscode
|
label: PlexGO
|
||||||
source: |-
|
source: |-
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
11
docs/models/operations/attributes.md
Normal file
11
docs/models/operations/attributes.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Attributes
|
||||||
|
|
||||||
|
Attributes associated with the marker.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
|
||||||
|
| `ID` | *int64* | :heavy_check_mark: | The identifier for the attributes. | 306970 |
|
||||||
|
| `Version` | **int64* | :heavy_minus_sign: | The version number of the marker attributes. | 4 |
|
||||||
15
docs/models/operations/chapter.md
Normal file
15
docs/models/operations/chapter.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Chapter
|
||||||
|
|
||||||
|
The thumbnail for the chapter
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
|
||||||
|
| `ID` | *int64* | :heavy_check_mark: | N/A | 4 |
|
||||||
|
| `Filter` | *string* | :heavy_check_mark: | N/A | thumb=4 |
|
||||||
|
| `Index` | *int64* | :heavy_check_mark: | N/A | 1 |
|
||||||
|
| `StartTimeOffset` | *int64* | :heavy_check_mark: | N/A | 0 |
|
||||||
|
| `EndTimeOffset` | *int64* | :heavy_check_mark: | N/A | 100100 |
|
||||||
|
| `Thumb` | *string* | :heavy_check_mark: | N/A | /library/media/46883/chapterImages/1 |
|
||||||
@@ -7,6 +7,6 @@ The filter query string for country media items.
|
|||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||||
| `ID` | *int64* | :heavy_check_mark: | N/A | 259 |
|
| `ID` | *int* | :heavy_check_mark: | N/A | 259 |
|
||||||
| `Tag` | *string* | :heavy_check_mark: | The country of origin of this media item | United States of America |
|
| `Tag` | *string* | :heavy_check_mark: | The country of origin of this media item | United States of America |
|
||||||
| `Filter` | **string* | :heavy_minus_sign: | N/A | country=19 |
|
| `Filter` | **string* | :heavy_minus_sign: | N/A | country=19 |
|
||||||
8
docs/models/operations/extras.md
Normal file
8
docs/models/operations/extras.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Extras
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- |
|
||||||
|
| `Size` | **int64* | :heavy_minus_sign: | The size of the extras. | 1 |
|
||||||
@@ -4,25 +4,25 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `AllowSync` | *bool* | :heavy_check_mark: | N/A | true |
|
| `AllowSync` | *bool* | :heavy_check_mark: | Indicates whether syncing is allowed. | false |
|
||||||
| `Art` | *string* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg |
|
| `Art` | *string* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg |
|
||||||
| `Composite` | *string* | :heavy_check_mark: | N/A | /library/sections/1/composite/1705615584 |
|
| `Composite` | *string* | :heavy_check_mark: | The relative path to the composite media item. | /library/sections/1/composite/1743824484 |
|
||||||
| `Filters` | *bool* | :heavy_check_mark: | N/A | true |
|
| `Filters` | *bool* | :heavy_check_mark: | UNKNOWN | true |
|
||||||
| `Refreshing` | *bool* | :heavy_check_mark: | N/A | false |
|
| `Refreshing` | *bool* | :heavy_check_mark: | Indicates whether the library is currently being refreshed or updated | true |
|
||||||
| `Thumb` | *string* | :heavy_check_mark: | N/A | /:/resources/movie.png |
|
| `Thumb` | *string* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png |
|
||||||
| `Key` | *string* | :heavy_check_mark: | N/A | 1 |
|
| `Key` | *string* | :heavy_check_mark: | The library key representing the unique identifier | 1 |
|
||||||
| `Type` | *string* | :heavy_check_mark: | N/A | movie |
|
| `Type` | [operations.GetAllLibrariesType](../../models/operations/getalllibrariestype.md) | :heavy_check_mark: | N/A | movie |
|
||||||
| `Title` | *string* | :heavy_check_mark: | N/A | Movies |
|
| `Title` | *string* | :heavy_check_mark: | The title of the library | Movies |
|
||||||
| `Agent` | *string* | :heavy_check_mark: | N/A | tv.plex.agents.movie |
|
| `Agent` | *string* | :heavy_check_mark: | The Plex agent used to match and retrieve media metadata. | tv.plex.agents.movie |
|
||||||
| `Scanner` | *string* | :heavy_check_mark: | N/A | Plex Movie |
|
| `Scanner` | *string* | :heavy_check_mark: | UNKNOWN | Plex Movie |
|
||||||
| `Language` | *string* | :heavy_check_mark: | N/A | en-US |
|
| `Language` | *string* | :heavy_check_mark: | The Plex library language that has been set | en-US |
|
||||||
| `UUID` | *string* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
| `UUID` | *string* | :heavy_check_mark: | The universally unique identifier for the library. | e69655a2-ef48-4aba-bb19-01e7d3cc34d6 |
|
||||||
| `UpdatedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
| `UpdatedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||||
| `CreatedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
| `CreatedAt` | **int64* | :heavy_minus_sign: | N/A | 1556281940 |
|
||||||
| `ScannedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
| `ScannedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||||
| `Content` | *bool* | :heavy_check_mark: | N/A | true |
|
| `Content` | *bool* | :heavy_check_mark: | UNKNOWN | true |
|
||||||
| `Directory` | *bool* | :heavy_check_mark: | N/A | true |
|
| `Directory` | *bool* | :heavy_check_mark: | UNKNOWN | true |
|
||||||
| `ContentChangedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
| `ContentChangedAt` | *int64* | :heavy_check_mark: | Timestamp (in seconds) representing the last time the content was modified.<br/>NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64<br/> | 9173960 |
|
||||||
| `Hidden` | *int* | :heavy_check_mark: | N/A | 0 |
|
| `Hidden` | [*operations.Hidden](../../models/operations/hidden.md) | :heavy_minus_sign: | N/A | 1 |
|
||||||
| `Location` | [][operations.GetAllLibrariesLocation](../../models/operations/getalllibrarieslocation.md) | :heavy_check_mark: | N/A | |
|
| `Location` | [][operations.GetAllLibrariesLocation](../../models/operations/getalllibrarieslocation.md) | :heavy_check_mark: | N/A | |
|
||||||
@@ -4,6 +4,6 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
| --------------------------- | --------------------------- | --------------------------- | --------------------------- | --------------------------- |
|
||||||
| `ID` | *int* | :heavy_check_mark: | N/A | 1 |
|
| `ID` | *int* | :heavy_check_mark: | The ID of the location. | 1 |
|
||||||
| `Path` | *string* | :heavy_check_mark: | N/A | /movies |
|
| `Path` | *string* | :heavy_check_mark: | The path to the media item. | /Movies |
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
||||||
| `Size` | *int* | :heavy_check_mark: | N/A | 5 |
|
| `Size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
|
||||||
| `AllowSync` | *bool* | :heavy_check_mark: | N/A | false |
|
| `AllowSync` | *bool* | :heavy_check_mark: | Indicates whether syncing is allowed. | false |
|
||||||
| `Title1` | *string* | :heavy_check_mark: | N/A | Plex Library |
|
| `Title1` | *string* | :heavy_check_mark: | The primary title of the media container. | TV Series |
|
||||||
| `Directory` | [][operations.GetAllLibrariesDirectory](../../models/operations/getalllibrariesdirectory.md) | :heavy_check_mark: | N/A | |
|
| `Directory` | [][operations.GetAllLibrariesDirectory](../../models/operations/getalllibrariesdirectory.md) | :heavy_minus_sign: | N/A | |
|
||||||
@@ -6,5 +6,5 @@ The libraries available on the Server
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description |
|
||||||
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||||
| `MediaContainer` | [operations.GetAllLibrariesMediaContainer](../../models/operations/getalllibrariesmediacontainer.md) | :heavy_check_mark: | N/A |
|
| `MediaContainer` | [*operations.GetAllLibrariesMediaContainer](../../models/operations/getalllibrariesmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
15
docs/models/operations/getalllibrariestype.md
Normal file
15
docs/models/operations/getalllibrariestype.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# GetAllLibrariesType
|
||||||
|
|
||||||
|
The library type
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------------------------- | ---------------------------- |
|
||||||
|
| `GetAllLibrariesTypeMovie` | movie |
|
||||||
|
| `GetAllLibrariesTypeTvShow` | show |
|
||||||
|
| `GetAllLibrariesTypeSeason` | season |
|
||||||
|
| `GetAllLibrariesTypeEpisode` | episode |
|
||||||
|
| `GetAllLibrariesTypeArtist` | artist |
|
||||||
|
| `GetAllLibrariesTypeAlbum` | album |
|
||||||
@@ -4,12 +4,13 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
||||||
| `ID` | *int64* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
| `ID` | *int64* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
||||||
| `StreamType` | *int* | :heavy_check_mark: | Stream type (1=video, 2=audio, 3=subtitle). | 1 |
|
| `StreamType` | [operations.GetAllMediaLibraryStreamType](../../models/operations/getallmedialibrarystreamtype.md) | :heavy_check_mark: | Stream type:<br/> - 1 = video<br/> - 2 = audio<br/> - 3 = subtitle<br/> | 1 |
|
||||||
|
| `Format` | **string* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt |
|
||||||
| `Default` | **bool* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
| `Default` | **bool* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
||||||
| `Codec` | *string* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
| `Codec` | *string* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
||||||
| `Index` | *int* | :heavy_check_mark: | Index of the stream. | 0 |
|
| `Index` | **int* | :heavy_minus_sign: | Index of the stream. | 0 |
|
||||||
| `Bitrate` | **int* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
| `Bitrate` | **int* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
||||||
| `Language` | **string* | :heavy_minus_sign: | Language of the stream. | English |
|
| `Language` | **string* | :heavy_minus_sign: | Language of the stream. | English |
|
||||||
| `LanguageTag` | **string* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
| `LanguageTag` | **string* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
||||||
@@ -34,6 +35,7 @@
|
|||||||
| `ColorSpace` | **string* | :heavy_minus_sign: | Color space. | bt2020nc |
|
| `ColorSpace` | **string* | :heavy_minus_sign: | Color space. | bt2020nc |
|
||||||
| `ColorTrc` | **string* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
| `ColorTrc` | **string* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
||||||
| `FrameRate` | **float32* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
| `FrameRate` | **float32* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 |
|
||||||
| `Height` | **int* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
| `Height` | **int* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
||||||
| `Level` | **int* | :heavy_minus_sign: | Video level. | 150 |
|
| `Level` | **int* | :heavy_minus_sign: | Video level. | 150 |
|
||||||
| `Original` | **bool* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
| `Original` | **bool* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
||||||
|
|||||||
16
docs/models/operations/getallmedialibrarystreamtype.md
Normal file
16
docs/models/operations/getallmedialibrarystreamtype.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# GetAllMediaLibraryStreamType
|
||||||
|
|
||||||
|
Stream type:
|
||||||
|
- 1 = video
|
||||||
|
- 2 = audio
|
||||||
|
- 3 = subtitle
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| -------------------------------------- | -------------------------------------- |
|
||||||
|
| `GetAllMediaLibraryStreamTypeVideo` | 1 |
|
||||||
|
| `GetAllMediaLibraryStreamTypeAudio` | 2 |
|
||||||
|
| `GetAllMediaLibraryStreamTypeSubtitle` | 3 |
|
||||||
@@ -4,6 +4,6 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `IncludeDetails` | [*operations.IncludeDetails](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
|
| `IncludeDetails` | [*operations.IncludeDetails](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).<br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
|
||||||
| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
|
| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
|
||||||
12
docs/models/operations/getmediaartsmediacontainer.md
Normal file
12
docs/models/operations/getmediaartsmediacontainer.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# GetMediaArtsMediaContainer
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
||||||
|
| `Size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
|
||||||
|
| `MediaTagVersion` | *int64* | :heavy_check_mark: | The version number for media tags. | 1734362201 |
|
||||||
|
| `MediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ |
|
||||||
|
| `Identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library |
|
||||||
|
| `Metadata` | [][operations.GetMediaArtsMetadata](../../models/operations/getmediaartsmetadata.md) | :heavy_check_mark: | N/A | |
|
||||||
12
docs/models/operations/getmediaartsmetadata.md
Normal file
12
docs/models/operations/getmediaartsmetadata.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# GetMediaArtsMetadata
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Key` | *string* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg |
|
||||||
|
| `Provider` | **string* | :heavy_minus_sign: | The provider of the artwork. | tmdb |
|
||||||
|
| `RatingKey` | *string* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg |
|
||||||
|
| `Selected` | *bool* | :heavy_check_mark: | Whether this is the selected artwork. | true |
|
||||||
|
| `Thumb` | *string* | :heavy_check_mark: | The URL of the artwork thumbnail. | https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg |
|
||||||
8
docs/models/operations/getmediaartsrequest.md
Normal file
8
docs/models/operations/getmediaartsrequest.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# GetMediaArtsRequest
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||||
|
| `RatingKey` | *int64* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 |
|
||||||
11
docs/models/operations/getmediaartsresponse.md
Normal file
11
docs/models/operations/getmediaartsresponse.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# GetMediaArtsResponse
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
||||||
|
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||||
|
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||||
|
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||||
|
| `Object` | [*operations.GetMediaArtsResponseBody](../../models/operations/getmediaartsresponsebody.md) | :heavy_minus_sign: | The available background artwork for the library item. |
|
||||||
10
docs/models/operations/getmediaartsresponsebody.md
Normal file
10
docs/models/operations/getmediaartsresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# GetMediaArtsResponseBody
|
||||||
|
|
||||||
|
The available background artwork for the library item.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*operations.GetMediaArtsMediaContainer](../../models/operations/getmediaartsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
# GetMediaMetaDataCountry
|
# GetMediaMetaDataCountry
|
||||||
|
|
||||||
|
The filter query string for country media items.
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||||
| `ID` | *int* | :heavy_check_mark: | The unique country identifier. | 58591 |
|
| `ID` | *int* | :heavy_check_mark: | N/A | 259 |
|
||||||
| `Filter` | *string* | :heavy_check_mark: | The filter string for the country. | country=58591 |
|
| `Tag` | *string* | :heavy_check_mark: | The country of origin of this media item | United States of America |
|
||||||
| `Tag` | *string* | :heavy_check_mark: | The country name. | United States of America |
|
| `Filter` | **string* | :heavy_minus_sign: | N/A | country=19 |
|
||||||
@@ -4,10 +4,9 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||||
| `ID` | *int64* | :heavy_check_mark: | The unique role identifier. | 109501 |
|
| `ID` | *int* | :heavy_check_mark: | Unique identifier for the director. | 126522 |
|
||||||
| `Filter` | *string* | :heavy_check_mark: | The filter string for the role. | actor=109501 |
|
| `Tag` | *string* | :heavy_check_mark: | The role of Director | Danny Boyle |
|
||||||
| `Tag` | *string* | :heavy_check_mark: | The actor's name. | Bob Odenkirk |
|
| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this director. | director=235876 |
|
||||||
| `TagKey` | *string* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 |
|
| `TagKey` | **string* | :heavy_minus_sign: | A unique key associated with the director's tag, used for internal identification. | 5d776831151a60001f24d031 |
|
||||||
| `Role` | **string* | :heavy_minus_sign: | The character name or role. | Jimmy McGill |
|
| `Thumb` | **string* | :heavy_minus_sign: | The URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg |
|
||||||
| `Thumb` | **string* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg |
|
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
# GetMediaMetaDataGenre
|
# GetMediaMetaDataGenre
|
||||||
|
|
||||||
|
The filter query string for similar items.
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
|
| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
||||||
| `ID` | *int64* | :heavy_check_mark: | The unique genre identifier. | 1057 |
|
| `ID` | *int64* | :heavy_check_mark: | N/A | 259 |
|
||||||
| `Filter` | *string* | :heavy_check_mark: | The filter string for the genre. | genre=1057 |
|
| `Tag` | *string* | :heavy_check_mark: | The genre name of this media-item<br/> | Crime |
|
||||||
| `Tag` | *string* | :heavy_check_mark: | The genre name. | Crime |
|
| `Filter` | *string* | :heavy_check_mark: | N/A | genre=19 |
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
||||||
| `Alt` | *string* | :heavy_check_mark: | Alternate text for the image. | Better Call Saul |
|
| `Alt` | *string* | :heavy_check_mark: | N/A | Episode 1 |
|
||||||
| `Type` | *string* | :heavy_check_mark: | The type of image (e.g., coverPoster, background, clearLogo). | coverPoster |
|
| `Type` | [operations.GetMediaMetaDataLibraryType](../../models/operations/getmediametadatalibrarytype.md) | :heavy_check_mark: | N/A | background |
|
||||||
| `URL` | *string* | :heavy_check_mark: | The URL of the image. | /library/metadata/44288/thumb/1736487993 |
|
| `URL` | *string* | :heavy_check_mark: | N/A | /library/metadata/45521/thumb/1644710589 |
|
||||||
11
docs/models/operations/getmediametadatalibrarytype.md
Normal file
11
docs/models/operations/getmediametadatalibrarytype.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# GetMediaMetaDataLibraryType
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------------------------------------- | ---------------------------------------- |
|
||||||
|
| `GetMediaMetaDataLibraryTypeCoverPoster` | coverPoster |
|
||||||
|
| `GetMediaMetaDataLibraryTypeBackground` | background |
|
||||||
|
| `GetMediaMetaDataLibraryTypeSnapshot` | snapshot |
|
||||||
|
| `GetMediaMetaDataLibraryTypeClearLogo` | clearLogo |
|
||||||
@@ -1,68 +1,83 @@
|
|||||||
# GetMediaMetaDataMetadata
|
# GetMediaMetaDataMetadata
|
||||||
|
|
||||||
|
Unknown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `RatingKey` | *string* | :heavy_check_mark: | The rating key of the metadata item. | 44288 |
|
| `RatingKey` | *string* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 |
|
||||||
| `ParentRatingKey` | **string* | :heavy_minus_sign: | The rating key of the parent of this metadata item. | 48047 |
|
| `Key` | *string* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 |
|
||||||
| `GrandparentRatingKey` | **string* | :heavy_minus_sign: | The rating key of the grandparent of this metadata item. | 45520 |
|
| `GUID` | *string* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 |
|
||||||
| `ParentGUID` | **string* | :heavy_minus_sign: | A GUID identifying the parent entity (e.g., season) for the item. | plex://season/618b89208dde18df707ad15c |
|
| `Slug` | *string* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas |
|
||||||
| `GrandparentGUID` | **string* | :heavy_minus_sign: | A GUID identifying the grandparent entity (e.g., show). | plex://show/5e16253691c20300412003a8 |
|
| `Studio` | **string* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios |
|
||||||
| `GrandparentSlug` | **string* | :heavy_minus_sign: | A URL-friendly identifier (slug) for the grandparent entity. | alice-in-borderland-2020 |
|
| `Type` | [operations.GetMediaMetaDataType](../../models/operations/getmediametadatatype.md) | :heavy_check_mark: | N/A | movie |
|
||||||
| `GrandparentKey` | **string* | :heavy_minus_sign: | A key identifying the grandparent metadata in the library. | /library/metadata/45520 |
|
| `Title` | *string* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water |
|
||||||
| `ParentKey` | **string* | :heavy_minus_sign: | A key identifying the parent metadata in the library. | /library/metadata/48047 |
|
| `TitleSort` | *string* | :heavy_check_mark: | The sort title used for ordering media items. | Whale |
|
||||||
| `Key` | *string* | :heavy_check_mark: | The API key to access metadata details. | /library/metadata/44288/children |
|
| `ContentRating` | **string* | :heavy_minus_sign: | The content rating for the media item. | PG-13 |
|
||||||
| `GUID` | *string* | :heavy_check_mark: | The globally unique identifier for the item. | plex://show/5d9c08254eefaa001f5d6dcb |
|
| `Summary` | *string* | :heavy_check_mark: | A synopsis of the media item. | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.<br/>Once a familiar threat returns to finish what was previously started, Jake must<br/>work with Neytiri and the army of the Na'vi race to protect their home.<br/> |
|
||||||
| `Slug` | **string* | :heavy_minus_sign: | A URL-friendly identifier for the item. | better-call-saul |
|
| `Rating` | *float32* | :heavy_check_mark: | The critic rating for the media item. | 7.6 |
|
||||||
| `Studio` | **string* | :heavy_minus_sign: | The studio that produced the content. | Sony Pictures Television |
|
| `AudienceRating` | *float64* | :heavy_check_mark: | The audience rating for the media item. | 9.2 |
|
||||||
| `Type` | *string* | :heavy_check_mark: | The type of content (e.g., show, movie). | show |
|
| `Year` | **int* | :heavy_minus_sign: | The release year of the media item. | 2022 |
|
||||||
| `Title` | *string* | :heavy_check_mark: | The title of the content. | Better Call Saul |
|
| `Tagline` | *string* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. |
|
||||||
| `OriginalTitle` | **string* | :heavy_minus_sign: | The original title of the content. | Wicked: Part I |
|
| `Thumb` | *string* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 |
|
||||||
| `LibrarySectionTitle` | *string* | :heavy_check_mark: | The title of the library section. | TV Series |
|
| `Art` | *string* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 |
|
||||||
| `LibrarySectionID` | *int64* | :heavy_check_mark: | The ID of the library section. | 2 |
|
| `Theme` | *string* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 |
|
||||||
| `LibrarySectionKey` | *string* | :heavy_check_mark: | The key of the library section. | /library/sections/2 |
|
| `Index` | *int* | :heavy_check_mark: | The index position of the media item. | 1 |
|
||||||
| `ContentRating` | **string* | :heavy_minus_sign: | The content rating (e.g., TV-MA). | TV-MA |
|
| `LeafCount` | **int* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 |
|
||||||
| `Summary` | *string* | :heavy_check_mark: | A summary of the content. | Before Saul Goodman, he was Jimmy McGill. And if you're calling Jimmy, you're in real trouble. The prequel to "Breaking Bad" follows small-time attorney, Jimmy McGill, as he transforms into Walter White's morally challenged lawyer, Saul Goodman. |
|
| `ViewedLeafCount` | **int* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 |
|
||||||
| `Index` | **int64* | :heavy_minus_sign: | The index or order of the item. | 1 |
|
| `ChildCount` | *int* | :heavy_check_mark: | The number of child items associated with this media item. | 1 |
|
||||||
| `GrandparentTitle` | **string* | :heavy_minus_sign: | The title of the grandparent entity (typically the show's title). | Alice in Borderland |
|
| `SeasonCount` | *int* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 |
|
||||||
| `ParentTitle` | **string* | :heavy_minus_sign: | The title of the parent entity (typically the season's title). | Season 2 |
|
| `Duration` | *int* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 |
|
||||||
| `AudienceRating` | **float32* | :heavy_minus_sign: | The audience rating for the content. | 8.7 |
|
| `OriginallyAvailableAt` | [types.Date](../../types/date.md) | :heavy_check_mark: | The original release date of the media item. | 2022-12-14 |
|
||||||
| `ViewCount` | **int64* | :heavy_minus_sign: | The number of times the item has been viewed. | 4 |
|
|
||||||
| `SkipCount` | **int64* | :heavy_minus_sign: | The number of times the item has been skipped. | 1 |
|
|
||||||
| `LastViewedAt` | **int64* | :heavy_minus_sign: | Unix timestamp of when the item was last viewed. | 1625764795 |
|
|
||||||
| `Year` | *int* | :heavy_check_mark: | The release year. | 2015 |
|
|
||||||
| `Rating` | **float32* | :heavy_minus_sign: | The general rating | 6 |
|
|
||||||
| `RatingImage` | **string* | :heavy_minus_sign: | The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image). | rottentomatoes://image.rating.ripe |
|
|
||||||
| `Tagline` | **string* | :heavy_minus_sign: | The tagline of the content. | Make the call |
|
|
||||||
| `ChapterSource` | **string* | :heavy_minus_sign: | N/A | media |
|
|
||||||
| `PrimaryExtraKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/134704 |
|
|
||||||
| `Thumb` | *string* | :heavy_check_mark: | URL of the thumbnail image. | /library/metadata/44288/thumb/1736487993 |
|
|
||||||
| `Art` | *string* | :heavy_check_mark: | URL of the art image. | /library/metadata/44288/art/1736487993 |
|
|
||||||
| `Theme` | **string* | :heavy_minus_sign: | URL of the theme image. | /library/metadata/44288/theme/1736487993 |
|
|
||||||
| `Duration` | *int* | :heavy_check_mark: | Duration of the content in milliseconds. | 2700000 |
|
|
||||||
| `OriginallyAvailableAt` | [*types.Date](../../types/date.md) | :heavy_minus_sign: | The original release date. | 2015-02-08 |
|
|
||||||
| `LeafCount` | **int64* | :heavy_minus_sign: | The total number of episodes (or leaves). | 63 |
|
|
||||||
| `ViewedLeafCount` | **int64* | :heavy_minus_sign: | The number of episodes that have been viewed. | 4 |
|
|
||||||
| `ChildCount` | **int* | :heavy_minus_sign: | The number of child items. | 6 |
|
|
||||||
| `AddedAt` | *int64* | :heavy_check_mark: | N/A | 1556281940 |
|
| `AddedAt` | *int64* | :heavy_check_mark: | N/A | 1556281940 |
|
||||||
| `UpdatedAt` | *int64* | :heavy_check_mark: | N/A | 1556281940 |
|
| `UpdatedAt` | **int64* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 |
|
||||||
| `AudienceRatingImage` | **string* | :heavy_minus_sign: | The URL for the audience rating image. | themoviedb://image.rating |
|
| `AudienceRatingImage` | **string* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright |
|
||||||
| `ParentIndex` | **int64* | :heavy_minus_sign: | The index number of the parent entity, which could indicate its order or position. | 2 |
|
| `ChapterSource` | **string* | :heavy_minus_sign: | The source from which chapter data is derived. | media |
|
||||||
| `ParentThumb` | **string* | :heavy_minus_sign: | The URL of the parent's thumbnail image. | /library/metadata/48047/thumb/1671800243 |
|
| `PrimaryExtraKey` | **string* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 |
|
||||||
| `GrandparentThumb` | **string* | :heavy_minus_sign: | The URL of the grandparent's thumbnail image. | /library/metadata/45520/thumb/1736488003 |
|
| `OriginalTitle` | **string* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 |
|
||||||
| `GrandparentArt` | **string* | :heavy_minus_sign: | The URL of the grandparent's art image. | /library/metadata/45520/art/1736488003 |
|
| `ParentRatingKey` | **string* | :heavy_minus_sign: | The rating key of the parent media item. | 66 |
|
||||||
|
| `GrandparentRatingKey` | **string* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 |
|
||||||
|
| `ParentGUID` | **string* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 |
|
||||||
|
| `GrandparentGUID` | **string* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 |
|
||||||
|
| `GrandparentSlug` | **string* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 |
|
||||||
|
| `GrandparentKey` | **string* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 |
|
||||||
|
| `ParentKey` | **string* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 |
|
||||||
|
| `GrandparentTitle` | **string* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica |
|
||||||
|
| `GrandparentThumb` | **string* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 |
|
||||||
|
| `GrandparentTheme` | **string* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 |
|
||||||
|
| `GrandparentArt` | **string* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 |
|
||||||
|
| `ParentTitle` | **string* | :heavy_minus_sign: | The title of the parent media item. | Caprica |
|
||||||
|
| `ParentIndex` | **int* | :heavy_minus_sign: | The index position of the parent media item. | 1 |
|
||||||
|
| `ParentThumb` | **string* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 |
|
||||||
|
| `RatingImage` | **string* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe |
|
||||||
|
| `ViewCount` | **int* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 |
|
||||||
|
| `ViewOffset` | **int* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 |
|
||||||
|
| `SkipCount` | **int* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 |
|
||||||
|
| `Subtype` | **string* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip |
|
||||||
|
| `LastRatedAt` | **int64* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 |
|
||||||
|
| `CreatedAtAccuracy` | **string* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local |
|
||||||
|
| `CreatedAtTZOffset` | **string* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 |
|
||||||
|
| `LastViewedAt` | **int* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 |
|
||||||
|
| `UserRating` | **float32* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 |
|
||||||
|
| `Image` | [][operations.GetMediaMetaDataImage](../../models/operations/getmediametadataimage.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `UltraBlurColors` | [*operations.GetMediaMetaDataUltraBlurColors](../../models/operations/getmediametadataultrablurcolors.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `LibrarySectionID` | *int64* | :heavy_check_mark: | The identifier for the library section. | 1 |
|
||||||
|
| `LibrarySectionTitle` | *string* | :heavy_check_mark: | The title of the library section. | Movies |
|
||||||
|
| `LibrarySectionKey` | *string* | :heavy_check_mark: | The key corresponding to the library section. | /library/sections/1 |
|
||||||
| `Media` | [][operations.GetMediaMetaDataMedia](../../models/operations/getmediametadatamedia.md) | :heavy_minus_sign: | N/A | |
|
| `Media` | [][operations.GetMediaMetaDataMedia](../../models/operations/getmediametadatamedia.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `Image` | [][operations.GetMediaMetaDataImage](../../models/operations/getmediametadataimage.md) | :heavy_check_mark: | An array of image objects. | |
|
| `Genre` | [][operations.GetMediaMetaDataGenre](../../models/operations/getmediametadatagenre.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `UltraBlurColors` | [operations.GetMediaMetaDataUltraBlurColors](../../models/operations/getmediametadataultrablurcolors.md) | :heavy_check_mark: | N/A | |
|
| `Country` | [][operations.GetMediaMetaDataCountry](../../models/operations/getmediametadatacountry.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `Genre` | [][operations.GetMediaMetaDataGenre](../../models/operations/getmediametadatagenre.md) | :heavy_minus_sign: | An array of genre tags. | |
|
| `Director` | [][operations.GetMediaMetaDataDirector](../../models/operations/getmediametadatadirector.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `Country` | [][operations.GetMediaMetaDataCountry](../../models/operations/getmediametadatacountry.md) | :heavy_minus_sign: | An array of country tags. | |
|
| `Writer` | [][operations.GetMediaMetaDataWriter](../../models/operations/getmediametadatawriter.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `Guids` | [][operations.GetMediaMetaDataGuids](../../models/operations/getmediametadataguids.md) | :heavy_minus_sign: | An array of GUID objects. | |
|
| `Producer` | [][operations.GetMediaMetaDataProducer](../../models/operations/getmediametadataproducer.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `Ratings` | [][operations.Ratings](../../models/operations/ratings.md) | :heavy_minus_sign: | An array of rating objects. | |
|
| `Role` | [][operations.GetMediaMetaDataRole](../../models/operations/getmediametadatarole.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `Role` | [][operations.GetMediaMetaDataRole](../../models/operations/getmediametadatarole.md) | :heavy_minus_sign: | An array of Actor roles. | |
|
| `Guids` | [][operations.GetMediaMetaDataGuids](../../models/operations/getmediametadataguids.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `Director` | [][operations.GetMediaMetaDataDirector](../../models/operations/getmediametadatadirector.md) | :heavy_minus_sign: | An array of Director roles. | |
|
| `Ratings` | [][operations.Ratings](../../models/operations/ratings.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `Writer` | [][operations.GetMediaMetaDataWriter](../../models/operations/getmediametadatawriter.md) | :heavy_minus_sign: | An array of Writer roles. | |
|
| `Similar` | [][operations.GetMediaMetaDataSimilar](../../models/operations/getmediametadatasimilar.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `Producer` | [][operations.GetMediaMetaDataProducer](../../models/operations/getmediametadataproducer.md) | :heavy_minus_sign: | An array of Writer roles. | |
|
| `Location` | [][operations.GetMediaMetaDataLocation](../../models/operations/getmediametadatalocation.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `Similar` | [][operations.GetMediaMetaDataSimilar](../../models/operations/getmediametadatasimilar.md) | :heavy_minus_sign: | An array of similar content objects. | |
|
| `Chapter` | [][operations.Chapter](../../models/operations/chapter.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `Location` | [][operations.GetMediaMetaDataLocation](../../models/operations/getmediametadatalocation.md) | :heavy_minus_sign: | An array of location objects. | |
|
| `Marker` | [][operations.Marker](../../models/operations/marker.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `Extras` | [*operations.Extras](../../models/operations/extras.md) | :heavy_minus_sign: | N/A | |
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||||
| `ID` | *int64* | :heavy_check_mark: | The unique role identifier. | 109501 |
|
| `ID` | *int64* | :heavy_check_mark: | Unique identifier for the actor or role. | 126522 |
|
||||||
| `Filter` | *string* | :heavy_check_mark: | The filter string for the role. | actor=109501 |
|
| `Tag` | *string* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller |
|
||||||
| `Tag` | *string* | :heavy_check_mark: | The actor's name. | Bob Odenkirk |
|
| `Role` | **string* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge |
|
||||||
| `TagKey` | *string* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 |
|
| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. | actor=126522 |
|
||||||
| `Role` | **string* | :heavy_minus_sign: | The character name or role. | Jimmy McGill |
|
| `TagKey` | **string* | :heavy_minus_sign: | A unique key associated with the actor's tag, used for internal identification. | 5d77683d85719b001f3a535e |
|
||||||
| `Thumb` | **string* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg |
|
| `Thumb` | **string* | :heavy_minus_sign: | The URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg |
|
||||||
@@ -4,12 +4,13 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
||||||
| `ID` | *int64* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
| `ID` | *int64* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
||||||
| `StreamType` | *int* | :heavy_check_mark: | Stream type (1=video, 2=audio, 3=subtitle). | 1 |
|
| `StreamType` | [operations.GetMediaMetaDataStreamType](../../models/operations/getmediametadatastreamtype.md) | :heavy_check_mark: | Stream type:<br/> - 1 = video<br/> - 2 = audio<br/> - 3 = subtitle<br/> | 1 |
|
||||||
|
| `Format` | **string* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt |
|
||||||
| `Default` | **bool* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
| `Default` | **bool* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
||||||
| `Codec` | *string* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
| `Codec` | *string* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
||||||
| `Index` | *int* | :heavy_check_mark: | Index of the stream. | 0 |
|
| `Index` | **int* | :heavy_minus_sign: | Index of the stream. | 0 |
|
||||||
| `Bitrate` | **int* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
| `Bitrate` | **int* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
||||||
| `Language` | **string* | :heavy_minus_sign: | Language of the stream. | English |
|
| `Language` | **string* | :heavy_minus_sign: | Language of the stream. | English |
|
||||||
| `LanguageTag` | **string* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
| `LanguageTag` | **string* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
||||||
@@ -34,6 +35,7 @@
|
|||||||
| `ColorSpace` | **string* | :heavy_minus_sign: | Color space. | bt2020nc |
|
| `ColorSpace` | **string* | :heavy_minus_sign: | Color space. | bt2020nc |
|
||||||
| `ColorTrc` | **string* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
| `ColorTrc` | **string* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
||||||
| `FrameRate` | **float32* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
| `FrameRate` | **float32* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 |
|
||||||
| `Height` | **int* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
| `Height` | **int* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
||||||
| `Level` | **int* | :heavy_minus_sign: | Video level. | 150 |
|
| `Level` | **int* | :heavy_minus_sign: | Video level. | 150 |
|
||||||
| `Original` | **bool* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
| `Original` | **bool* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
||||||
|
|||||||
16
docs/models/operations/getmediametadatastreamtype.md
Normal file
16
docs/models/operations/getmediametadatastreamtype.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# GetMediaMetaDataStreamType
|
||||||
|
|
||||||
|
Stream type:
|
||||||
|
- 1 = video
|
||||||
|
- 2 = audio
|
||||||
|
- 3 = subtitle
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------------------------ | ------------------------------------ |
|
||||||
|
| `GetMediaMetaDataStreamTypeVideo` | 1 |
|
||||||
|
| `GetMediaMetaDataStreamTypeAudio` | 2 |
|
||||||
|
| `GetMediaMetaDataStreamTypeSubtitle` | 3 |
|
||||||
16
docs/models/operations/getmediametadatatype.md
Normal file
16
docs/models/operations/getmediametadatatype.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# GetMediaMetaDataType
|
||||||
|
|
||||||
|
The type of media content
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ----------------------------- | ----------------------------- |
|
||||||
|
| `GetMediaMetaDataTypeMovie` | movie |
|
||||||
|
| `GetMediaMetaDataTypeTvShow` | show |
|
||||||
|
| `GetMediaMetaDataTypeSeason` | season |
|
||||||
|
| `GetMediaMetaDataTypeEpisode` | episode |
|
||||||
|
| `GetMediaMetaDataTypeArtist` | artist |
|
||||||
|
| `GetMediaMetaDataTypeAlbum` | album |
|
||||||
@@ -4,8 +4,8 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- |
|
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||||
| `TopLeft` | *string* | :heavy_check_mark: | The top-left color value. | 11333a |
|
| `TopLeft` | *string* | :heavy_check_mark: | N/A | 11333b |
|
||||||
| `TopRight` | *string* | :heavy_check_mark: | The top-right color value. | 1d2721 |
|
| `TopRight` | *string* | :heavy_check_mark: | N/A | 0a232d |
|
||||||
| `BottomRight` | *string* | :heavy_check_mark: | The bottom-right color value. | 5c451d |
|
| `BottomRight` | *string* | :heavy_check_mark: | N/A | 73958 |
|
||||||
| `BottomLeft` | *string* | :heavy_check_mark: | The bottom-left color value. | 372c10 |
|
| `BottomLeft` | *string* | :heavy_check_mark: | N/A | 1f5066 |
|
||||||
@@ -4,10 +4,9 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||||
| `ID` | *int64* | :heavy_check_mark: | The unique role identifier. | 109501 |
|
| `ID` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 |
|
||||||
| `Filter` | *string* | :heavy_check_mark: | The filter string for the role. | actor=109501 |
|
| `Tag` | *string* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson |
|
||||||
| `Tag` | *string* | :heavy_check_mark: | The actor's name. | Bob Odenkirk |
|
| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 |
|
||||||
| `TagKey` | *string* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 |
|
| `Thumb` | **string* | :heavy_minus_sign: | The URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg |
|
||||||
| `Role` | **string* | :heavy_minus_sign: | The character name or role. | Jimmy McGill |
|
| `TagKey` | **string* | :heavy_minus_sign: | A unique key associated with the writers tag, used for internal identification. | 5d77683d85719b001f3a535e |
|
||||||
| `Thumb` | **string* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg |
|
|
||||||
12
docs/models/operations/getmediapostersmediacontainer.md
Normal file
12
docs/models/operations/getmediapostersmediacontainer.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# GetMediaPostersMediaContainer
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
||||||
|
| `Size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
|
||||||
|
| `MediaTagVersion` | *int64* | :heavy_check_mark: | The version number for media tags. | 1734362201 |
|
||||||
|
| `MediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ |
|
||||||
|
| `Identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library |
|
||||||
|
| `Metadata` | [][operations.GetMediaPostersMetadata](../../models/operations/getmediapostersmetadata.md) | :heavy_check_mark: | N/A | |
|
||||||
12
docs/models/operations/getmediapostersmetadata.md
Normal file
12
docs/models/operations/getmediapostersmetadata.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# GetMediaPostersMetadata
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Key` | *string* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg |
|
||||||
|
| `Provider` | **string* | :heavy_minus_sign: | The provider of the poster. | tmdb |
|
||||||
|
| `RatingKey` | *string* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg |
|
||||||
|
| `Selected` | *bool* | :heavy_check_mark: | Whether this is the selected poster. | true |
|
||||||
|
| `Thumb` | *string* | :heavy_check_mark: | The URL of the poster thumbnail. | https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg |
|
||||||
8
docs/models/operations/getmediapostersrequest.md
Normal file
8
docs/models/operations/getmediapostersrequest.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# GetMediaPostersRequest
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||||
|
| `RatingKey` | *int64* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 |
|
||||||
11
docs/models/operations/getmediapostersresponse.md
Normal file
11
docs/models/operations/getmediapostersresponse.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# GetMediaPostersResponse
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
||||||
|
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||||
|
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||||
|
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||||
|
| `Object` | [*operations.GetMediaPostersResponseBody](../../models/operations/getmediapostersresponsebody.md) | :heavy_minus_sign: | The available posters for the library item. |
|
||||||
10
docs/models/operations/getmediapostersresponsebody.md
Normal file
10
docs/models/operations/getmediapostersresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# GetMediaPostersResponseBody
|
||||||
|
|
||||||
|
The available posters for the library item.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*operations.GetMediaPostersMediaContainer](../../models/operations/getmediapostersmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
11
docs/models/operations/hidden.md
Normal file
11
docs/models/operations/hidden.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Hidden
|
||||||
|
|
||||||
|
UNKNOWN
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| --------------- | --------------- |
|
||||||
|
| `HiddenDisable` | 0 |
|
||||||
|
| `HiddenEnable` | 1 |
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
||||||
| `Level` | [operations.Level](../../models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with. <br/>0: Error <br/>1: Warning <br/>2: Info <br/>3: Debug <br/>4: Verbose<br/> | |
|
| `Level` | [operations.Level](../../models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.<br/>0: Error<br/>1: Warning<br/>2: Info<br/>3: Debug<br/>4: Verbose<br/> | |
|
||||||
| `Message` | *string* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
|
| `Message` | *string* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
|
||||||
| `Source` | *string* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
|
| `Source` | *string* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
|
||||||
15
docs/models/operations/marker.md
Normal file
15
docs/models/operations/marker.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Marker
|
||||||
|
|
||||||
|
The final status of the marker
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||||
|
| `ID` | *int64* | :heavy_check_mark: | N/A | 306970 |
|
||||||
|
| `Type` | *string* | :heavy_check_mark: | N/A | credits |
|
||||||
|
| `StartTimeOffset` | *int64* | :heavy_check_mark: | N/A | 4176050 |
|
||||||
|
| `EndTimeOffset` | *int64* | :heavy_check_mark: | N/A | 4393389 |
|
||||||
|
| `Final` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `Attributes` | [*operations.Attributes](../../models/operations/attributes.md) | :heavy_minus_sign: | Attributes associated with the marker. | |
|
||||||
10
docs/models/operations/postmediaartsrequest.md
Normal file
10
docs/models/operations/postmediaartsrequest.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# PostMediaArtsRequest
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||||
|
| `RatingKey` | *int64* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||||
|
| `URL` | **string* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
|
||||||
|
| `RequestBody` | **any* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||||
10
docs/models/operations/postmediaartsresponse.md
Normal file
10
docs/models/operations/postmediaartsresponse.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# PostMediaArtsResponse
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
|
||||||
|
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||||
|
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||||
|
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||||
10
docs/models/operations/postmediaposterrequest.md
Normal file
10
docs/models/operations/postmediaposterrequest.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# PostMediaPosterRequest
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||||
|
| `RatingKey` | *int64* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||||
|
| `URL` | **string* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
|
||||||
|
| `RequestBody` | **any* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||||
10
docs/models/operations/postmediaposterresponse.md
Normal file
10
docs/models/operations/postmediaposterresponse.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# PostMediaPosterResponse
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
|
||||||
|
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||||
|
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||||
|
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||||
| `ID` | *int64* | :heavy_check_mark: | Unique identifier for the producer. | 126522 |
|
| `ID` | *int* | :heavy_check_mark: | Unique identifier for the producer. | 126522 |
|
||||||
| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this producer. | producer=126522 |
|
| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this producer. | producer=126522 |
|
||||||
| `Tag` | *string* | :heavy_check_mark: | The name of the producer | Amelia Knapp |
|
| `Tag` | *string* | :heavy_check_mark: | The name of the producer | Amelia Knapp |
|
||||||
| `TagKey` | **string* | :heavy_minus_sign: | A unique key associated with the producer's tag, used for internal identification. | 5d77683d85719b001f3a535e |
|
| `TagKey` | **string* | :heavy_minus_sign: | A unique key associated with the producer's tag, used for internal identification. | 5d77683d85719b001f3a535e |
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||||
| `ID` | *int64* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
| `ID` | *int64* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
||||||
| `StreamType` | *int* | :heavy_check_mark: | Stream type (1=video, 2=audio, 3=subtitle). | 1 |
|
| `StreamType` | [operations.StreamType](../../models/operations/streamtype.md) | :heavy_check_mark: | Stream type:<br/> - 1 = video<br/> - 2 = audio<br/> - 3 = subtitle<br/> | 1 |
|
||||||
|
| `Format` | **string* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt |
|
||||||
| `Default` | **bool* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
| `Default` | **bool* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
||||||
| `Codec` | *string* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
| `Codec` | *string* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
||||||
| `Index` | *int* | :heavy_check_mark: | Index of the stream. | 0 |
|
| `Index` | **int* | :heavy_minus_sign: | Index of the stream. | 0 |
|
||||||
| `Bitrate` | **int* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
| `Bitrate` | **int* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
||||||
| `Language` | **string* | :heavy_minus_sign: | Language of the stream. | English |
|
| `Language` | **string* | :heavy_minus_sign: | Language of the stream. | English |
|
||||||
| `LanguageTag` | **string* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
| `LanguageTag` | **string* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
||||||
@@ -34,6 +35,7 @@
|
|||||||
| `ColorSpace` | **string* | :heavy_minus_sign: | Color space. | bt2020nc |
|
| `ColorSpace` | **string* | :heavy_minus_sign: | Color space. | bt2020nc |
|
||||||
| `ColorTrc` | **string* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
| `ColorTrc` | **string* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
||||||
| `FrameRate` | **float32* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
| `FrameRate` | **float32* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 |
|
||||||
| `Height` | **int* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
| `Height` | **int* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
||||||
| `Level` | **int* | :heavy_minus_sign: | Video level. | 150 |
|
| `Level` | **int* | :heavy_minus_sign: | Video level. | 150 |
|
||||||
| `Original` | **bool* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
| `Original` | **bool* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
||||||
|
|||||||
16
docs/models/operations/streamtype.md
Normal file
16
docs/models/operations/streamtype.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# StreamType
|
||||||
|
|
||||||
|
Stream type:
|
||||||
|
- 1 = video
|
||||||
|
- 2 = audio
|
||||||
|
- 3 = subtitle
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| -------------------- | -------------------- |
|
||||||
|
| `StreamTypeVideo` | 1 |
|
||||||
|
| `StreamTypeAudio` | 2 |
|
||||||
|
| `StreamTypeSubtitle` | 3 |
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `Path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
|
| `Path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.<br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed.<br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
|
||||||
| `Force` | [operations.QueryParamForce](../../models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
|
| `Force` | [operations.QueryParamForce](../../models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.<br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist.<br/>The `force` argument is used to disable overwriting.<br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
|
||||||
| `SectionID` | *int64* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
|
| `SectionID` | *int64* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||||
| `ID` | *int64* | :heavy_check_mark: | Unique identifier for the writer. | 126522 |
|
| `ID` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 |
|
||||||
| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 |
|
| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 |
|
||||||
| `Tag` | *string* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson |
|
| `Tag` | *string* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson |
|
||||||
| `TagKey` | **string* | :heavy_minus_sign: | A unique key associated with the writers tag, used for internal identification. | 5d77683d85719b001f3a535e |
|
| `TagKey` | **string* | :heavy_minus_sign: | A unique key associated with the writers tag, used for internal identification. | 5d77683d85719b001f3a535e |
|
||||||
@@ -22,6 +22,10 @@ API Calls interacting with Plex Media Server Libraries
|
|||||||
* [GetActorsLibrary](#getactorslibrary) - Get Actors of library media
|
* [GetActorsLibrary](#getactorslibrary) - Get Actors of library media
|
||||||
* [GetSearchAllLibraries](#getsearchalllibraries) - Search All Libraries
|
* [GetSearchAllLibraries](#getsearchalllibraries) - Search All Libraries
|
||||||
* [GetMediaMetaData](#getmediametadata) - Get Media Metadata
|
* [GetMediaMetaData](#getmediametadata) - Get Media Metadata
|
||||||
|
* [GetMediaArts](#getmediaarts) - Get Media Background Artwork
|
||||||
|
* [PostMediaArts](#postmediaarts) - Upload Media Background Artwork
|
||||||
|
* [GetMediaPosters](#getmediaposters) - Get Media Posters
|
||||||
|
* [PostMediaPoster](#postmediaposter) - Upload Media Poster
|
||||||
* [GetMetadataChildren](#getmetadatachildren) - Get Items Children
|
* [GetMetadataChildren](#getmetadatachildren) - Get Items Children
|
||||||
* [GetTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content
|
* [GetTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content
|
||||||
|
|
||||||
@@ -281,10 +285,10 @@ func main() {
|
|||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
|
| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
|
||||||
| `includeDetails` | [*operations.IncludeDetails](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
|
| `includeDetails` | [*operations.IncludeDetails](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).<br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
|
||||||
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
@@ -907,6 +911,210 @@ func main() {
|
|||||||
| sdkerrors.GetMediaMetaDataUnauthorized | 401 | application/json |
|
| sdkerrors.GetMediaMetaDataUnauthorized | 401 | application/json |
|
||||||
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
||||||
|
|
||||||
|
## GetMediaArts
|
||||||
|
|
||||||
|
Returns the background artwork for a library item.
|
||||||
|
|
||||||
|
### Example Usage
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import(
|
||||||
|
"context"
|
||||||
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"log"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
ctx := context.Background()
|
||||||
|
|
||||||
|
s := plexgo.New(
|
||||||
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
|
)
|
||||||
|
|
||||||
|
res, err := s.Library.GetMediaArts(ctx, 16099)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
if res.Object != nil {
|
||||||
|
// handle response
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Parameter | Type | Required | Description | Example |
|
||||||
|
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
|
||||||
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
|
| `ratingKey` | *int64* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 |
|
||||||
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
|
||||||
|
|
||||||
|
### Response
|
||||||
|
|
||||||
|
**[*operations.GetMediaArtsResponse](../../models/operations/getmediaartsresponse.md), error**
|
||||||
|
|
||||||
|
### Errors
|
||||||
|
|
||||||
|
| Error Type | Status Code | Content Type |
|
||||||
|
| ------------------ | ------------------ | ------------------ |
|
||||||
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
||||||
|
|
||||||
|
## PostMediaArts
|
||||||
|
|
||||||
|
Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
|
||||||
|
|
||||||
|
### Example Usage
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import(
|
||||||
|
"context"
|
||||||
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"log"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
ctx := context.Background()
|
||||||
|
|
||||||
|
s := plexgo.New(
|
||||||
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
|
)
|
||||||
|
|
||||||
|
res, err := s.Library.PostMediaArts(ctx, 2268, plexgo.String("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"), nil)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
if res != nil {
|
||||||
|
// handle response
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Parameter | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||||
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
|
| `ratingKey` | *int64* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||||
|
| `url_` | **string* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
|
||||||
|
| `requestBody` | **any* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||||
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
|
||||||
|
|
||||||
|
### Response
|
||||||
|
|
||||||
|
**[*operations.PostMediaArtsResponse](../../models/operations/postmediaartsresponse.md), error**
|
||||||
|
|
||||||
|
### Errors
|
||||||
|
|
||||||
|
| Error Type | Status Code | Content Type |
|
||||||
|
| ------------------ | ------------------ | ------------------ |
|
||||||
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
||||||
|
|
||||||
|
## GetMediaPosters
|
||||||
|
|
||||||
|
Returns the available posters for a library item.
|
||||||
|
|
||||||
|
### Example Usage
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import(
|
||||||
|
"context"
|
||||||
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"log"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
ctx := context.Background()
|
||||||
|
|
||||||
|
s := plexgo.New(
|
||||||
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
|
)
|
||||||
|
|
||||||
|
res, err := s.Library.GetMediaPosters(ctx, 16099)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
if res.Object != nil {
|
||||||
|
// handle response
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Parameter | Type | Required | Description | Example |
|
||||||
|
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
|
||||||
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
|
| `ratingKey` | *int64* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 |
|
||||||
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
|
||||||
|
|
||||||
|
### Response
|
||||||
|
|
||||||
|
**[*operations.GetMediaPostersResponse](../../models/operations/getmediapostersresponse.md), error**
|
||||||
|
|
||||||
|
### Errors
|
||||||
|
|
||||||
|
| Error Type | Status Code | Content Type |
|
||||||
|
| ------------------ | ------------------ | ------------------ |
|
||||||
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
||||||
|
|
||||||
|
## PostMediaPoster
|
||||||
|
|
||||||
|
Uploads a poster to a library item, either from a local file or a remote URL
|
||||||
|
|
||||||
|
### Example Usage
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import(
|
||||||
|
"context"
|
||||||
|
"github.com/LukeHagar/plexgo"
|
||||||
|
"log"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
ctx := context.Background()
|
||||||
|
|
||||||
|
s := plexgo.New(
|
||||||
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
|
)
|
||||||
|
|
||||||
|
res, err := s.Library.PostMediaPoster(ctx, 2268, plexgo.String("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"), nil)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
if res != nil {
|
||||||
|
// handle response
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Parameter | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||||
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
|
| `ratingKey` | *int64* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||||
|
| `url_` | **string* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
|
||||||
|
| `requestBody` | **any* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||||
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
|
||||||
|
|
||||||
|
### Response
|
||||||
|
|
||||||
|
**[*operations.PostMediaPosterResponse](../../models/operations/postmediaposterresponse.md), error**
|
||||||
|
|
||||||
|
### Errors
|
||||||
|
|
||||||
|
| Error Type | Status Code | Content Type |
|
||||||
|
| ------------------ | ------------------ | ------------------ |
|
||||||
|
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
|
||||||
|
|
||||||
## GetMetadataChildren
|
## GetMetadataChildren
|
||||||
|
|
||||||
This endpoint will return the children of of a library item specified with the ratingKey.
|
This endpoint will return the children of of a library item specified with the ratingKey.
|
||||||
|
|||||||
@@ -49,9 +49,9 @@ func main() {
|
|||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
||||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
| `level` | [operations.Level](../../models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with. <br/>0: Error <br/>1: Warning <br/>2: Info <br/>3: Debug <br/>4: Verbose<br/> | |
|
| `level` | [operations.Level](../../models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.<br/>0: Error<br/>1: Warning<br/>2: Info<br/>3: Debug<br/>4: Verbose<br/> | |
|
||||||
| `message` | *string* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
|
| `message` | *string* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
|
||||||
| `source` | *string* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
|
| `source` | *string* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
|
||||||
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
|
||||||
|
|||||||
@@ -501,10 +501,10 @@ func main() {
|
|||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
| `path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
|
| `path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.<br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed.<br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
|
||||||
| `force` | [operations.QueryParamForce](../../models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
|
| `force` | [operations.QueryParamForce](../../models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.<br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist.<br/>The `force` argument is used to disable overwriting.<br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
|
||||||
| `sectionID` | *int64* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
|
| `sectionID` | *int64* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
|
||||||
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
|
||||||
|
|
||||||
|
|||||||
@@ -186,8 +186,8 @@ func UnmarshalJSON(b []byte, v interface{}, tag reflect.StructTag, topLevel bool
|
|||||||
|
|
||||||
value, ok := unmarhsaled[fieldName]
|
value, ok := unmarhsaled[fieldName]
|
||||||
if !ok {
|
if !ok {
|
||||||
defaultTag := field.Tag.Get("default")
|
defaultTag, defaultOk := field.Tag.Lookup("default")
|
||||||
if defaultTag != "" {
|
if defaultOk {
|
||||||
value = handleDefaultConstValue(defaultTag, fieldVal.Interface(), field.Tag)
|
value = handleDefaultConstValue(defaultTag, fieldVal.Interface(), field.Tag)
|
||||||
ok = true
|
ok = true
|
||||||
}
|
}
|
||||||
@@ -257,8 +257,8 @@ func marshalValue(v interface{}, tag reflect.StructTag) (json.RawMessage, error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if isNil(reflect.TypeOf(v), reflect.ValueOf(v)) {
|
if isNil(reflect.TypeOf(v), reflect.ValueOf(v)) {
|
||||||
defaultTag := tag.Get("default")
|
defaultTag, ok := tag.Lookup("default")
|
||||||
if defaultTag != "" {
|
if ok {
|
||||||
return handleDefaultConstValue(defaultTag, v, tag), nil
|
return handleDefaultConstValue(defaultTag, v, tag), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
814
library.go
814
library.go
@@ -3575,6 +3575,820 @@ func (s *Library) GetMediaMetaData(ctx context.Context, request operations.GetMe
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetMediaArts - Get Media Background Artwork
|
||||||
|
// Returns the background artwork for a library item.
|
||||||
|
func (s *Library) GetMediaArts(ctx context.Context, ratingKey int64, opts ...operations.Option) (*operations.GetMediaArtsResponse, error) {
|
||||||
|
request := operations.GetMediaArtsRequest{
|
||||||
|
RatingKey: ratingKey,
|
||||||
|
}
|
||||||
|
|
||||||
|
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 := utils.GenerateURL(ctx, baseURL, "/library/metadata/{ratingKey}/arts", request, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
hookCtx := hooks.HookContext{
|
||||||
|
BaseURL: baseURL,
|
||||||
|
Context: ctx,
|
||||||
|
OperationID: "get-media-arts",
|
||||||
|
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.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 {
|
||||||
|
copyBody, err := req.GetBody()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
req.Body = copyBody
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||||
|
if err != nil {
|
||||||
|
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.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
|
}
|
||||||
|
return httpRes, err
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
} else {
|
||||||
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
httpRes, err = s.sdkConfiguration.Client.Do(req)
|
||||||
|
if err != nil || httpRes == nil {
|
||||||
|
if err != nil {
|
||||||
|
err = fmt.Errorf("error sending request: %w", err)
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("error sending request: no response")
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
|
return nil, err
|
||||||
|
} else if utils.MatchStatusCodes([]string{"404", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
res := &operations.GetMediaArtsResponse{
|
||||||
|
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 operations.GetMediaArtsResponseBody
|
||||||
|
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
res.Object = &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 == 404:
|
||||||
|
fallthrough
|
||||||
|
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
||||||
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
|
||||||
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
default:
|
||||||
|
rawBody, err := 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
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// PostMediaArts - Upload Media Background Artwork
|
||||||
|
// Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
|
||||||
|
func (s *Library) PostMediaArts(ctx context.Context, ratingKey int64, url_ *string, requestBody *any, opts ...operations.Option) (*operations.PostMediaArtsResponse, error) {
|
||||||
|
request := operations.PostMediaArtsRequest{
|
||||||
|
RatingKey: ratingKey,
|
||||||
|
URL: url_,
|
||||||
|
RequestBody: requestBody,
|
||||||
|
}
|
||||||
|
|
||||||
|
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 := utils.GenerateURL(ctx, baseURL, "/library/metadata/{ratingKey}/arts", request, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
hookCtx := hooks.HookContext{
|
||||||
|
BaseURL: baseURL,
|
||||||
|
Context: ctx,
|
||||||
|
OperationID: "post-media-arts",
|
||||||
|
OAuth2Scopes: []string{},
|
||||||
|
SecuritySource: s.sdkConfiguration.Security,
|
||||||
|
}
|
||||||
|
bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "raw", `request:"mediaType=image/*"`)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
timeout := o.Timeout
|
||||||
|
if timeout == nil {
|
||||||
|
timeout = s.sdkConfiguration.Timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
if timeout != nil {
|
||||||
|
var cancel context.CancelFunc
|
||||||
|
ctx, cancel = context.WithTimeout(ctx, *timeout)
|
||||||
|
defer cancel()
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error creating request: %w", err)
|
||||||
|
}
|
||||||
|
req.Header.Set("Accept", "*/*")
|
||||||
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
if reqContentType != "" {
|
||||||
|
req.Header.Set("Content-Type", reqContentType)
|
||||||
|
}
|
||||||
|
|
||||||
|
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 {
|
||||||
|
copyBody, err := req.GetBody()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
req.Body = copyBody
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||||
|
if err != nil {
|
||||||
|
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.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
|
}
|
||||||
|
return httpRes, err
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
} else {
|
||||||
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
httpRes, err = s.sdkConfiguration.Client.Do(req)
|
||||||
|
if err != nil || httpRes == nil {
|
||||||
|
if err != nil {
|
||||||
|
err = fmt.Errorf("error sending request: %w", err)
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("error sending request: no response")
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
|
return nil, err
|
||||||
|
} else if utils.MatchStatusCodes([]string{"404", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
res := &operations.PostMediaArtsResponse{
|
||||||
|
StatusCode: httpRes.StatusCode,
|
||||||
|
ContentType: httpRes.Header.Get("Content-Type"),
|
||||||
|
RawResponse: httpRes,
|
||||||
|
}
|
||||||
|
|
||||||
|
switch {
|
||||||
|
case httpRes.StatusCode == 200:
|
||||||
|
case httpRes.StatusCode == 404:
|
||||||
|
fallthrough
|
||||||
|
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
||||||
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
|
||||||
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
default:
|
||||||
|
rawBody, err := 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
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMediaPosters - Get Media Posters
|
||||||
|
// Returns the available posters for a library item.
|
||||||
|
func (s *Library) GetMediaPosters(ctx context.Context, ratingKey int64, opts ...operations.Option) (*operations.GetMediaPostersResponse, error) {
|
||||||
|
request := operations.GetMediaPostersRequest{
|
||||||
|
RatingKey: ratingKey,
|
||||||
|
}
|
||||||
|
|
||||||
|
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 := utils.GenerateURL(ctx, baseURL, "/library/metadata/{ratingKey}/posters", request, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
hookCtx := hooks.HookContext{
|
||||||
|
BaseURL: baseURL,
|
||||||
|
Context: ctx,
|
||||||
|
OperationID: "get-media-posters",
|
||||||
|
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.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 {
|
||||||
|
copyBody, err := req.GetBody()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
req.Body = copyBody
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||||
|
if err != nil {
|
||||||
|
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.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
|
}
|
||||||
|
return httpRes, err
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
} else {
|
||||||
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
httpRes, err = s.sdkConfiguration.Client.Do(req)
|
||||||
|
if err != nil || httpRes == nil {
|
||||||
|
if err != nil {
|
||||||
|
err = fmt.Errorf("error sending request: %w", err)
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("error sending request: no response")
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
|
return nil, err
|
||||||
|
} else if utils.MatchStatusCodes([]string{"404", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
res := &operations.GetMediaPostersResponse{
|
||||||
|
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 operations.GetMediaPostersResponseBody
|
||||||
|
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
res.Object = &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 == 404:
|
||||||
|
fallthrough
|
||||||
|
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
||||||
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
|
||||||
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
default:
|
||||||
|
rawBody, err := 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
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// PostMediaPoster - Upload Media Poster
|
||||||
|
// Uploads a poster to a library item, either from a local file or a remote URL
|
||||||
|
func (s *Library) PostMediaPoster(ctx context.Context, ratingKey int64, url_ *string, requestBody *any, opts ...operations.Option) (*operations.PostMediaPosterResponse, error) {
|
||||||
|
request := operations.PostMediaPosterRequest{
|
||||||
|
RatingKey: ratingKey,
|
||||||
|
URL: url_,
|
||||||
|
RequestBody: requestBody,
|
||||||
|
}
|
||||||
|
|
||||||
|
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 := utils.GenerateURL(ctx, baseURL, "/library/metadata/{ratingKey}/posters", request, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
hookCtx := hooks.HookContext{
|
||||||
|
BaseURL: baseURL,
|
||||||
|
Context: ctx,
|
||||||
|
OperationID: "post-media-poster",
|
||||||
|
OAuth2Scopes: []string{},
|
||||||
|
SecuritySource: s.sdkConfiguration.Security,
|
||||||
|
}
|
||||||
|
bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "raw", `request:"mediaType=image/*"`)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
timeout := o.Timeout
|
||||||
|
if timeout == nil {
|
||||||
|
timeout = s.sdkConfiguration.Timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
if timeout != nil {
|
||||||
|
var cancel context.CancelFunc
|
||||||
|
ctx, cancel = context.WithTimeout(ctx, *timeout)
|
||||||
|
defer cancel()
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error creating request: %w", err)
|
||||||
|
}
|
||||||
|
req.Header.Set("Accept", "*/*")
|
||||||
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
if reqContentType != "" {
|
||||||
|
req.Header.Set("Content-Type", reqContentType)
|
||||||
|
}
|
||||||
|
|
||||||
|
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 {
|
||||||
|
copyBody, err := req.GetBody()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
req.Body = copyBody
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||||
|
if err != nil {
|
||||||
|
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.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
|
}
|
||||||
|
return httpRes, err
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
} else {
|
||||||
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
httpRes, err = s.sdkConfiguration.Client.Do(req)
|
||||||
|
if err != nil || httpRes == nil {
|
||||||
|
if err != nil {
|
||||||
|
err = fmt.Errorf("error sending request: %w", err)
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("error sending request: no response")
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
|
return nil, err
|
||||||
|
} else if utils.MatchStatusCodes([]string{"404", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
res := &operations.PostMediaPosterResponse{
|
||||||
|
StatusCode: httpRes.StatusCode,
|
||||||
|
ContentType: httpRes.Header.Get("Content-Type"),
|
||||||
|
RawResponse: httpRes,
|
||||||
|
}
|
||||||
|
|
||||||
|
switch {
|
||||||
|
case httpRes.StatusCode == 200:
|
||||||
|
case httpRes.StatusCode == 404:
|
||||||
|
fallthrough
|
||||||
|
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
||||||
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
|
||||||
|
rawBody, err := utils.ConsumeRawBody(httpRes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
default:
|
||||||
|
rawBody, err := 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
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// GetMetadataChildren - Get Items Children
|
// GetMetadataChildren - Get Items Children
|
||||||
// This endpoint will return the children of of a library item specified with the ratingKey.
|
// This endpoint will return the children of of a library item specified with the ratingKey.
|
||||||
func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, includeElements *string, opts ...operations.Option) (*operations.GetMetadataChildrenResponse, error) {
|
func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, includeElements *string, opts ...operations.Option) (*operations.GetMetadataChildrenResponse, error) {
|
||||||
|
|||||||
@@ -20,23 +20,6 @@ const (
|
|||||||
func (e CreatePlaylistQueryParamType) ToPointer() *CreatePlaylistQueryParamType {
|
func (e CreatePlaylistQueryParamType) ToPointer() *CreatePlaylistQueryParamType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *CreatePlaylistQueryParamType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "audio":
|
|
||||||
fallthrough
|
|
||||||
case "video":
|
|
||||||
fallthrough
|
|
||||||
case "photo":
|
|
||||||
*e = CreatePlaylistQueryParamType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for CreatePlaylistQueryParamType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Smart - whether the playlist is smart or not
|
// Smart - whether the playlist is smart or not
|
||||||
type Smart int64
|
type Smart int64
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -29,31 +27,6 @@ const (
|
|||||||
func (e GetActorsLibraryQueryParamType) ToPointer() *GetActorsLibraryQueryParamType {
|
func (e GetActorsLibraryQueryParamType) ToPointer() *GetActorsLibraryQueryParamType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetActorsLibraryQueryParamType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v int64
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case 1:
|
|
||||||
fallthrough
|
|
||||||
case 2:
|
|
||||||
fallthrough
|
|
||||||
case 3:
|
|
||||||
fallthrough
|
|
||||||
case 4:
|
|
||||||
fallthrough
|
|
||||||
case 8:
|
|
||||||
fallthrough
|
|
||||||
case 9:
|
|
||||||
fallthrough
|
|
||||||
case 10:
|
|
||||||
*e = GetActorsLibraryQueryParamType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetActorsLibraryQueryParamType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetActorsLibraryRequest struct {
|
type GetActorsLibraryRequest struct {
|
||||||
// The unique key of the Plex library.
|
// The unique key of the Plex library.
|
||||||
|
|||||||
@@ -3,11 +3,59 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"github.com/LukeHagar/plexgo/internal/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// GetAllLibrariesType - The library type
|
||||||
|
type GetAllLibrariesType string
|
||||||
|
|
||||||
|
const (
|
||||||
|
GetAllLibrariesTypeMovie GetAllLibrariesType = "movie"
|
||||||
|
GetAllLibrariesTypeTvShow GetAllLibrariesType = "show"
|
||||||
|
GetAllLibrariesTypeSeason GetAllLibrariesType = "season"
|
||||||
|
GetAllLibrariesTypeEpisode GetAllLibrariesType = "episode"
|
||||||
|
GetAllLibrariesTypeArtist GetAllLibrariesType = "artist"
|
||||||
|
GetAllLibrariesTypeAlbum GetAllLibrariesType = "album"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (e GetAllLibrariesType) ToPointer() *GetAllLibrariesType {
|
||||||
|
return &e
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hidden - UNKNOWN
|
||||||
|
type Hidden int
|
||||||
|
|
||||||
|
const (
|
||||||
|
HiddenDisable Hidden = 0
|
||||||
|
HiddenEnable Hidden = 1
|
||||||
|
)
|
||||||
|
|
||||||
|
func (e Hidden) ToPointer() *Hidden {
|
||||||
|
return &e
|
||||||
|
}
|
||||||
|
func (e *Hidden) UnmarshalJSON(data []byte) error {
|
||||||
|
var v int
|
||||||
|
if err := json.Unmarshal(data, &v); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
switch v {
|
||||||
|
case 0:
|
||||||
|
fallthrough
|
||||||
|
case 1:
|
||||||
|
*e = Hidden(v)
|
||||||
|
return nil
|
||||||
|
default:
|
||||||
|
return fmt.Errorf("invalid value for Hidden: %v", v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type GetAllLibrariesLocation struct {
|
type GetAllLibrariesLocation struct {
|
||||||
|
// The ID of the location.
|
||||||
ID int `json:"id"`
|
ID int `json:"id"`
|
||||||
|
// The path to the media item.
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,33 +74,59 @@ func (o *GetAllLibrariesLocation) GetPath() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type GetAllLibrariesDirectory struct {
|
type GetAllLibrariesDirectory struct {
|
||||||
|
// Indicates whether syncing is allowed.
|
||||||
AllowSync bool `json:"allowSync"`
|
AllowSync bool `json:"allowSync"`
|
||||||
|
// URL for the background artwork of the media container.
|
||||||
Art string `json:"art"`
|
Art string `json:"art"`
|
||||||
|
// The relative path to the composite media item.
|
||||||
Composite string `json:"composite"`
|
Composite string `json:"composite"`
|
||||||
|
// UNKNOWN
|
||||||
Filters bool `json:"filters"`
|
Filters bool `json:"filters"`
|
||||||
|
// Indicates whether the library is currently being refreshed or updated
|
||||||
Refreshing bool `json:"refreshing"`
|
Refreshing bool `json:"refreshing"`
|
||||||
|
// URL for the thumbnail image of the media container.
|
||||||
Thumb string `json:"thumb"`
|
Thumb string `json:"thumb"`
|
||||||
|
// The library key representing the unique identifier
|
||||||
Key string `json:"key"`
|
Key string `json:"key"`
|
||||||
Type string `json:"type"`
|
Type GetAllLibrariesType `json:"type"`
|
||||||
|
// The title of the library
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
|
// The Plex agent used to match and retrieve media metadata.
|
||||||
Agent string `json:"agent"`
|
Agent string `json:"agent"`
|
||||||
|
// UNKNOWN
|
||||||
Scanner string `json:"scanner"`
|
Scanner string `json:"scanner"`
|
||||||
|
// The Plex library language that has been set
|
||||||
Language string `json:"language"`
|
Language string `json:"language"`
|
||||||
|
// The universally unique identifier for the library.
|
||||||
UUID string `json:"uuid"`
|
UUID string `json:"uuid"`
|
||||||
// Unix epoch datetime in seconds
|
// Unix epoch datetime in seconds
|
||||||
UpdatedAt int64 `json:"updatedAt"`
|
UpdatedAt int64 `json:"updatedAt"`
|
||||||
// Unix epoch datetime in seconds
|
CreatedAt *int64 `json:"createdAt,omitempty"`
|
||||||
CreatedAt int64 `json:"createdAt"`
|
|
||||||
// Unix epoch datetime in seconds
|
// Unix epoch datetime in seconds
|
||||||
ScannedAt int64 `json:"scannedAt"`
|
ScannedAt int64 `json:"scannedAt"`
|
||||||
|
// UNKNOWN
|
||||||
Content bool `json:"content"`
|
Content bool `json:"content"`
|
||||||
|
// UNKNOWN
|
||||||
Directory bool `json:"directory"`
|
Directory bool `json:"directory"`
|
||||||
// Unix epoch datetime in seconds
|
// Timestamp (in seconds) representing the last time the content was modified.
|
||||||
|
// NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64
|
||||||
|
//
|
||||||
ContentChangedAt int64 `json:"contentChangedAt"`
|
ContentChangedAt int64 `json:"contentChangedAt"`
|
||||||
Hidden int `json:"hidden"`
|
Hidden *Hidden `default:"0" json:"hidden"`
|
||||||
Location []GetAllLibrariesLocation `json:"Location"`
|
Location []GetAllLibrariesLocation `json:"Location"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g GetAllLibrariesDirectory) MarshalJSON() ([]byte, error) {
|
||||||
|
return utils.MarshalJSON(g, "", false)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (g *GetAllLibrariesDirectory) UnmarshalJSON(data []byte) error {
|
||||||
|
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (o *GetAllLibrariesDirectory) GetAllowSync() bool {
|
func (o *GetAllLibrariesDirectory) GetAllowSync() bool {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return false
|
return false
|
||||||
@@ -102,9 +176,9 @@ func (o *GetAllLibrariesDirectory) GetKey() string {
|
|||||||
return o.Key
|
return o.Key
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetAllLibrariesDirectory) GetType() string {
|
func (o *GetAllLibrariesDirectory) GetType() GetAllLibrariesType {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return ""
|
return GetAllLibrariesType("")
|
||||||
}
|
}
|
||||||
return o.Type
|
return o.Type
|
||||||
}
|
}
|
||||||
@@ -151,9 +225,9 @@ func (o *GetAllLibrariesDirectory) GetUpdatedAt() int64 {
|
|||||||
return o.UpdatedAt
|
return o.UpdatedAt
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetAllLibrariesDirectory) GetCreatedAt() int64 {
|
func (o *GetAllLibrariesDirectory) GetCreatedAt() *int64 {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return 0
|
return nil
|
||||||
}
|
}
|
||||||
return o.CreatedAt
|
return o.CreatedAt
|
||||||
}
|
}
|
||||||
@@ -186,9 +260,9 @@ func (o *GetAllLibrariesDirectory) GetContentChangedAt() int64 {
|
|||||||
return o.ContentChangedAt
|
return o.ContentChangedAt
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetAllLibrariesDirectory) GetHidden() int {
|
func (o *GetAllLibrariesDirectory) GetHidden() *Hidden {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return 0
|
return nil
|
||||||
}
|
}
|
||||||
return o.Hidden
|
return o.Hidden
|
||||||
}
|
}
|
||||||
@@ -201,10 +275,13 @@ func (o *GetAllLibrariesDirectory) GetLocation() []GetAllLibrariesLocation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type GetAllLibrariesMediaContainer struct {
|
type GetAllLibrariesMediaContainer struct {
|
||||||
|
// Number of media items returned in this response.
|
||||||
Size int `json:"size"`
|
Size int `json:"size"`
|
||||||
|
// Indicates whether syncing is allowed.
|
||||||
AllowSync bool `json:"allowSync"`
|
AllowSync bool `json:"allowSync"`
|
||||||
|
// The primary title of the media container.
|
||||||
Title1 string `json:"title1"`
|
Title1 string `json:"title1"`
|
||||||
Directory []GetAllLibrariesDirectory `json:"Directory"`
|
Directory []GetAllLibrariesDirectory `json:"Directory,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetAllLibrariesMediaContainer) GetSize() int {
|
func (o *GetAllLibrariesMediaContainer) GetSize() int {
|
||||||
@@ -230,19 +307,19 @@ func (o *GetAllLibrariesMediaContainer) GetTitle1() string {
|
|||||||
|
|
||||||
func (o *GetAllLibrariesMediaContainer) GetDirectory() []GetAllLibrariesDirectory {
|
func (o *GetAllLibrariesMediaContainer) GetDirectory() []GetAllLibrariesDirectory {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return []GetAllLibrariesDirectory{}
|
return nil
|
||||||
}
|
}
|
||||||
return o.Directory
|
return o.Directory
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetAllLibrariesResponseBody - The libraries available on the Server
|
// GetAllLibrariesResponseBody - The libraries available on the Server
|
||||||
type GetAllLibrariesResponseBody struct {
|
type GetAllLibrariesResponseBody struct {
|
||||||
MediaContainer GetAllLibrariesMediaContainer `json:"MediaContainer"`
|
MediaContainer *GetAllLibrariesMediaContainer `json:"MediaContainer,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetAllLibrariesResponseBody) GetMediaContainer() GetAllLibrariesMediaContainer {
|
func (o *GetAllLibrariesResponseBody) GetMediaContainer() *GetAllLibrariesMediaContainer {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return GetAllLibrariesMediaContainer{}
|
return nil
|
||||||
}
|
}
|
||||||
return o.MediaContainer
|
return o.MediaContainer
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,31 +32,6 @@ const (
|
|||||||
func (e GetAllMediaLibraryQueryParamType) ToPointer() *GetAllMediaLibraryQueryParamType {
|
func (e GetAllMediaLibraryQueryParamType) ToPointer() *GetAllMediaLibraryQueryParamType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetAllMediaLibraryQueryParamType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v int64
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case 1:
|
|
||||||
fallthrough
|
|
||||||
case 2:
|
|
||||||
fallthrough
|
|
||||||
case 3:
|
|
||||||
fallthrough
|
|
||||||
case 4:
|
|
||||||
fallthrough
|
|
||||||
case 8:
|
|
||||||
fallthrough
|
|
||||||
case 9:
|
|
||||||
fallthrough
|
|
||||||
case 10:
|
|
||||||
*e = GetAllMediaLibraryQueryParamType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetAllMediaLibraryQueryParamType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetAllMediaLibraryQueryParamIncludeMeta - Adds the Meta object to the response
|
// GetAllMediaLibraryQueryParamIncludeMeta - Adds the Meta object to the response
|
||||||
type GetAllMediaLibraryQueryParamIncludeMeta int
|
type GetAllMediaLibraryQueryParamIncludeMeta int
|
||||||
@@ -660,29 +635,6 @@ const (
|
|||||||
func (e GetAllMediaLibraryLibraryType) ToPointer() *GetAllMediaLibraryLibraryType {
|
func (e GetAllMediaLibraryLibraryType) ToPointer() *GetAllMediaLibraryLibraryType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetAllMediaLibraryLibraryType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "movie":
|
|
||||||
fallthrough
|
|
||||||
case "show":
|
|
||||||
fallthrough
|
|
||||||
case "season":
|
|
||||||
fallthrough
|
|
||||||
case "episode":
|
|
||||||
fallthrough
|
|
||||||
case "artist":
|
|
||||||
fallthrough
|
|
||||||
case "album":
|
|
||||||
*e = GetAllMediaLibraryLibraryType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetAllMediaLibraryLibraryType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetAllMediaLibraryLibraryResponseType string
|
type GetAllMediaLibraryLibraryResponseType string
|
||||||
|
|
||||||
@@ -696,25 +648,6 @@ const (
|
|||||||
func (e GetAllMediaLibraryLibraryResponseType) ToPointer() *GetAllMediaLibraryLibraryResponseType {
|
func (e GetAllMediaLibraryLibraryResponseType) ToPointer() *GetAllMediaLibraryLibraryResponseType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetAllMediaLibraryLibraryResponseType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "coverPoster":
|
|
||||||
fallthrough
|
|
||||||
case "background":
|
|
||||||
fallthrough
|
|
||||||
case "snapshot":
|
|
||||||
fallthrough
|
|
||||||
case "clearLogo":
|
|
||||||
*e = GetAllMediaLibraryLibraryResponseType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetAllMediaLibraryLibraryResponseType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetAllMediaLibraryImage struct {
|
type GetAllMediaLibraryImage struct {
|
||||||
Alt string `json:"alt"`
|
Alt string `json:"alt"`
|
||||||
@@ -985,17 +918,39 @@ func (e *GetAllMediaLibraryHasThumbnail) UnmarshalJSON(data []byte) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetAllMediaLibraryStreamType - Stream type:
|
||||||
|
// - 1 = video
|
||||||
|
// - 2 = audio
|
||||||
|
// - 3 = subtitle
|
||||||
|
type GetAllMediaLibraryStreamType int
|
||||||
|
|
||||||
|
const (
|
||||||
|
GetAllMediaLibraryStreamTypeVideo GetAllMediaLibraryStreamType = 1
|
||||||
|
GetAllMediaLibraryStreamTypeAudio GetAllMediaLibraryStreamType = 2
|
||||||
|
GetAllMediaLibraryStreamTypeSubtitle GetAllMediaLibraryStreamType = 3
|
||||||
|
)
|
||||||
|
|
||||||
|
func (e GetAllMediaLibraryStreamType) ToPointer() *GetAllMediaLibraryStreamType {
|
||||||
|
return &e
|
||||||
|
}
|
||||||
|
|
||||||
type GetAllMediaLibraryStream struct {
|
type GetAllMediaLibraryStream struct {
|
||||||
// Unique stream identifier.
|
// Unique stream identifier.
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
// Stream type (1=video, 2=audio, 3=subtitle).
|
// Stream type:
|
||||||
StreamType int `json:"streamType"`
|
// - 1 = video
|
||||||
|
// - 2 = audio
|
||||||
|
// - 3 = subtitle
|
||||||
|
//
|
||||||
|
StreamType GetAllMediaLibraryStreamType `json:"streamType"`
|
||||||
|
// Format of the stream (e.g., srt).
|
||||||
|
Format *string `json:"format,omitempty"`
|
||||||
// Indicates if this stream is default.
|
// Indicates if this stream is default.
|
||||||
Default *bool `json:"default,omitempty"`
|
Default *bool `json:"default,omitempty"`
|
||||||
// Codec used by the stream.
|
// Codec used by the stream.
|
||||||
Codec string `json:"codec"`
|
Codec string `json:"codec"`
|
||||||
// Index of the stream.
|
// Index of the stream.
|
||||||
Index int `json:"index"`
|
Index *int `json:"index,omitempty"`
|
||||||
// Bitrate of the stream.
|
// Bitrate of the stream.
|
||||||
Bitrate *int `json:"bitrate,omitempty"`
|
Bitrate *int `json:"bitrate,omitempty"`
|
||||||
// Language of the stream.
|
// Language of the stream.
|
||||||
@@ -1043,6 +998,8 @@ type GetAllMediaLibraryStream struct {
|
|||||||
ColorTrc *string `json:"colorTrc,omitempty"`
|
ColorTrc *string `json:"colorTrc,omitempty"`
|
||||||
// Frame rate of the stream.
|
// Frame rate of the stream.
|
||||||
FrameRate *float32 `json:"frameRate,omitempty"`
|
FrameRate *float32 `json:"frameRate,omitempty"`
|
||||||
|
// Key to access this stream part.
|
||||||
|
Key *string `json:"key,omitempty"`
|
||||||
// Height of the video stream.
|
// Height of the video stream.
|
||||||
Height *int `json:"height,omitempty"`
|
Height *int `json:"height,omitempty"`
|
||||||
// Video level.
|
// Video level.
|
||||||
@@ -1088,13 +1045,20 @@ func (o *GetAllMediaLibraryStream) GetID() int64 {
|
|||||||
return o.ID
|
return o.ID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetAllMediaLibraryStream) GetStreamType() int {
|
func (o *GetAllMediaLibraryStream) GetStreamType() GetAllMediaLibraryStreamType {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return 0
|
return GetAllMediaLibraryStreamType(0)
|
||||||
}
|
}
|
||||||
return o.StreamType
|
return o.StreamType
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (o *GetAllMediaLibraryStream) GetFormat() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Format
|
||||||
|
}
|
||||||
|
|
||||||
func (o *GetAllMediaLibraryStream) GetDefault() *bool {
|
func (o *GetAllMediaLibraryStream) GetDefault() *bool {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return nil
|
return nil
|
||||||
@@ -1109,9 +1073,9 @@ func (o *GetAllMediaLibraryStream) GetCodec() string {
|
|||||||
return o.Codec
|
return o.Codec
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetAllMediaLibraryStream) GetIndex() int {
|
func (o *GetAllMediaLibraryStream) GetIndex() *int {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return 0
|
return nil
|
||||||
}
|
}
|
||||||
return o.Index
|
return o.Index
|
||||||
}
|
}
|
||||||
@@ -1284,6 +1248,13 @@ func (o *GetAllMediaLibraryStream) GetFrameRate() *float32 {
|
|||||||
return o.FrameRate
|
return o.FrameRate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (o *GetAllMediaLibraryStream) GetKey() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Key
|
||||||
|
}
|
||||||
|
|
||||||
func (o *GetAllMediaLibraryStream) GetHeight() *int {
|
func (o *GetAllMediaLibraryStream) GetHeight() *int {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -29,31 +27,6 @@ const (
|
|||||||
func (e GetCountriesLibraryQueryParamType) ToPointer() *GetCountriesLibraryQueryParamType {
|
func (e GetCountriesLibraryQueryParamType) ToPointer() *GetCountriesLibraryQueryParamType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetCountriesLibraryQueryParamType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v int64
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case 1:
|
|
||||||
fallthrough
|
|
||||||
case 2:
|
|
||||||
fallthrough
|
|
||||||
case 3:
|
|
||||||
fallthrough
|
|
||||||
case 4:
|
|
||||||
fallthrough
|
|
||||||
case 8:
|
|
||||||
fallthrough
|
|
||||||
case 9:
|
|
||||||
fallthrough
|
|
||||||
case 10:
|
|
||||||
*e = GetCountriesLibraryQueryParamType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetCountriesLibraryQueryParamType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetCountriesLibraryRequest struct {
|
type GetCountriesLibraryRequest struct {
|
||||||
// The unique key of the Plex library.
|
// The unique key of the Plex library.
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -29,31 +27,6 @@ const (
|
|||||||
func (e GetGenresLibraryQueryParamType) ToPointer() *GetGenresLibraryQueryParamType {
|
func (e GetGenresLibraryQueryParamType) ToPointer() *GetGenresLibraryQueryParamType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetGenresLibraryQueryParamType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v int64
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case 1:
|
|
||||||
fallthrough
|
|
||||||
case 2:
|
|
||||||
fallthrough
|
|
||||||
case 3:
|
|
||||||
fallthrough
|
|
||||||
case 4:
|
|
||||||
fallthrough
|
|
||||||
case 8:
|
|
||||||
fallthrough
|
|
||||||
case 9:
|
|
||||||
fallthrough
|
|
||||||
case 10:
|
|
||||||
*e = GetGenresLibraryQueryParamType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetGenresLibraryQueryParamType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetGenresLibraryRequest struct {
|
type GetGenresLibraryRequest struct {
|
||||||
// The unique key of the Plex library.
|
// The unique key of the Plex library.
|
||||||
|
|||||||
@@ -35,49 +35,6 @@ const (
|
|||||||
func (e Tag) ToPointer() *Tag {
|
func (e Tag) ToPointer() *Tag {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *Tag) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "unwatched":
|
|
||||||
fallthrough
|
|
||||||
case "newest":
|
|
||||||
fallthrough
|
|
||||||
case "recentlyAdded":
|
|
||||||
fallthrough
|
|
||||||
case "recentlyViewed":
|
|
||||||
fallthrough
|
|
||||||
case "onDeck":
|
|
||||||
fallthrough
|
|
||||||
case "collection":
|
|
||||||
fallthrough
|
|
||||||
case "edition":
|
|
||||||
fallthrough
|
|
||||||
case "year":
|
|
||||||
fallthrough
|
|
||||||
case "decade":
|
|
||||||
fallthrough
|
|
||||||
case "director":
|
|
||||||
fallthrough
|
|
||||||
case "contentRating":
|
|
||||||
fallthrough
|
|
||||||
case "rating":
|
|
||||||
fallthrough
|
|
||||||
case "resolution":
|
|
||||||
fallthrough
|
|
||||||
case "firstCharacter":
|
|
||||||
fallthrough
|
|
||||||
case "folder":
|
|
||||||
fallthrough
|
|
||||||
case "albums":
|
|
||||||
*e = Tag(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for Tag: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// IncludeGuids - Adds the Guids object to the response
|
// IncludeGuids - Adds the Guids object to the response
|
||||||
type IncludeGuids int
|
type IncludeGuids int
|
||||||
@@ -127,31 +84,6 @@ const (
|
|||||||
func (e GetLibraryItemsQueryParamType) ToPointer() *GetLibraryItemsQueryParamType {
|
func (e GetLibraryItemsQueryParamType) ToPointer() *GetLibraryItemsQueryParamType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetLibraryItemsQueryParamType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v int64
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case 1:
|
|
||||||
fallthrough
|
|
||||||
case 2:
|
|
||||||
fallthrough
|
|
||||||
case 3:
|
|
||||||
fallthrough
|
|
||||||
case 4:
|
|
||||||
fallthrough
|
|
||||||
case 8:
|
|
||||||
fallthrough
|
|
||||||
case 9:
|
|
||||||
fallthrough
|
|
||||||
case 10:
|
|
||||||
*e = GetLibraryItemsQueryParamType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetLibraryItemsQueryParamType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetLibraryItemsQueryParamIncludeMeta - Adds the Meta object to the response
|
// GetLibraryItemsQueryParamIncludeMeta - Adds the Meta object to the response
|
||||||
type GetLibraryItemsQueryParamIncludeMeta int
|
type GetLibraryItemsQueryParamIncludeMeta int
|
||||||
@@ -615,29 +547,6 @@ const (
|
|||||||
func (e GetLibraryItemsLibraryType) ToPointer() *GetLibraryItemsLibraryType {
|
func (e GetLibraryItemsLibraryType) ToPointer() *GetLibraryItemsLibraryType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetLibraryItemsLibraryType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "movie":
|
|
||||||
fallthrough
|
|
||||||
case "show":
|
|
||||||
fallthrough
|
|
||||||
case "season":
|
|
||||||
fallthrough
|
|
||||||
case "episode":
|
|
||||||
fallthrough
|
|
||||||
case "artist":
|
|
||||||
fallthrough
|
|
||||||
case "album":
|
|
||||||
*e = GetLibraryItemsLibraryType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetLibraryItemsLibraryType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FlattenSeasons - Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
// FlattenSeasons - Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
||||||
type FlattenSeasons string
|
type FlattenSeasons string
|
||||||
@@ -651,23 +560,6 @@ const (
|
|||||||
func (e FlattenSeasons) ToPointer() *FlattenSeasons {
|
func (e FlattenSeasons) ToPointer() *FlattenSeasons {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *FlattenSeasons) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "-1":
|
|
||||||
fallthrough
|
|
||||||
case "0":
|
|
||||||
fallthrough
|
|
||||||
case "1":
|
|
||||||
*e = FlattenSeasons(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for FlattenSeasons: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// EpisodeSort - Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
// EpisodeSort - Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||||
type EpisodeSort string
|
type EpisodeSort string
|
||||||
@@ -681,23 +573,6 @@ const (
|
|||||||
func (e EpisodeSort) ToPointer() *EpisodeSort {
|
func (e EpisodeSort) ToPointer() *EpisodeSort {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *EpisodeSort) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "-1":
|
|
||||||
fallthrough
|
|
||||||
case "0":
|
|
||||||
fallthrough
|
|
||||||
case "1":
|
|
||||||
*e = EpisodeSort(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for EpisodeSort: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// EnableCreditsMarkerGeneration - Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
// EnableCreditsMarkerGeneration - Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||||
type EnableCreditsMarkerGeneration string
|
type EnableCreditsMarkerGeneration string
|
||||||
@@ -710,21 +585,6 @@ const (
|
|||||||
func (e EnableCreditsMarkerGeneration) ToPointer() *EnableCreditsMarkerGeneration {
|
func (e EnableCreditsMarkerGeneration) ToPointer() *EnableCreditsMarkerGeneration {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *EnableCreditsMarkerGeneration) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "-1":
|
|
||||||
fallthrough
|
|
||||||
case "0":
|
|
||||||
*e = EnableCreditsMarkerGeneration(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for EnableCreditsMarkerGeneration: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ShowOrdering - Setting that indicates the episode ordering for the show.
|
// ShowOrdering - Setting that indicates the episode ordering for the show.
|
||||||
// None = Library default,
|
// None = Library default,
|
||||||
@@ -745,27 +605,6 @@ const (
|
|||||||
func (e ShowOrdering) ToPointer() *ShowOrdering {
|
func (e ShowOrdering) ToPointer() *ShowOrdering {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *ShowOrdering) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "None":
|
|
||||||
fallthrough
|
|
||||||
case "tmdbAiring":
|
|
||||||
fallthrough
|
|
||||||
case "aired":
|
|
||||||
fallthrough
|
|
||||||
case "dvd":
|
|
||||||
fallthrough
|
|
||||||
case "absolute":
|
|
||||||
*e = ShowOrdering(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for ShowOrdering: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetLibraryItemsOptimizedForStreaming int
|
type GetLibraryItemsOptimizedForStreaming int
|
||||||
|
|
||||||
@@ -1652,25 +1491,6 @@ const (
|
|||||||
func (e GetLibraryItemsLibraryResponse200Type) ToPointer() *GetLibraryItemsLibraryResponse200Type {
|
func (e GetLibraryItemsLibraryResponse200Type) ToPointer() *GetLibraryItemsLibraryResponse200Type {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetLibraryItemsLibraryResponse200Type) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "coverPoster":
|
|
||||||
fallthrough
|
|
||||||
case "background":
|
|
||||||
fallthrough
|
|
||||||
case "snapshot":
|
|
||||||
fallthrough
|
|
||||||
case "clearLogo":
|
|
||||||
*e = GetLibraryItemsLibraryResponse200Type(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetLibraryItemsLibraryResponse200Type: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetLibraryItemsImage struct {
|
type GetLibraryItemsImage struct {
|
||||||
Alt string `json:"alt"`
|
Alt string `json:"alt"`
|
||||||
|
|||||||
165
models/operations/getmediaarts.go
Normal file
165
models/operations/getmediaarts.go
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||||
|
|
||||||
|
package operations
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
type GetMediaArtsRequest struct {
|
||||||
|
// the id of the library item to return the artwork of.
|
||||||
|
RatingKey int64 `pathParam:"style=simple,explode=false,name=ratingKey"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsRequest) GetRatingKey() int64 {
|
||||||
|
if o == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return o.RatingKey
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetMediaArtsMetadata struct {
|
||||||
|
// The URL of the artwork.
|
||||||
|
Key string `json:"key"`
|
||||||
|
// The provider of the artwork.
|
||||||
|
Provider *string `json:"provider,omitempty"`
|
||||||
|
// The URL of the artwork.
|
||||||
|
RatingKey string `json:"ratingKey"`
|
||||||
|
// Whether this is the selected artwork.
|
||||||
|
Selected bool `json:"selected"`
|
||||||
|
// The URL of the artwork thumbnail.
|
||||||
|
Thumb string `json:"thumb"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsMetadata) GetKey() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.Key
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsMetadata) GetProvider() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Provider
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsMetadata) GetRatingKey() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.RatingKey
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsMetadata) GetSelected() bool {
|
||||||
|
if o == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return o.Selected
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsMetadata) GetThumb() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.Thumb
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetMediaArtsMediaContainer struct {
|
||||||
|
// Number of media items returned in this response.
|
||||||
|
Size int `json:"size"`
|
||||||
|
// The version number for media tags.
|
||||||
|
MediaTagVersion int64 `json:"mediaTagVersion"`
|
||||||
|
// The prefix used for media tag resource paths.
|
||||||
|
MediaTagPrefix string `json:"mediaTagPrefix"`
|
||||||
|
// An plugin identifier for the media container.
|
||||||
|
Identifier string `json:"identifier"`
|
||||||
|
Metadata []GetMediaArtsMetadata `json:"Metadata"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsMediaContainer) GetSize() int {
|
||||||
|
if o == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return o.Size
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsMediaContainer) GetMediaTagVersion() int64 {
|
||||||
|
if o == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return o.MediaTagVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsMediaContainer) GetMediaTagPrefix() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.MediaTagPrefix
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsMediaContainer) GetIdentifier() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.Identifier
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsMediaContainer) GetMetadata() []GetMediaArtsMetadata {
|
||||||
|
if o == nil {
|
||||||
|
return []GetMediaArtsMetadata{}
|
||||||
|
}
|
||||||
|
return o.Metadata
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMediaArtsResponseBody - The available background artwork for the library item.
|
||||||
|
type GetMediaArtsResponseBody struct {
|
||||||
|
MediaContainer *GetMediaArtsMediaContainer `json:"MediaContainer,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsResponseBody) GetMediaContainer() *GetMediaArtsMediaContainer {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.MediaContainer
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetMediaArtsResponse struct {
|
||||||
|
// HTTP response content type for this operation
|
||||||
|
ContentType string
|
||||||
|
// HTTP response status code for this operation
|
||||||
|
StatusCode int
|
||||||
|
// Raw HTTP response; suitable for custom response parsing
|
||||||
|
RawResponse *http.Response
|
||||||
|
// The available background artwork for the library item.
|
||||||
|
Object *GetMediaArtsResponseBody
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsResponse) GetContentType() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.ContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsResponse) GetStatusCode() int {
|
||||||
|
if o == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return o.StatusCode
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsResponse) GetRawResponse() *http.Response {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.RawResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaArtsResponse) GetObject() *GetMediaArtsResponseBody {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Object
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
165
models/operations/getmediaposters.go
Normal file
165
models/operations/getmediaposters.go
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||||
|
|
||||||
|
package operations
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
type GetMediaPostersRequest struct {
|
||||||
|
// the id of the library item to return the posters of.
|
||||||
|
RatingKey int64 `pathParam:"style=simple,explode=false,name=ratingKey"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersRequest) GetRatingKey() int64 {
|
||||||
|
if o == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return o.RatingKey
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetMediaPostersMetadata struct {
|
||||||
|
// The URL of the poster.
|
||||||
|
Key string `json:"key"`
|
||||||
|
// The provider of the poster.
|
||||||
|
Provider *string `json:"provider,omitempty"`
|
||||||
|
// The URL of the poster.
|
||||||
|
RatingKey string `json:"ratingKey"`
|
||||||
|
// Whether this is the selected poster.
|
||||||
|
Selected bool `json:"selected"`
|
||||||
|
// The URL of the poster thumbnail.
|
||||||
|
Thumb string `json:"thumb"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersMetadata) GetKey() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.Key
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersMetadata) GetProvider() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Provider
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersMetadata) GetRatingKey() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.RatingKey
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersMetadata) GetSelected() bool {
|
||||||
|
if o == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return o.Selected
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersMetadata) GetThumb() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.Thumb
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetMediaPostersMediaContainer struct {
|
||||||
|
// Number of media items returned in this response.
|
||||||
|
Size int `json:"size"`
|
||||||
|
// The version number for media tags.
|
||||||
|
MediaTagVersion int64 `json:"mediaTagVersion"`
|
||||||
|
// The prefix used for media tag resource paths.
|
||||||
|
MediaTagPrefix string `json:"mediaTagPrefix"`
|
||||||
|
// An plugin identifier for the media container.
|
||||||
|
Identifier string `json:"identifier"`
|
||||||
|
Metadata []GetMediaPostersMetadata `json:"Metadata"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersMediaContainer) GetSize() int {
|
||||||
|
if o == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return o.Size
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersMediaContainer) GetMediaTagVersion() int64 {
|
||||||
|
if o == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return o.MediaTagVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersMediaContainer) GetMediaTagPrefix() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.MediaTagPrefix
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersMediaContainer) GetIdentifier() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.Identifier
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersMediaContainer) GetMetadata() []GetMediaPostersMetadata {
|
||||||
|
if o == nil {
|
||||||
|
return []GetMediaPostersMetadata{}
|
||||||
|
}
|
||||||
|
return o.Metadata
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMediaPostersResponseBody - The available posters for the library item.
|
||||||
|
type GetMediaPostersResponseBody struct {
|
||||||
|
MediaContainer *GetMediaPostersMediaContainer `json:"MediaContainer,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersResponseBody) GetMediaContainer() *GetMediaPostersMediaContainer {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.MediaContainer
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetMediaPostersResponse struct {
|
||||||
|
// HTTP response content type for this operation
|
||||||
|
ContentType string
|
||||||
|
// HTTP response status code for this operation
|
||||||
|
StatusCode int
|
||||||
|
// Raw HTTP response; suitable for custom response parsing
|
||||||
|
RawResponse *http.Response
|
||||||
|
// The available posters for the library item.
|
||||||
|
Object *GetMediaPostersResponseBody
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersResponse) GetContentType() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.ContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersResponse) GetStatusCode() int {
|
||||||
|
if o == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return o.StatusCode
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersResponse) GetRawResponse() *http.Response {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.RawResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetMediaPostersResponse) GetObject() *GetMediaPostersResponseBody {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Object
|
||||||
|
}
|
||||||
@@ -3,8 +3,6 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"github.com/LukeHagar/plexgo/internal/utils"
|
"github.com/LukeHagar/plexgo/internal/utils"
|
||||||
"github.com/LukeHagar/plexgo/types"
|
"github.com/LukeHagar/plexgo/types"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -31,31 +29,6 @@ const (
|
|||||||
func (e GetPlaylistContentsQueryParamType) ToPointer() *GetPlaylistContentsQueryParamType {
|
func (e GetPlaylistContentsQueryParamType) ToPointer() *GetPlaylistContentsQueryParamType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetPlaylistContentsQueryParamType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v int64
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case 1:
|
|
||||||
fallthrough
|
|
||||||
case 2:
|
|
||||||
fallthrough
|
|
||||||
case 3:
|
|
||||||
fallthrough
|
|
||||||
case 4:
|
|
||||||
fallthrough
|
|
||||||
case 8:
|
|
||||||
fallthrough
|
|
||||||
case 9:
|
|
||||||
fallthrough
|
|
||||||
case 10:
|
|
||||||
*e = GetPlaylistContentsQueryParamType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetPlaylistContentsQueryParamType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetPlaylistContentsRequest struct {
|
type GetPlaylistContentsRequest struct {
|
||||||
// the ID of the playlist
|
// the ID of the playlist
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -20,23 +18,6 @@ const (
|
|||||||
func (e PlaylistType) ToPointer() *PlaylistType {
|
func (e PlaylistType) ToPointer() *PlaylistType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *PlaylistType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "audio":
|
|
||||||
fallthrough
|
|
||||||
case "video":
|
|
||||||
fallthrough
|
|
||||||
case "photo":
|
|
||||||
*e = PlaylistType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for PlaylistType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// QueryParamSmart - type of playlists to return (default is all).
|
// QueryParamSmart - type of playlists to return (default is all).
|
||||||
type QueryParamSmart int64
|
type QueryParamSmart int64
|
||||||
@@ -49,21 +30,6 @@ const (
|
|||||||
func (e QueryParamSmart) ToPointer() *QueryParamSmart {
|
func (e QueryParamSmart) ToPointer() *QueryParamSmart {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *QueryParamSmart) UnmarshalJSON(data []byte) error {
|
|
||||||
var v int64
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case 0:
|
|
||||||
fallthrough
|
|
||||||
case 1:
|
|
||||||
*e = QueryParamSmart(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for QueryParamSmart: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetPlaylistsRequest struct {
|
type GetPlaylistsRequest struct {
|
||||||
// limit to a type of playlist.
|
// limit to a type of playlist.
|
||||||
|
|||||||
@@ -32,31 +32,6 @@ const (
|
|||||||
func (e Type) ToPointer() *Type {
|
func (e Type) ToPointer() *Type {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *Type) UnmarshalJSON(data []byte) error {
|
|
||||||
var v int64
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case 1:
|
|
||||||
fallthrough
|
|
||||||
case 2:
|
|
||||||
fallthrough
|
|
||||||
case 3:
|
|
||||||
fallthrough
|
|
||||||
case 4:
|
|
||||||
fallthrough
|
|
||||||
case 8:
|
|
||||||
fallthrough
|
|
||||||
case 9:
|
|
||||||
fallthrough
|
|
||||||
case 10:
|
|
||||||
*e = Type(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for Type: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// IncludeMeta - Adds the Meta object to the response
|
// IncludeMeta - Adds the Meta object to the response
|
||||||
type IncludeMeta int
|
type IncludeMeta int
|
||||||
@@ -537,29 +512,6 @@ const (
|
|||||||
func (e GetRecentlyAddedHubsType) ToPointer() *GetRecentlyAddedHubsType {
|
func (e GetRecentlyAddedHubsType) ToPointer() *GetRecentlyAddedHubsType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetRecentlyAddedHubsType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "movie":
|
|
||||||
fallthrough
|
|
||||||
case "show":
|
|
||||||
fallthrough
|
|
||||||
case "season":
|
|
||||||
fallthrough
|
|
||||||
case "episode":
|
|
||||||
fallthrough
|
|
||||||
case "artist":
|
|
||||||
fallthrough
|
|
||||||
case "album":
|
|
||||||
*e = GetRecentlyAddedHubsType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetRecentlyAddedHubsType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetRecentlyAddedHubsResponseType string
|
type GetRecentlyAddedHubsResponseType string
|
||||||
|
|
||||||
@@ -573,25 +525,6 @@ const (
|
|||||||
func (e GetRecentlyAddedHubsResponseType) ToPointer() *GetRecentlyAddedHubsResponseType {
|
func (e GetRecentlyAddedHubsResponseType) ToPointer() *GetRecentlyAddedHubsResponseType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetRecentlyAddedHubsResponseType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "coverPoster":
|
|
||||||
fallthrough
|
|
||||||
case "background":
|
|
||||||
fallthrough
|
|
||||||
case "snapshot":
|
|
||||||
fallthrough
|
|
||||||
case "clearLogo":
|
|
||||||
*e = GetRecentlyAddedHubsResponseType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetRecentlyAddedHubsResponseType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetRecentlyAddedImage struct {
|
type GetRecentlyAddedImage struct {
|
||||||
Alt string `json:"alt"`
|
Alt string `json:"alt"`
|
||||||
@@ -862,17 +795,39 @@ func (e *HasThumbnail) UnmarshalJSON(data []byte) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// StreamType - Stream type:
|
||||||
|
// - 1 = video
|
||||||
|
// - 2 = audio
|
||||||
|
// - 3 = subtitle
|
||||||
|
type StreamType int
|
||||||
|
|
||||||
|
const (
|
||||||
|
StreamTypeVideo StreamType = 1
|
||||||
|
StreamTypeAudio StreamType = 2
|
||||||
|
StreamTypeSubtitle StreamType = 3
|
||||||
|
)
|
||||||
|
|
||||||
|
func (e StreamType) ToPointer() *StreamType {
|
||||||
|
return &e
|
||||||
|
}
|
||||||
|
|
||||||
type Stream struct {
|
type Stream struct {
|
||||||
// Unique stream identifier.
|
// Unique stream identifier.
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
// Stream type (1=video, 2=audio, 3=subtitle).
|
// Stream type:
|
||||||
StreamType int `json:"streamType"`
|
// - 1 = video
|
||||||
|
// - 2 = audio
|
||||||
|
// - 3 = subtitle
|
||||||
|
//
|
||||||
|
StreamType StreamType `json:"streamType"`
|
||||||
|
// Format of the stream (e.g., srt).
|
||||||
|
Format *string `json:"format,omitempty"`
|
||||||
// Indicates if this stream is default.
|
// Indicates if this stream is default.
|
||||||
Default *bool `json:"default,omitempty"`
|
Default *bool `json:"default,omitempty"`
|
||||||
// Codec used by the stream.
|
// Codec used by the stream.
|
||||||
Codec string `json:"codec"`
|
Codec string `json:"codec"`
|
||||||
// Index of the stream.
|
// Index of the stream.
|
||||||
Index int `json:"index"`
|
Index *int `json:"index,omitempty"`
|
||||||
// Bitrate of the stream.
|
// Bitrate of the stream.
|
||||||
Bitrate *int `json:"bitrate,omitempty"`
|
Bitrate *int `json:"bitrate,omitempty"`
|
||||||
// Language of the stream.
|
// Language of the stream.
|
||||||
@@ -920,6 +875,8 @@ type Stream struct {
|
|||||||
ColorTrc *string `json:"colorTrc,omitempty"`
|
ColorTrc *string `json:"colorTrc,omitempty"`
|
||||||
// Frame rate of the stream.
|
// Frame rate of the stream.
|
||||||
FrameRate *float32 `json:"frameRate,omitempty"`
|
FrameRate *float32 `json:"frameRate,omitempty"`
|
||||||
|
// Key to access this stream part.
|
||||||
|
Key *string `json:"key,omitempty"`
|
||||||
// Height of the video stream.
|
// Height of the video stream.
|
||||||
Height *int `json:"height,omitempty"`
|
Height *int `json:"height,omitempty"`
|
||||||
// Video level.
|
// Video level.
|
||||||
@@ -965,13 +922,20 @@ func (o *Stream) GetID() int64 {
|
|||||||
return o.ID
|
return o.ID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Stream) GetStreamType() int {
|
func (o *Stream) GetStreamType() StreamType {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return 0
|
return StreamType(0)
|
||||||
}
|
}
|
||||||
return o.StreamType
|
return o.StreamType
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (o *Stream) GetFormat() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Format
|
||||||
|
}
|
||||||
|
|
||||||
func (o *Stream) GetDefault() *bool {
|
func (o *Stream) GetDefault() *bool {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return nil
|
return nil
|
||||||
@@ -986,9 +950,9 @@ func (o *Stream) GetCodec() string {
|
|||||||
return o.Codec
|
return o.Codec
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Stream) GetIndex() int {
|
func (o *Stream) GetIndex() *int {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return 0
|
return nil
|
||||||
}
|
}
|
||||||
return o.Index
|
return o.Index
|
||||||
}
|
}
|
||||||
@@ -1161,6 +1125,13 @@ func (o *Stream) GetFrameRate() *float32 {
|
|||||||
return o.FrameRate
|
return o.FrameRate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (o *Stream) GetKey() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Key
|
||||||
|
}
|
||||||
|
|
||||||
func (o *Stream) GetHeight() *int {
|
func (o *Stream) GetHeight() *int {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return nil
|
return nil
|
||||||
@@ -1660,13 +1631,13 @@ func (o *Genre) GetTag() string {
|
|||||||
|
|
||||||
// Country - The filter query string for country media items.
|
// Country - The filter query string for country media items.
|
||||||
type Country struct {
|
type Country struct {
|
||||||
ID int64 `json:"id"`
|
ID int `json:"id"`
|
||||||
// The country of origin of this media item
|
// The country of origin of this media item
|
||||||
Tag string `json:"tag"`
|
Tag string `json:"tag"`
|
||||||
Filter *string `json:"filter,omitempty"`
|
Filter *string `json:"filter,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Country) GetID() int64 {
|
func (o *Country) GetID() int {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -1701,7 +1672,7 @@ func (o *Director) GetTag() string {
|
|||||||
|
|
||||||
type Writer struct {
|
type Writer struct {
|
||||||
// Unique identifier for the writer.
|
// Unique identifier for the writer.
|
||||||
ID int64 `json:"id"`
|
ID int `json:"id"`
|
||||||
// The filter string used to query this writer.
|
// The filter string used to query this writer.
|
||||||
Filter string `json:"filter"`
|
Filter string `json:"filter"`
|
||||||
// The role of Writer
|
// The role of Writer
|
||||||
@@ -1710,7 +1681,7 @@ type Writer struct {
|
|||||||
TagKey *string `json:"tagKey,omitempty"`
|
TagKey *string `json:"tagKey,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Writer) GetID() int64 {
|
func (o *Writer) GetID() int {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -1797,7 +1768,7 @@ func (o *Role) GetThumb() *string {
|
|||||||
|
|
||||||
type Producer struct {
|
type Producer struct {
|
||||||
// Unique identifier for the producer.
|
// Unique identifier for the producer.
|
||||||
ID int64 `json:"id"`
|
ID int `json:"id"`
|
||||||
// The filter string used to query this producer.
|
// The filter string used to query this producer.
|
||||||
Filter string `json:"filter"`
|
Filter string `json:"filter"`
|
||||||
// The name of the producer
|
// The name of the producer
|
||||||
@@ -1808,7 +1779,7 @@ type Producer struct {
|
|||||||
Thumb *string `json:"thumb,omitempty"`
|
Thumb *string `json:"thumb,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Producer) GetID() int64 {
|
func (o *Producer) GetID() int {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,31 +31,6 @@ const (
|
|||||||
func (e QueryParamType) ToPointer() *QueryParamType {
|
func (e QueryParamType) ToPointer() *QueryParamType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *QueryParamType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v int64
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case 1:
|
|
||||||
fallthrough
|
|
||||||
case 2:
|
|
||||||
fallthrough
|
|
||||||
case 3:
|
|
||||||
fallthrough
|
|
||||||
case 4:
|
|
||||||
fallthrough
|
|
||||||
case 8:
|
|
||||||
fallthrough
|
|
||||||
case 9:
|
|
||||||
fallthrough
|
|
||||||
case 10:
|
|
||||||
*e = QueryParamType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for QueryParamType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// QueryParamIncludeMeta - Adds the Meta object to the response
|
// QueryParamIncludeMeta - Adds the Meta object to the response
|
||||||
type QueryParamIncludeMeta int
|
type QueryParamIncludeMeta int
|
||||||
|
|||||||
@@ -23,27 +23,6 @@ const (
|
|||||||
func (e SearchTypes) ToPointer() *SearchTypes {
|
func (e SearchTypes) ToPointer() *SearchTypes {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *SearchTypes) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "movies":
|
|
||||||
fallthrough
|
|
||||||
case "music":
|
|
||||||
fallthrough
|
|
||||||
case "otherVideos":
|
|
||||||
fallthrough
|
|
||||||
case "people":
|
|
||||||
fallthrough
|
|
||||||
case "tv":
|
|
||||||
*e = SearchTypes(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for SearchTypes: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetSearchAllLibrariesQueryParamIncludeCollections - Whether to include collections in the search results.
|
// GetSearchAllLibrariesQueryParamIncludeCollections - Whether to include collections in the search results.
|
||||||
type GetSearchAllLibrariesQueryParamIncludeCollections int
|
type GetSearchAllLibrariesQueryParamIncludeCollections int
|
||||||
@@ -183,29 +162,6 @@ const (
|
|||||||
func (e GetSearchAllLibrariesType) ToPointer() *GetSearchAllLibrariesType {
|
func (e GetSearchAllLibrariesType) ToPointer() *GetSearchAllLibrariesType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetSearchAllLibrariesType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "movie":
|
|
||||||
fallthrough
|
|
||||||
case "show":
|
|
||||||
fallthrough
|
|
||||||
case "season":
|
|
||||||
fallthrough
|
|
||||||
case "episode":
|
|
||||||
fallthrough
|
|
||||||
case "artist":
|
|
||||||
fallthrough
|
|
||||||
case "album":
|
|
||||||
*e = GetSearchAllLibrariesType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetSearchAllLibrariesType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetSearchAllLibrariesFlattenSeasons - Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
// GetSearchAllLibrariesFlattenSeasons - Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
||||||
type GetSearchAllLibrariesFlattenSeasons string
|
type GetSearchAllLibrariesFlattenSeasons string
|
||||||
@@ -219,23 +175,6 @@ const (
|
|||||||
func (e GetSearchAllLibrariesFlattenSeasons) ToPointer() *GetSearchAllLibrariesFlattenSeasons {
|
func (e GetSearchAllLibrariesFlattenSeasons) ToPointer() *GetSearchAllLibrariesFlattenSeasons {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetSearchAllLibrariesFlattenSeasons) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "-1":
|
|
||||||
fallthrough
|
|
||||||
case "0":
|
|
||||||
fallthrough
|
|
||||||
case "1":
|
|
||||||
*e = GetSearchAllLibrariesFlattenSeasons(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetSearchAllLibrariesFlattenSeasons: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetSearchAllLibrariesEpisodeSort - Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
// GetSearchAllLibrariesEpisodeSort - Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||||
type GetSearchAllLibrariesEpisodeSort string
|
type GetSearchAllLibrariesEpisodeSort string
|
||||||
@@ -249,23 +188,6 @@ const (
|
|||||||
func (e GetSearchAllLibrariesEpisodeSort) ToPointer() *GetSearchAllLibrariesEpisodeSort {
|
func (e GetSearchAllLibrariesEpisodeSort) ToPointer() *GetSearchAllLibrariesEpisodeSort {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetSearchAllLibrariesEpisodeSort) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "-1":
|
|
||||||
fallthrough
|
|
||||||
case "0":
|
|
||||||
fallthrough
|
|
||||||
case "1":
|
|
||||||
*e = GetSearchAllLibrariesEpisodeSort(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetSearchAllLibrariesEpisodeSort: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetSearchAllLibrariesEnableCreditsMarkerGeneration - Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
// GetSearchAllLibrariesEnableCreditsMarkerGeneration - Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||||
type GetSearchAllLibrariesEnableCreditsMarkerGeneration string
|
type GetSearchAllLibrariesEnableCreditsMarkerGeneration string
|
||||||
@@ -278,21 +200,6 @@ const (
|
|||||||
func (e GetSearchAllLibrariesEnableCreditsMarkerGeneration) ToPointer() *GetSearchAllLibrariesEnableCreditsMarkerGeneration {
|
func (e GetSearchAllLibrariesEnableCreditsMarkerGeneration) ToPointer() *GetSearchAllLibrariesEnableCreditsMarkerGeneration {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetSearchAllLibrariesEnableCreditsMarkerGeneration) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "-1":
|
|
||||||
fallthrough
|
|
||||||
case "0":
|
|
||||||
*e = GetSearchAllLibrariesEnableCreditsMarkerGeneration(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetSearchAllLibrariesEnableCreditsMarkerGeneration: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetSearchAllLibrariesShowOrdering - Setting that indicates the episode ordering for the show.
|
// GetSearchAllLibrariesShowOrdering - Setting that indicates the episode ordering for the show.
|
||||||
// None = Library default,
|
// None = Library default,
|
||||||
@@ -313,27 +220,6 @@ const (
|
|||||||
func (e GetSearchAllLibrariesShowOrdering) ToPointer() *GetSearchAllLibrariesShowOrdering {
|
func (e GetSearchAllLibrariesShowOrdering) ToPointer() *GetSearchAllLibrariesShowOrdering {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetSearchAllLibrariesShowOrdering) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "None":
|
|
||||||
fallthrough
|
|
||||||
case "tmdbAiring":
|
|
||||||
fallthrough
|
|
||||||
case "aired":
|
|
||||||
fallthrough
|
|
||||||
case "dvd":
|
|
||||||
fallthrough
|
|
||||||
case "absolute":
|
|
||||||
*e = GetSearchAllLibrariesShowOrdering(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetSearchAllLibrariesShowOrdering: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetSearchAllLibrariesOptimizedForStreaming int
|
type GetSearchAllLibrariesOptimizedForStreaming int
|
||||||
|
|
||||||
@@ -1220,25 +1106,6 @@ const (
|
|||||||
func (e GetSearchAllLibrariesLibraryType) ToPointer() *GetSearchAllLibrariesLibraryType {
|
func (e GetSearchAllLibrariesLibraryType) ToPointer() *GetSearchAllLibrariesLibraryType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetSearchAllLibrariesLibraryType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "coverPoster":
|
|
||||||
fallthrough
|
|
||||||
case "background":
|
|
||||||
fallthrough
|
|
||||||
case "snapshot":
|
|
||||||
fallthrough
|
|
||||||
case "clearLogo":
|
|
||||||
*e = GetSearchAllLibrariesLibraryType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetSearchAllLibrariesLibraryType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetSearchAllLibrariesImage struct {
|
type GetSearchAllLibrariesImage struct {
|
||||||
Alt string `json:"alt"`
|
Alt string `json:"alt"`
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -29,31 +27,6 @@ const (
|
|||||||
func (e GetSearchLibraryQueryParamType) ToPointer() *GetSearchLibraryQueryParamType {
|
func (e GetSearchLibraryQueryParamType) ToPointer() *GetSearchLibraryQueryParamType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetSearchLibraryQueryParamType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v int64
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case 1:
|
|
||||||
fallthrough
|
|
||||||
case 2:
|
|
||||||
fallthrough
|
|
||||||
case 3:
|
|
||||||
fallthrough
|
|
||||||
case 4:
|
|
||||||
fallthrough
|
|
||||||
case 8:
|
|
||||||
fallthrough
|
|
||||||
case 9:
|
|
||||||
fallthrough
|
|
||||||
case 10:
|
|
||||||
*e = GetSearchLibraryQueryParamType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetSearchLibraryQueryParamType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetSearchLibraryRequest struct {
|
type GetSearchLibraryRequest struct {
|
||||||
// The unique key of the Plex library.
|
// The unique key of the Plex library.
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -20,23 +18,6 @@ const (
|
|||||||
func (e State) ToPointer() *State {
|
func (e State) ToPointer() *State {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *State) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "playing":
|
|
||||||
fallthrough
|
|
||||||
case "paused":
|
|
||||||
fallthrough
|
|
||||||
case "stopped":
|
|
||||||
*e = State(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for State: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetTimelineRequest struct {
|
type GetTimelineRequest struct {
|
||||||
// The rating key of the media item
|
// The rating key of the media item
|
||||||
|
|||||||
@@ -24,21 +24,6 @@ const (
|
|||||||
func (e MailingListStatus) ToPointer() *MailingListStatus {
|
func (e MailingListStatus) ToPointer() *MailingListStatus {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *MailingListStatus) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "active":
|
|
||||||
fallthrough
|
|
||||||
case "unsubscribed":
|
|
||||||
*e = MailingListStatus(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for MailingListStatus: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// AutoSelectSubtitle - The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
// AutoSelectSubtitle - The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
||||||
type AutoSelectSubtitle int
|
type AutoSelectSubtitle int
|
||||||
@@ -266,21 +251,6 @@ const (
|
|||||||
func (e GetTokenDetailsStatus) ToPointer() *GetTokenDetailsStatus {
|
func (e GetTokenDetailsStatus) ToPointer() *GetTokenDetailsStatus {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetTokenDetailsStatus) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "online":
|
|
||||||
fallthrough
|
|
||||||
case "offline":
|
|
||||||
*e = GetTokenDetailsStatus(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetTokenDetailsStatus: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type Services struct {
|
type Services struct {
|
||||||
Identifier string `json:"identifier"`
|
Identifier string `json:"identifier"`
|
||||||
@@ -336,21 +306,6 @@ const (
|
|||||||
func (e GetTokenDetailsAuthenticationStatus) ToPointer() *GetTokenDetailsAuthenticationStatus {
|
func (e GetTokenDetailsAuthenticationStatus) ToPointer() *GetTokenDetailsAuthenticationStatus {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetTokenDetailsAuthenticationStatus) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "Inactive":
|
|
||||||
fallthrough
|
|
||||||
case "Active":
|
|
||||||
*e = GetTokenDetailsAuthenticationStatus(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetTokenDetailsAuthenticationStatus: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Subscription - If the account’s Plex Pass subscription is active
|
// Subscription - If the account’s Plex Pass subscription is active
|
||||||
type Subscription struct {
|
type Subscription struct {
|
||||||
@@ -421,21 +376,6 @@ const (
|
|||||||
func (e GetTokenDetailsAuthenticationResponseStatus) ToPointer() *GetTokenDetailsAuthenticationResponseStatus {
|
func (e GetTokenDetailsAuthenticationResponseStatus) ToPointer() *GetTokenDetailsAuthenticationResponseStatus {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetTokenDetailsAuthenticationResponseStatus) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "Inactive":
|
|
||||||
fallthrough
|
|
||||||
case "Active":
|
|
||||||
*e = GetTokenDetailsAuthenticationResponseStatus(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetTokenDetailsAuthenticationResponseStatus: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetTokenDetailsSubscription struct {
|
type GetTokenDetailsSubscription struct {
|
||||||
// List of features allowed on your Plex Pass subscription
|
// List of features allowed on your Plex Pass subscription
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"github.com/LukeHagar/plexgo/internal/utils"
|
"github.com/LukeHagar/plexgo/internal/utils"
|
||||||
"github.com/LukeHagar/plexgo/types"
|
"github.com/LukeHagar/plexgo/types"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -31,31 +29,6 @@ const (
|
|||||||
func (e GetTopWatchedContentQueryParamType) ToPointer() *GetTopWatchedContentQueryParamType {
|
func (e GetTopWatchedContentQueryParamType) ToPointer() *GetTopWatchedContentQueryParamType {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *GetTopWatchedContentQueryParamType) UnmarshalJSON(data []byte) error {
|
|
||||||
var v int64
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case 1:
|
|
||||||
fallthrough
|
|
||||||
case 2:
|
|
||||||
fallthrough
|
|
||||||
case 3:
|
|
||||||
fallthrough
|
|
||||||
case 4:
|
|
||||||
fallthrough
|
|
||||||
case 8:
|
|
||||||
fallthrough
|
|
||||||
case 9:
|
|
||||||
fallthrough
|
|
||||||
case 10:
|
|
||||||
*e = GetTopWatchedContentQueryParamType(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for GetTopWatchedContentQueryParamType: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetTopWatchedContentRequest struct {
|
type GetTopWatchedContentRequest struct {
|
||||||
// Adds the Guids object to the response
|
// Adds the Guids object to the response
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"github.com/LukeHagar/plexgo/internal/utils"
|
"github.com/LukeHagar/plexgo/internal/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
@@ -29,19 +27,6 @@ const (
|
|||||||
func (e Status) ToPointer() *Status {
|
func (e Status) ToPointer() *Status {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *Status) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "accepted":
|
|
||||||
*e = Status(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for Status: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type Friend struct {
|
type Friend struct {
|
||||||
// The account email address
|
// The account email address
|
||||||
|
|||||||
@@ -26,23 +26,6 @@ const (
|
|||||||
func (e Filter) ToPointer() *Filter {
|
func (e Filter) ToPointer() *Filter {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *Filter) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "all":
|
|
||||||
fallthrough
|
|
||||||
case "available":
|
|
||||||
fallthrough
|
|
||||||
case "released":
|
|
||||||
*e = Filter(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for Filter: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Libtype - The type of library to filter. Can be "movie" or "show", or all if not present.
|
// Libtype - The type of library to filter. Can be "movie" or "show", or all if not present.
|
||||||
type Libtype string
|
type Libtype string
|
||||||
@@ -55,21 +38,6 @@ const (
|
|||||||
func (e Libtype) ToPointer() *Libtype {
|
func (e Libtype) ToPointer() *Libtype {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *Libtype) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "movie":
|
|
||||||
fallthrough
|
|
||||||
case "show":
|
|
||||||
*e = Libtype(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for Libtype: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// IncludeCollections - include collections in the results
|
// IncludeCollections - include collections in the results
|
||||||
type IncludeCollections int64
|
type IncludeCollections int64
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -27,27 +25,6 @@ const (
|
|||||||
func (e Level) ToPointer() *Level {
|
func (e Level) ToPointer() *Level {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *Level) UnmarshalJSON(data []byte) error {
|
|
||||||
var v int64
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case 0:
|
|
||||||
fallthrough
|
|
||||||
case 1:
|
|
||||||
fallthrough
|
|
||||||
case 2:
|
|
||||||
fallthrough
|
|
||||||
case 3:
|
|
||||||
fallthrough
|
|
||||||
case 4:
|
|
||||||
*e = Level(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for Level: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type LogLineRequest struct {
|
type LogLineRequest struct {
|
||||||
// An integer log level to write to the PMS log with.
|
// An integer log level to write to the PMS log with.
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ type AcceptHeaderEnum string
|
|||||||
const (
|
const (
|
||||||
AcceptHeaderEnumApplicationJson AcceptHeaderEnum = "application/json"
|
AcceptHeaderEnumApplicationJson AcceptHeaderEnum = "application/json"
|
||||||
AcceptHeaderEnumImageJpeg AcceptHeaderEnum = "image/jpeg"
|
AcceptHeaderEnumImageJpeg AcceptHeaderEnum = "image/jpeg"
|
||||||
|
AcceptHeaderEnumWildcardRootWildcard AcceptHeaderEnum = "*/*"
|
||||||
AcceptHeaderEnumApplicationXml AcceptHeaderEnum = "application/xml"
|
AcceptHeaderEnumApplicationXml AcceptHeaderEnum = "application/xml"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
68
models/operations/postmediaarts.go
Normal file
68
models/operations/postmediaarts.go
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||||
|
|
||||||
|
package operations
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
type PostMediaArtsRequest struct {
|
||||||
|
// the id of the library item to return the posters of.
|
||||||
|
RatingKey int64 `pathParam:"style=simple,explode=false,name=ratingKey"`
|
||||||
|
// The URL of the image, if uploading a remote image
|
||||||
|
URL *string `queryParam:"style=form,explode=true,name=url"`
|
||||||
|
// The contents of the image, if uploading a local file
|
||||||
|
// This field accepts []byte data or io.Reader implementations, such as *os.File.
|
||||||
|
RequestBody *any `request:"mediaType=image/*"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostMediaArtsRequest) GetRatingKey() int64 {
|
||||||
|
if o == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return o.RatingKey
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostMediaArtsRequest) GetURL() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.URL
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostMediaArtsRequest) GetRequestBody() *any {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.RequestBody
|
||||||
|
}
|
||||||
|
|
||||||
|
type PostMediaArtsResponse struct {
|
||||||
|
// HTTP response content type for this operation
|
||||||
|
ContentType string
|
||||||
|
// HTTP response status code for this operation
|
||||||
|
StatusCode int
|
||||||
|
// Raw HTTP response; suitable for custom response parsing
|
||||||
|
RawResponse *http.Response
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostMediaArtsResponse) GetContentType() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.ContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostMediaArtsResponse) GetStatusCode() int {
|
||||||
|
if o == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return o.StatusCode
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostMediaArtsResponse) GetRawResponse() *http.Response {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.RawResponse
|
||||||
|
}
|
||||||
68
models/operations/postmediaposter.go
Normal file
68
models/operations/postmediaposter.go
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||||
|
|
||||||
|
package operations
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
type PostMediaPosterRequest struct {
|
||||||
|
// the id of the library item to return the posters of.
|
||||||
|
RatingKey int64 `pathParam:"style=simple,explode=false,name=ratingKey"`
|
||||||
|
// The URL of the image, if uploading a remote image
|
||||||
|
URL *string `queryParam:"style=form,explode=true,name=url"`
|
||||||
|
// The contents of the image, if uploading a local file
|
||||||
|
// This field accepts []byte data or io.Reader implementations, such as *os.File.
|
||||||
|
RequestBody *any `request:"mediaType=image/*"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostMediaPosterRequest) GetRatingKey() int64 {
|
||||||
|
if o == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return o.RatingKey
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostMediaPosterRequest) GetURL() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.URL
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostMediaPosterRequest) GetRequestBody() *any {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.RequestBody
|
||||||
|
}
|
||||||
|
|
||||||
|
type PostMediaPosterResponse struct {
|
||||||
|
// HTTP response content type for this operation
|
||||||
|
ContentType string
|
||||||
|
// HTTP response status code for this operation
|
||||||
|
StatusCode int
|
||||||
|
// Raw HTTP response; suitable for custom response parsing
|
||||||
|
RawResponse *http.Response
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostMediaPosterResponse) GetContentType() string {
|
||||||
|
if o == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return o.ContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostMediaPosterResponse) GetStatusCode() int {
|
||||||
|
if o == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return o.StatusCode
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostMediaPosterResponse) GetRawResponse() *http.Response {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.RawResponse
|
||||||
|
}
|
||||||
@@ -128,21 +128,6 @@ const (
|
|||||||
func (e PostUsersSignInDataMailingListStatus) ToPointer() *PostUsersSignInDataMailingListStatus {
|
func (e PostUsersSignInDataMailingListStatus) ToPointer() *PostUsersSignInDataMailingListStatus {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *PostUsersSignInDataMailingListStatus) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "active":
|
|
||||||
fallthrough
|
|
||||||
case "unsubscribed":
|
|
||||||
*e = PostUsersSignInDataMailingListStatus(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for PostUsersSignInDataMailingListStatus: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// PostUsersSignInDataAutoSelectSubtitle - The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
// PostUsersSignInDataAutoSelectSubtitle - The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
||||||
type PostUsersSignInDataAutoSelectSubtitle int
|
type PostUsersSignInDataAutoSelectSubtitle int
|
||||||
@@ -370,21 +355,6 @@ const (
|
|||||||
func (e PostUsersSignInDataStatus) ToPointer() *PostUsersSignInDataStatus {
|
func (e PostUsersSignInDataStatus) ToPointer() *PostUsersSignInDataStatus {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *PostUsersSignInDataStatus) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "online":
|
|
||||||
fallthrough
|
|
||||||
case "offline":
|
|
||||||
*e = PostUsersSignInDataStatus(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for PostUsersSignInDataStatus: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type PostUsersSignInDataServices struct {
|
type PostUsersSignInDataServices struct {
|
||||||
Identifier string `json:"identifier"`
|
Identifier string `json:"identifier"`
|
||||||
@@ -440,21 +410,6 @@ const (
|
|||||||
func (e PostUsersSignInDataAuthenticationStatus) ToPointer() *PostUsersSignInDataAuthenticationStatus {
|
func (e PostUsersSignInDataAuthenticationStatus) ToPointer() *PostUsersSignInDataAuthenticationStatus {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *PostUsersSignInDataAuthenticationStatus) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "Inactive":
|
|
||||||
fallthrough
|
|
||||||
case "Active":
|
|
||||||
*e = PostUsersSignInDataAuthenticationStatus(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for PostUsersSignInDataAuthenticationStatus: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// PostUsersSignInDataSubscription - If the account’s Plex Pass subscription is active
|
// PostUsersSignInDataSubscription - If the account’s Plex Pass subscription is active
|
||||||
type PostUsersSignInDataSubscription struct {
|
type PostUsersSignInDataSubscription struct {
|
||||||
@@ -525,21 +480,6 @@ const (
|
|||||||
func (e PostUsersSignInDataAuthenticationResponseStatus) ToPointer() *PostUsersSignInDataAuthenticationResponseStatus {
|
func (e PostUsersSignInDataAuthenticationResponseStatus) ToPointer() *PostUsersSignInDataAuthenticationResponseStatus {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *PostUsersSignInDataAuthenticationResponseStatus) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "Inactive":
|
|
||||||
fallthrough
|
|
||||||
case "Active":
|
|
||||||
*e = PostUsersSignInDataAuthenticationResponseStatus(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for PostUsersSignInDataAuthenticationResponseStatus: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type PostUsersSignInDataAuthenticationSubscription struct {
|
type PostUsersSignInDataAuthenticationSubscription struct {
|
||||||
// List of features allowed on your Plex Pass subscription
|
// List of features allowed on your Plex Pass subscription
|
||||||
@@ -607,19 +547,6 @@ const (
|
|||||||
func (e PostUsersSignInDataState) ToPointer() *PostUsersSignInDataState {
|
func (e PostUsersSignInDataState) ToPointer() *PostUsersSignInDataState {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *PostUsersSignInDataState) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "ended":
|
|
||||||
*e = PostUsersSignInDataState(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for PostUsersSignInDataState: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type InternalPaymentMethod struct {
|
type InternalPaymentMethod struct {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -31,45 +29,6 @@ const (
|
|||||||
func (e TaskName) ToPointer() *TaskName {
|
func (e TaskName) ToPointer() *TaskName {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *TaskName) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "BackupDatabase":
|
|
||||||
fallthrough
|
|
||||||
case "BuildGracenoteCollections":
|
|
||||||
fallthrough
|
|
||||||
case "CheckForUpdates":
|
|
||||||
fallthrough
|
|
||||||
case "CleanOldBundles":
|
|
||||||
fallthrough
|
|
||||||
case "CleanOldCacheFiles":
|
|
||||||
fallthrough
|
|
||||||
case "DeepMediaAnalysis":
|
|
||||||
fallthrough
|
|
||||||
case "GenerateAutoTags":
|
|
||||||
fallthrough
|
|
||||||
case "GenerateChapterThumbs":
|
|
||||||
fallthrough
|
|
||||||
case "GenerateMediaIndexFiles":
|
|
||||||
fallthrough
|
|
||||||
case "OptimizeDatabase":
|
|
||||||
fallthrough
|
|
||||||
case "RefreshLibraries":
|
|
||||||
fallthrough
|
|
||||||
case "RefreshLocalMedia":
|
|
||||||
fallthrough
|
|
||||||
case "RefreshPeriodicMetadata":
|
|
||||||
fallthrough
|
|
||||||
case "UpgradeMediaAnalysis":
|
|
||||||
*e = TaskName(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for TaskName: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type StartTaskRequest struct {
|
type StartTaskRequest struct {
|
||||||
// the name of the task to be started.
|
// the name of the task to be started.
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -31,45 +29,6 @@ const (
|
|||||||
func (e PathParamTaskName) ToPointer() *PathParamTaskName {
|
func (e PathParamTaskName) ToPointer() *PathParamTaskName {
|
||||||
return &e
|
return &e
|
||||||
}
|
}
|
||||||
func (e *PathParamTaskName) UnmarshalJSON(data []byte) error {
|
|
||||||
var v string
|
|
||||||
if err := json.Unmarshal(data, &v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
switch v {
|
|
||||||
case "BackupDatabase":
|
|
||||||
fallthrough
|
|
||||||
case "BuildGracenoteCollections":
|
|
||||||
fallthrough
|
|
||||||
case "CheckForUpdates":
|
|
||||||
fallthrough
|
|
||||||
case "CleanOldBundles":
|
|
||||||
fallthrough
|
|
||||||
case "CleanOldCacheFiles":
|
|
||||||
fallthrough
|
|
||||||
case "DeepMediaAnalysis":
|
|
||||||
fallthrough
|
|
||||||
case "GenerateAutoTags":
|
|
||||||
fallthrough
|
|
||||||
case "GenerateChapterThumbs":
|
|
||||||
fallthrough
|
|
||||||
case "GenerateMediaIndexFiles":
|
|
||||||
fallthrough
|
|
||||||
case "OptimizeDatabase":
|
|
||||||
fallthrough
|
|
||||||
case "RefreshLibraries":
|
|
||||||
fallthrough
|
|
||||||
case "RefreshLocalMedia":
|
|
||||||
fallthrough
|
|
||||||
case "RefreshPeriodicMetadata":
|
|
||||||
fallthrough
|
|
||||||
case "UpgradeMediaAnalysis":
|
|
||||||
*e = PathParamTaskName(v)
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value for PathParamTaskName: %v", v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type StopTaskRequest struct {
|
type StopTaskRequest struct {
|
||||||
// The name of the task to be started.
|
// The name of the task to be started.
|
||||||
|
|||||||
@@ -299,9 +299,9 @@ func New(opts ...SDKOption) *PlexAPI {
|
|||||||
sdkConfiguration: sdkConfiguration{
|
sdkConfiguration: sdkConfiguration{
|
||||||
Language: "go",
|
Language: "go",
|
||||||
OpenAPIDocVersion: "0.0.3",
|
OpenAPIDocVersion: "0.0.3",
|
||||||
SDKVersion: "0.19.2",
|
SDKVersion: "0.21.1",
|
||||||
GenVersion: "2.545.4",
|
GenVersion: "2.596.2",
|
||||||
UserAgent: "speakeasy-sdk/go 0.19.2 2.545.4 0.0.3 github.com/LukeHagar/plexgo",
|
UserAgent: "speakeasy-sdk/go 0.21.1 2.596.2 0.0.3 github.com/LukeHagar/plexgo",
|
||||||
ServerDefaults: []map[string]string{
|
ServerDefaults: []map[string]string{
|
||||||
{
|
{
|
||||||
"protocol": "https",
|
"protocol": "https",
|
||||||
|
|||||||
Reference in New Issue
Block a user