mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-07 20:47:49 +00:00
Compare commits
60 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a34f15746e | ||
|
|
12afbc6467 | ||
|
|
8267c3fcbd | ||
|
|
3f2fc4fe8c | ||
|
|
21517ca298 | ||
|
|
d7fe60ed91 | ||
|
|
b09c6ad37a | ||
|
|
6a5cd06342 | ||
|
|
9531527f23 | ||
|
|
db2b15241c | ||
|
|
344db7cbcb | ||
|
|
af9748433a | ||
|
|
8f332b739e | ||
|
|
c504a2d46e | ||
|
|
95d64024f2 | ||
|
|
457b36fb49 | ||
|
|
8691720920 | ||
|
|
205c454485 | ||
|
|
71b5f4f4b7 | ||
|
|
f3779b0079 | ||
|
|
0eaf609b40 | ||
|
|
b0931cba2e | ||
|
|
d09f9292ce | ||
|
|
9a382342e4 | ||
|
|
b8b984dc14 | ||
|
|
0de5991239 | ||
|
|
0ff88615e0 | ||
|
|
0eb6f2c692 | ||
|
|
0adacc0e13 | ||
|
|
ec6ef7db64 | ||
|
|
32a5beaae6 | ||
|
|
ea30334a95 | ||
|
|
f3eb760757 | ||
|
|
683823eab9 | ||
|
|
6942d6b905 | ||
|
|
1a7051235f | ||
|
|
68fedfa8fc | ||
|
|
5916d2ace5 | ||
|
|
417454ebb2 | ||
|
|
992291fe20 | ||
|
|
515f318f05 | ||
|
|
8b81bc5692 | ||
|
|
9dd356ea91 | ||
|
|
efe42104bc | ||
|
|
70001e1e72 | ||
|
|
0118475c63 | ||
|
|
f812f82747 | ||
|
|
7b38f4ba85 | ||
|
|
7caa38277c | ||
|
|
2cfb7aefac | ||
|
|
41ce744f6d | ||
|
|
2b4d612003 | ||
|
|
853bfe69d5 | ||
|
|
81cfd47570 | ||
|
|
44e551a11d | ||
|
|
264d228db7 | ||
|
|
c1bc2419c8 | ||
|
|
471d850f17 | ||
|
|
b3ac2d0c2e | ||
|
|
61283a5769 |
46
.github/workflows/speakeasy_sdk_generation.yml
vendored
46
.github/workflows/speakeasy_sdk_generation.yml
vendored
@@ -1,29 +1,25 @@
|
||||
name: Generate
|
||||
permissions:
|
||||
checks: write
|
||||
contents: write
|
||||
pull-requests: write
|
||||
statuses: write
|
||||
checks: write
|
||||
contents: write
|
||||
pull-requests: write
|
||||
statuses: write
|
||||
"on":
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
force:
|
||||
description: Force generation of SDKs
|
||||
type: boolean
|
||||
default: false
|
||||
schedule:
|
||||
- cron: 0 0 * * *
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
force:
|
||||
description: Force generation of SDKs
|
||||
type: boolean
|
||||
default: false
|
||||
schedule:
|
||||
- cron: 0 0 * * *
|
||||
jobs:
|
||||
generate:
|
||||
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-generation.yaml@v14
|
||||
with:
|
||||
force: ${{ github.event.inputs.force }}
|
||||
languages: |
|
||||
- go
|
||||
mode: direct
|
||||
openapi_docs: |
|
||||
- https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
||||
speakeasy_version: latest
|
||||
secrets:
|
||||
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
|
||||
generate:
|
||||
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
|
||||
with:
|
||||
force: ${{ github.event.inputs.force }}
|
||||
mode: direct
|
||||
speakeasy_version: latest
|
||||
secrets:
|
||||
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
|
||||
|
||||
@@ -1,42 +1,51 @@
|
||||
lockVersion: 2.0.0
|
||||
id: dfa99515-01c0-42eb-9be5-ee212fd03eb3
|
||||
management:
|
||||
docChecksum: 1e8e82037a237e1d1467721fbd2c7ab0
|
||||
docChecksum: 543cb95355401d2e3c2ba11a50d9dd94
|
||||
docVersion: 0.0.3
|
||||
speakeasyVersion: internal
|
||||
generationVersion: 2.237.3
|
||||
releaseVersion: 0.1.0
|
||||
configChecksum: 73d3c85671a6bde12c0c56fe7e1dc772
|
||||
speakeasyVersion: 1.285.0
|
||||
generationVersion: 2.326.3
|
||||
releaseVersion: 0.7.0
|
||||
configChecksum: 98c0e864ba8f7c2e3b366fd643dd90ab
|
||||
repoURL: https://github.com/LukeHagar/plexgo.git
|
||||
repoSubDirectory: .
|
||||
installationURL: https://github.com/LukeHagar/plexgo
|
||||
published: true
|
||||
features:
|
||||
go:
|
||||
constsAndDefaults: 0.1.2
|
||||
core: 3.3.1
|
||||
additionalDependencies: 0.1.0
|
||||
constsAndDefaults: 0.1.4
|
||||
core: 3.4.7
|
||||
flattening: 2.81.1
|
||||
globalSecurity: 2.82.4
|
||||
globalServerURLs: 2.82.1
|
||||
nameOverrides: 2.81.1
|
||||
unions: 2.85.2
|
||||
globalSecurity: 2.82.9
|
||||
globalSecurityCallbacks: 0.1.0
|
||||
globalSecurityFlattening: 0.1.0
|
||||
globalServerURLs: 2.82.2
|
||||
globals: 2.82.2
|
||||
intellisenseMarkdownSupport: 0.1.0
|
||||
methodServerURLs: 2.82.1
|
||||
nameOverrides: 2.81.2
|
||||
responseFormat: 0.1.1
|
||||
sdkHooks: 0.1.0
|
||||
unions: 2.85.5
|
||||
generatedFiles:
|
||||
- server.go
|
||||
- media.go
|
||||
- video.go
|
||||
- activities.go
|
||||
- butler.go
|
||||
- hubs.go
|
||||
- search.go
|
||||
- library.go
|
||||
- log.go
|
||||
- plex.go
|
||||
- playlists.go
|
||||
- security.go
|
||||
- authentication.go
|
||||
- statistics.go
|
||||
- sessions.go
|
||||
- updater.go
|
||||
- video.go
|
||||
- plexapi.go
|
||||
- go.mod
|
||||
- go.sum
|
||||
- models/sdkerrors/sdkerror.go
|
||||
- types/bigint.go
|
||||
- types/date.go
|
||||
@@ -53,6 +62,7 @@ generatedFiles:
|
||||
- internal/utils/retries.go
|
||||
- internal/utils/security.go
|
||||
- internal/utils/utils.go
|
||||
- internal/globals/globals.go
|
||||
- /models/operations/getservercapabilities.go
|
||||
- /models/operations/getserverpreferences.go
|
||||
- /models/operations/getavailableclients.go
|
||||
@@ -64,6 +74,8 @@ generatedFiles:
|
||||
- /models/operations/markplayed.go
|
||||
- /models/operations/markunplayed.go
|
||||
- /models/operations/updateplayprogress.go
|
||||
- /models/operations/gettimeline.go
|
||||
- /models/operations/startuniversaltranscode.go
|
||||
- /models/operations/getserveractivities.go
|
||||
- /models/operations/cancelserveractivities.go
|
||||
- /models/operations/getbutlertasks.go
|
||||
@@ -81,16 +93,16 @@ generatedFiles:
|
||||
- /models/operations/getlibraries.go
|
||||
- /models/operations/getlibrary.go
|
||||
- /models/operations/deletelibrary.go
|
||||
- /models/operations/getlibraryitems.go
|
||||
- /models/operations/refreshlibrary.go
|
||||
- /models/operations/getlatestlibraryitems.go
|
||||
- /models/operations/getcommonlibraryitems.go
|
||||
- /models/operations/searchlibrary.go
|
||||
- /models/operations/getmetadata.go
|
||||
- /models/operations/getmetadatachildren.go
|
||||
- /models/operations/getondeck.go
|
||||
- /models/operations/logline.go
|
||||
- /models/operations/logmultiline.go
|
||||
- /models/operations/enablepapertrail.go
|
||||
- /models/operations/getpin.go
|
||||
- /models/operations/gettoken.go
|
||||
- /models/operations/createplaylist.go
|
||||
- /models/operations/getplaylists.go
|
||||
- /models/operations/getplaylist.go
|
||||
@@ -102,6 +114,7 @@ generatedFiles:
|
||||
- /models/operations/uploadplaylist.go
|
||||
- /models/operations/gettransienttoken.go
|
||||
- /models/operations/getsourceconnectioninformation.go
|
||||
- /models/operations/getstatistics.go
|
||||
- /models/operations/getsessions.go
|
||||
- /models/operations/getsessionhistory.go
|
||||
- /models/operations/gettranscodesessions.go
|
||||
@@ -109,8 +122,6 @@ generatedFiles:
|
||||
- /models/operations/getupdatestatus.go
|
||||
- /models/operations/checkforupdates.go
|
||||
- /models/operations/applyupdates.go
|
||||
- /models/operations/startuniversaltranscode.go
|
||||
- /models/operations/gettimeline.go
|
||||
- /models/sdkerrors/getservercapabilities.go
|
||||
- /models/sdkerrors/getserverpreferences.go
|
||||
- /models/sdkerrors/getavailableclients.go
|
||||
@@ -122,6 +133,8 @@ generatedFiles:
|
||||
- /models/sdkerrors/markplayed.go
|
||||
- /models/sdkerrors/markunplayed.go
|
||||
- /models/sdkerrors/updateplayprogress.go
|
||||
- /models/sdkerrors/gettimeline.go
|
||||
- /models/sdkerrors/startuniversaltranscode.go
|
||||
- /models/sdkerrors/getserveractivities.go
|
||||
- /models/sdkerrors/cancelserveractivities.go
|
||||
- /models/sdkerrors/getbutlertasks.go
|
||||
@@ -139,16 +152,15 @@ generatedFiles:
|
||||
- /models/sdkerrors/getlibraries.go
|
||||
- /models/sdkerrors/getlibrary.go
|
||||
- /models/sdkerrors/deletelibrary.go
|
||||
- /models/sdkerrors/getlibraryitems.go
|
||||
- /models/sdkerrors/refreshlibrary.go
|
||||
- /models/sdkerrors/getlatestlibraryitems.go
|
||||
- /models/sdkerrors/getcommonlibraryitems.go
|
||||
- /models/sdkerrors/getmetadata.go
|
||||
- /models/sdkerrors/getmetadatachildren.go
|
||||
- /models/sdkerrors/getondeck.go
|
||||
- /models/sdkerrors/logline.go
|
||||
- /models/sdkerrors/logmultiline.go
|
||||
- /models/sdkerrors/enablepapertrail.go
|
||||
- /models/sdkerrors/getpin.go
|
||||
- /models/sdkerrors/gettoken.go
|
||||
- /models/sdkerrors/createplaylist.go
|
||||
- /models/sdkerrors/getplaylists.go
|
||||
- /models/sdkerrors/getplaylist.go
|
||||
@@ -160,6 +172,7 @@ generatedFiles:
|
||||
- /models/sdkerrors/uploadplaylist.go
|
||||
- /models/sdkerrors/gettransienttoken.go
|
||||
- /models/sdkerrors/getsourceconnectioninformation.go
|
||||
- /models/sdkerrors/getstatistics.go
|
||||
- /models/sdkerrors/getsessions.go
|
||||
- /models/sdkerrors/getsessionhistory.go
|
||||
- /models/sdkerrors/gettranscodesessions.go
|
||||
@@ -167,22 +180,18 @@ generatedFiles:
|
||||
- /models/sdkerrors/getupdatestatus.go
|
||||
- /models/sdkerrors/checkforupdates.go
|
||||
- /models/sdkerrors/applyupdates.go
|
||||
- /models/sdkerrors/startuniversaltranscode.go
|
||||
- /models/sdkerrors/gettimeline.go
|
||||
- /models/components/security.go
|
||||
- docs/models/operations/directory.md
|
||||
- docs/models/operations/mediacontainer.md
|
||||
- docs/models/operations/getservercapabilitiesresponsebody.md
|
||||
- docs/models/operations/getservercapabilitiesresponse.md
|
||||
- docs/models/operations/two.md
|
||||
- docs/models/operations/one.md
|
||||
- docs/models/operations/setting.md
|
||||
- docs/models/operations/getserverpreferencesmediacontainer.md
|
||||
- docs/models/operations/getserverpreferencesresponsebody.md
|
||||
- docs/models/operations/getserverpreferencesresponse.md
|
||||
- docs/models/operations/server.md
|
||||
- docs/models/operations/getavailableclientsmediacontainer.md
|
||||
- docs/models/operations/responsebody.md
|
||||
- docs/models/operations/getavailableclientsresponsebody.md
|
||||
- docs/models/operations/getavailableclientsresponse.md
|
||||
- docs/models/operations/device.md
|
||||
- docs/models/operations/getdevicesmediacontainer.md
|
||||
@@ -208,6 +217,11 @@ generatedFiles:
|
||||
- docs/models/operations/markunplayedresponse.md
|
||||
- docs/models/operations/updateplayprogressrequest.md
|
||||
- docs/models/operations/updateplayprogressresponse.md
|
||||
- docs/models/operations/state.md
|
||||
- docs/models/operations/gettimelinerequest.md
|
||||
- docs/models/operations/gettimelineresponse.md
|
||||
- docs/models/operations/startuniversaltranscoderequest.md
|
||||
- docs/models/operations/startuniversaltranscoderesponse.md
|
||||
- docs/models/operations/context.md
|
||||
- docs/models/operations/activity.md
|
||||
- docs/models/operations/getserveractivitiesmediacontainer.md
|
||||
@@ -229,9 +243,25 @@ generatedFiles:
|
||||
- docs/models/operations/stoptaskresponse.md
|
||||
- docs/models/operations/onlytransient.md
|
||||
- docs/models/operations/getglobalhubsrequest.md
|
||||
- docs/models/operations/getglobalhubsmetadata.md
|
||||
- docs/models/operations/hub.md
|
||||
- docs/models/operations/getglobalhubsmediacontainer.md
|
||||
- docs/models/operations/getglobalhubsresponsebody.md
|
||||
- docs/models/operations/getglobalhubsresponse.md
|
||||
- docs/models/operations/queryparamonlytransient.md
|
||||
- docs/models/operations/getlibraryhubsrequest.md
|
||||
- docs/models/operations/getlibraryhubspart.md
|
||||
- docs/models/operations/getlibraryhubsmedia.md
|
||||
- docs/models/operations/getlibraryhubsgenre.md
|
||||
- docs/models/operations/getlibraryhubscountry.md
|
||||
- docs/models/operations/getlibraryhubsdirector.md
|
||||
- docs/models/operations/getlibraryhubsrole.md
|
||||
- docs/models/operations/getlibraryhubswriter.md
|
||||
- docs/types/date.md
|
||||
- docs/models/operations/getlibraryhubsmetadata.md
|
||||
- docs/models/operations/getlibraryhubshub.md
|
||||
- docs/models/operations/getlibraryhubsmediacontainer.md
|
||||
- docs/models/operations/getlibraryhubsresponsebody.md
|
||||
- docs/models/operations/getlibraryhubsresponse.md
|
||||
- docs/models/operations/performsearchrequest.md
|
||||
- docs/models/operations/performsearchresponse.md
|
||||
@@ -263,7 +293,7 @@ generatedFiles:
|
||||
- docs/models/operations/getrecentlyaddedmediacontainer.md
|
||||
- docs/models/operations/getrecentlyaddedresponsebody.md
|
||||
- docs/models/operations/getrecentlyaddedresponse.md
|
||||
- docs/models/operations/location.md
|
||||
- docs/models/operations/getlibrarieslocation.md
|
||||
- docs/models/operations/getlibrariesdirectory.md
|
||||
- docs/models/operations/getlibrariesmediacontainer.md
|
||||
- docs/models/operations/getlibrariesresponsebody.md
|
||||
@@ -282,22 +312,40 @@ generatedFiles:
|
||||
- docs/models/operations/getlibraryresponse.md
|
||||
- docs/models/operations/deletelibraryrequest.md
|
||||
- docs/models/operations/deletelibraryresponse.md
|
||||
- docs/models/operations/getlibraryitemsrequest.md
|
||||
- docs/models/operations/getlibraryitemsresponse.md
|
||||
- docs/models/operations/refreshlibraryrequest.md
|
||||
- docs/models/operations/refreshlibraryresponse.md
|
||||
- docs/models/operations/getlatestlibraryitemsrequest.md
|
||||
- docs/models/operations/getlatestlibraryitemsresponse.md
|
||||
- docs/models/operations/getcommonlibraryitemsrequest.md
|
||||
- docs/models/operations/getcommonlibraryitemsresponse.md
|
||||
- docs/models/operations/type.md
|
||||
- docs/models/operations/searchlibraryrequest.md
|
||||
- docs/models/operations/searchlibrarymetadata.md
|
||||
- docs/models/operations/searchlibrarymediacontainer.md
|
||||
- docs/models/operations/searchlibraryresponsebody.md
|
||||
- docs/models/operations/searchlibraryresponse.md
|
||||
- docs/models/operations/getmetadatarequest.md
|
||||
- docs/models/operations/stream.md
|
||||
- docs/models/operations/getmetadatapart.md
|
||||
- docs/models/operations/getmetadatamedia.md
|
||||
- docs/models/operations/getmetadatagenre.md
|
||||
- docs/models/operations/getmetadatacountry.md
|
||||
- docs/models/operations/guids.md
|
||||
- docs/models/operations/ratings.md
|
||||
- docs/models/operations/getmetadatadirector.md
|
||||
- docs/models/operations/getmetadatawriter.md
|
||||
- docs/models/operations/getmetadatarole.md
|
||||
- docs/models/operations/producer.md
|
||||
- docs/models/operations/getmetadatametadata.md
|
||||
- docs/models/operations/getmetadatamediacontainer.md
|
||||
- docs/models/operations/getmetadataresponsebody.md
|
||||
- docs/models/operations/getmetadataresponse.md
|
||||
- docs/models/operations/getmetadatachildrenrequest.md
|
||||
- docs/models/operations/getmetadatachildrendirectory.md
|
||||
- docs/models/operations/getmetadatachildrenmetadata.md
|
||||
- docs/models/operations/getmetadatachildrenmediacontainer.md
|
||||
- docs/models/operations/getmetadatachildrenresponsebody.md
|
||||
- docs/models/operations/getmetadatachildrenresponse.md
|
||||
- docs/models/operations/stream.md
|
||||
- docs/models/operations/getondeckstream.md
|
||||
- docs/models/operations/getondeckpart.md
|
||||
- docs/models/operations/getondeckmedia.md
|
||||
- docs/models/operations/guids.md
|
||||
- docs/models/operations/getondeckguids.md
|
||||
- docs/models/operations/getondeckmetadata.md
|
||||
- docs/models/operations/getondeckmediacontainer.md
|
||||
- docs/models/operations/getondeckresponsebody.md
|
||||
@@ -307,36 +355,85 @@ generatedFiles:
|
||||
- docs/models/operations/loglineresponse.md
|
||||
- docs/models/operations/logmultilineresponse.md
|
||||
- docs/models/operations/enablepapertrailresponse.md
|
||||
- docs/models/operations/type.md
|
||||
- docs/models/operations/getpinglobals.md
|
||||
- docs/models/operations/getpinrequest.md
|
||||
- docs/models/operations/location.md
|
||||
- docs/models/operations/getpinresponsebody.md
|
||||
- docs/models/operations/getpinresponse.md
|
||||
- docs/models/operations/gettokenglobals.md
|
||||
- docs/models/operations/gettokenrequest.md
|
||||
- docs/models/operations/gettokenresponse.md
|
||||
- docs/models/operations/queryparamtype.md
|
||||
- docs/models/operations/smart.md
|
||||
- docs/models/operations/createplaylistrequest.md
|
||||
- docs/models/operations/createplaylistmetadata.md
|
||||
- docs/models/operations/createplaylistmediacontainer.md
|
||||
- docs/models/operations/createplaylistresponsebody.md
|
||||
- docs/models/operations/createplaylistresponse.md
|
||||
- docs/models/operations/playlisttype.md
|
||||
- docs/models/operations/queryparamsmart.md
|
||||
- docs/models/operations/getplaylistsrequest.md
|
||||
- docs/models/operations/getplaylistsmetadata.md
|
||||
- docs/models/operations/getplaylistsmediacontainer.md
|
||||
- docs/models/operations/getplaylistsresponsebody.md
|
||||
- docs/models/operations/getplaylistsresponse.md
|
||||
- docs/models/operations/getplaylistrequest.md
|
||||
- docs/models/operations/getplaylistmetadata.md
|
||||
- docs/models/operations/getplaylistmediacontainer.md
|
||||
- docs/models/operations/getplaylistresponsebody.md
|
||||
- docs/models/operations/getplaylistresponse.md
|
||||
- docs/models/operations/deleteplaylistrequest.md
|
||||
- docs/models/operations/deleteplaylistresponse.md
|
||||
- docs/models/operations/updateplaylistrequest.md
|
||||
- docs/models/operations/updateplaylistresponse.md
|
||||
- docs/models/operations/getplaylistcontentsrequest.md
|
||||
- docs/models/operations/getplaylistcontentspart.md
|
||||
- docs/models/operations/getplaylistcontentsmedia.md
|
||||
- docs/models/operations/getplaylistcontentsgenre.md
|
||||
- docs/models/operations/getplaylistcontentscountry.md
|
||||
- docs/models/operations/getplaylistcontentsdirector.md
|
||||
- docs/models/operations/getplaylistcontentswriter.md
|
||||
- docs/models/operations/getplaylistcontentsrole.md
|
||||
- docs/models/operations/getplaylistcontentsmetadata.md
|
||||
- docs/models/operations/getplaylistcontentsmediacontainer.md
|
||||
- docs/models/operations/getplaylistcontentsresponsebody.md
|
||||
- docs/models/operations/getplaylistcontentsresponse.md
|
||||
- docs/models/operations/clearplaylistcontentsrequest.md
|
||||
- docs/models/operations/clearplaylistcontentsresponse.md
|
||||
- docs/models/operations/addplaylistcontentsrequest.md
|
||||
- docs/models/operations/addplaylistcontentsmetadata.md
|
||||
- docs/models/operations/addplaylistcontentsmediacontainer.md
|
||||
- docs/models/operations/addplaylistcontentsresponsebody.md
|
||||
- docs/models/operations/addplaylistcontentsresponse.md
|
||||
- docs/models/operations/force.md
|
||||
- docs/models/operations/uploadplaylistrequest.md
|
||||
- docs/models/operations/uploadplaylistresponse.md
|
||||
- docs/models/operations/queryparamtype.md
|
||||
- docs/models/operations/gettransienttokenqueryparamtype.md
|
||||
- docs/models/operations/scope.md
|
||||
- docs/models/operations/gettransienttokenrequest.md
|
||||
- docs/models/operations/gettransienttokenresponse.md
|
||||
- docs/models/operations/getsourceconnectioninformationrequest.md
|
||||
- docs/models/operations/getsourceconnectioninformationresponse.md
|
||||
- docs/models/operations/getstatisticsrequest.md
|
||||
- docs/models/operations/getstatisticsdevice.md
|
||||
- docs/models/operations/account.md
|
||||
- docs/models/operations/statisticsmedia.md
|
||||
- docs/models/operations/getstatisticsmediacontainer.md
|
||||
- docs/models/operations/getstatisticsresponsebody.md
|
||||
- docs/models/operations/getstatisticsresponse.md
|
||||
- docs/models/operations/getsessionsstream.md
|
||||
- docs/models/operations/getsessionspart.md
|
||||
- docs/models/operations/getsessionsmedia.md
|
||||
- docs/models/operations/user.md
|
||||
- docs/models/operations/player.md
|
||||
- docs/models/operations/session.md
|
||||
- docs/models/operations/getsessionsmetadata.md
|
||||
- docs/models/operations/getsessionsmediacontainer.md
|
||||
- docs/models/operations/getsessionsresponsebody.md
|
||||
- docs/models/operations/getsessionsresponse.md
|
||||
- docs/models/operations/getsessionhistorymetadata.md
|
||||
- docs/models/operations/getsessionhistorymediacontainer.md
|
||||
- docs/models/operations/getsessionhistoryresponsebody.md
|
||||
- docs/models/operations/getsessionhistoryresponse.md
|
||||
- docs/models/operations/transcodesession.md
|
||||
- docs/models/operations/gettranscodesessionsmediacontainer.md
|
||||
@@ -344,6 +441,9 @@ generatedFiles:
|
||||
- docs/models/operations/gettranscodesessionsresponse.md
|
||||
- docs/models/operations/stoptranscodesessionrequest.md
|
||||
- docs/models/operations/stoptranscodesessionresponse.md
|
||||
- docs/models/operations/release.md
|
||||
- docs/models/operations/getupdatestatusmediacontainer.md
|
||||
- docs/models/operations/getupdatestatusresponsebody.md
|
||||
- docs/models/operations/getupdatestatusresponse.md
|
||||
- docs/models/operations/download.md
|
||||
- docs/models/operations/checkforupdatesrequest.md
|
||||
@@ -352,11 +452,6 @@ generatedFiles:
|
||||
- docs/models/operations/skip.md
|
||||
- docs/models/operations/applyupdatesrequest.md
|
||||
- docs/models/operations/applyupdatesresponse.md
|
||||
- docs/models/operations/startuniversaltranscoderequest.md
|
||||
- docs/models/operations/startuniversaltranscoderesponse.md
|
||||
- docs/models/operations/state.md
|
||||
- docs/models/operations/gettimelinerequest.md
|
||||
- docs/models/operations/gettimelineresponse.md
|
||||
- docs/models/sdkerrors/errors.md
|
||||
- docs/models/sdkerrors/getservercapabilitiesresponsebody.md
|
||||
- docs/models/sdkerrors/getserverpreferenceserrors.md
|
||||
@@ -379,6 +474,10 @@ generatedFiles:
|
||||
- docs/models/sdkerrors/markunplayedresponsebody.md
|
||||
- docs/models/sdkerrors/updateplayprogresserrors.md
|
||||
- docs/models/sdkerrors/updateplayprogressresponsebody.md
|
||||
- docs/models/sdkerrors/gettimelineerrors.md
|
||||
- docs/models/sdkerrors/gettimelineresponsebody.md
|
||||
- docs/models/sdkerrors/startuniversaltranscodeerrors.md
|
||||
- docs/models/sdkerrors/startuniversaltranscoderesponsebody.md
|
||||
- docs/models/sdkerrors/getserveractivitieserrors.md
|
||||
- docs/models/sdkerrors/getserveractivitiesresponsebody.md
|
||||
- docs/models/sdkerrors/cancelserveractivitieserrors.md
|
||||
@@ -413,14 +512,8 @@ generatedFiles:
|
||||
- docs/models/sdkerrors/getlibraryresponsebody.md
|
||||
- docs/models/sdkerrors/deletelibraryerrors.md
|
||||
- docs/models/sdkerrors/deletelibraryresponsebody.md
|
||||
- docs/models/sdkerrors/getlibraryitemserrors.md
|
||||
- docs/models/sdkerrors/getlibraryitemsresponsebody.md
|
||||
- docs/models/sdkerrors/refreshlibraryerrors.md
|
||||
- docs/models/sdkerrors/refreshlibraryresponsebody.md
|
||||
- docs/models/sdkerrors/getlatestlibraryitemserrors.md
|
||||
- docs/models/sdkerrors/getlatestlibraryitemsresponsebody.md
|
||||
- docs/models/sdkerrors/getcommonlibraryitemserrors.md
|
||||
- docs/models/sdkerrors/getcommonlibraryitemsresponsebody.md
|
||||
- docs/models/sdkerrors/getmetadataerrors.md
|
||||
- docs/models/sdkerrors/getmetadataresponsebody.md
|
||||
- docs/models/sdkerrors/getmetadatachildrenerrors.md
|
||||
@@ -433,6 +526,10 @@ generatedFiles:
|
||||
- docs/models/sdkerrors/logmultilineresponsebody.md
|
||||
- docs/models/sdkerrors/enablepapertrailerrors.md
|
||||
- docs/models/sdkerrors/enablepapertrailresponsebody.md
|
||||
- docs/models/sdkerrors/getpinerrors.md
|
||||
- docs/models/sdkerrors/getpinresponsebody.md
|
||||
- docs/models/sdkerrors/gettokenerrors.md
|
||||
- docs/models/sdkerrors/gettokenresponsebody.md
|
||||
- docs/models/sdkerrors/createplaylisterrors.md
|
||||
- docs/models/sdkerrors/createplaylistresponsebody.md
|
||||
- docs/models/sdkerrors/getplaylistserrors.md
|
||||
@@ -455,6 +552,8 @@ generatedFiles:
|
||||
- docs/models/sdkerrors/gettransienttokenresponsebody.md
|
||||
- docs/models/sdkerrors/getsourceconnectioninformationerrors.md
|
||||
- docs/models/sdkerrors/getsourceconnectioninformationresponsebody.md
|
||||
- docs/models/sdkerrors/getstatisticserrors.md
|
||||
- docs/models/sdkerrors/getstatisticsresponsebody.md
|
||||
- docs/models/sdkerrors/getsessionserrors.md
|
||||
- docs/models/sdkerrors/getsessionsresponsebody.md
|
||||
- docs/models/sdkerrors/getsessionhistoryerrors.md
|
||||
@@ -469,24 +568,25 @@ generatedFiles:
|
||||
- docs/models/sdkerrors/checkforupdatesresponsebody.md
|
||||
- docs/models/sdkerrors/applyupdateserrors.md
|
||||
- docs/models/sdkerrors/applyupdatesresponsebody.md
|
||||
- docs/models/sdkerrors/startuniversaltranscodeerrors.md
|
||||
- docs/models/sdkerrors/startuniversaltranscoderesponsebody.md
|
||||
- docs/models/sdkerrors/gettimelineerrors.md
|
||||
- docs/models/sdkerrors/gettimelineresponsebody.md
|
||||
- docs/models/components/security.md
|
||||
- docs/sdks/plexapi/README.md
|
||||
- docs/sdks/server/README.md
|
||||
- docs/sdks/media/README.md
|
||||
- docs/sdks/video/README.md
|
||||
- docs/sdks/activities/README.md
|
||||
- docs/sdks/butler/README.md
|
||||
- docs/sdks/hubs/README.md
|
||||
- docs/sdks/search/README.md
|
||||
- docs/sdks/library/README.md
|
||||
- docs/sdks/log/README.md
|
||||
- docs/models/operations/option.md
|
||||
- docs/sdks/plex/README.md
|
||||
- docs/sdks/playlists/README.md
|
||||
- docs/sdks/security/README.md
|
||||
- docs/sdks/authentication/README.md
|
||||
- docs/sdks/statistics/README.md
|
||||
- docs/sdks/sessions/README.md
|
||||
- docs/sdks/updater/README.md
|
||||
- docs/sdks/video/README.md
|
||||
- USAGE.md
|
||||
- models/operations/options.go
|
||||
- .gitattributes
|
||||
- internal/hooks/hooks.go
|
||||
|
||||
@@ -6,9 +6,14 @@ generation:
|
||||
optionalPropertyRendering: withExample
|
||||
useClassNamesForArrayFields: true
|
||||
fixes:
|
||||
nameResolutionDec2023: false
|
||||
nameResolutionDec2023: true
|
||||
parameterOrderingFeb2024: true
|
||||
requestResponseComponentNamesFeb2024: true
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
go:
|
||||
version: 0.1.0
|
||||
version: 0.7.0
|
||||
additionalDependencies: {}
|
||||
clientServerStatusCodesAsErrors: true
|
||||
flattenGlobalSecurity: true
|
||||
imports:
|
||||
@@ -21,5 +26,7 @@ go:
|
||||
webhooks: models/webhooks
|
||||
inputModelSuffix: input
|
||||
maxMethodParams: 4
|
||||
methodArguments: require-security-and-request
|
||||
outputModelSuffix: output
|
||||
packageName: github.com/LukeHagar/plexgo
|
||||
responseFormat: envelope
|
||||
16
.speakeasy/workflow.lock
Normal file
16
.speakeasy/workflow.lock
Normal file
@@ -0,0 +1,16 @@
|
||||
speakeasyVersion: 1.285.0
|
||||
sources: {}
|
||||
targets: {}
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
sources:
|
||||
my-source:
|
||||
inputs:
|
||||
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
||||
targets:
|
||||
plexgo:
|
||||
target: go
|
||||
source: my-source
|
||||
codeSamples:
|
||||
output: codeSamples.yaml
|
||||
12
.speakeasy/workflow.yaml
Normal file
12
.speakeasy/workflow.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
sources:
|
||||
my-source:
|
||||
inputs:
|
||||
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
||||
targets:
|
||||
plexgo:
|
||||
target: go
|
||||
source: my-source
|
||||
codeSamples:
|
||||
output: codeSamples.yaml
|
||||
22
LICENSE.md
22
LICENSE.md
@@ -1,21 +1,7 @@
|
||||
MIT License
|
||||
Copyright 2024 Luke Hagar
|
||||
|
||||
Copyright (c) 2023 LukeHagar
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
142
README.md
142
README.md
@@ -33,6 +33,7 @@ import (
|
||||
func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
ctx := context.Background()
|
||||
@@ -40,7 +41,6 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if res.Object != nil {
|
||||
// handle response
|
||||
}
|
||||
@@ -69,6 +69,11 @@ func main() {
|
||||
* [MarkUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed
|
||||
* [UpdatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress
|
||||
|
||||
### [Video](docs/sdks/video/README.md)
|
||||
|
||||
* [GetTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item
|
||||
* [StartUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode
|
||||
|
||||
### [Activities](docs/sdks/activities/README.md)
|
||||
|
||||
* [GetServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities
|
||||
@@ -100,10 +105,8 @@ func main() {
|
||||
* [GetLibraries](docs/sdks/library/README.md#getlibraries) - Get All Libraries
|
||||
* [GetLibrary](docs/sdks/library/README.md#getlibrary) - Get Library Details
|
||||
* [DeleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section
|
||||
* [GetLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
|
||||
* [RefreshLibrary](docs/sdks/library/README.md#refreshlibrary) - Refresh Library
|
||||
* [GetLatestLibraryItems](docs/sdks/library/README.md#getlatestlibraryitems) - Get Latest Library Items
|
||||
* [GetCommonLibraryItems](docs/sdks/library/README.md#getcommonlibraryitems) - Get Common Library Items
|
||||
* [SearchLibrary](docs/sdks/library/README.md#searchlibrary) - Search Library
|
||||
* [GetMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata
|
||||
* [GetMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
||||
* [GetOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck
|
||||
@@ -114,6 +117,11 @@ func main() {
|
||||
* [LogMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message
|
||||
* [EnablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail
|
||||
|
||||
### [Plex](docs/sdks/plex/README.md)
|
||||
|
||||
* [GetPin](docs/sdks/plex/README.md#getpin) - Get a Pin
|
||||
* [GetToken](docs/sdks/plex/README.md#gettoken) - Get Access Token
|
||||
|
||||
### [Playlists](docs/sdks/playlists/README.md)
|
||||
|
||||
* [CreatePlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist
|
||||
@@ -126,10 +134,14 @@ func main() {
|
||||
* [AddPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist
|
||||
* [UploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist
|
||||
|
||||
### [Security](docs/sdks/security/README.md)
|
||||
### [Authentication](docs/sdks/authentication/README.md)
|
||||
|
||||
* [GetTransientToken](docs/sdks/security/README.md#gettransienttoken) - Get a Transient Token.
|
||||
* [GetSourceConnectionInformation](docs/sdks/security/README.md#getsourceconnectioninformation) - Get Source Connection Information
|
||||
* [GetTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token.
|
||||
* [GetSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information
|
||||
|
||||
### [Statistics](docs/sdks/statistics/README.md)
|
||||
|
||||
* [GetStatistics](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics
|
||||
|
||||
### [Sessions](docs/sdks/sessions/README.md)
|
||||
|
||||
@@ -143,11 +155,6 @@ func main() {
|
||||
* [GetUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates
|
||||
* [CheckForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates
|
||||
* [ApplyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates
|
||||
|
||||
### [Video](docs/sdks/video/README.md)
|
||||
|
||||
* [StartUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode
|
||||
* [GetTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item
|
||||
<!-- End Available Resources and Operations [operations] -->
|
||||
|
||||
<!-- Start Error Handling [errors] -->
|
||||
@@ -177,6 +184,7 @@ import (
|
||||
func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
ctx := context.Background()
|
||||
@@ -227,6 +235,7 @@ func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithServerIndex(0),
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
ctx := context.Background()
|
||||
@@ -234,7 +243,6 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if res.Object != nil {
|
||||
// handle response
|
||||
}
|
||||
@@ -266,6 +274,7 @@ func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithServerURL("{protocol}://{ip}:{port}"),
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
ctx := context.Background()
|
||||
@@ -273,7 +282,39 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if res.Object != nil {
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Override Server URL Per-Operation
|
||||
|
||||
The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var strong *bool = plexgo.Bool(false)
|
||||
|
||||
var xPlexClientIdentifier *string = plexgo.String("Postman")
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Plex.GetPin(ctx, strong, xPlexClientIdentifier, operations.WithServerURL("https://plex.tv/api/v2"))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if res.Object != nil {
|
||||
// handle response
|
||||
}
|
||||
@@ -335,6 +376,7 @@ import (
|
||||
func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
ctx := context.Background()
|
||||
@@ -342,7 +384,6 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if res.Object != nil {
|
||||
// handle response
|
||||
}
|
||||
@@ -354,9 +395,82 @@ func main() {
|
||||
<!-- Start Special Types [types] -->
|
||||
## Special Types
|
||||
|
||||
This SDK defines the following custom types to assist with marshalling and unmarshalling data.
|
||||
|
||||
### Date
|
||||
|
||||
`types.Date` is a wrapper around time.Time that allows for JSON marshaling a date string formatted as "2006-01-02".
|
||||
|
||||
#### Usage
|
||||
|
||||
```go
|
||||
d1 := types.NewDate(time.Now()) // returns *types.Date
|
||||
|
||||
d2 := types.DateFromTime(time.Now()) // returns types.Date
|
||||
|
||||
d3, err := types.NewDateFromString("2019-01-01") // returns *types.Date, error
|
||||
|
||||
d4, err := types.DateFromString("2019-01-01") // returns types.Date, error
|
||||
|
||||
d5 := types.MustNewDateFromString("2019-01-01") // returns *types.Date and panics on error
|
||||
|
||||
d6 := types.MustDateFromString("2019-01-01") // returns types.Date and panics on error
|
||||
```
|
||||
<!-- End Special Types [types] -->
|
||||
|
||||
<!-- Start Global Parameters [global-parameters] -->
|
||||
## Global Parameters
|
||||
|
||||
A parameter is configured globally. This parameter must be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
|
||||
|
||||
For example, you can set `X-Plex-Client-Identifier` to `"Postman"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
|
||||
|
||||
|
||||
### Available Globals
|
||||
|
||||
The following global parameter is available. The required parameter must be set when you initialize the SDK client.
|
||||
|
||||
| Name | Type | Required | Description |
|
||||
| ---- | ---- |:--------:| ----------- |
|
||||
| XPlexClientIdentifier | string | ✔️ | The unique identifier for the client application
|
||||
This is used to track the client application and its usage
|
||||
(UUID, serial number, or other number unique per device)
|
||||
|
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var strong *bool = plexgo.Bool(false)
|
||||
|
||||
var xPlexClientIdentifier *string = plexgo.String("Postman")
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Plex.GetPin(ctx, strong, xPlexClientIdentifier)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if res.Object != nil {
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
<!-- End Global Parameters [global-parameters] -->
|
||||
|
||||
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
||||
|
||||
# Development
|
||||
|
||||
346
RELEASES.md
346
RELEASES.md
@@ -58,4 +58,348 @@ Based on:
|
||||
### Generated
|
||||
- [go v0.1.0] .
|
||||
### Releases
|
||||
- [Go v0.1.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.1.0 - .
|
||||
- [Go v0.1.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.1.0 - .
|
||||
|
||||
## 2024-01-22 17:16:22
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.148.0 (2.237.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.1.1] .
|
||||
### Releases
|
||||
- [Go v0.1.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.1.1 - .
|
||||
|
||||
## 2024-01-23 20:47:20
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.150.0 (2.237.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.1.2] .
|
||||
### Releases
|
||||
- [Go v0.1.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.1.2 - .
|
||||
|
||||
## 2024-01-23 21:56:10
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.150.0 (2.237.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.1.3] .
|
||||
### Releases
|
||||
- [Go v0.1.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.1.3 - .
|
||||
|
||||
## 2024-01-31 15:05:54
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.158.0 (2.239.4) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.2.0] .
|
||||
### Releases
|
||||
- [Go v0.2.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.2.0 - .
|
||||
|
||||
## 2024-02-01 00:46:46
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.161.0 (2.245.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.2.1] .
|
||||
### Releases
|
||||
- [Go v0.2.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.2.1 - .
|
||||
|
||||
## 2024-02-05 14:23:54
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.166.1 (2.249.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.3.0] .
|
||||
### Releases
|
||||
- [Go v0.3.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.3.0 - .
|
||||
|
||||
## 2024-02-23 14:46:30
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.193.0 (2.269.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.4.0] .
|
||||
### Releases
|
||||
- [Go v0.4.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.4.0 - .
|
||||
|
||||
## 2024-02-24 00:41:54
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.193.4 (2.272.4) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.4.1] .
|
||||
### Releases
|
||||
- [Go v0.4.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.4.1 - .
|
||||
|
||||
## 2024-02-27 00:43:09
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.194.0 (2.272.7) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.4.2] .
|
||||
### Releases
|
||||
- [Go v0.4.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.4.2 - .
|
||||
|
||||
## 2024-03-02 00:42:48
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.200.0 (2.277.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.4.3] .
|
||||
### Releases
|
||||
- [Go v0.4.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.4.3 - .
|
||||
|
||||
## 2024-03-08 00:43:49
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.204.1 (2.279.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.5.0] .
|
||||
### Releases
|
||||
- [Go v0.5.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.5.0 - .
|
||||
|
||||
## 2024-03-13 00:44:38
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.207.1 (2.280.6) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.5.1] .
|
||||
### Releases
|
||||
- [Go v0.5.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.5.1 - .
|
||||
|
||||
## 2024-03-20 00:43:42
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.213.0 (2.283.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.5.2] .
|
||||
### Releases
|
||||
- [Go v0.5.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.5.2 - .
|
||||
|
||||
## 2024-03-27 00:44:06
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.227.0 (2.291.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.5.3] .
|
||||
### Releases
|
||||
- [Go v0.5.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.5.3 - .
|
||||
|
||||
## 2024-03-29 16:37:06
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.228.1 (2.292.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.0] .
|
||||
### Releases
|
||||
- [Go v0.6.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.0 - .
|
||||
|
||||
## 2024-04-03 00:44:02
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.235.0 (2.298.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.1] .
|
||||
### Releases
|
||||
- [Go v0.6.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.1 - .
|
||||
|
||||
## 2024-04-09 00:44:53
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.244.0 (2.301.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.2] .
|
||||
### Releases
|
||||
- [Go v0.6.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.2 - .
|
||||
|
||||
## 2024-04-10 00:44:38
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.245.0 (2.301.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.3] .
|
||||
### Releases
|
||||
- [Go v0.6.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.3 - .
|
||||
|
||||
## 2024-04-22 16:14:47
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc 0.0.3
|
||||
- Speakeasy CLI 1.267.2 (2.312.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.4] .
|
||||
### Releases
|
||||
- [Go v0.6.4] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.4 - .
|
||||
|
||||
## 2024-04-24 00:45:20
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.271.0 (2.312.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.5] .
|
||||
|
||||
## 2024-04-25 00:48:55
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.274.1 (2.314.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.5] .
|
||||
|
||||
## 2024-04-26 00:46:09
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.274.1 (2.314.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.5] .
|
||||
|
||||
## 2024-04-27 00:45:23
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.276.0 (2.314.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.5] .
|
||||
### Releases
|
||||
- [Go v0.6.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.5 - .
|
||||
|
||||
## 2024-04-28 00:50:52
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.276.0 (2.314.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.5] .
|
||||
### Releases
|
||||
- [Go v0.6.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.5 - .
|
||||
|
||||
## 2024-04-29 00:47:20
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.276.0 (2.314.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.5] .
|
||||
### Releases
|
||||
- [Go v0.6.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.5 - .
|
||||
|
||||
## 2024-04-30 00:45:49
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.277.0 (2.317.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.5] .
|
||||
### Releases
|
||||
- [Go v0.6.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.5 - .
|
||||
|
||||
## 2024-05-01 00:50:59
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.277.4 (2.318.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.5] .
|
||||
### Releases
|
||||
- [Go v0.6.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.5 - .
|
||||
|
||||
## 2024-05-02 00:45:48
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.277.4 (2.318.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.5] .
|
||||
### Releases
|
||||
- [Go v0.6.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.5 - .
|
||||
|
||||
## 2024-05-03 00:50:00
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.277.8 (2.319.10) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.6] .
|
||||
### Releases
|
||||
- [Go v0.6.6] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.6 - .
|
||||
|
||||
## 2024-05-04 00:46:06
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.279.0 (2.322.5) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.7] .
|
||||
### Releases
|
||||
- [Go v0.6.7] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.7 - .
|
||||
|
||||
## 2024-05-05 00:50:48
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.279.0 (2.322.5) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.7] .
|
||||
### Releases
|
||||
- [Go v0.6.7] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.7 - .
|
||||
|
||||
## 2024-05-06 00:48:07
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.279.0 (2.322.5) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.7] .
|
||||
### Releases
|
||||
- [Go v0.6.7] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.7 - .
|
||||
|
||||
## 2024-05-07 00:47:05
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.280.1 (2.322.5) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.7] .
|
||||
### Releases
|
||||
- [Go v0.6.7] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.7 - .
|
||||
|
||||
## 2024-05-08 00:38:43
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.283.1 (2.324.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.6.7] .
|
||||
### Releases
|
||||
- [Go v0.6.7] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.7 - .
|
||||
|
||||
## 2024-05-08 18:14:51
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.285.0 (2.326.3) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [go v0.7.0] .
|
||||
### Releases
|
||||
- [Go v0.7.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.7.0 - .
|
||||
2
USAGE.md
2
USAGE.md
@@ -12,6 +12,7 @@ import (
|
||||
func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
ctx := context.Background()
|
||||
@@ -19,7 +20,6 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if res.Object != nil {
|
||||
// handle response
|
||||
}
|
||||
|
||||
130
activities.go
130
activities.go
@@ -6,12 +6,13 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/LukeHagar/plexgo/internal/hooks"
|
||||
"github.com/LukeHagar/plexgo/internal/utils"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"github.com/LukeHagar/plexgo/models/sdkerrors"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
|
||||
@@ -34,31 +35,62 @@ func newActivities(sdkConfig sdkConfiguration) *Activities {
|
||||
// GetServerActivities - Get Server Activities
|
||||
// Get Server Activities
|
||||
func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetServerActivitiesResponse, error) {
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
url := strings.TrimSuffix(baseURL, "/") + "/activities"
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getServerActivities",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
opURL, err := url.JoinPath(baseURL, "/activities")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||
}
|
||||
|
||||
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)
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
client := s.sdkConfiguration.SecurityClient
|
||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpRes, err := client.Do(req)
|
||||
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error sending request: %w", err)
|
||||
}
|
||||
if httpRes == nil {
|
||||
return nil, fmt.Errorf("error sending request: no response")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
contentType := httpRes.Header.Get("Content-Type")
|
||||
httpRes, err := s.sdkConfiguration.Client.Do(req)
|
||||
if err != nil || httpRes == nil {
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error sending request: %w", err)
|
||||
} else {
|
||||
err = fmt.Errorf("error sending request: no response")
|
||||
}
|
||||
|
||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||
return nil, err
|
||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if _httpRes != nil {
|
||||
httpRes = _httpRes
|
||||
}
|
||||
} else {
|
||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
res := &operations.GetServerActivitiesResponse{
|
||||
StatusCode: httpRes.StatusCode,
|
||||
ContentType: contentType,
|
||||
ContentType: httpRes.Header.Get("Content-Type"),
|
||||
RawResponse: httpRes,
|
||||
}
|
||||
|
||||
@@ -68,10 +100,11 @@ func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetSe
|
||||
}
|
||||
httpRes.Body.Close()
|
||||
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
|
||||
|
||||
switch {
|
||||
case httpRes.StatusCode == 200:
|
||||
switch {
|
||||
case utils.MatchContentType(contentType, `application/json`):
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out operations.GetServerActivitiesResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
@@ -79,7 +112,7 @@ func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetSe
|
||||
|
||||
res.Object = &out
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
case httpRes.StatusCode == 400:
|
||||
fallthrough
|
||||
@@ -89,17 +122,19 @@ func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetSe
|
||||
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
case httpRes.StatusCode == 401:
|
||||
switch {
|
||||
case utils.MatchContentType(contentType, `application/json`):
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out sdkerrors.GetServerActivitiesResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
out.RawResponse = httpRes
|
||||
|
||||
out.RawResponse = httpRes
|
||||
return nil, &out
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
|
||||
return res, nil
|
||||
@@ -108,38 +143,66 @@ func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetSe
|
||||
// CancelServerActivities - Cancel Server Activities
|
||||
// Cancel Server Activities
|
||||
func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID string) (*operations.CancelServerActivitiesResponse, error) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "cancelServerActivities",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.CancelServerActivitiesRequest{
|
||||
ActivityUUID: activityUUID,
|
||||
}
|
||||
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
url, err := utils.GenerateURL(ctx, baseURL, "/activities/{activityUUID}", request, nil)
|
||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/activities/{activityUUID}", request, nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil)
|
||||
req, err := http.NewRequestWithContext(ctx, "DELETE", 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)
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
client := s.sdkConfiguration.SecurityClient
|
||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpRes, err := client.Do(req)
|
||||
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error sending request: %w", err)
|
||||
}
|
||||
if httpRes == nil {
|
||||
return nil, fmt.Errorf("error sending request: no response")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
contentType := httpRes.Header.Get("Content-Type")
|
||||
httpRes, err := s.sdkConfiguration.Client.Do(req)
|
||||
if err != nil || httpRes == nil {
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error sending request: %w", err)
|
||||
} else {
|
||||
err = fmt.Errorf("error sending request: no response")
|
||||
}
|
||||
|
||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||
return nil, err
|
||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if _httpRes != nil {
|
||||
httpRes = _httpRes
|
||||
}
|
||||
} else {
|
||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
res := &operations.CancelServerActivitiesResponse{
|
||||
StatusCode: httpRes.StatusCode,
|
||||
ContentType: contentType,
|
||||
ContentType: httpRes.Header.Get("Content-Type"),
|
||||
RawResponse: httpRes,
|
||||
}
|
||||
|
||||
@@ -149,6 +212,7 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
|
||||
}
|
||||
httpRes.Body.Close()
|
||||
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
|
||||
|
||||
switch {
|
||||
case httpRes.StatusCode == 200:
|
||||
case httpRes.StatusCode == 400:
|
||||
@@ -159,17 +223,19 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
|
||||
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
case httpRes.StatusCode == 401:
|
||||
switch {
|
||||
case utils.MatchContentType(contentType, `application/json`):
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out sdkerrors.CancelServerActivitiesResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
out.RawResponse = httpRes
|
||||
|
||||
out.RawResponse = httpRes
|
||||
return nil, &out
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
239
authentication.go
Normal file
239
authentication.go
Normal file
@@ -0,0 +1,239 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
package plexgo
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/LukeHagar/plexgo/internal/hooks"
|
||||
"github.com/LukeHagar/plexgo/internal/utils"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"github.com/LukeHagar/plexgo/models/sdkerrors"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// Authentication - API Calls regarding authentication for Plex Media Server
|
||||
type Authentication struct {
|
||||
sdkConfiguration sdkConfiguration
|
||||
}
|
||||
|
||||
func newAuthentication(sdkConfig sdkConfiguration) *Authentication {
|
||||
return &Authentication{
|
||||
sdkConfiguration: sdkConfig,
|
||||
}
|
||||
}
|
||||
|
||||
// GetTransientToken - Get a Transient Token.
|
||||
// This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
|
||||
func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations.GetTransientTokenQueryParamType, scope operations.Scope) (*operations.GetTransientTokenResponse, error) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getTransientToken",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetTransientTokenRequest{
|
||||
Type: type_,
|
||||
Scope: scope,
|
||||
}
|
||||
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
opURL, err := url.JoinPath(baseURL, "/security/token")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error creating request: %w", err)
|
||||
}
|
||||
req.Header.Set("Accept", "application/json")
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||
}
|
||||
|
||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpRes, err := s.sdkConfiguration.Client.Do(req)
|
||||
if err != nil || httpRes == nil {
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error sending request: %w", err)
|
||||
} else {
|
||||
err = fmt.Errorf("error sending request: no response")
|
||||
}
|
||||
|
||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||
return nil, err
|
||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if _httpRes != nil {
|
||||
httpRes = _httpRes
|
||||
}
|
||||
} else {
|
||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
res := &operations.GetTransientTokenResponse{
|
||||
StatusCode: httpRes.StatusCode,
|
||||
ContentType: httpRes.Header.Get("Content-Type"),
|
||||
RawResponse: httpRes,
|
||||
}
|
||||
|
||||
rawBody, err := io.ReadAll(httpRes.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error reading response body: %w", err)
|
||||
}
|
||||
httpRes.Body.Close()
|
||||
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
|
||||
|
||||
switch {
|
||||
case httpRes.StatusCode == 200:
|
||||
case httpRes.StatusCode == 400:
|
||||
fallthrough
|
||||
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
||||
fallthrough
|
||||
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
|
||||
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
case httpRes.StatusCode == 401:
|
||||
switch {
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out sdkerrors.GetTransientTokenResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out.RawResponse = httpRes
|
||||
return nil, &out
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
|
||||
return res, nil
|
||||
}
|
||||
|
||||
// GetSourceConnectionInformation - Get Source Connection Information
|
||||
// If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
|
||||
// Note: requires Plex Media Server >= 1.15.4.
|
||||
func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, source string) (*operations.GetSourceConnectionInformationResponse, error) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getSourceConnectionInformation",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetSourceConnectionInformationRequest{
|
||||
Source: source,
|
||||
}
|
||||
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
opURL, err := url.JoinPath(baseURL, "/security/resources")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error creating request: %w", err)
|
||||
}
|
||||
req.Header.Set("Accept", "application/json")
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||
}
|
||||
|
||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpRes, err := s.sdkConfiguration.Client.Do(req)
|
||||
if err != nil || httpRes == nil {
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error sending request: %w", err)
|
||||
} else {
|
||||
err = fmt.Errorf("error sending request: no response")
|
||||
}
|
||||
|
||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||
return nil, err
|
||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if _httpRes != nil {
|
||||
httpRes = _httpRes
|
||||
}
|
||||
} else {
|
||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
res := &operations.GetSourceConnectionInformationResponse{
|
||||
StatusCode: httpRes.StatusCode,
|
||||
ContentType: httpRes.Header.Get("Content-Type"),
|
||||
RawResponse: httpRes,
|
||||
}
|
||||
|
||||
rawBody, err := io.ReadAll(httpRes.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error reading response body: %w", err)
|
||||
}
|
||||
httpRes.Body.Close()
|
||||
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
|
||||
|
||||
switch {
|
||||
case httpRes.StatusCode == 200:
|
||||
case httpRes.StatusCode == 400:
|
||||
fallthrough
|
||||
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
||||
fallthrough
|
||||
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
|
||||
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
case httpRes.StatusCode == 401:
|
||||
switch {
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out sdkerrors.GetSourceConnectionInformationResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out.RawResponse = httpRes
|
||||
return nil, &out
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
|
||||
return res, nil
|
||||
}
|
||||
317
butler.go
317
butler.go
@@ -6,12 +6,13 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/LukeHagar/plexgo/internal/hooks"
|
||||
"github.com/LukeHagar/plexgo/internal/utils"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"github.com/LukeHagar/plexgo/models/sdkerrors"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// Butler is the task manager of the Plex Media Server Ecosystem.
|
||||
@@ -28,31 +29,62 @@ func newButler(sdkConfig sdkConfiguration) *Butler {
|
||||
// GetButlerTasks - Get Butler tasks
|
||||
// Returns a list of butler tasks
|
||||
func (s *Butler) GetButlerTasks(ctx context.Context) (*operations.GetButlerTasksResponse, error) {
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
url := strings.TrimSuffix(baseURL, "/") + "/butler"
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getButlerTasks",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
opURL, err := url.JoinPath(baseURL, "/butler")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||
}
|
||||
|
||||
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)
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
client := s.sdkConfiguration.SecurityClient
|
||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpRes, err := client.Do(req)
|
||||
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error sending request: %w", err)
|
||||
}
|
||||
if httpRes == nil {
|
||||
return nil, fmt.Errorf("error sending request: no response")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
contentType := httpRes.Header.Get("Content-Type")
|
||||
httpRes, err := s.sdkConfiguration.Client.Do(req)
|
||||
if err != nil || httpRes == nil {
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error sending request: %w", err)
|
||||
} else {
|
||||
err = fmt.Errorf("error sending request: no response")
|
||||
}
|
||||
|
||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||
return nil, err
|
||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if _httpRes != nil {
|
||||
httpRes = _httpRes
|
||||
}
|
||||
} else {
|
||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
res := &operations.GetButlerTasksResponse{
|
||||
StatusCode: httpRes.StatusCode,
|
||||
ContentType: contentType,
|
||||
ContentType: httpRes.Header.Get("Content-Type"),
|
||||
RawResponse: httpRes,
|
||||
}
|
||||
|
||||
@@ -62,10 +94,11 @@ func (s *Butler) GetButlerTasks(ctx context.Context) (*operations.GetButlerTasks
|
||||
}
|
||||
httpRes.Body.Close()
|
||||
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
|
||||
|
||||
switch {
|
||||
case httpRes.StatusCode == 200:
|
||||
switch {
|
||||
case utils.MatchContentType(contentType, `application/json`):
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out operations.GetButlerTasksResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
@@ -73,7 +106,7 @@ func (s *Butler) GetButlerTasks(ctx context.Context) (*operations.GetButlerTasks
|
||||
|
||||
res.Object = &out
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
case httpRes.StatusCode == 400:
|
||||
fallthrough
|
||||
@@ -83,17 +116,19 @@ func (s *Butler) GetButlerTasks(ctx context.Context) (*operations.GetButlerTasks
|
||||
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
case httpRes.StatusCode == 401:
|
||||
switch {
|
||||
case utils.MatchContentType(contentType, `application/json`):
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out sdkerrors.GetButlerTasksResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
out.RawResponse = httpRes
|
||||
|
||||
out.RawResponse = httpRes
|
||||
return nil, &out
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
|
||||
return res, nil
|
||||
@@ -106,31 +141,62 @@ func (s *Butler) GetButlerTasks(ctx context.Context) (*operations.GetButlerTasks
|
||||
// 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
|
||||
// 4. If we are outside the configured window, the task will start immediately.
|
||||
func (s *Butler) StartAllTasks(ctx context.Context) (*operations.StartAllTasksResponse, error) {
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
url := strings.TrimSuffix(baseURL, "/") + "/butler"
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "startAllTasks",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "POST", url, nil)
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
opURL, err := url.JoinPath(baseURL, "/butler")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "POST", opURL, nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error creating request: %w", err)
|
||||
}
|
||||
req.Header.Set("Accept", "application/json")
|
||||
req.Header.Set("user-agent", s.sdkConfiguration.UserAgent)
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
client := s.sdkConfiguration.SecurityClient
|
||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpRes, err := client.Do(req)
|
||||
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error sending request: %w", err)
|
||||
}
|
||||
if httpRes == nil {
|
||||
return nil, fmt.Errorf("error sending request: no response")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
contentType := httpRes.Header.Get("Content-Type")
|
||||
httpRes, err := s.sdkConfiguration.Client.Do(req)
|
||||
if err != nil || httpRes == nil {
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error sending request: %w", err)
|
||||
} else {
|
||||
err = fmt.Errorf("error sending request: no response")
|
||||
}
|
||||
|
||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||
return nil, err
|
||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if _httpRes != nil {
|
||||
httpRes = _httpRes
|
||||
}
|
||||
} else {
|
||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
res := &operations.StartAllTasksResponse{
|
||||
StatusCode: httpRes.StatusCode,
|
||||
ContentType: contentType,
|
||||
ContentType: httpRes.Header.Get("Content-Type"),
|
||||
RawResponse: httpRes,
|
||||
}
|
||||
|
||||
@@ -140,6 +206,7 @@ func (s *Butler) StartAllTasks(ctx context.Context) (*operations.StartAllTasksRe
|
||||
}
|
||||
httpRes.Body.Close()
|
||||
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
|
||||
|
||||
switch {
|
||||
case httpRes.StatusCode == 200:
|
||||
case httpRes.StatusCode == 400:
|
||||
@@ -150,17 +217,19 @@ func (s *Butler) StartAllTasks(ctx context.Context) (*operations.StartAllTasksRe
|
||||
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
case httpRes.StatusCode == 401:
|
||||
switch {
|
||||
case utils.MatchContentType(contentType, `application/json`):
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out sdkerrors.StartAllTasksResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
out.RawResponse = httpRes
|
||||
|
||||
out.RawResponse = httpRes
|
||||
return nil, &out
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
|
||||
return res, nil
|
||||
@@ -169,31 +238,62 @@ func (s *Butler) StartAllTasks(ctx context.Context) (*operations.StartAllTasksRe
|
||||
// StopAllTasks - Stop all Butler tasks
|
||||
// This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
|
||||
func (s *Butler) StopAllTasks(ctx context.Context) (*operations.StopAllTasksResponse, error) {
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
url := strings.TrimSuffix(baseURL, "/") + "/butler"
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "stopAllTasks",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil)
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
opURL, err := url.JoinPath(baseURL, "/butler")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "DELETE", 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)
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
client := s.sdkConfiguration.SecurityClient
|
||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpRes, err := client.Do(req)
|
||||
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error sending request: %w", err)
|
||||
}
|
||||
if httpRes == nil {
|
||||
return nil, fmt.Errorf("error sending request: no response")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
contentType := httpRes.Header.Get("Content-Type")
|
||||
httpRes, err := s.sdkConfiguration.Client.Do(req)
|
||||
if err != nil || httpRes == nil {
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error sending request: %w", err)
|
||||
} else {
|
||||
err = fmt.Errorf("error sending request: no response")
|
||||
}
|
||||
|
||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||
return nil, err
|
||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if _httpRes != nil {
|
||||
httpRes = _httpRes
|
||||
}
|
||||
} else {
|
||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
res := &operations.StopAllTasksResponse{
|
||||
StatusCode: httpRes.StatusCode,
|
||||
ContentType: contentType,
|
||||
ContentType: httpRes.Header.Get("Content-Type"),
|
||||
RawResponse: httpRes,
|
||||
}
|
||||
|
||||
@@ -203,6 +303,7 @@ func (s *Butler) StopAllTasks(ctx context.Context) (*operations.StopAllTasksResp
|
||||
}
|
||||
httpRes.Body.Close()
|
||||
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
|
||||
|
||||
switch {
|
||||
case httpRes.StatusCode == 200:
|
||||
case httpRes.StatusCode == 400:
|
||||
@@ -213,17 +314,19 @@ func (s *Butler) StopAllTasks(ctx context.Context) (*operations.StopAllTasksResp
|
||||
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
case httpRes.StatusCode == 401:
|
||||
switch {
|
||||
case utils.MatchContentType(contentType, `application/json`):
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out sdkerrors.StopAllTasksResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
out.RawResponse = httpRes
|
||||
|
||||
out.RawResponse = httpRes
|
||||
return nil, &out
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
|
||||
return res, nil
|
||||
@@ -236,38 +339,66 @@ func (s *Butler) StopAllTasks(ctx context.Context) (*operations.StopAllTasksResp
|
||||
// 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
|
||||
// 4. If we are outside the configured window, the task will start immediately.
|
||||
func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName) (*operations.StartTaskResponse, error) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "startTask",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.StartTaskRequest{
|
||||
TaskName: taskName,
|
||||
}
|
||||
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
url, err := utils.GenerateURL(ctx, baseURL, "/butler/{taskName}", request, nil)
|
||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/butler/{taskName}", request, nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "POST", url, nil)
|
||||
req, err := http.NewRequestWithContext(ctx, "POST", opURL, nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error creating request: %w", err)
|
||||
}
|
||||
req.Header.Set("Accept", "application/json")
|
||||
req.Header.Set("user-agent", s.sdkConfiguration.UserAgent)
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
client := s.sdkConfiguration.SecurityClient
|
||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpRes, err := client.Do(req)
|
||||
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error sending request: %w", err)
|
||||
}
|
||||
if httpRes == nil {
|
||||
return nil, fmt.Errorf("error sending request: no response")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
contentType := httpRes.Header.Get("Content-Type")
|
||||
httpRes, err := s.sdkConfiguration.Client.Do(req)
|
||||
if err != nil || httpRes == nil {
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error sending request: %w", err)
|
||||
} else {
|
||||
err = fmt.Errorf("error sending request: no response")
|
||||
}
|
||||
|
||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||
return nil, err
|
||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if _httpRes != nil {
|
||||
httpRes = _httpRes
|
||||
}
|
||||
} else {
|
||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
res := &operations.StartTaskResponse{
|
||||
StatusCode: httpRes.StatusCode,
|
||||
ContentType: contentType,
|
||||
ContentType: httpRes.Header.Get("Content-Type"),
|
||||
RawResponse: httpRes,
|
||||
}
|
||||
|
||||
@@ -277,6 +408,7 @@ func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName) (*
|
||||
}
|
||||
httpRes.Body.Close()
|
||||
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
|
||||
|
||||
switch {
|
||||
case httpRes.StatusCode == 200:
|
||||
fallthrough
|
||||
@@ -289,17 +421,19 @@ func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName) (*
|
||||
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
case httpRes.StatusCode == 401:
|
||||
switch {
|
||||
case utils.MatchContentType(contentType, `application/json`):
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out sdkerrors.StartTaskResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
out.RawResponse = httpRes
|
||||
|
||||
out.RawResponse = httpRes
|
||||
return nil, &out
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
|
||||
return res, nil
|
||||
@@ -308,38 +442,66 @@ func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName) (*
|
||||
// StopTask - Stop a single Butler task
|
||||
// This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
|
||||
func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTaskName) (*operations.StopTaskResponse, error) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "stopTask",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.StopTaskRequest{
|
||||
TaskName: taskName,
|
||||
}
|
||||
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
url, err := utils.GenerateURL(ctx, baseURL, "/butler/{taskName}", request, nil)
|
||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/butler/{taskName}", request, nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "DELETE", url, nil)
|
||||
req, err := http.NewRequestWithContext(ctx, "DELETE", 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)
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
client := s.sdkConfiguration.SecurityClient
|
||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpRes, err := client.Do(req)
|
||||
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error sending request: %w", err)
|
||||
}
|
||||
if httpRes == nil {
|
||||
return nil, fmt.Errorf("error sending request: no response")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
contentType := httpRes.Header.Get("Content-Type")
|
||||
httpRes, err := s.sdkConfiguration.Client.Do(req)
|
||||
if err != nil || httpRes == nil {
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error sending request: %w", err)
|
||||
} else {
|
||||
err = fmt.Errorf("error sending request: no response")
|
||||
}
|
||||
|
||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||
return nil, err
|
||||
} else if utils.MatchStatusCodes([]string{"400", "401", "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.StopTaskResponse{
|
||||
StatusCode: httpRes.StatusCode,
|
||||
ContentType: contentType,
|
||||
ContentType: httpRes.Header.Get("Content-Type"),
|
||||
RawResponse: httpRes,
|
||||
}
|
||||
|
||||
@@ -349,6 +511,7 @@ func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTask
|
||||
}
|
||||
httpRes.Body.Close()
|
||||
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
|
||||
|
||||
switch {
|
||||
case httpRes.StatusCode == 200:
|
||||
case httpRes.StatusCode == 400:
|
||||
@@ -361,17 +524,19 @@ func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTask
|
||||
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
case httpRes.StatusCode == 401:
|
||||
switch {
|
||||
case utils.MatchContentType(contentType, `application/json`):
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out sdkerrors.StopTaskResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
out.RawResponse = httpRes
|
||||
|
||||
out.RawResponse = httpRes
|
||||
return nil, &out
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
default:
|
||||
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
359
codeSamples.yaml
Normal file
359
codeSamples.yaml
Normal file
@@ -0,0 +1,359 @@
|
||||
overlay: 1.0.0
|
||||
info:
|
||||
title: CodeSamples overlay for go target
|
||||
version: 0.0.0
|
||||
actions:
|
||||
- target: $["paths"]["/pins"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getPin
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var strong *bool = plexgo.Bool(false)\n\n var xPlexClientIdentifier *string = plexgo.String(\"Postman\")\n \n ctx := context.Background()\n res, err := s.GetPin(ctx, strong, xPlexClientIdentifier)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/pins/{pinID}"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getToken
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var pinID string = \"<value>\"\n\n var xPlexClientIdentifier *string = plexgo.String(\"Postman\")\n \n ctx := context.Background()\n res, err := s.GetToken(ctx, pinID, xPlexClientIdentifier)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/devices"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getDevices
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetDevices(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/hubs/search"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: performSearch
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var query string = \"dylan\"\n\n var sectionID *float64 = plexgo.Float64(1516.53)\n\n var limit *float64 = plexgo.Float64(5)\n \n ctx := context.Background()\n res, err := s.PerformSearch(ctx, query, sectionID, limit)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/log"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: logMultiLine
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var request string = \"level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman\nlevel=1&message=Test%20message%203&source=postman\"\n \n ctx := context.Background()\n res, err := s.LogMultiLine(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/library/sections"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getLibraries
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetLibraries(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getMetadata
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var ratingKey float64 = 8382.31\n \n ctx := context.Background()\n res, err := s.GetMetadata(ctx, ratingKey)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/myplex/account"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getMyPlexAccount
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetMyPlexAccount(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/activities"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getServerActivities
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetServerActivities(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/playlists/{playlistID}/items"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: clearPlaylistContents
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var playlistID float64 = 1893.18\n \n ctx := context.Background()\n res, err := s.ClearPlaylistContents(ctx, playlistID)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/:/scrobble"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: markPlayed
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var key float64 = 59398\n \n ctx := context.Background()\n res, err := s.MarkPlayed(ctx, key)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/search"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getSearchResults
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var query string = \"110\"\n \n ctx := context.Background()\n res, err := s.GetSearchResults(ctx, query)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/library/recentlyAdded"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getRecentlyAdded
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetRecentlyAdded(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getMetadataChildren
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var ratingKey float64 = 1539.14\n \n ctx := context.Background()\n res, err := s.GetMetadataChildren(ctx, ratingKey)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/playlists/{playlistID}"]["put"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: updatePlaylist
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var playlistID float64 = 3915\n\n var title *string = plexgo.String(\"<value>\")\n\n var summary *string = plexgo.String(\"<value>\")\n \n ctx := context.Background()\n res, err := s.UpdatePlaylist(ctx, playlistID, title, summary)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/identity"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getServerIdentity
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetServerIdentity(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: startUniversalTranscode
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n request := operations.StartUniversalTranscodeRequest{\n HasMDE: 1,\n Path: \"/library/metadata/23409\",\n MediaIndex: 0,\n PartIndex: 0,\n Protocol: \"hls\",\n FastSeek: plexgo.Float64(0),\n DirectPlay: plexgo.Float64(0),\n DirectStream: plexgo.Float64(0),\n SubtitleSize: plexgo.Float64(100),\n Subtites: plexgo.String(\"burn\"),\n AudioBoost: plexgo.Float64(100),\n Location: plexgo.String(\"lan\"),\n MediaBufferSize: plexgo.Float64(102400),\n Session: plexgo.String(\"zvcage8b7rkioqcm8f4uns4c\"),\n AddDebugOverlay: plexgo.Float64(0),\n AutoAdjustQuality: plexgo.Float64(0),\n }\n \n ctx := context.Background()\n res, err := s.StartUniversalTranscode(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/butler"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: stopAllTasks
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.StopAllTasks(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/library/sections/{sectionId}/refresh"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: refreshLibrary
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var sectionID float64 = 934.16\n \n ctx := context.Background()\n res, err := s.RefreshLibrary(ctx, sectionID)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/playlists"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getPlaylists
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var playlistType *operations.PlaylistType = operations.PlaylistTypeAudio.ToPointer()\n\n var smart *operations.QueryParamSmart = operations.QueryParamSmartZero.ToPointer()\n \n ctx := context.Background()\n res, err := s.GetPlaylists(ctx, playlistType, smart)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/playlists/{playlistID}"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: deletePlaylist
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var playlistID float64 = 216.22\n \n ctx := context.Background()\n res, err := s.DeletePlaylist(ctx, playlistID)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/playlists/{playlistID}/items"]["put"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: addPlaylistContents
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var playlistID float64 = 8502.01\n\n var uri string = \"server://12345/com.plexapp.plugins.library/library/metadata/1\"\n\n var playQueueID *float64 = plexgo.Float64(123)\n \n ctx := context.Background()\n res, err := s.AddPlaylistContents(ctx, playlistID, uri, playQueueID)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/butler/{taskName}"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: stopTask
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var taskName operations.PathParamTaskName = operations.PathParamTaskNameBackupDatabase\n \n ctx := context.Background()\n res, err := s.StopTask(ctx, taskName)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/library/hashes"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getFileHash
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var url_ string = \"file://C:\\Image.png&type=13\"\n\n var type_ *float64 = plexgo.Float64(4462.17)\n \n ctx := context.Background()\n res, err := s.GetFileHash(ctx, url_, type_)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/transcode/sessions"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getTranscodeSessions
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetTranscodeSessions(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/hubs"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getGlobalHubs
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var count *float64 = plexgo.Float64(1262.49)\n\n var onlyTransient *operations.OnlyTransient = operations.OnlyTransientOne.ToPointer()\n \n ctx := context.Background()\n res, err := s.GetGlobalHubs(ctx, count, onlyTransient)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/library/sections/{sectionId}"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: deleteLibrary
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var sectionID float64 = 1000\n \n ctx := context.Background()\n res, err := s.DeleteLibrary(ctx, sectionID)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/playlists"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: createPlaylist
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n request := operations.CreatePlaylistRequest{\n Title: \"<value>\",\n Type: operations.QueryParamTypePhoto,\n Smart: operations.SmartOne,\n URI: \"https://inborn-brochure.biz\",\n }\n \n ctx := context.Background()\n res, err := s.CreatePlaylist(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/:/prefs"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getServerPreferences
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetServerPreferences(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/butler/{taskName}"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: startTask
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var taskName operations.TaskName = operations.TaskNameCleanOldBundles\n \n ctx := context.Background()\n res, err := s.StartTask(ctx, taskName)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/log"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: logLine
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var level operations.Level = operations.LevelThree\n\n var message string = \"Test log message\"\n\n var source string = \"Postman\"\n \n ctx := context.Background()\n res, err := s.LogLine(ctx, level, message, source)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/:/timeline"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getTimeline
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n request := operations.GetTimelineRequest{\n RatingKey: 23409,\n Key: \"/library/metadata/23409\",\n State: operations.StatePlaying,\n HasMDE: 1,\n Time: 2000,\n Duration: 10000,\n Context: \"home:hub.continueWatching\",\n PlayQueueItemID: 1,\n PlayBackTime: 2000,\n Row: 1,\n }\n \n ctx := context.Background()\n res, err := s.GetTimeline(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/butler"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: startAllTasks
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.StartAllTasks(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/hubs/search/voice"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: performVoiceSearch
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var query string = \"dead+poop\"\n\n var sectionID *float64 = plexgo.Float64(4094.8)\n\n var limit *float64 = plexgo.Float64(5)\n \n ctx := context.Background()\n res, err := s.PerformVoiceSearch(ctx, query, sectionID, limit)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/library/sections/{sectionId}/search"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: searchLibrary
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var sectionID int64 = 933505\n\n var type_ operations.Type = operations.TypeFour\n \n ctx := context.Background()\n res, err := s.SearchLibrary(ctx, sectionID, type_)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/status/sessions"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getSessions
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetSessions(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/updater/apply"]["put"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: applyUpdates
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var tonight *operations.Tonight = operations.TonightOne.ToPointer()\n\n var skip *operations.Skip = operations.SkipOne.ToPointer()\n \n ctx := context.Background()\n res, err := s.ApplyUpdates(ctx, tonight, skip)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/clients"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getAvailableClients
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetAvailableClients(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/:/progress"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: updatePlayProgress
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var key string = \"<value>\"\n\n var time float64 = 90000\n\n var state string = \"played\"\n \n ctx := context.Background()\n res, err := s.UpdatePlayProgress(ctx, key, time, state)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/hubs/sections/{sectionId}"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getLibraryHubs
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var sectionID float64 = 6728.76\n\n var count *float64 = plexgo.Float64(9010.22)\n\n var onlyTransient *operations.QueryParamOnlyTransient = operations.QueryParamOnlyTransientZero.ToPointer()\n \n ctx := context.Background()\n res, err := s.GetLibraryHubs(ctx, sectionID, count, onlyTransient)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/security/resources"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getSourceConnectionInformation
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var source string = \"server://client-identifier\"\n \n ctx := context.Background()\n res, err := s.GetSourceConnectionInformation(ctx, source)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/updater/status"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getUpdateStatus
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetUpdateStatus(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/servers"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getServerList
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetServerList(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/activities/{activityUUID}"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: cancelServerActivities
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var activityUUID string = \"25b71ed5-0f9d-461c-baa7-d404e9e10d3e\"\n \n ctx := context.Background()\n res, err := s.CancelServerActivities(ctx, activityUUID)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/log/networked"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: enablePaperTrail
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.EnablePaperTrail(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/playlists/{playlistID}/items"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getPlaylistContents
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var playlistID float64 = 5004.46\n\n var type_ float64 = 9403.59\n \n ctx := context.Background()\n res, err := s.GetPlaylistContents(ctx, playlistID, type_)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/playlists/upload"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: uploadPlaylist
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var path string = \"/home/barkley/playlist.m3u\"\n\n var force operations.Force = operations.ForceZero\n \n ctx := context.Background()\n res, err := s.UploadPlaylist(ctx, path, force)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/statistics/media"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getStatistics
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var timespan *int64 = plexgo.Int64(4)\n \n ctx := context.Background()\n res, err := s.GetStatistics(ctx, timespan)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/butler"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getButlerTasks
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetButlerTasks(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/security/token"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getTransientToken
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var type_ operations.GetTransientTokenQueryParamType = operations.GetTransientTokenQueryParamTypeDelegation\n\n var scope operations.Scope = operations.ScopeAll\n \n ctx := context.Background()\n res, err := s.GetTransientToken(ctx, type_, scope)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/status/sessions/history/all"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getSessionHistory
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetSessionHistory(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getServerCapabilities
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetServerCapabilities(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/photo/:/transcode"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getResizedPhoto
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n request := operations.GetResizedPhotoRequest{\n Width: 110,\n Height: 165,\n Opacity: 100,\n Blur: 20,\n MinSize: operations.MinSizeOne,\n Upscale: operations.UpscaleZero,\n URL: \"/library/metadata/49564/thumb/1654258204\",\n }\n \n ctx := context.Background()\n res, err := s.GetResizedPhoto(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/:/unscrobble"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: markUnplayed
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var key float64 = 59398\n \n ctx := context.Background()\n res, err := s.MarkUnplayed(ctx, key)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/library/sections/{sectionId}"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getLibrary
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var sectionID float64 = 1000\n\n var includeDetails *operations.IncludeDetails = operations.IncludeDetailsZero.ToPointer()\n \n ctx := context.Background()\n res, err := s.GetLibrary(ctx, sectionID, includeDetails)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/library/onDeck"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getOnDeck
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n\n \n ctx := context.Background()\n res, err := s.GetOnDeck(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/playlists/{playlistID}"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: getPlaylist
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var playlistID float64 = 4109.48\n \n ctx := context.Background()\n res, err := s.GetPlaylist(ctx, playlistID)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: stopTranscodeSession
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var sessionKey string = \"zz7llzqlx8w9vnrsbnwhbmep\"\n \n ctx := context.Background()\n res, err := s.StopTranscodeSession(ctx, sessionKey)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
- target: $["paths"]["/updater/check"]["put"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: go
|
||||
label: checkForUpdates
|
||||
source: "package main\n\nimport(\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n plexgo.WithXPlexClientIdentifier(\"Postman\"),\n )\n\n var download *operations.Download = operations.DownloadOne.ToPointer()\n \n ctx := context.Background()\n res, err := s.CheckForUpdates(ctx, download)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
|
||||
15
docs/models/operations/account.md
Normal file
15
docs/models/operations/account.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Account
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 238960586 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /accounts/238960586 |
|
||||
| `Name` | **string* | :heavy_minus_sign: | N/A | Diane |
|
||||
| `DefaultAudioLanguage` | **string* | :heavy_minus_sign: | N/A | en |
|
||||
| `AutoSelectAudio` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `DefaultSubtitleLanguage` | **string* | :heavy_minus_sign: | N/A | en |
|
||||
| `SubtitleMode` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | https://plex.tv/users/50d83634246da1de/avatar?c=1707110967 |
|
||||
11
docs/models/operations/addplaylistcontentsmediacontainer.md
Normal file
11
docs/models/operations/addplaylistcontentsmediacontainer.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# AddPlaylistContentsMediaContainer
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Size` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `LeafCountAdded` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `LeafCountRequested` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Metadata` | [][operations.AddPlaylistContentsMetadata](../../models/operations/addplaylistcontentsmetadata.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"ratingKey": "94",<br/>"key": "/playlists/94/items",<br/>"guid": "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2",<br/>"type": "playlist",<br/>"title": "A great playlist",<br/>"summary": "One of my great playlists",<br/>"smart": false,<br/>"playlistType": "video",<br/>"composite": "/playlists/94/composite/1705800070",<br/>"duration": 423000,<br/>"leafCount": 3,<br/>"addedAt": 1705716458,<br/>"updatedAt": 1705800070<br/>}<br/>] |
|
||||
20
docs/models/operations/addplaylistcontentsmetadata.md
Normal file
20
docs/models/operations/addplaylistcontentsmetadata.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# AddPlaylistContentsMetadata
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| `RatingKey` | **string* | :heavy_minus_sign: | N/A | 94 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /playlists/94/items |
|
||||
| `GUID` | **string* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2 |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | playlist |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | A great playlist |
|
||||
| `Summary` | **string* | :heavy_minus_sign: | N/A | One of my great playlists |
|
||||
| `Smart` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `PlaylistType` | **string* | :heavy_minus_sign: | N/A | video |
|
||||
| `Composite` | **string* | :heavy_minus_sign: | N/A | /playlists/94/composite/1705800070 |
|
||||
| `Duration` | **int* | :heavy_minus_sign: | N/A | 423000 |
|
||||
| `LeafCount` | **int* | :heavy_minus_sign: | N/A | 3 |
|
||||
| `AddedAt` | **int* | :heavy_minus_sign: | N/A | 1705716458 |
|
||||
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705800070 |
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| `PlaylistID` | *float64* | :heavy_check_mark: | the ID of the playlist | |
|
||||
| `URI` | *string* | :heavy_check_mark: | the content URI for the playlist | library://.. |
|
||||
| `PlayQueueID` | *float64* | :heavy_check_mark: | the play queue to add to a playlist | 123 |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| `PlaylistID` | *float64* | :heavy_check_mark: | the ID of the playlist | |
|
||||
| `URI` | *string* | :heavy_check_mark: | the content URI for the playlist | server://12345/com.plexapp.plugins.library/library/metadata/1 |
|
||||
| `PlayQueueID` | **float64* | :heavy_minus_sign: | the play queue to add to a playlist | 123 |
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
## 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 |
|
||||
| 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.AddPlaylistContentsResponseBody](../../models/operations/addplaylistcontentsresponsebody.md) | :heavy_minus_sign: | Playlist Updated |
|
||||
10
docs/models/operations/addplaylistcontentsresponsebody.md
Normal file
10
docs/models/operations/addplaylistcontentsresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# AddPlaylistContentsResponseBody
|
||||
|
||||
Playlist Updated
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `MediaContainer` | [*operations.AddPlaylistContentsMediaContainer](../../models/operations/addplaylistcontentsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Tonight` | [*operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install |
|
||||
| `Skip` | [*operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Tonight` | [*operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 |
|
||||
| `Skip` | [*operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. | 1 |
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
|
||||
| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e |
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `Download` | [*operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `Download` | [*operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 |
|
||||
9
docs/models/operations/createplaylistmediacontainer.md
Normal file
9
docs/models/operations/createplaylistmediacontainer.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# CreatePlaylistMediaContainer
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `Size` | **int* | :heavy_minus_sign: | N/A | 7 |
|
||||
| `Metadata` | [][operations.CreatePlaylistMetadata](../../models/operations/createplaylistmetadata.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"ratingKey": "96",<br/>"key": "/playlists/96/items",<br/>"guid": "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55",<br/>"type": "playlist",<br/>"title": "A Great Playlist",<br/>"summary": "What a great playlist",<br/>"smart": false,<br/>"playlistType": "video",<br/>"icon": "playlist://image.smart",<br/>"viewCount": 1,<br/>"lastViewedAt": 1705719589,<br/>"leafCount": 1,<br/>"addedAt": 1705719589,<br/>"updatedAt": 1705724593,<br/>"composite": "/playlists/96/composite/1705724593",<br/>"duration": 141000<br/>}<br/>] |
|
||||
23
docs/models/operations/createplaylistmetadata.md
Normal file
23
docs/models/operations/createplaylistmetadata.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# CreatePlaylistMetadata
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| `RatingKey` | **string* | :heavy_minus_sign: | N/A | 96 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /playlists/96/items |
|
||||
| `GUID` | **string* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55 |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | playlist |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | A Great Playlist |
|
||||
| `Summary` | **string* | :heavy_minus_sign: | N/A | What a great playlist |
|
||||
| `Smart` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `PlaylistType` | **string* | :heavy_minus_sign: | N/A | video |
|
||||
| `Icon` | **string* | :heavy_minus_sign: | N/A | playlist://image.smart |
|
||||
| `ViewCount` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `LastViewedAt` | **int* | :heavy_minus_sign: | N/A | 1705719589 |
|
||||
| `LeafCount` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `AddedAt` | **int* | :heavy_minus_sign: | N/A | 1705719589 |
|
||||
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705724593 |
|
||||
| `Composite` | **string* | :heavy_minus_sign: | N/A | /playlists/96/composite/1705724593 |
|
||||
| `Duration` | **int* | :heavy_minus_sign: | N/A | 141000 |
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||
| `Title` | *string* | :heavy_check_mark: | name of the playlist |
|
||||
| `Type` | [operations.Type](../../models/operations/type.md) | :heavy_check_mark: | type of playlist to create |
|
||||
| `Smart` | [operations.Smart](../../models/operations/smart.md) | :heavy_check_mark: | whether the playlist is smart or not |
|
||||
| `URI` | **string* | :heavy_minus_sign: | the content URI for the playlist |
|
||||
| `PlayQueueID` | **float64* | :heavy_minus_sign: | the play queue to copy to a playlist |
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| `Title` | *string* | :heavy_check_mark: | name of the playlist |
|
||||
| `Type` | [operations.QueryParamType](../../models/operations/queryparamtype.md) | :heavy_check_mark: | type of playlist to create |
|
||||
| `Smart` | [operations.Smart](../../models/operations/smart.md) | :heavy_check_mark: | whether the playlist is smart or not |
|
||||
| `URI` | *string* | :heavy_check_mark: | the content URI for the playlist |
|
||||
| `PlayQueueID` | **float64* | :heavy_minus_sign: | the play queue to copy to a playlist |
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
## 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 |
|
||||
| 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.CreatePlaylistResponseBody](../../models/operations/createplaylistresponsebody.md) | :heavy_minus_sign: | returns all playlists |
|
||||
10
docs/models/operations/createplaylistresponsebody.md
Normal file
10
docs/models/operations/createplaylistresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# CreatePlaylistResponseBody
|
||||
|
||||
returns all playlists
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
||||
| `MediaContainer` | [*operations.CreatePlaylistMediaContainer](../../models/operations/createplaylistmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -6,4 +6,4 @@
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | resolution |
|
||||
| `Operator` | [][operations.Operator](../../models/operations/operator.md) | :heavy_minus_sign: | N/A | [{"key":"=","title":"is"}] |
|
||||
| `Operator` | [][operations.Operator](../../models/operations/operator.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"key": "=",<br/>"title": "is"<br/>}<br/>] |
|
||||
@@ -1,7 +1,9 @@
|
||||
# Force
|
||||
|
||||
force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist.
|
||||
The `force` argument is used to disable overwriting. 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.
|
||||
Force overwriting of duplicate playlists.
|
||||
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
|
||||
The `force` argument is used to disable overwriting.
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
## 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 |
|
||||
| `ResponseBodies` | [][operations.ResponseBody](../../models/operations/responsebody.md) | :heavy_minus_sign: | Available Clients |
|
||||
| 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.GetAvailableClientsResponseBody](../../models/operations/getavailableclientsresponsebody.md) | :heavy_minus_sign: | Available Clients |
|
||||
@@ -1,4 +1,6 @@
|
||||
# ResponseBody
|
||||
# GetAvailableClientsResponseBody
|
||||
|
||||
Available Clients
|
||||
|
||||
|
||||
## Fields
|
||||
@@ -1,10 +0,0 @@
|
||||
# GetCommonLibraryItemsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| `SectionID` | *float64* | :heavy_check_mark: | the Id of the library to query |
|
||||
| `Type` | *float64* | :heavy_check_mark: | item type |
|
||||
| `Filter` | **string* | :heavy_minus_sign: | the filter parameter |
|
||||
@@ -1,10 +0,0 @@
|
||||
# GetCommonLibraryItemsResponse
|
||||
|
||||
|
||||
## 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 |
|
||||
11
docs/models/operations/getglobalhubsmediacontainer.md
Normal file
11
docs/models/operations/getglobalhubsmediacontainer.md
Normal file
File diff suppressed because one or more lines are too long
24
docs/models/operations/getglobalhubsmetadata.md
Normal file
24
docs/models/operations/getglobalhubsmetadata.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# GetGlobalHubsMetadata
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| `RatingKey` | **string* | :heavy_minus_sign: | N/A | 57070 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /playlists/57070/items |
|
||||
| `GUID` | **string* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | playlist |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | November Movie Day |
|
||||
| `TitleSort` | **string* | :heavy_minus_sign: | N/A | Tracks |
|
||||
| `Summary` | **string* | :heavy_minus_sign: | N/A | |
|
||||
| `Smart` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `PlaylistType` | **string* | :heavy_minus_sign: | N/A | video |
|
||||
| `Composite` | **string* | :heavy_minus_sign: | N/A | /playlists/57070/composite/1668787730 |
|
||||
| `Icon` | **string* | :heavy_minus_sign: | N/A | playlist://image.smart |
|
||||
| `ViewCount` | **int* | :heavy_minus_sign: | N/A | 2 |
|
||||
| `LastViewedAt` | **int* | :heavy_minus_sign: | N/A | 1668787732 |
|
||||
| `Duration` | **int* | :heavy_minus_sign: | N/A | 16873000 |
|
||||
| `LeafCount` | **int* | :heavy_minus_sign: | N/A | 3 |
|
||||
| `AddedAt` | **int* | :heavy_minus_sign: | N/A | 1668779618 |
|
||||
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1668787730 |
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
## 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 |
|
||||
| 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.GetGlobalHubsResponseBody](../../models/operations/getglobalhubsresponsebody.md) | :heavy_minus_sign: | returns global hubs |
|
||||
10
docs/models/operations/getglobalhubsresponsebody.md
Normal file
10
docs/models/operations/getglobalhubsresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetGlobalHubsResponseBody
|
||||
|
||||
returns global hubs
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| `MediaContainer` | [*operations.GetGlobalHubsMediaContainer](../../models/operations/getglobalhubsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -1,10 +0,0 @@
|
||||
# GetLatestLibraryItemsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| `SectionID` | *float64* | :heavy_check_mark: | the Id of the library to query |
|
||||
| `Type` | *float64* | :heavy_check_mark: | item type |
|
||||
| `Filter` | **string* | :heavy_minus_sign: | the filter parameter |
|
||||
@@ -1,10 +0,0 @@
|
||||
# GetLatestLibraryItemsResponse
|
||||
|
||||
|
||||
## 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 |
|
||||
@@ -3,26 +3,26 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Art` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
||||
| `Composite` | **string* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 |
|
||||
| `Filters` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Refreshing` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | movie |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `Agent` | **string* | :heavy_minus_sign: | N/A | tv.plex.agents.movie |
|
||||
| `Scanner` | **string* | :heavy_minus_sign: | N/A | Plex Movie |
|
||||
| `Language` | **string* | :heavy_minus_sign: | N/A | en-US |
|
||||
| `UUID` | **string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
||||
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705615634 |
|
||||
| `CreatedAt` | **int* | :heavy_minus_sign: | N/A | 1654131312 |
|
||||
| `ScannedAt` | **int* | :heavy_minus_sign: | N/A | 1705615584 |
|
||||
| `Content` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Directory` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `ContentChangedAt` | **int* | :heavy_minus_sign: | N/A | 3192854 |
|
||||
| `Hidden` | **int* | :heavy_minus_sign: | N/A | 0 |
|
||||
| `Location` | [][operations.Location](../../models/operations/location.md) | :heavy_minus_sign: | N/A | [{"id":1,"path":"/movies"}] |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
||||
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Art` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
||||
| `Composite` | **string* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 |
|
||||
| `Filters` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Refreshing` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | movie |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `Agent` | **string* | :heavy_minus_sign: | N/A | tv.plex.agents.movie |
|
||||
| `Scanner` | **string* | :heavy_minus_sign: | N/A | Plex Movie |
|
||||
| `Language` | **string* | :heavy_minus_sign: | N/A | en-US |
|
||||
| `UUID` | **string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
||||
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705615634 |
|
||||
| `CreatedAt` | **int* | :heavy_minus_sign: | N/A | 1654131312 |
|
||||
| `ScannedAt` | **int* | :heavy_minus_sign: | N/A | 1705615584 |
|
||||
| `Content` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Directory` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `ContentChangedAt` | **int* | :heavy_minus_sign: | N/A | 3192854 |
|
||||
| `Hidden` | **int* | :heavy_minus_sign: | N/A | 0 |
|
||||
| `Location` | [][operations.GetLibrariesLocation](../../models/operations/getlibrarieslocation.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"id": 1,<br/>"path": "/movies"<br/>}<br/>] |
|
||||
9
docs/models/operations/getlibrarieslocation.md
Normal file
9
docs/models/operations/getlibrarieslocation.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetLibrariesLocation
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Path` | **string* | :heavy_minus_sign: | N/A | /movies |
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Size` | **int* | :heavy_minus_sign: | N/A | 5 |
|
||||
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Title1` | **string* | :heavy_minus_sign: | N/A | Plex Library |
|
||||
| `Directory` | [][operations.GetLibrariesDirectory](../../models/operations/getlibrariesdirectory.md) | :heavy_minus_sign: | N/A | [{"Location":[{"id":1,"path":"/movies"}],"agent":"tv.plex.agents.movie","allowSync":true,"art":"/:/resources/movie-fanart.jpg","composite":"/library/sections/1/composite/1705615584","content":true,"contentChangedAt":3192854,"createdAt":1654131312,"directory":true,"filters":true,"hidden":0,"key":"1","language":"en-US","refreshing":false,"scannedAt":1705615584,"scanner":"Plex Movie","thumb":"/:/resources/movie.png","title":"Movies","type":"movie","updatedAt":1705615634,"uuid":"322a231a-b7f7-49f5-920f-14c61199cd30"}] |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Size` | **int* | :heavy_minus_sign: | N/A | 5 |
|
||||
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Title1` | **string* | :heavy_minus_sign: | N/A | Plex Library |
|
||||
| `Directory` | [][operations.GetLibrariesDirectory](../../models/operations/getlibrariesdirectory.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"allowSync": true,<br/>"art": "/:/resources/movie-fanart.jpg",<br/>"composite": "/library/sections/1/composite/1705615584",<br/>"filters": true,<br/>"refreshing": false,<br/>"thumb": "/:/resources/movie.png",<br/>"key": "1",<br/>"type": "movie",<br/>"title": "Movies",<br/>"agent": "tv.plex.agents.movie",<br/>"scanner": "Plex Movie",<br/>"language": "en-US",<br/>"uuid": "322a231a-b7f7-49f5-920f-14c61199cd30",<br/>"updatedAt": 1705615634,<br/>"createdAt": 1654131312,<br/>"scannedAt": 1705615584,<br/>"content": true,<br/>"directory": true,<br/>"contentChangedAt": 3192854,<br/>"hidden": 0,<br/>"Location": [<br/>{<br/>"id": 1,<br/>"path": "/movies"<br/>}<br/>]<br/>}<br/>] |
|
||||
8
docs/models/operations/getlibraryhubscountry.md
Normal file
8
docs/models/operations/getlibraryhubscountry.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetLibraryHubsCountry
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | United States of America |
|
||||
8
docs/models/operations/getlibraryhubsdirector.md
Normal file
8
docs/models/operations/getlibraryhubsdirector.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetLibraryHubsDirector
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | Nathan Greno |
|
||||
8
docs/models/operations/getlibraryhubsgenre.md
Normal file
8
docs/models/operations/getlibraryhubsgenre.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetLibraryHubsGenre
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | Animation |
|
||||
19
docs/models/operations/getlibraryhubshub.md
Normal file
19
docs/models/operations/getlibraryhubshub.md
Normal file
File diff suppressed because one or more lines are too long
24
docs/models/operations/getlibraryhubsmedia.md
Normal file
24
docs/models/operations/getlibraryhubsmedia.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# GetLibraryHubsMedia
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 38247 |
|
||||
| `Duration` | **int* | :heavy_minus_sign: | N/A | 6017237 |
|
||||
| `Bitrate` | **int* | :heavy_minus_sign: | N/A | 2051 |
|
||||
| `Width` | **int* | :heavy_minus_sign: | N/A | 1920 |
|
||||
| `Height` | **int* | :heavy_minus_sign: | N/A | 1080 |
|
||||
| `AspectRatio` | **float64* | :heavy_minus_sign: | N/A | 1.78 |
|
||||
| `AudioChannels` | **int* | :heavy_minus_sign: | N/A | 2 |
|
||||
| `AudioCodec` | **string* | :heavy_minus_sign: | N/A | aac |
|
||||
| `VideoCodec` | **string* | :heavy_minus_sign: | N/A | h264 |
|
||||
| `VideoResolution` | **string* | :heavy_minus_sign: | N/A | 1080 |
|
||||
| `Container` | **string* | :heavy_minus_sign: | N/A | mp4 |
|
||||
| `VideoFrameRate` | **string* | :heavy_minus_sign: | N/A | 24p |
|
||||
| `OptimizedForStreaming` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `AudioProfile` | **string* | :heavy_minus_sign: | N/A | lc |
|
||||
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | high |
|
||||
| `Part` | [][operations.GetLibraryHubsPart](../../models/operations/getlibraryhubspart.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"id": 38247,<br/>"key": "/library/parts/38247/1589412494/file.mp4",<br/>"duration": 6017237,<br/>"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",<br/>"size": 1545647447,<br/>"audioProfile": "lc",<br/>"container": "mp4",<br/>"has64bitOffsets": false,<br/>"optimizedForStreaming": true,<br/>"videoProfile": "high"<br/>}<br/>] |
|
||||
14
docs/models/operations/getlibraryhubsmediacontainer.md
Normal file
14
docs/models/operations/getlibraryhubsmediacontainer.md
Normal file
File diff suppressed because one or more lines are too long
41
docs/models/operations/getlibraryhubsmetadata.md
Normal file
41
docs/models/operations/getlibraryhubsmetadata.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# GetLibraryHubsMetadata
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `RatingKey` | **string* | :heavy_minus_sign: | N/A | 14944 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/metadata/14944 |
|
||||
| `GUID` | **string* | :heavy_minus_sign: | N/A | plex://movie/5d77686eeb5d26001f1eb339 |
|
||||
| `Studio` | **string* | :heavy_minus_sign: | N/A | Walt Disney Animation Studios |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | movie |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | Tangled |
|
||||
| `LibrarySectionTitle` | **string* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `LibrarySectionID` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `LibrarySectionKey` | **string* | :heavy_minus_sign: | N/A | /library/sections/1 |
|
||||
| `ContentRating` | **string* | :heavy_minus_sign: | N/A | PG |
|
||||
| `Summary` | **string* | :heavy_minus_sign: | N/A | The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is. |
|
||||
| `Rating` | **float64* | :heavy_minus_sign: | N/A | 8.9 |
|
||||
| `AudienceRating` | **float64* | :heavy_minus_sign: | N/A | 8.7 |
|
||||
| `ViewCount` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `LastViewedAt` | **int* | :heavy_minus_sign: | N/A | 1704936047 |
|
||||
| `Year` | **int* | :heavy_minus_sign: | N/A | 2010 |
|
||||
| `Tagline` | **string* | :heavy_minus_sign: | N/A | They're taking adventure to new lengths. |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/14944/thumb/1705739847 |
|
||||
| `Art` | **string* | :heavy_minus_sign: | N/A | /library/metadata/14944/art/1705739847 |
|
||||
| `Duration` | **int* | :heavy_minus_sign: | N/A | 6017237 |
|
||||
| `OriginallyAvailableAt` | [*types.Date](../../types/date.md) | :heavy_minus_sign: | N/A | 2010-11-24 00:00:00 +0000 UTC |
|
||||
| `AddedAt` | **int* | :heavy_minus_sign: | N/A | 1589412494 |
|
||||
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705739847 |
|
||||
| `AudienceRatingImage` | **string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright |
|
||||
| `PrimaryExtraKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/14952 |
|
||||
| `RatingImage` | **string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe |
|
||||
| `Media` | [][operations.GetLibraryHubsMedia](../../models/operations/getlibraryhubsmedia.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"id": 38247,<br/>"duration": 6017237,<br/>"bitrate": 2051,<br/>"width": 1920,<br/>"height": 1080,<br/>"aspectRatio": 1.78,<br/>"audioChannels": 2,<br/>"audioCodec": "aac",<br/>"videoCodec": "h264",<br/>"videoResolution": "1080",<br/>"container": "mp4",<br/>"videoFrameRate": "24p",<br/>"optimizedForStreaming": 1,<br/>"audioProfile": "lc",<br/>"has64bitOffsets": false,<br/>"videoProfile": "high",<br/>"Part": [<br/>{<br/>"id": 38247,<br/>"key": "/library/parts/38247/1589412494/file.mp4",<br/>"duration": 6017237,<br/>"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",<br/>"size": 1545647447,<br/>"audioProfile": "lc",<br/>"container": "mp4",<br/>"has64bitOffsets": false,<br/>"optimizedForStreaming": true,<br/>"videoProfile": "high"<br/>}<br/>]<br/>}<br/>] |
|
||||
| `Genre` | [][operations.GetLibraryHubsGenre](../../models/operations/getlibraryhubsgenre.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "Animation"<br/>}<br/>] |
|
||||
| `Country` | [][operations.GetLibraryHubsCountry](../../models/operations/getlibraryhubscountry.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "United States of America"<br/>}<br/>] |
|
||||
| `Director` | [][operations.GetLibraryHubsDirector](../../models/operations/getlibraryhubsdirector.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "Nathan Greno"<br/>}<br/>] |
|
||||
| `Role` | [][operations.GetLibraryHubsRole](../../models/operations/getlibraryhubsrole.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "Donna Murphy"<br/>}<br/>] |
|
||||
| `Writer` | [][operations.GetLibraryHubsWriter](../../models/operations/getlibraryhubswriter.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "Wilhelm Grimm"<br/>}<br/>] |
|
||||
| `SkipCount` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `ChapterSource` | **string* | :heavy_minus_sign: | N/A | media |
|
||||
17
docs/models/operations/getlibraryhubspart.md
Normal file
17
docs/models/operations/getlibraryhubspart.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# GetLibraryHubsPart
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 38247 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/parts/38247/1589412494/file.mp4 |
|
||||
| `Duration` | **int* | :heavy_minus_sign: | N/A | 6017237 |
|
||||
| `File` | **string* | :heavy_minus_sign: | N/A | /movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4 |
|
||||
| `Size` | **int* | :heavy_minus_sign: | N/A | 1545647447 |
|
||||
| `AudioProfile` | **string* | :heavy_minus_sign: | N/A | lc |
|
||||
| `Container` | **string* | :heavy_minus_sign: | N/A | mp4 |
|
||||
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | high |
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
## 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 |
|
||||
| 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.GetLibraryHubsResponseBody](../../models/operations/getlibraryhubsresponsebody.md) | :heavy_minus_sign: | The hubs specific to the library |
|
||||
10
docs/models/operations/getlibraryhubsresponsebody.md
Normal file
10
docs/models/operations/getlibraryhubsresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetLibraryHubsResponseBody
|
||||
|
||||
The hubs specific to the library
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
||||
| `MediaContainer` | [*operations.GetLibraryHubsMediaContainer](../../models/operations/getlibraryhubsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
8
docs/models/operations/getlibraryhubsrole.md
Normal file
8
docs/models/operations/getlibraryhubsrole.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetLibraryHubsRole
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | Donna Murphy |
|
||||
8
docs/models/operations/getlibraryhubswriter.md
Normal file
8
docs/models/operations/getlibraryhubswriter.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetLibraryHubsWriter
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | Wilhelm Grimm |
|
||||
@@ -1,10 +0,0 @@
|
||||
# GetLibraryItemsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| `SectionID` | *float64* | :heavy_check_mark: | the Id of the library to query |
|
||||
| `Type` | **float64* | :heavy_minus_sign: | item type |
|
||||
| `Filter` | **string* | :heavy_minus_sign: | the filter parameter |
|
||||
File diff suppressed because one or more lines are too long
@@ -3,12 +3,12 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | movie |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `Active` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Filter` | [][operations.Filter](../../models/operations/filter.md) | :heavy_minus_sign: | N/A | [{"filter":"label","filterType":"string","key":"/library/sections/1/label","title":"Labels","type":"filter"}] |
|
||||
| `Sort` | [][operations.Sort](../../models/operations/sort.md) | :heavy_minus_sign: | N/A | [{"default":"asc","defaultDirection":"desc","descKey":"random:desc","firstCharacterKey":"/library/sections/1/firstCharacter","key":"random","title":"Randomly"}] |
|
||||
| `Field` | [][operations.Field](../../models/operations/field.md) | :heavy_minus_sign: | N/A | [{"key":"label","subType":"bitrate","title":"Label","type":"tag"}] |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | movie |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `Active` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Filter` | [][operations.Filter](../../models/operations/filter.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"filter": "label",<br/>"filterType": "string",<br/>"key": "/library/sections/1/label",<br/>"title": "Labels",<br/>"type": "filter"<br/>}<br/>] |
|
||||
| `Sort` | [][operations.Sort](../../models/operations/sort.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"default": "asc",<br/>"defaultDirection": "desc",<br/>"descKey": "random:desc",<br/>"firstCharacterKey": "/library/sections/1/firstCharacter",<br/>"key": "random",<br/>"title": "Randomly"<br/>}<br/>] |
|
||||
| `Field` | [][operations.Field](../../models/operations/field.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"key": "label",<br/>"title": "Label",<br/>"type": "tag",<br/>"subType": "bitrate"<br/>}<br/>] |
|
||||
12
docs/models/operations/getmetadatachildrendirectory.md
Normal file
12
docs/models/operations/getmetadatachildrendirectory.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# GetMetadataChildrenDirectory
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||
| `LeafCount` | **int* | :heavy_minus_sign: | N/A | 16 |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 |
|
||||
| `ViewedLeafCount` | **int* | :heavy_minus_sign: | N/A | 16 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/metadata/30072/allLeaves |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | All episodes |
|
||||
30
docs/models/operations/getmetadatachildrenmediacontainer.md
Normal file
30
docs/models/operations/getmetadatachildrenmediacontainer.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GetMetadataChildrenMediaContainer
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `Size` | **int* | :heavy_minus_sign: | N/A | 3 |
|
||||
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Art` | **string* | :heavy_minus_sign: | N/A | /library/metadata/30072/art/1705739923 |
|
||||
| `Identifier` | **string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | 30072 |
|
||||
| `LibrarySectionID` | **int* | :heavy_minus_sign: | N/A | 2 |
|
||||
| `LibrarySectionTitle` | **string* | :heavy_minus_sign: | N/A | TV Shows |
|
||||
| `LibrarySectionUUID` | **string* | :heavy_minus_sign: | N/A | 4bb2521c-8ba9-459b-aaee-8ab8bc35eabd |
|
||||
| `MediaTagPrefix` | **string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ |
|
||||
| `MediaTagVersion` | **int* | :heavy_minus_sign: | N/A | 1701731894 |
|
||||
| `Nocache` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `ParentIndex` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `ParentTitle` | **string* | :heavy_minus_sign: | N/A | Reacher |
|
||||
| `ParentYear` | **int* | :heavy_minus_sign: | N/A | 2022 |
|
||||
| `Summary` | **string* | :heavy_minus_sign: | N/A | When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia. |
|
||||
| `Theme` | **string* | :heavy_minus_sign: | N/A | /library/metadata/30072/theme/1705739923 |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 |
|
||||
| `Title1` | **string* | :heavy_minus_sign: | N/A | TV Shows |
|
||||
| `Title2` | **string* | :heavy_minus_sign: | N/A | Reacher |
|
||||
| `ViewGroup` | **string* | :heavy_minus_sign: | N/A | season |
|
||||
| `ViewMode` | **int* | :heavy_minus_sign: | N/A | 65593 |
|
||||
| `Directory` | [][operations.GetMetadataChildrenDirectory](../../models/operations/getmetadatachildrendirectory.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"leafCount": 16,<br/>"thumb": "/library/metadata/30072/thumb/1705739923",<br/>"viewedLeafCount": 16,<br/>"key": "/library/metadata/30072/allLeaves",<br/>"title": "All episodes"<br/>}<br/>] |
|
||||
| `Metadata` | [][operations.GetMetadataChildrenMetadata](../../models/operations/getmetadatachildrenmetadata.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"ratingKey": "66488",<br/>"key": "/library/metadata/66488/children",<br/>"parentRatingKey": "30072",<br/>"guid": "plex://season/652aea6549508477c34c6000",<br/>"parentGuid": "plex://show/5d9c09190aaccd001f8f42f0",<br/>"parentStudio": "Amazon Studios",<br/>"type": "season",<br/>"title": "Season 2",<br/>"parentKey": "/library/metadata/30072",<br/>"parentTitle": "Reacher",<br/>"summary": "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind—revenge.",<br/>"index": 2,<br/>"parentIndex": 1,<br/>"viewCount": 11,<br/>"lastViewedAt": 1705646565,<br/>"parentYear": 2022,<br/>"thumb": "/library/metadata/66488/thumb/1703065033",<br/>"art": "/library/metadata/30072/art/1705739923",<br/>"parentThumb": "/library/metadata/30072/thumb/1705739923",<br/>"parentTheme": "/library/metadata/30072/theme/1705739923",<br/>"leafCount": 8,<br/>"viewedLeafCount": 8,<br/>"addedAt": 1702602021,<br/>"updatedAt": 1703065033,<br/>"userRating": 9,<br/>"skipCount": 1,<br/>"lastRatedAt": 1703881224<br/>}<br/>] |
|
||||
34
docs/models/operations/getmetadatachildrenmetadata.md
Normal file
34
docs/models/operations/getmetadatachildrenmetadata.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# GetMetadataChildrenMetadata
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `RatingKey` | **string* | :heavy_minus_sign: | N/A | 66488 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66488/children |
|
||||
| `ParentRatingKey` | **string* | :heavy_minus_sign: | N/A | 30072 |
|
||||
| `GUID` | **string* | :heavy_minus_sign: | N/A | plex://season/652aea6549508477c34c6000 |
|
||||
| `ParentGUID` | **string* | :heavy_minus_sign: | N/A | plex://show/5d9c09190aaccd001f8f42f0 |
|
||||
| `ParentStudio` | **string* | :heavy_minus_sign: | N/A | Amazon Studios |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | season |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | Season 2 |
|
||||
| `ParentKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/30072 |
|
||||
| `ParentTitle` | **string* | :heavy_minus_sign: | N/A | Reacher |
|
||||
| `Summary` | **string* | :heavy_minus_sign: | N/A | Based on"Bad Luck and Trouble," when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind—revenge. |
|
||||
| `Index` | **int* | :heavy_minus_sign: | N/A | 2 |
|
||||
| `ParentIndex` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `ViewCount` | **int* | :heavy_minus_sign: | N/A | 11 |
|
||||
| `LastViewedAt` | **int* | :heavy_minus_sign: | N/A | 1705646565 |
|
||||
| `ParentYear` | **int* | :heavy_minus_sign: | N/A | 2022 |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66488/thumb/1703065033 |
|
||||
| `Art` | **string* | :heavy_minus_sign: | N/A | /library/metadata/30072/art/1705739923 |
|
||||
| `ParentThumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 |
|
||||
| `ParentTheme` | **string* | :heavy_minus_sign: | N/A | /library/metadata/30072/theme/1705739923 |
|
||||
| `LeafCount` | **int* | :heavy_minus_sign: | N/A | 8 |
|
||||
| `ViewedLeafCount` | **int* | :heavy_minus_sign: | N/A | 8 |
|
||||
| `AddedAt` | **int* | :heavy_minus_sign: | N/A | 1702602021 |
|
||||
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1703065033 |
|
||||
| `UserRating` | **int* | :heavy_minus_sign: | N/A | 9 |
|
||||
| `SkipCount` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `LastRatedAt` | **int* | :heavy_minus_sign: | N/A | 1703881224 |
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
## 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 |
|
||||
| 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.GetMetadataChildrenResponseBody](../../models/operations/getmetadatachildrenresponsebody.md) | :heavy_minus_sign: | The children of the library item. |
|
||||
10
docs/models/operations/getmetadatachildrenresponsebody.md
Normal file
10
docs/models/operations/getmetadatachildrenresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetMetadataChildrenResponseBody
|
||||
|
||||
The children of the library item.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `MediaContainer` | [*operations.GetMetadataChildrenMediaContainer](../../models/operations/getmetadatachildrenmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
10
docs/models/operations/getmetadatacountry.md
Normal file
10
docs/models/operations/getmetadatacountry.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetMetadataCountry
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 116 |
|
||||
| `Filter` | **string* | :heavy_minus_sign: | N/A | country=116 |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | United States of America |
|
||||
12
docs/models/operations/getmetadatadirector.md
Normal file
12
docs/models/operations/getmetadatadirector.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# GetMetadataDirector
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 130 |
|
||||
| `Filter` | **string* | :heavy_minus_sign: | N/A | director=130 |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | Joss Whedon |
|
||||
| `TagKey` | **string* | :heavy_minus_sign: | N/A | 5d776828880197001ec90e8f |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg |
|
||||
10
docs/models/operations/getmetadatagenre.md
Normal file
10
docs/models/operations/getmetadatagenre.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetMetadataGenre
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 184 |
|
||||
| `Filter` | **string* | :heavy_minus_sign: | N/A | genre=184 |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | Thriller |
|
||||
24
docs/models/operations/getmetadatamedia.md
Normal file
24
docs/models/operations/getmetadatamedia.md
Normal file
File diff suppressed because one or more lines are too long
16
docs/models/operations/getmetadatamediacontainer.md
Normal file
16
docs/models/operations/getmetadatamediacontainer.md
Normal file
File diff suppressed because one or more lines are too long
40
docs/models/operations/getmetadatametadata.md
Normal file
40
docs/models/operations/getmetadatametadata.md
Normal file
File diff suppressed because one or more lines are too long
18
docs/models/operations/getmetadatapart.md
Normal file
18
docs/models/operations/getmetadatapart.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# GetMetadataPart
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 15 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/parts/15/1705637151/file.mp4 |
|
||||
| `Duration` | **int* | :heavy_minus_sign: | N/A | 141417 |
|
||||
| `File` | **string* | :heavy_minus_sign: | N/A | /movies/Serenity (2005)/Serenity (2005).mp4 |
|
||||
| `Size` | **int* | :heavy_minus_sign: | N/A | 40271948 |
|
||||
| `AudioProfile` | **string* | :heavy_minus_sign: | N/A | lc |
|
||||
| `Container` | **string* | :heavy_minus_sign: | N/A | mp4 |
|
||||
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | high |
|
||||
| `Stream` | [][operations.Stream](../../models/operations/stream.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"id": 29,<br/>"streamType": 2,<br/>"default": true,<br/>"codec": "aac",<br/>"index": 0,<br/>"bitrate": 128,<br/>"bitDepth": 8,<br/>"chromaLocation": "left",<br/>"chromaSubsampling": 14520,<br/>"codedHeight": 816,<br/>"codedWidth": 1920,<br/>"colorPrimaries": "bt709",<br/>"colorRange": "tv",<br/>"colorSpace": "bt709",<br/>"colorTrc": "bt709",<br/>"frameRate": 24,<br/>"hasScalingMatrix": false,<br/>"height": 814,<br/>"level": 40,<br/>"profile": "lc",<br/>"refFrames": 4,<br/>"scanType": "progressive",<br/>"streamIdentifier": "1",<br/>"width": 1920,<br/>"displayTitle": "English (AAC Stereo)",<br/>"extendedDisplayTitle": "English (AAC Stereo)",<br/>"selected": true,<br/>"channels": 2,<br/>"language": "English",<br/>"languageTag": "en",<br/>"languageCode": "eng",<br/>"samplingRate": 44100<br/>}<br/>] |
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
## 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 |
|
||||
| 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.GetMetadataResponseBody](../../models/operations/getmetadataresponsebody.md) | :heavy_minus_sign: | The metadata of the library item. |
|
||||
10
docs/models/operations/getmetadataresponsebody.md
Normal file
10
docs/models/operations/getmetadataresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetMetadataResponseBody
|
||||
|
||||
The metadata of the library item.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `MediaContainer` | [*operations.GetMetadataMediaContainer](../../models/operations/getmetadatamediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
13
docs/models/operations/getmetadatarole.md
Normal file
13
docs/models/operations/getmetadatarole.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# GetMetadataRole
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 220 |
|
||||
| `Filter` | **string* | :heavy_minus_sign: | N/A | actor=220 |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | Dennis Keiffer |
|
||||
| `TagKey` | **string* | :heavy_minus_sign: | N/A | 5d77683554f42c001f8c4708 |
|
||||
| `Role` | **string* | :heavy_minus_sign: | N/A | Bar Guy (uncredited) |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg |
|
||||
12
docs/models/operations/getmetadatawriter.md
Normal file
12
docs/models/operations/getmetadatawriter.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# GetMetadataWriter
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 132 |
|
||||
| `Filter` | **string* | :heavy_minus_sign: | N/A | writer=132 |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | Joss Whedon |
|
||||
| `TagKey` | **string* | :heavy_minus_sign: | N/A | 5d776828880197001ec90e8f |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg |
|
||||
8
docs/models/operations/getondeckguids.md
Normal file
8
docs/models/operations/getondeckguids.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetOnDeckGuids
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `ID` | **string* | :heavy_minus_sign: | N/A | imdb://tt13303712 |
|
||||
@@ -40,4 +40,4 @@
|
||||
| `AddedAt` | **float64* | :heavy_minus_sign: | N/A | 1654258196 |
|
||||
| `UpdatedAt` | **float64* | :heavy_minus_sign: | N/A | 1654258204 |
|
||||
| `Media` | [][operations.GetOnDeckMedia](../../models/operations/getondeckmedia.md) | :heavy_minus_sign: | N/A | |
|
||||
| `Guids` | [][operations.Guids](../../models/operations/guids.md) | :heavy_minus_sign: | N/A | |
|
||||
| `Guids` | [][operations.GetOnDeckGuids](../../models/operations/getondeckguids.md) | :heavy_minus_sign: | N/A | |
|
||||
@@ -3,14 +3,14 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
|
||||
| `ID` | **float64* | :heavy_minus_sign: | N/A | 80994 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/parts/80994/1655007810/file.mkv |
|
||||
| `Duration` | **float64* | :heavy_minus_sign: | N/A | 420080 |
|
||||
| `File` | **string* | :heavy_minus_sign: | N/A | /tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv |
|
||||
| `Size` | **float64* | :heavy_minus_sign: | N/A | 55148931 |
|
||||
| `AudioProfile` | **string* | :heavy_minus_sign: | N/A | lc |
|
||||
| `Container` | **string* | :heavy_minus_sign: | N/A | mkv |
|
||||
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main |
|
||||
| `Stream` | [][operations.Stream](../../models/operations/stream.md) | :heavy_minus_sign: | N/A | |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
||||
| `ID` | **float64* | :heavy_minus_sign: | N/A | 80994 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/parts/80994/1655007810/file.mkv |
|
||||
| `Duration` | **float64* | :heavy_minus_sign: | N/A | 420080 |
|
||||
| `File` | **string* | :heavy_minus_sign: | N/A | /tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv |
|
||||
| `Size` | **float64* | :heavy_minus_sign: | N/A | 55148931 |
|
||||
| `AudioProfile` | **string* | :heavy_minus_sign: | N/A | lc |
|
||||
| `Container` | **string* | :heavy_minus_sign: | N/A | mkv |
|
||||
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main |
|
||||
| `Stream` | [][operations.GetOnDeckStream](../../models/operations/getondeckstream.md) | :heavy_minus_sign: | N/A | |
|
||||
30
docs/models/operations/getondeckstream.md
Normal file
30
docs/models/operations/getondeckstream.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GetOnDeckStream
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
|
||||
| `ID` | **float64* | :heavy_minus_sign: | N/A | 211234 |
|
||||
| `StreamType` | **float64* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Default` | **bool* | :heavy_minus_sign: | N/A | |
|
||||
| `Codec` | **string* | :heavy_minus_sign: | N/A | hevc |
|
||||
| `Index` | **float64* | :heavy_minus_sign: | N/A | 0 |
|
||||
| `Bitrate` | **float64* | :heavy_minus_sign: | N/A | 918 |
|
||||
| `Language` | **string* | :heavy_minus_sign: | N/A | English |
|
||||
| `LanguageTag` | **string* | :heavy_minus_sign: | N/A | en |
|
||||
| `LanguageCode` | **string* | :heavy_minus_sign: | N/A | eng |
|
||||
| `BitDepth` | **float64* | :heavy_minus_sign: | N/A | 8 |
|
||||
| `ChromaLocation` | **string* | :heavy_minus_sign: | N/A | left |
|
||||
| `ChromaSubsampling` | **string* | :heavy_minus_sign: | N/A | 4:2:0 |
|
||||
| `CodedHeight` | **float64* | :heavy_minus_sign: | N/A | 1080 |
|
||||
| `CodedWidth` | **float64* | :heavy_minus_sign: | N/A | 1920 |
|
||||
| `ColorRange` | **string* | :heavy_minus_sign: | N/A | tv |
|
||||
| `FrameRate` | **float64* | :heavy_minus_sign: | N/A | 25 |
|
||||
| `Height` | **float64* | :heavy_minus_sign: | N/A | 1080 |
|
||||
| `Level` | **float64* | :heavy_minus_sign: | N/A | 120 |
|
||||
| `Profile` | **string* | :heavy_minus_sign: | N/A | main |
|
||||
| `RefFrames` | **float64* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Width` | **float64* | :heavy_minus_sign: | N/A | 1920 |
|
||||
| `DisplayTitle` | **string* | :heavy_minus_sign: | N/A | 1080p (HEVC Main) |
|
||||
| `ExtendedDisplayTitle` | **string* | :heavy_minus_sign: | N/A | 1080p (HEVC Main) |
|
||||
8
docs/models/operations/getpinglobals.md
Normal file
8
docs/models/operations/getpinglobals.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetPinGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `XPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||
9
docs/models/operations/getpinrequest.md
Normal file
9
docs/models/operations/getpinrequest.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetPinRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Strong` | **bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> | |
|
||||
| `XPlexClientIdentifier` | **string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||
11
docs/models/operations/getpinresponse.md
Normal file
11
docs/models/operations/getpinresponse.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# GetPinResponse
|
||||
|
||||
|
||||
## 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.GetPinResponseBody](../../models/operations/getpinresponsebody.md) | :heavy_minus_sign: | The Pin |
|
||||
21
docs/models/operations/getpinresponsebody.md
Normal file
21
docs/models/operations/getpinresponsebody.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# GetPinResponseBody
|
||||
|
||||
The Pin
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `ID` | **float64* | :heavy_minus_sign: | PinID for use with authentication | 1272322473 |
|
||||
| `Code` | **string* | :heavy_minus_sign: | N/A | 3patfx1a78ukcbr7x0n9bl26t |
|
||||
| `Product` | **string* | :heavy_minus_sign: | N/A | Plex Web |
|
||||
| `Trusted` | **bool* | :heavy_minus_sign: | N/A | |
|
||||
| `Qr` | **string* | :heavy_minus_sign: | a link to a QR code hosted on plex.tv <br/>The QR code redirects to the relevant `plex.tv/link` authentication page<br/>Which then prompts the user for the 4 Digit Link Pin<br/> | https://plex.tv/api/v2/pins/qr/3patfx1a78ukcbr7x0n9bl26t |
|
||||
| `ClientIdentifier` | **string* | :heavy_minus_sign: | N/A | Postman |
|
||||
| `Location` | [*operations.Location](../../models/operations/location.md) | :heavy_minus_sign: | N/A | |
|
||||
| `ExpiresIn` | **float64* | :heavy_minus_sign: | N/A | 1800 |
|
||||
| `CreatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | 2023-04-12 17:00:03 +0000 UTC |
|
||||
| `ExpiresAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | 2023-04-12 17:30:03 +0000 UTC |
|
||||
| `AuthToken` | **string* | :heavy_minus_sign: | N/A | |
|
||||
| `NewRegistration` | **string* | :heavy_minus_sign: | N/A | |
|
||||
8
docs/models/operations/getplaylistcontentscountry.md
Normal file
8
docs/models/operations/getplaylistcontentscountry.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetPlaylistContentsCountry
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | United States of America |
|
||||
8
docs/models/operations/getplaylistcontentsdirector.md
Normal file
8
docs/models/operations/getplaylistcontentsdirector.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetPlaylistContentsDirector
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | Joss Whedon |
|
||||
8
docs/models/operations/getplaylistcontentsgenre.md
Normal file
8
docs/models/operations/getplaylistcontentsgenre.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetPlaylistContentsGenre
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | Action |
|
||||
24
docs/models/operations/getplaylistcontentsmedia.md
Normal file
24
docs/models/operations/getplaylistcontentsmedia.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# GetPlaylistContentsMedia
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 15 |
|
||||
| `Duration` | **int* | :heavy_minus_sign: | N/A | 141416 |
|
||||
| `Bitrate` | **int* | :heavy_minus_sign: | N/A | 2273 |
|
||||
| `Width` | **int* | :heavy_minus_sign: | N/A | 1920 |
|
||||
| `Height` | **int* | :heavy_minus_sign: | N/A | 814 |
|
||||
| `AspectRatio` | **float64* | :heavy_minus_sign: | N/A | 2.35 |
|
||||
| `AudioChannels` | **int* | :heavy_minus_sign: | N/A | 2 |
|
||||
| `AudioCodec` | **string* | :heavy_minus_sign: | N/A | aac |
|
||||
| `VideoCodec` | **string* | :heavy_minus_sign: | N/A | h264 |
|
||||
| `VideoResolution` | **string* | :heavy_minus_sign: | N/A | 1080 |
|
||||
| `Container` | **string* | :heavy_minus_sign: | N/A | mp4 |
|
||||
| `VideoFrameRate` | **string* | :heavy_minus_sign: | N/A | 24p |
|
||||
| `OptimizedForStreaming` | **int* | :heavy_minus_sign: | N/A | 0 |
|
||||
| `AudioProfile` | **string* | :heavy_minus_sign: | N/A | lc |
|
||||
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | high |
|
||||
| `Part` | [][operations.GetPlaylistContentsPart](../../models/operations/getplaylistcontentspart.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"id": 15,<br/>"key": "/library/parts/15/1705637151/file.mp4",<br/>"duration": 141416,<br/>"file": "/movies/Serenity (2005)/Serenity (2005).mp4",<br/>"size": 40271948,<br/>"audioProfile": "lc",<br/>"container": "mp4",<br/>"has64bitOffsets": false,<br/>"optimizedForStreaming": false,<br/>"videoProfile": "high"<br/>}<br/>] |
|
||||
16
docs/models/operations/getplaylistcontentsmediacontainer.md
Normal file
16
docs/models/operations/getplaylistcontentsmediacontainer.md
Normal file
File diff suppressed because one or more lines are too long
39
docs/models/operations/getplaylistcontentsmetadata.md
Normal file
39
docs/models/operations/getplaylistcontentsmetadata.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# GetPlaylistContentsMetadata
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `RatingKey` | **string* | :heavy_minus_sign: | N/A | 17 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/metadata/17 |
|
||||
| `GUID` | **string* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 |
|
||||
| `Studio` | **string* | :heavy_minus_sign: | N/A | Universal Pictures |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | movie |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | Serenity |
|
||||
| `TitleSort` | **string* | :heavy_minus_sign: | N/A | Amazing Spider-Man 2 |
|
||||
| `LibrarySectionTitle` | **string* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `LibrarySectionID` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `LibrarySectionKey` | **string* | :heavy_minus_sign: | N/A | /library/sections/1 |
|
||||
| `ContentRating` | **string* | :heavy_minus_sign: | N/A | PG-13 |
|
||||
| `Summary` | **string* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. |
|
||||
| `Rating` | **float64* | :heavy_minus_sign: | N/A | 8.2 |
|
||||
| `AudienceRating` | **float64* | :heavy_minus_sign: | N/A | 9.1 |
|
||||
| `Year` | **int* | :heavy_minus_sign: | N/A | 2005 |
|
||||
| `Tagline` | **string* | :heavy_minus_sign: | N/A | They aim to misbehave. |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 |
|
||||
| `Art` | **string* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 |
|
||||
| `Duration` | **int* | :heavy_minus_sign: | N/A | 141416 |
|
||||
| `OriginallyAvailableAt` | [*types.Date](../../types/date.md) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC |
|
||||
| `AddedAt` | **int* | :heavy_minus_sign: | N/A | 1705637164 |
|
||||
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705637165 |
|
||||
| `AudienceRatingImage` | **string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright |
|
||||
| `HasPremiumExtras` | **string* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `HasPremiumPrimaryExtra` | **string* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `RatingImage` | **string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe |
|
||||
| `Media` | [][operations.GetPlaylistContentsMedia](../../models/operations/getplaylistcontentsmedia.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"id": 15,<br/>"duration": 141416,<br/>"bitrate": 2273,<br/>"width": 1920,<br/>"height": 814,<br/>"aspectRatio": 2.35,<br/>"audioChannels": 2,<br/>"audioCodec": "aac",<br/>"videoCodec": "h264",<br/>"videoResolution": "1080",<br/>"container": "mp4",<br/>"videoFrameRate": "24p",<br/>"optimizedForStreaming": 0,<br/>"audioProfile": "lc",<br/>"has64bitOffsets": false,<br/>"videoProfile": "high",<br/>"Part": [<br/>{<br/>"id": 15,<br/>"key": "/library/parts/15/1705637151/file.mp4",<br/>"duration": 141416,<br/>"file": "/movies/Serenity (2005)/Serenity (2005).mp4",<br/>"size": 40271948,<br/>"audioProfile": "lc",<br/>"container": "mp4",<br/>"has64bitOffsets": false,<br/>"optimizedForStreaming": false,<br/>"videoProfile": "high"<br/>}<br/>]<br/>}<br/>] |
|
||||
| `Genre` | [][operations.GetPlaylistContentsGenre](../../models/operations/getplaylistcontentsgenre.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "Action"<br/>}<br/>] |
|
||||
| `Country` | [][operations.GetPlaylistContentsCountry](../../models/operations/getplaylistcontentscountry.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "United States of America"<br/>}<br/>] |
|
||||
| `Director` | [][operations.GetPlaylistContentsDirector](../../models/operations/getplaylistcontentsdirector.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "Joss Whedon"<br/>}<br/>] |
|
||||
| `Writer` | [][operations.GetPlaylistContentsWriter](../../models/operations/getplaylistcontentswriter.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "Joss Whedon"<br/>}<br/>] |
|
||||
| `Role` | [][operations.GetPlaylistContentsRole](../../models/operations/getplaylistcontentsrole.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "Gina Torres"<br/>}<br/>] |
|
||||
17
docs/models/operations/getplaylistcontentspart.md
Normal file
17
docs/models/operations/getplaylistcontentspart.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# GetPlaylistContentsPart
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 15 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/parts/15/1705637151/file.mp4 |
|
||||
| `Duration` | **int* | :heavy_minus_sign: | N/A | 141416 |
|
||||
| `File` | **string* | :heavy_minus_sign: | N/A | /movies/Serenity (2005)/Serenity (2005).mp4 |
|
||||
| `Size` | **int* | :heavy_minus_sign: | N/A | 40271948 |
|
||||
| `AudioProfile` | **string* | :heavy_minus_sign: | N/A | lc |
|
||||
| `Container` | **string* | :heavy_minus_sign: | N/A | mp4 |
|
||||
| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | high |
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
## 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 |
|
||||
| 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.GetPlaylistContentsResponseBody](../../models/operations/getplaylistcontentsresponsebody.md) | :heavy_minus_sign: | The playlist contents |
|
||||
10
docs/models/operations/getplaylistcontentsresponsebody.md
Normal file
10
docs/models/operations/getplaylistcontentsresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetPlaylistContentsResponseBody
|
||||
|
||||
The playlist contents
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `MediaContainer` | [*operations.GetPlaylistContentsMediaContainer](../../models/operations/getplaylistcontentsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
8
docs/models/operations/getplaylistcontentsrole.md
Normal file
8
docs/models/operations/getplaylistcontentsrole.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetPlaylistContentsRole
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | Gina Torres |
|
||||
8
docs/models/operations/getplaylistcontentswriter.md
Normal file
8
docs/models/operations/getplaylistcontentswriter.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetPlaylistContentsWriter
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `Tag` | **string* | :heavy_minus_sign: | N/A | Joss Whedon |
|
||||
9
docs/models/operations/getplaylistmediacontainer.md
Normal file
9
docs/models/operations/getplaylistmediacontainer.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetPlaylistMediaContainer
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `Size` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Metadata` | [][operations.GetPlaylistMetadata](../../models/operations/getplaylistmetadata.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"content": "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1",<br/>"ratingKey": "95",<br/>"key": "/playlists/95/items",<br/>"guid": "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91",<br/>"type": "playlist",<br/>"title": "Smart Movie Playlist",<br/>"summary": "",<br/>"smart": true,<br/>"playlistType": "video",<br/>"composite": "/playlists/95/composite/1705717387",<br/>"icon": "playlist://image.smart",<br/>"duration": 282000,<br/>"leafCount": 2,<br/>"addedAt": 1705716493,<br/>"updatedAt": 1705717387<br/>}<br/>] |
|
||||
22
docs/models/operations/getplaylistmetadata.md
Normal file
22
docs/models/operations/getplaylistmetadata.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# GetPlaylistMetadata
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Content` | **string* | :heavy_minus_sign: | N/A | library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1 |
|
||||
| `RatingKey` | **string* | :heavy_minus_sign: | N/A | 95 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /playlists/95/items |
|
||||
| `GUID` | **string* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91 |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | playlist |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | Smart Movie Playlist |
|
||||
| `Summary` | **string* | :heavy_minus_sign: | N/A | |
|
||||
| `Smart` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `PlaylistType` | **string* | :heavy_minus_sign: | N/A | video |
|
||||
| `Composite` | **string* | :heavy_minus_sign: | N/A | /playlists/95/composite/1705717387 |
|
||||
| `Icon` | **string* | :heavy_minus_sign: | N/A | playlist://image.smart |
|
||||
| `Duration` | **int* | :heavy_minus_sign: | N/A | 282000 |
|
||||
| `LeafCount` | **int* | :heavy_minus_sign: | N/A | 2 |
|
||||
| `AddedAt` | **int* | :heavy_minus_sign: | N/A | 1705716493 |
|
||||
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705717387 |
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
## 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 |
|
||||
| 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.GetPlaylistResponseBody](../../models/operations/getplaylistresponsebody.md) | :heavy_minus_sign: | The playlist |
|
||||
10
docs/models/operations/getplaylistresponsebody.md
Normal file
10
docs/models/operations/getplaylistresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetPlaylistResponseBody
|
||||
|
||||
The playlist
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `MediaContainer` | [*operations.GetPlaylistMediaContainer](../../models/operations/getplaylistmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
9
docs/models/operations/getplaylistsmediacontainer.md
Normal file
9
docs/models/operations/getplaylistsmediacontainer.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetPlaylistsMediaContainer
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Size` | **int* | :heavy_minus_sign: | N/A | 4 |
|
||||
| `Metadata` | [][operations.GetPlaylistsMetadata](../../models/operations/getplaylistsmetadata.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"ratingKey": "92",<br/>"key": "/playlists/92/items",<br/>"guid": "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903",<br/>"type": "playlist",<br/>"title": "Static Playlist",<br/>"summary": "A Great Playlist",<br/>"smart": false,<br/>"playlistType": "video",<br/>"composite": "/playlists/92/composite/1705716440",<br/>"icon": "playlist://image.smart",<br/>"viewCount": 1,<br/>"lastViewedAt": 1705716298,<br/>"duration": 7328000,<br/>"leafCount": 32,<br/>"addedAt": 1705716298,<br/>"updatedAt": 1705716440<br/>}<br/>] |
|
||||
23
docs/models/operations/getplaylistsmetadata.md
Normal file
23
docs/models/operations/getplaylistsmetadata.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# GetPlaylistsMetadata
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| `RatingKey` | **string* | :heavy_minus_sign: | N/A | 92 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /playlists/92/items |
|
||||
| `GUID` | **string* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903 |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | playlist |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | Static Playlist |
|
||||
| `Summary` | **string* | :heavy_minus_sign: | N/A | A Great Playlist |
|
||||
| `Smart` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `PlaylistType` | **string* | :heavy_minus_sign: | N/A | video |
|
||||
| `Composite` | **string* | :heavy_minus_sign: | N/A | /playlists/92/composite/1705716440 |
|
||||
| `Icon` | **string* | :heavy_minus_sign: | N/A | playlist://image.smart |
|
||||
| `ViewCount` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `LastViewedAt` | **int* | :heavy_minus_sign: | N/A | 1705716298 |
|
||||
| `Duration` | **int* | :heavy_minus_sign: | N/A | 7328000 |
|
||||
| `LeafCount` | **int* | :heavy_minus_sign: | N/A | 32 |
|
||||
| `AddedAt` | **int* | :heavy_minus_sign: | N/A | 1705716298 |
|
||||
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705716440 |
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
## 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 |
|
||||
| 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.GetPlaylistsResponseBody](../../models/operations/getplaylistsresponsebody.md) | :heavy_minus_sign: | returns all playlists |
|
||||
10
docs/models/operations/getplaylistsresponsebody.md
Normal file
10
docs/models/operations/getplaylistsresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetPlaylistsResponseBody
|
||||
|
||||
returns all playlists
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
||||
| `MediaContainer` | [*operations.GetPlaylistsMediaContainer](../../models/operations/getplaylistsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user