From dc815780a69603f0f063cbe29b3ed78cfb8c46f2 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 3 Oct 2024 00:10:47 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.406.0 --- .speakeasy/gen.lock | 115 +- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 12 +- README.md | 138 +- RELEASES.md | 12 +- USAGE.md | 10 +- activities.go | 33 +- authentication.go | 73 +- butler.go | 81 +- codeSamples.yaml | 795 +++---- docs/models/operations/features.md | 102 - .../operations/getalllibrariesdirectory.md | 46 +- .../operations/getalllibrarieslocation.md | 9 + .../operations/getbannerimagerequest.md | 2 +- .../operations/getlibrarydetailsrequest.md | 4 +- .../operations/getlibraryitemslocation.md | 8 + .../models/operations/getlibraryitemsmedia.md | 22 +- .../operations/getlibraryitemsmetadata.md | 1 + docs/models/operations/getlibraryitemspart.md | 4 +- .../operations/getlibraryitemsrequest.md | 2 +- .../operations/getmediaprovidersrequest.md | 6 +- .../operations/getmetadatachildrenmetadata.md | 2 +- docs/models/operations/getpinglobals.md | 14 +- docs/models/operations/getpinrequest.md | 16 +- .../operations/getrecentlyaddedmetadata.md | 1 + .../getrefreshlibrarymetadatarequest.md | 4 +- .../getsearchalllibrariescollection.md | 8 + .../getsearchalllibrariescountry.md | 8 + .../getsearchalllibrariesdirector.md | 8 + .../getsearchalllibrariesflattenseasons.md | 9 + .../operations/getsearchalllibrariesgenre.md | 8 + .../getsearchalllibrariesglobals.md | 8 + .../getsearchalllibrarieshasthumbnail.md | 9 + .../operations/getsearchalllibrariesimage.md | 10 + .../getsearchalllibrarieslibrarytype.md | 11 + .../getsearchalllibrarieslocation.md | 8 + .../operations/getsearchalllibrariesmedia.md | 25 + .../getsearchalllibrariesmediacontainer.md | 9 + .../getsearchalllibrariesmediaguid.md | 8 + .../getsearchalllibrariesmetadata.md | 81 + .../getsearchalllibrariesmetadatarating.md | 10 + ...searchalllibrariesoptimizedforstreaming.md | 9 + .../operations/getsearchalllibrariespart.md | 20 + .../getsearchalllibrariesrequest.md | 13 + .../getsearchalllibrariesresponse.md | 11 + .../getsearchalllibrariesresponsebody.md | 10 + .../operations/getsearchalllibrariesrole.md | 13 + .../getsearchalllibrariesshowordering.md | 20 + .../operations/getsearchalllibrariesstream.md | 45 + .../operations/getsearchalllibrariestype.md | 14 + .../getsearchalllibrariesultrablurcolors.md | 11 + .../operations/getsearchalllibrarieswriter.md | 8 + .../operations/getserverresourcesglobals.md | 6 +- .../operations/getserverresourcesrequest.md | 12 +- .../models/operations/getthumbimagerequest.md | 2 +- .../operations/gettokenbypinidglobals.md | 14 +- .../operations/gettokenbypinidrequest.md | 16 +- .../operations/gettokendetailsfeatures.md | 102 - .../operations/gettokendetailssubscription.md | 2 +- .../operations/gettopwatchedcontentrequest.md | 4 +- docs/models/operations/getwatchlistrequest.md | 2 +- docs/models/operations/location.md | 3 +- docs/models/operations/media.md | 22 +- docs/models/operations/part.md | 4 +- ...stuserssignindataauthenticationfeatures.md | 102 - ...erssignindataauthenticationsubscription.md | 2 +- .../operations/postuserssignindatafeatures.md | 102 - .../operations/postuserssignindataglobals.md | 14 +- .../operations/postuserssignindatarequest.md | 16 +- .../postuserssignindatasubscription.md | 2 +- .../queryparamincludecollections.md | 11 + .../queryparamincludeexternalmedia.md | 11 + docs/models/operations/searchresult.md | 9 + docs/models/operations/searchtypes.md | 12 + docs/models/operations/subscription.md | 2 +- .../getsearchalllibrariesbadrequest.md | 11 + .../sdkerrors/getsearchalllibrarieserrors.md | 10 + .../getsearchalllibrarieslibraryerrors.md | 10 + .../getsearchalllibrariesunauthorized.md | 11 + docs/sdks/activities/README.md | 20 +- docs/sdks/authentication/README.md | 40 +- docs/sdks/butler/README.md | 50 +- docs/sdks/hubs/README.md | 30 +- docs/sdks/library/README.md | 188 +- docs/sdks/log/README.md | 30 +- docs/sdks/media/README.md | 50 +- docs/sdks/playlists/README.md | 90 +- docs/sdks/plex/README.md | 88 +- docs/sdks/plexapi/README.md | 2 +- docs/sdks/search/README.md | 30 +- docs/sdks/server/README.md | 92 +- docs/sdks/sessions/README.md | 40 +- docs/sdks/statistics/README.md | 30 +- docs/sdks/updater/README.md | 30 +- docs/sdks/video/README.md | 20 +- docs/sdks/watchlist/README.md | 10 +- hubs.go | 49 +- internal/globals/globals.go | 24 +- library.go | 457 +++- log.go | 49 +- media.go | 85 +- models/operations/getalllibraries.go | 16 +- models/operations/getbannerimage.go | 4 +- models/operations/getlibrarydetails.go | 22 +- models/operations/getlibraryitems.go | 119 +- models/operations/getmediaproviders.go | 4 +- models/operations/getpin.go | 48 +- models/operations/getrecentlyadded.go | 97 +- .../operations/getrefreshlibrarymetadata.go | 18 +- models/operations/getsearchalllibraries.go | 1928 +++++++++++++++++ models/operations/getserverresources.go | 8 +- models/operations/getthumbimage.go | 4 +- models/operations/gettokenbypinid.go | 48 +- models/operations/gettokendetails.go | 216 +- models/operations/gettopwatchedcontent.go | 20 +- models/operations/getwatchlist.go | 4 +- models/operations/postuserssignindata.go | 264 +-- models/sdkerrors/getsearchalllibraries.go | 90 + playlists.go | 145 +- plex.go | 129 +- plexapi.go | 18 +- search.go | 49 +- server.go | 149 +- sessions.go | 65 +- statistics.go | 49 +- updater.go | 49 +- video.go | 33 +- watchlist.go | 19 +- 128 files changed, 5089 insertions(+), 2452 deletions(-) delete mode 100644 docs/models/operations/features.md create mode 100644 docs/models/operations/getalllibrarieslocation.md create mode 100644 docs/models/operations/getlibraryitemslocation.md create mode 100644 docs/models/operations/getsearchalllibrariescollection.md create mode 100644 docs/models/operations/getsearchalllibrariescountry.md create mode 100644 docs/models/operations/getsearchalllibrariesdirector.md create mode 100644 docs/models/operations/getsearchalllibrariesflattenseasons.md create mode 100644 docs/models/operations/getsearchalllibrariesgenre.md create mode 100644 docs/models/operations/getsearchalllibrariesglobals.md create mode 100644 docs/models/operations/getsearchalllibrarieshasthumbnail.md create mode 100644 docs/models/operations/getsearchalllibrariesimage.md create mode 100644 docs/models/operations/getsearchalllibrarieslibrarytype.md create mode 100644 docs/models/operations/getsearchalllibrarieslocation.md create mode 100644 docs/models/operations/getsearchalllibrariesmedia.md create mode 100644 docs/models/operations/getsearchalllibrariesmediacontainer.md create mode 100644 docs/models/operations/getsearchalllibrariesmediaguid.md create mode 100644 docs/models/operations/getsearchalllibrariesmetadata.md create mode 100644 docs/models/operations/getsearchalllibrariesmetadatarating.md create mode 100644 docs/models/operations/getsearchalllibrariesoptimizedforstreaming.md create mode 100644 docs/models/operations/getsearchalllibrariespart.md create mode 100644 docs/models/operations/getsearchalllibrariesrequest.md create mode 100644 docs/models/operations/getsearchalllibrariesresponse.md create mode 100644 docs/models/operations/getsearchalllibrariesresponsebody.md create mode 100644 docs/models/operations/getsearchalllibrariesrole.md create mode 100644 docs/models/operations/getsearchalllibrariesshowordering.md create mode 100644 docs/models/operations/getsearchalllibrariesstream.md create mode 100644 docs/models/operations/getsearchalllibrariestype.md create mode 100644 docs/models/operations/getsearchalllibrariesultrablurcolors.md create mode 100644 docs/models/operations/getsearchalllibrarieswriter.md delete mode 100644 docs/models/operations/gettokendetailsfeatures.md delete mode 100644 docs/models/operations/postuserssignindataauthenticationfeatures.md delete mode 100644 docs/models/operations/postuserssignindatafeatures.md create mode 100644 docs/models/operations/queryparamincludecollections.md create mode 100644 docs/models/operations/queryparamincludeexternalmedia.md create mode 100644 docs/models/operations/searchresult.md create mode 100644 docs/models/operations/searchtypes.md create mode 100644 docs/models/sdkerrors/getsearchalllibrariesbadrequest.md create mode 100644 docs/models/sdkerrors/getsearchalllibrarieserrors.md create mode 100644 docs/models/sdkerrors/getsearchalllibrarieslibraryerrors.md create mode 100644 docs/models/sdkerrors/getsearchalllibrariesunauthorized.md create mode 100644 models/operations/getsearchalllibraries.go create mode 100644 models/sdkerrors/getsearchalllibraries.go diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index dd50439..b06abcf 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: dfa99515-01c0-42eb-9be5-ee212fd03eb3 management: - docChecksum: f12b653820ae77ca3b2820bc9459d866 + docChecksum: 1ee2e5413af07e886e33659b9b269dd5 docVersion: 0.0.3 - speakeasyVersion: 1.405.6 - generationVersion: 2.428.1 - releaseVersion: 0.14.0 - configChecksum: b3f62e5341e89e4827891e48d581a6c3 + speakeasyVersion: 1.406.0 + generationVersion: 2.429.0 + releaseVersion: 0.15.0 + configChecksum: a2c4d09241a2acac8ca19d8c9ee8f2bc repoURL: https://github.com/LukeHagar/plexgo.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexgo @@ -32,7 +32,6 @@ features: methodServerURLs: 2.82.1 nameOverrides: 2.81.2 nullables: 0.1.0 - openEnums: 0.1.0 responseFormat: 0.1.2 retries: 2.83.0 sdkHooks: 0.1.0 @@ -76,6 +75,7 @@ generatedFiles: - /models/operations/getrefreshlibrarymetadata.go - /models/operations/getresizedphoto.go - /models/operations/getresourcesstatistics.go + - /models/operations/getsearchalllibraries.go - /models/operations/getsearchlibrary.go - /models/operations/getsearchresults.go - /models/operations/getserveractivities.go @@ -150,6 +150,7 @@ generatedFiles: - /models/sdkerrors/getrefreshlibrarymetadata.go - /models/sdkerrors/getresizedphoto.go - /models/sdkerrors/getresourcesstatistics.go + - /models/sdkerrors/getsearchalllibraries.go - /models/sdkerrors/getsearchlibrary.go - /models/sdkerrors/getsearchresults.go - /models/sdkerrors/getserveractivities.go @@ -238,7 +239,6 @@ generatedFiles: - docs/models/operations/download.md - docs/models/operations/enablepapertrailresponse.md - docs/models/operations/feature.md - - docs/models/operations/features.md - docs/models/operations/field.md - docs/models/operations/fieldtype.md - docs/models/operations/filter.md @@ -248,6 +248,7 @@ generatedFiles: - docs/models/operations/genre.md - docs/models/operations/geodata.md - docs/models/operations/getalllibrariesdirectory.md + - docs/models/operations/getalllibrarieslocation.md - docs/models/operations/getalllibrariesmediacontainer.md - docs/models/operations/getalllibrariesresponse.md - docs/models/operations/getalllibrariesresponsebody.md @@ -325,6 +326,7 @@ generatedFiles: - docs/models/operations/getlibraryitemslibraryresponsetype.md - docs/models/operations/getlibraryitemslibrarysort.md - docs/models/operations/getlibraryitemslibrarytype.md + - docs/models/operations/getlibraryitemslocation.md - docs/models/operations/getlibraryitemsmedia.md - docs/models/operations/getlibraryitemsmediacontainer.md - docs/models/operations/getlibraryitemsmediaguid.md @@ -445,6 +447,32 @@ generatedFiles: - docs/models/operations/getresourcesstatisticsrequest.md - docs/models/operations/getresourcesstatisticsresponse.md - docs/models/operations/getresourcesstatisticsresponsebody.md + - docs/models/operations/getsearchalllibrariescollection.md + - docs/models/operations/getsearchalllibrariescountry.md + - docs/models/operations/getsearchalllibrariesdirector.md + - docs/models/operations/getsearchalllibrariesflattenseasons.md + - docs/models/operations/getsearchalllibrariesgenre.md + - docs/models/operations/getsearchalllibrariesglobals.md + - docs/models/operations/getsearchalllibrarieshasthumbnail.md + - docs/models/operations/getsearchalllibrariesimage.md + - docs/models/operations/getsearchalllibrarieslibrarytype.md + - docs/models/operations/getsearchalllibrarieslocation.md + - docs/models/operations/getsearchalllibrariesmedia.md + - docs/models/operations/getsearchalllibrariesmediacontainer.md + - docs/models/operations/getsearchalllibrariesmediaguid.md + - docs/models/operations/getsearchalllibrariesmetadata.md + - docs/models/operations/getsearchalllibrariesmetadatarating.md + - docs/models/operations/getsearchalllibrariesoptimizedforstreaming.md + - docs/models/operations/getsearchalllibrariespart.md + - docs/models/operations/getsearchalllibrariesrequest.md + - docs/models/operations/getsearchalllibrariesresponse.md + - docs/models/operations/getsearchalllibrariesresponsebody.md + - docs/models/operations/getsearchalllibrariesrole.md + - docs/models/operations/getsearchalllibrariesshowordering.md + - docs/models/operations/getsearchalllibrariesstream.md + - docs/models/operations/getsearchalllibrariestype.md + - docs/models/operations/getsearchalllibrariesultrablurcolors.md + - docs/models/operations/getsearchalllibrarieswriter.md - docs/models/operations/getsearchlibrarymediacontainer.md - docs/models/operations/getsearchlibrarymetadata.md - docs/models/operations/getsearchlibraryqueryparamtype.md @@ -512,7 +540,6 @@ generatedFiles: - docs/models/operations/gettokenbypinidresponse.md - docs/models/operations/gettokendetailsauthenticationresponsestatus.md - docs/models/operations/gettokendetailsauthenticationstatus.md - - docs/models/operations/gettokendetailsfeatures.md - docs/models/operations/gettokendetailsresponse.md - docs/models/operations/gettokendetailsstatus.md - docs/models/operations/gettokendetailssubscription.md @@ -589,14 +616,12 @@ generatedFiles: - docs/models/operations/player.md - docs/models/operations/playlisttype.md - docs/models/operations/plexdevice.md - - docs/models/operations/postuserssignindataauthenticationfeatures.md - docs/models/operations/postuserssignindataauthenticationresponsestatus.md - docs/models/operations/postuserssignindataauthenticationstatus.md - docs/models/operations/postuserssignindataauthenticationsubscription.md - docs/models/operations/postuserssignindataautoselectsubtitle.md - docs/models/operations/postuserssignindatadefaultsubtitleaccessibility.md - docs/models/operations/postuserssignindatadefaultsubtitleforced.md - - docs/models/operations/postuserssignindatafeatures.md - docs/models/operations/postuserssignindataglobals.md - docs/models/operations/postuserssignindatamailingliststatus.md - docs/models/operations/postuserssignindatamediareviewsvisibility.md @@ -615,6 +640,8 @@ generatedFiles: - docs/models/operations/provider.md - docs/models/operations/queryparamfilter.md - docs/models/operations/queryparamforce.md + - docs/models/operations/queryparamincludecollections.md + - docs/models/operations/queryparamincludeexternalmedia.md - docs/models/operations/queryparamincludemeta.md - docs/models/operations/queryparamonlytransient.md - docs/models/operations/queryparamsmart.md @@ -624,6 +651,8 @@ generatedFiles: - docs/models/operations/responsebody.md - docs/models/operations/role.md - docs/models/operations/scope.md + - docs/models/operations/searchresult.md + - docs/models/operations/searchtypes.md - docs/models/operations/server.md - docs/models/operations/services.md - docs/models/operations/session.md @@ -812,6 +841,10 @@ generatedFiles: - docs/models/sdkerrors/getresourcesstatisticserrors.md - docs/models/sdkerrors/getresourcesstatisticsstatisticserrors.md - docs/models/sdkerrors/getresourcesstatisticsunauthorized.md + - docs/models/sdkerrors/getsearchalllibrariesbadrequest.md + - docs/models/sdkerrors/getsearchalllibrarieserrors.md + - docs/models/sdkerrors/getsearchalllibrarieslibraryerrors.md + - docs/models/sdkerrors/getsearchalllibrariesunauthorized.md - docs/models/sdkerrors/getsearchlibrarybadrequest.md - docs/models/sdkerrors/getsearchlibraryerrors.md - docs/models/sdkerrors/getsearchlibrarylibraryerrors.md @@ -1086,6 +1119,8 @@ examples: parameters: query: X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + header: + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" responses: "400": application/json: {"errors": []} @@ -1145,6 +1180,8 @@ examples: minSize: 1 upscale: 1 X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + header: + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" responses: "400": application/json: {"errors": []} @@ -1162,6 +1199,8 @@ examples: minSize: 1 upscale: 1 X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + header: + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" responses: "400": application/json: {"errors": []} @@ -1325,6 +1364,21 @@ examples: application/json: {"errors": []} "401": application/json: {"errors": []} + "": + parameters: + query: + includeHttps: 1 + includeRelay: 1 + includeIPv6: 1 + header: + X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58" + responses: + "200": + application/json: [] + "400": + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + "401": + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getPin: "": parameters: @@ -1334,6 +1388,12 @@ examples: X-Plex-Version: "4.133.0" X-Plex-Platform: "Chrome" X-Plex-Client-Identifier: "gcgzw5rz2xovp84b4vha3a40" + header: + X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58" + X-Plex-Product: "Plex for Roku" + X-Plex-Device: "Roku 3" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" responses: "200": application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": 802, "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null} @@ -1352,6 +1412,12 @@ examples: X-Plex-Device: "Linux" X-Plex-Version: "4.133.0" X-Plex-Platform: "Chrome" + header: + X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58" + X-Plex-Product: "Plex for Roku" + X-Plex-Device: "Roku 3" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" responses: "404": application/json: {"errors": [{"code": 1020, "message": "Code not found or expired"}]} @@ -1498,7 +1564,7 @@ examples: X-Plex-Container-Size: 50 responses: "200": - application/json: {"MediaContainer": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}], "size": 70, "totalSize": 170, "offset": 0, "content": "secondary", "allowSync": true, "nocache": true, "art": "/:/resources/movie-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "title2": "Recently Released", "viewGroup": "movie", "viewMode": 65592, "mixedParents": true, "Metadata": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "showOrdering": "dvd", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}], "Genre": [{"tag": "Adventure"}, {"tag": "Adventure"}, {"tag": "Adventure"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Guid": [{"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}, {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "showOrdering": "dvd", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}], "Genre": [], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}, {"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Guid": [{"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}], "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [], "Sort": [], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}]}}} + application/json: {"MediaContainer": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}], "size": 70, "totalSize": 170, "offset": 0, "content": "secondary", "allowSync": true, "nocache": true, "art": "/:/resources/movie-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "title2": "Recently Released", "viewGroup": "movie", "viewMode": 65592, "mixedParents": true, "Metadata": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "showOrdering": "dvd", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}], "Genre": [{"tag": "Adventure"}, {"tag": "Adventure"}, {"tag": "Adventure"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [{"path": "/TV Shows/House"}], "Guid": [{"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}, {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "showOrdering": "dvd", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}], "Genre": [], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}, {"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [{"path": "/TV Shows/House"}, {"path": "/TV Shows/House"}], "Guid": [{"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}], "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [], "Sort": [], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}]}}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": @@ -1612,6 +1678,8 @@ examples: X-Plex-Container-Start: 0 X-Plex-Container-Size: 50 X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + header: + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" responses: "400": application/json: {"errors": []} @@ -1806,6 +1874,12 @@ examples: X-Plex-Device: "Linux" X-Plex-Version: "4.133.0" X-Plex-Platform: "Chrome" + header: + X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58" + X-Plex-Product: "Plex for Roku" + X-Plex-Device: "Roku 3" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" requestBody: application/x-www-form-urlencoded: {"login": "username@email.com", "password": "password123", "verificationCode": "123456"} responses: @@ -2008,7 +2082,7 @@ examples: X-Plex-Container-Size: 50 responses: "200": - application/json: {"MediaContainer": {"size": 50, "identifier": "com.plexapp.plugins.library", "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}, {"type": "tag", "Operator": []}, {"type": "tag", "Operator": []}]}, "Metadata": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "showOrdering": "dvd", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": []}]}], "Genre": [{"tag": "Adventure"}], "Country": [], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [], "Collection": [], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Guid": [{"id": "imdb://tt13015952"}, {"id": "imdb://tt13015952"}, {"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}]}} + application/json: {"MediaContainer": {"size": 50, "identifier": "com.plexapp.plugins.library", "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}, {"type": "tag", "Operator": []}, {"type": "tag", "Operator": []}]}, "Metadata": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "showOrdering": "dvd", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": []}]}], "Genre": [{"tag": "Adventure"}], "Country": [], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [], "Collection": [], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [{"path": "/TV Shows/House"}], "Guid": [{"id": "imdb://tt13015952"}, {"id": "imdb://tt13015952"}, {"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}]}} get-recently-added-library: speakeasy-default-get-recently-added-library: parameters: @@ -2027,3 +2101,20 @@ examples: application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + get-search-all-libraries: + "": + parameters: + query: + query: "" + searchTypes: ["people"] + includeCollections: 1 + includeExternalMedia: 1 + header: + X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58" + responses: + "200": + application/json: {"MediaContainer": {"size": "9266.90", "SearchResult": [{"score": "2698.71", "Metadata": {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "showOrdering": "dvd", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}, {"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}], "Genre": [{"tag": "Adventure"}, {"tag": "Adventure"}, {"tag": "Adventure"}], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}], "Writer": [], "Collection": [{"tag": "Working NL Subs"}, {"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [], "Guid": [{"id": "imdb://tt13015952"}, {"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}}, {"score": "9681.40", "Metadata": {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "showOrdering": "dvd", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [], "Genre": [], "Country": [], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}, {"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [{"path": "/TV Shows/House"}, {"path": "/TV Shows/House"}, {"path": "/TV Shows/House"}], "Guid": [], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Image": [], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}}, {"score": "1665.12", "Metadata": {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "showOrdering": "dvd", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}], "Genre": [{"tag": "Adventure"}, {"tag": "Adventure"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}, {"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [{"path": "/TV Shows/House"}, {"path": "/TV Shows/House"}, {"path": "/TV Shows/House"}], "Guid": [{"id": "imdb://tt13015952"}, {"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}}]}} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 66c9957..096d75e 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true go: - version: 0.14.0 + version: 0.15.0 additionalDependencies: {} allowUnknownFieldsInWeakUnions: false clientServerStatusCodesAsErrors: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index eb6791e..6a7d056 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.405.6 +speakeasyVersion: 1.406.0 sources: my-source: sourceNamespace: my-source @@ -9,8 +9,8 @@ sources: - main plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:c52cde0b8d51e160f7b9f1a3d3ea4dbb1aca6d5caad714e549201fb757fadd57 - sourceBlobDigest: sha256:f417b03ff71356808554313f24c3d06d670474bf51bc9a0631de1ad49c13a361 + sourceRevisionDigest: sha256:c6ab8f13847c7cdc4ab3752f517164d7da08266726255aa0d614b1eaea66fb0e + sourceBlobDigest: sha256:64c7694915a0828aeb256d10d2fa0ea477681785b818916b6681be8cc5ffb93b tags: - latest - main @@ -18,10 +18,10 @@ targets: plexgo: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:c52cde0b8d51e160f7b9f1a3d3ea4dbb1aca6d5caad714e549201fb757fadd57 - sourceBlobDigest: sha256:f417b03ff71356808554313f24c3d06d670474bf51bc9a0631de1ad49c13a361 + sourceRevisionDigest: sha256:c6ab8f13847c7cdc4ab3752f517164d7da08266726255aa0d614b1eaea66fb0e + sourceBlobDigest: sha256:64c7694915a0828aeb256d10d2fa0ea477681785b818916b6681be8cc5ffb93b codeSamplesNamespace: code-samples-go-plexgo - codeSamplesRevisionDigest: sha256:02a3daa914a5c29e77e5cae2f0c1ca74840d6627a908b2a8d890e93d99bd3767 + codeSamplesRevisionDigest: sha256:9ae03dbe12a6438ac7667de48bf864bbeb4b470bd87b38555484879a998889ba workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index af9f313..c7697f8 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,6 @@ The following SDKs are generated from the OpenAPI Specification. They are automa * [SDK Installation](#sdk-installation) * [SDK Example Usage](#sdk-example-usage) * [Available Resources and Operations](#available-resources-and-operations) -* [Global Parameters](#global-parameters) * [Retries](#retries) * [Error Handling](#error-handling) * [Server Selection](#server-selection) @@ -79,11 +78,11 @@ import ( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -141,6 +140,7 @@ func main() { * [GetLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items * [GetRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library * [GetSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library +* [GetSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries * [GetMetaDataByRatingKey](docs/sdks/library/README.md#getmetadatabyratingkey) - Get Metadata by RatingKey * [GetMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children * [GetTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content @@ -252,11 +252,11 @@ import ( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -306,11 +306,11 @@ func main() { RetryConnectionErrors: false, }), plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -357,11 +357,11 @@ import ( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -417,11 +417,11 @@ func main() { s := plexgo.New( plexgo.WithServerIndex(0), plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -459,11 +459,11 @@ func main() { s := plexgo.New( plexgo.WithServerURL("{protocol}://{ip}:{port}"), plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -494,11 +494,11 @@ import ( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -567,11 +567,11 @@ import ( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -613,62 +613,6 @@ d6 := types.MustDateFromString("2019-01-01") // returns types.Date and panics on ``` - -## Global Parameters - -Certain parameters are configured globally. These parameters may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, These global values will be used as defaults on the operations that use them. When such operations are called, there is a place in each to override the global value, if needed. - -For example, you can set `ClientID` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetServerResources`. 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 parameters are available. - -| Name | Type | Required | Description | -| ---- | ---- |:--------:| ----------- | -| ClientID | 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) | -| ClientName | string | | The ClientName parameter. | -| ClientVersion | string | | The ClientVersion parameter. | -| ClientPlatform | string | | The ClientPlatform parameter. | -| DeviceName | string | | The DeviceName parameter. | - - -### Example - -```go -package main - -import ( - "context" - "github.com/LukeHagar/plexgo" - "github.com/LukeHagar/plexgo/models/operations" - "log" -) - -func main() { - s := plexgo.New( - plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), - ) - - ctx := context.Background() - res, err := s.Plex.GetServerResources(ctx, operations.IncludeHTTPSEnable.ToPointer(), operations.IncludeRelayEnable.ToPointer(), operations.IncludeIPv6Enable.ToPointer(), plexgo.String("gcgzw5rz2xovp84b4vha3a40")) - if err != nil { - log.Fatal(err) - } - if res.PlexDevices != nil { - // handle response - } -} - -``` - - # Development diff --git a/RELEASES.md b/RELEASES.md index d7c94d8..c3cde6c 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -932,4 +932,14 @@ Based on: ### Generated - [go v0.14.0] . ### Releases -- [Go v0.14.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.14.0 - . \ No newline at end of file +- [Go v0.14.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.14.0 - . + +## 2024-10-03 00:09:11 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.406.0 (2.429.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.15.0] . +### Releases +- [Go v0.15.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.15.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 4ec93dd..768027a 100644 --- a/USAGE.md +++ b/USAGE.md @@ -11,11 +11,11 @@ import ( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/activities.go b/activities.go index 97a9dce..cf8d2ae 100644 --- a/activities.go +++ b/activities.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -88,6 +89,16 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -96,11 +107,7 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -334,6 +341,16 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -342,11 +359,7 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/authentication.go b/authentication.go index 56c3605..e48aec9 100644 --- a/authentication.go +++ b/authentication.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -91,6 +92,16 @@ func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -99,11 +110,7 @@ func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -321,6 +328,16 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, sou if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -329,11 +346,7 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, sou httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -547,6 +560,16 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -555,11 +578,7 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -747,9 +766,9 @@ func (s *Authentication) PostUsersSignInData(ctx context.Context, request operat globals := operations.PostUsersSignInDataGlobals{ ClientID: s.sdkConfiguration.Globals.ClientID, ClientName: s.sdkConfiguration.Globals.ClientName, - DeviceName: s.sdkConfiguration.Globals.DeviceName, + DeviceNickname: s.sdkConfiguration.Globals.DeviceNickname, ClientVersion: s.sdkConfiguration.Globals.ClientVersion, - ClientPlatform: s.sdkConfiguration.Globals.ClientPlatform, + Platform: s.sdkConfiguration.Globals.Platform, } o := operations.Options{} @@ -799,15 +818,23 @@ func (s *Authentication) PostUsersSignInData(ctx context.Context, request operat req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) - if err := utils.PopulateQueryParams(ctx, req, request, globals); err != nil { - return nil, fmt.Errorf("error populating query params: %w", err) - } + utils.PopulateHeaders(ctx, req, request, globals) globalRetryConfig := s.sdkConfiguration.RetryConfig retryConfig := o.Retries if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -816,11 +843,7 @@ func (s *Authentication) PostUsersSignInData(ctx context.Context, request operat httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/butler.go b/butler.go index b844ecd..1270dd3 100644 --- a/butler.go +++ b/butler.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -82,6 +83,16 @@ func (s *Butler) GetButlerTasks(ctx context.Context, opts ...operations.Option) if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -90,11 +101,7 @@ func (s *Butler) GetButlerTasks(ctx context.Context, opts ...operations.Option) httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -328,6 +335,16 @@ func (s *Butler) StartAllTasks(ctx context.Context, opts ...operations.Option) ( if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -336,11 +353,7 @@ func (s *Butler) StartAllTasks(ctx context.Context, opts ...operations.Option) ( httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -549,6 +562,16 @@ func (s *Butler) StopAllTasks(ctx context.Context, opts ...operations.Option) (* if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -557,11 +580,7 @@ func (s *Butler) StopAllTasks(ctx context.Context, opts ...operations.Option) (* httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -778,6 +797,16 @@ func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName, op if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -786,11 +815,7 @@ func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName, op httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1005,6 +1030,16 @@ func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTask if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1013,11 +1048,7 @@ func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTask httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/codeSamples.yaml b/codeSamples.yaml index 029e27f..ecbb52a 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -20,11 +20,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -53,11 +53,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -86,11 +86,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -119,11 +119,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -153,11 +153,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -197,11 +197,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -230,11 +230,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -263,11 +263,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -296,11 +296,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -329,11 +329,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -362,11 +362,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -396,11 +396,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -430,11 +430,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -463,11 +463,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -496,11 +496,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -529,11 +529,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -562,11 +562,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -594,11 +594,11 @@ actions: func main() { s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -627,11 +627,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -660,11 +660,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -694,11 +694,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -734,11 +734,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -767,11 +767,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -800,11 +800,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -832,11 +832,11 @@ actions: func main() { s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -866,11 +866,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -899,11 +899,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -932,11 +932,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -966,11 +966,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1006,11 +1006,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1040,11 +1040,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1080,11 +1080,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1114,11 +1114,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1151,6 +1151,47 @@ actions: // handle response } } + - target: $["paths"]["/library/search"]["get"] + update: + x-codeSamples: + - lang: go + label: libraries + source: |- + package main + + import( + "github.com/LukeHagar/plexgo" + "context" + "github.com/LukeHagar/plexgo/models/operations" + "log" + ) + + func main() { + s := plexgo.New( + plexgo.WithSecurity(""), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), + ) + + ctx := context.Background() + res, err := s.Library.GetSearchAllLibraries(ctx, operations.GetSearchAllLibrariesRequest{ + Query: "", + SearchTypes: []operations.SearchTypes{ + operations.SearchTypesPeople, + }, + IncludeCollections: operations.QueryParamIncludeCollectionsEnable.ToPointer(), + IncludeExternalMedia: operations.QueryParamIncludeExternalMediaEnable.ToPointer(), + }) + if err != nil { + log.Fatal(err) + } + if res.Object != nil { + // handle response + } + } - target: $["paths"]["/library/sections"]["get"] update: x-codeSamples: @@ -1168,11 +1209,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1202,11 +1243,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1240,11 +1281,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1273,11 +1314,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1307,11 +1348,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1341,11 +1382,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1375,19 +1416,19 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() res, err := s.Library.GetLibraryItems(ctx, operations.GetLibraryItemsRequest{ - SectionKey: 9518, Tag: operations.TagEdition, IncludeGuids: operations.IncludeGuidsEnable.ToPointer(), Type: operations.GetLibraryItemsQueryParamTypeTvShow.ToPointer(), + SectionKey: 9518, IncludeMeta: operations.GetLibraryItemsQueryParamIncludeMetaEnable.ToPointer(), XPlexContainerStart: plexgo.Int(0), XPlexContainerSize: plexgo.Int(50), @@ -1417,11 +1458,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1450,11 +1491,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1485,11 +1526,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1518,11 +1559,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1551,11 +1592,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1585,11 +1626,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1626,11 +1667,11 @@ actions: func main() { s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1659,11 +1700,11 @@ actions: func main() { s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1694,11 +1735,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1728,11 +1769,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1767,11 +1808,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1800,11 +1841,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1833,11 +1874,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1866,11 +1907,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1899,11 +1940,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1933,11 +1974,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -1966,11 +2007,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2000,15 +2041,15 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() - res, err := s.Plex.GetServerResources(ctx, operations.IncludeHTTPSEnable.ToPointer(), operations.IncludeRelayEnable.ToPointer(), operations.IncludeIPv6Enable.ToPointer(), plexgo.String("gcgzw5rz2xovp84b4vha3a40")) + res, err := s.Plex.GetServerResources(ctx, operations.IncludeHTTPSEnable.ToPointer(), operations.IncludeRelayEnable.ToPointer(), operations.IncludeIPv6Enable.ToPointer(), plexgo.String("3381b62b-9ab7-4e37-827b-203e9809eb58")) if err != nil { log.Fatal(err) } @@ -2033,11 +2074,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2066,11 +2107,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2100,11 +2141,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2133,11 +2174,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2166,11 +2207,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2199,11 +2240,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2232,11 +2273,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2265,11 +2306,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2299,11 +2340,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2332,11 +2373,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2365,11 +2406,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2399,11 +2440,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2433,11 +2474,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2466,11 +2507,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2499,11 +2540,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2532,11 +2573,11 @@ actions: func main() { s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -2572,11 +2613,11 @@ actions: func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/models/operations/features.md b/docs/models/operations/features.md deleted file mode 100644 index a2f13ec..0000000 --- a/docs/models/operations/features.md +++ /dev/null @@ -1,102 +0,0 @@ -# Features - - -## Values - -| Name | Value | -| --------------------------------------------- | --------------------------------------------- | -| `FeaturesAndroidDolbyVision` | Android - Dolby Vision | -| `FeaturesAndroidPiP` | Android - PiP | -| `FeaturesCuSunset` | CU Sunset | -| `FeaturesHrkEnableEur` | HRK_enable_EUR | -| `FeaturesTrebleShowFeatures` | TREBLE-show-features | -| `FeaturesAdCountdownTimer` | ad-countdown-timer | -| `FeaturesAdaptiveBitrate` | adaptive_bitrate | -| `FeaturesAlbumTypes` | album-types | -| `FeaturesAllowDvr` | allow_dvr | -| `FeaturesAmazonLoopDebug` | amazon-loop-debug | -| `FeaturesAvodAdAnalysis` | avod-ad-analysis | -| `FeaturesAvodNewMedia` | avod-new-media | -| `FeaturesBlacklistGetSignin` | blacklist_get_signin | -| `FeaturesBoostVoices` | boost-voices | -| `FeaturesCameraUpload` | camera_upload | -| `FeaturesClientRadioStations` | client-radio-stations | -| `FeaturesCloudflareTurnstileRequired` | cloudflare-turnstile-required | -| `FeaturesCloudsync` | cloudsync | -| `FeaturesCollections` | collections | -| `FeaturesCommentsAndRepliesPushNotifications` | comments_and_replies_push_notifications | -| `FeaturesCommunityAccessPlexTv` | community_access_plex_tv | -| `FeaturesCompanionsSonos` | companions_sonos | -| `FeaturesContentFilter` | content_filter | -| `FeaturesCustomHomeRemoval` | custom-home-removal | -| `FeaturesDisableHomeUserFriendships` | disable_home_user_friendships | -| `FeaturesDisableSharingFriendships` | disable_sharing_friendships | -| `FeaturesDownloadsGating` | downloads-gating | -| `FeaturesDrmSupport` | drm_support | -| `FeaturesDvr` | dvr | -| `FeaturesDvrBlockUnsupportedCountries` | dvr-block-unsupported-countries | -| `FeaturesEpgRecentChannels` | epg-recent-channels | -| `FeaturesExcludeRestrictions` | exclude restrictions | -| `FeaturesFederatedAuth` | federated-auth | -| `FeaturesFriendRequestPushNotifications` | friend_request_push_notifications | -| `FeaturesGrandfatherSync` | grandfather-sync | -| `FeaturesGuidedUpgrade` | guided-upgrade | -| `FeaturesHardwareTranscoding` | hardware_transcoding | -| `FeaturesHome` | home | -| `FeaturesHwtranscode` | hwtranscode | -| `FeaturesImaggaV2` | imagga-v2 | -| `FeaturesIncreasePasswordComplexity` | increase-password-complexity | -| `FeaturesIos14PrivacyBanner` | ios14-privacy-banner | -| `FeaturesIterableNotificationTokens` | iterable-notification-tokens | -| `FeaturesItemClusters` | item_clusters | -| `FeaturesKeepPaymentMethod` | keep-payment-method | -| `FeaturesKevinBacon` | kevin-bacon | -| `FeaturesKoreaConsent` | korea-consent | -| `FeaturesLeIsrgRootX1` | le_isrg_root_x1 | -| `FeaturesLetsEncrypt` | lets_encrypt | -| `FeaturesLightningDvrPivot` | lightning-dvr-pivot | -| `FeaturesLiveTvSupportIncompleteSegments` | live-tv-support-incomplete-segments | -| `FeaturesLivetv` | livetv | -| `FeaturesLyrics` | lyrics | -| `FeaturesMetadataSearch` | metadata_search | -| `FeaturesMusicAnalysis` | music-analysis | -| `FeaturesMusicVideos` | music_videos | -| `FeaturesNewPlexPassPrices` | new_plex_pass_prices | -| `FeaturesNewsProviderSunsetModal` | news-provider-sunset-modal | -| `FeaturesNominatim` | nominatim | -| `FeaturesPass` | pass | -| `FeaturesPhotosFavorites` | photos-favorites | -| `FeaturesPhotosMetadataEdition` | photos-metadata-edition | -| `FeaturesPhotosV6Edit` | photosV6-edit | -| `FeaturesPhotosV6TvAlbums` | photosV6-tv-albums | -| `FeaturesPmsHealth` | pms_health | -| `FeaturesPremiumDashboard` | premium-dashboard | -| `FeaturesPremiumMusicMetadata` | premium_music_metadata | -| `FeaturesRadio` | radio | -| `FeaturesRateLimitClientToken` | rate-limit-client-token | -| `FeaturesScrobblingServicePlexTv` | scrobbling-service-plex-tv | -| `FeaturesSessionBandwidthRestrictions` | session_bandwidth_restrictions | -| `FeaturesSessionKick` | session_kick | -| `FeaturesSharedServerNotification` | shared_server_notification | -| `FeaturesSharedSourceNotification` | shared_source_notification | -| `FeaturesSigninNotification` | signin_notification | -| `FeaturesSigninWithApple` | signin_with_apple | -| `FeaturesSilenceRemoval` | silence-removal | -| `FeaturesSleepTimer` | sleep-timer | -| `FeaturesSpringServeAdProvider` | spring_serve_ad_provider | -| `FeaturesSync` | sync | -| `FeaturesSweetFades` | sweet-fades | -| `FeaturesTranscoderCache` | transcoder_cache | -| `FeaturesTrailers` | trailers | -| `FeaturesTunerSharing` | tuner-sharing | -| `FeaturesTwoFactorAuthentication` | two-factor-authentication | -| `FeaturesUnsupportedtuners` | unsupportedtuners | -| `FeaturesUpgrade3ds2` | upgrade-3ds2 | -| `FeaturesVisualizers` | visualizers | -| `FeaturesVodSchema` | vod-schema | -| `FeaturesVodCloudflare` | vod_cloudflare | -| `FeaturesVolumeLeveling` | volume-leveling | -| `FeaturesWatchTogetherInvite` | watch-together-invite | -| `FeaturesWatchlistRss` | watchlist-rss | -| `FeaturesWebServerDashboard` | web_server_dashboard | -| `FeaturesWebhooks` | webhooks | \ No newline at end of file diff --git a/docs/models/operations/getalllibrariesdirectory.md b/docs/models/operations/getalllibrariesdirectory.md index 9566aae..e68ae9d 100644 --- a/docs/models/operations/getalllibrariesdirectory.md +++ b/docs/models/operations/getalllibrariesdirectory.md @@ -3,26 +3,26 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `AllowSync` | *bool* | :heavy_check_mark: | N/A | true | -| `Art` | *string* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg | -| `Composite` | *string* | :heavy_check_mark: | N/A | /library/sections/1/composite/1705615584 | -| `Filters` | *bool* | :heavy_check_mark: | N/A | true | -| `Refreshing` | *bool* | :heavy_check_mark: | N/A | false | -| `Thumb` | *string* | :heavy_check_mark: | N/A | /:/resources/movie.png | -| `Key` | *string* | :heavy_check_mark: | N/A | 1 | -| `Type` | *string* | :heavy_check_mark: | N/A | movie | -| `Title` | *string* | :heavy_check_mark: | N/A | Movies | -| `Agent` | *string* | :heavy_check_mark: | N/A | tv.plex.agents.movie | -| `Scanner` | *string* | :heavy_check_mark: | N/A | Plex Movie | -| `Language` | *string* | :heavy_check_mark: | N/A | en-US | -| `UUID` | *string* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `UpdatedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `CreatedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `ScannedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `Content` | *bool* | :heavy_check_mark: | N/A | true | -| `Directory` | *bool* | :heavy_check_mark: | N/A | true | -| `ContentChangedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `Hidden` | *int* | :heavy_check_mark: | N/A | 0 | -| `Location` | [][operations.Location](../../models/operations/location.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `AllowSync` | *bool* | :heavy_check_mark: | N/A | true | +| `Art` | *string* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg | +| `Composite` | *string* | :heavy_check_mark: | N/A | /library/sections/1/composite/1705615584 | +| `Filters` | *bool* | :heavy_check_mark: | N/A | true | +| `Refreshing` | *bool* | :heavy_check_mark: | N/A | false | +| `Thumb` | *string* | :heavy_check_mark: | N/A | /:/resources/movie.png | +| `Key` | *string* | :heavy_check_mark: | N/A | 1 | +| `Type` | *string* | :heavy_check_mark: | N/A | movie | +| `Title` | *string* | :heavy_check_mark: | N/A | Movies | +| `Agent` | *string* | :heavy_check_mark: | N/A | tv.plex.agents.movie | +| `Scanner` | *string* | :heavy_check_mark: | N/A | Plex Movie | +| `Language` | *string* | :heavy_check_mark: | N/A | en-US | +| `UUID` | *string* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `UpdatedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | +| `CreatedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | +| `ScannedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | +| `Content` | *bool* | :heavy_check_mark: | N/A | true | +| `Directory` | *bool* | :heavy_check_mark: | N/A | true | +| `ContentChangedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | +| `Hidden` | *int* | :heavy_check_mark: | N/A | 0 | +| `Location` | [][operations.GetAllLibrariesLocation](../../models/operations/getalllibrarieslocation.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getalllibrarieslocation.md b/docs/models/operations/getalllibrarieslocation.md new file mode 100644 index 0000000..e9285ed --- /dev/null +++ b/docs/models/operations/getalllibrarieslocation.md @@ -0,0 +1,9 @@ +# GetAllLibrariesLocation + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `ID` | *int* | :heavy_check_mark: | N/A | 1 | +| `Path` | *string* | :heavy_check_mark: | N/A | /movies | \ No newline at end of file diff --git a/docs/models/operations/getbannerimagerequest.md b/docs/models/operations/getbannerimagerequest.md index 5441c94..9986cc2 100644 --- a/docs/models/operations/getbannerimagerequest.md +++ b/docs/models/operations/getbannerimagerequest.md @@ -10,4 +10,4 @@ | `Height` | *int64* | :heavy_check_mark: | N/A | 396 | | `MinSize` | *int64* | :heavy_check_mark: | N/A | 1 | | `Upscale` | *int64* | :heavy_check_mark: | N/A | 1 | -| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file +| `XPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/getlibrarydetailsrequest.md b/docs/models/operations/getlibrarydetailsrequest.md index 92a3a94..c6edea2 100644 --- a/docs/models/operations/getlibrarydetailsrequest.md +++ b/docs/models/operations/getlibrarydetailsrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | -| `IncludeDetails` | [*operations.IncludeDetails](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | \ No newline at end of file +| `IncludeDetails` | [*operations.IncludeDetails](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | +| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemslocation.md b/docs/models/operations/getlibraryitemslocation.md new file mode 100644 index 0000000..3166ab1 --- /dev/null +++ b/docs/models/operations/getlibraryitemslocation.md @@ -0,0 +1,8 @@ +# GetLibraryItemsLocation + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Path` | **string* | :heavy_minus_sign: | N/A | /TV Shows/House | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsmedia.md b/docs/models/operations/getlibraryitemsmedia.md index 3e815a0..739d7f4 100644 --- a/docs/models/operations/getlibraryitemsmedia.md +++ b/docs/models/operations/getlibraryitemsmedia.md @@ -6,19 +6,19 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | `ID` | *int* | :heavy_check_mark: | N/A | 119534 | -| `Duration` | *int* | :heavy_check_mark: | N/A | 11558112 | -| `Bitrate` | *int* | :heavy_check_mark: | N/A | 25025 | -| `Width` | *int* | :heavy_check_mark: | N/A | 3840 | -| `Height` | *int* | :heavy_check_mark: | N/A | 2072 | -| `AspectRatio` | *float64* | :heavy_check_mark: | N/A | 1.85 | +| `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 | +| `Bitrate` | **int* | :heavy_minus_sign: | N/A | 25025 | +| `Width` | **int* | :heavy_minus_sign: | N/A | 3840 | +| `Height` | **int* | :heavy_minus_sign: | N/A | 2072 | +| `AspectRatio` | **float64* | :heavy_minus_sign: | N/A | 1.85 | | `AudioProfile` | **string* | :heavy_minus_sign: | N/A | dts | -| `AudioChannels` | *int* | :heavy_check_mark: | N/A | 6 | -| `AudioCodec` | *string* | :heavy_check_mark: | N/A | eac3 | -| `VideoCodec` | *string* | :heavy_check_mark: | N/A | hevc | -| `VideoResolution` | *string* | :heavy_check_mark: | N/A | 4k | +| `AudioChannels` | **int* | :heavy_minus_sign: | N/A | 6 | +| `AudioCodec` | **string* | :heavy_minus_sign: | N/A | eac3 | +| `VideoCodec` | **string* | :heavy_minus_sign: | N/A | hevc | +| `VideoResolution` | **string* | :heavy_minus_sign: | N/A | 4k | | `Container` | *string* | :heavy_check_mark: | N/A | mkv | -| `VideoFrameRate` | *string* | :heavy_check_mark: | N/A | 24p | -| `VideoProfile` | *string* | :heavy_check_mark: | N/A | main 10 | +| `VideoFrameRate` | **string* | :heavy_minus_sign: | N/A | 24p | +| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main 10 | | `HasVoiceActivity` | **bool* | :heavy_minus_sign: | N/A | false | | `OptimizedForStreaming` | [*operations.GetLibraryItemsOptimizedForStreaming](../../models/operations/getlibraryitemsoptimizedforstreaming.md) | :heavy_minus_sign: | N/A | 1 | | `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false | diff --git a/docs/models/operations/getlibraryitemsmetadata.md b/docs/models/operations/getlibraryitemsmetadata.md index e6e51e9..db4af80 100644 --- a/docs/models/operations/getlibraryitemsmetadata.md +++ b/docs/models/operations/getlibraryitemsmetadata.md @@ -52,6 +52,7 @@ | `Writer` | [][operations.GetLibraryItemsWriter](../../models/operations/getlibraryitemswriter.md) | :heavy_minus_sign: | N/A | | | `Collection` | [][operations.GetLibraryItemsCollection](../../models/operations/getlibraryitemscollection.md) | :heavy_minus_sign: | N/A | | | `Role` | [][operations.GetLibraryItemsRole](../../models/operations/getlibraryitemsrole.md) | :heavy_minus_sign: | N/A | | +| `Location` | [][operations.GetLibraryItemsLocation](../../models/operations/getlibraryitemslocation.md) | :heavy_minus_sign: | N/A | | | `MediaGUID` | [][operations.GetLibraryItemsMediaGUID](../../models/operations/getlibraryitemsmediaguid.md) | :heavy_minus_sign: | The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
| | | `UltraBlurColors` | [*operations.GetLibraryItemsUltraBlurColors](../../models/operations/getlibraryitemsultrablurcolors.md) | :heavy_minus_sign: | N/A | | | `MetaDataRating` | [][operations.GetLibraryItemsMetaDataRating](../../models/operations/getlibraryitemsmetadatarating.md) | :heavy_minus_sign: | N/A | | diff --git a/docs/models/operations/getlibraryitemspart.md b/docs/models/operations/getlibraryitemspart.md index 1669c4c..fabaa7a 100644 --- a/docs/models/operations/getlibraryitemspart.md +++ b/docs/models/operations/getlibraryitemspart.md @@ -7,14 +7,14 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ID` | *int* | :heavy_check_mark: | N/A | 119542 | | `Key` | *string* | :heavy_check_mark: | N/A | /library/parts/119542/1680457526/file.mkv | -| `Duration` | *int* | :heavy_check_mark: | N/A | 11558112 | +| `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 | | `File` | *string* | :heavy_check_mark: | N/A | /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv | | `Size` | *int64* | :heavy_check_mark: | N/A | 36158371307 | | `Container` | *string* | :heavy_check_mark: | The container format of the media file.
| mkv | | `AudioProfile` | **string* | :heavy_minus_sign: | N/A | dts | | `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false | | `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | false | -| `VideoProfile` | *string* | :heavy_check_mark: | N/A | main 10 | +| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main 10 | | `Indexes` | **string* | :heavy_minus_sign: | N/A | sd | | `HasThumbnail` | [*operations.GetLibraryItemsHasThumbnail](../../models/operations/getlibraryitemshasthumbnail.md) | :heavy_minus_sign: | N/A | 1 | | `Stream` | [][operations.GetLibraryItemsStream](../../models/operations/getlibraryitemsstream.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsrequest.md b/docs/models/operations/getlibraryitemsrequest.md index 00389eb..98f15bc 100644 --- a/docs/models/operations/getlibraryitemsrequest.md +++ b/docs/models/operations/getlibraryitemsrequest.md @@ -5,10 +5,10 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | | `Tag` | [operations.Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | | | `IncludeGuids` | [*operations.IncludeGuids](../../models/operations/includeguids.md) | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | | `Type` | [*operations.GetLibraryItemsQueryParamType](../../models/operations/getlibraryitemsqueryparamtype.md) | :heavy_minus_sign: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | | `IncludeMeta` | [*operations.GetLibraryItemsQueryParamIncludeMeta](../../models/operations/getlibraryitemsqueryparamincludemeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | | `XPlexContainerStart` | **int* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | | `XPlexContainerSize` | **int* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file diff --git a/docs/models/operations/getmediaprovidersrequest.md b/docs/models/operations/getmediaprovidersrequest.md index 2466085..9dea2da 100644 --- a/docs/models/operations/getmediaprovidersrequest.md +++ b/docs/models/operations/getmediaprovidersrequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `XPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/getmetadatachildrenmetadata.md b/docs/models/operations/getmetadatachildrenmetadata.md index ad1c214..dc14d21 100644 --- a/docs/models/operations/getmetadatachildrenmetadata.md +++ b/docs/models/operations/getmetadatachildrenmetadata.md @@ -15,7 +15,7 @@ | `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. | +| `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 | diff --git a/docs/models/operations/getpinglobals.md b/docs/models/operations/getpinglobals.md index 01eb2f7..8917015 100644 --- a/docs/models/operations/getpinglobals.md +++ b/docs/models/operations/getpinglobals.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ClientID` | **string* | :heavy_minus_sign: | 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) | gcgzw5rz2xovp84b4vha3a40 | -| `ClientName` | **string* | :heavy_minus_sign: | N/A | Plex Web | -| `DeviceName` | **string* | :heavy_minus_sign: | N/A | Linux | -| `ClientVersion` | **string* | :heavy_minus_sign: | N/A | 4.133.0 | -| `ClientPlatform` | **string* | :heavy_minus_sign: | N/A | Chrome | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | +| `ClientName` | **string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | +| `DeviceNickname` | **string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `ClientVersion` | **string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | +| `Platform` | **string* | :heavy_minus_sign: | The platform of the client application. | Roku | \ No newline at end of file diff --git a/docs/models/operations/getpinrequest.md b/docs/models/operations/getpinrequest.md index 2fc5f3c..727abd1 100644 --- a/docs/models/operations/getpinrequest.md +++ b/docs/models/operations/getpinrequest.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Strong` | **bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call
Strong codes are used for Pin authentication flows
Non-Strong codes are used for `Plex.tv/link`
| | -| `ClientID` | **string* | :heavy_minus_sign: | 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) | gcgzw5rz2xovp84b4vha3a40 | -| `ClientName` | **string* | :heavy_minus_sign: | N/A | Plex Web | -| `DeviceName` | **string* | :heavy_minus_sign: | N/A | Linux | -| `ClientVersion` | **string* | :heavy_minus_sign: | N/A | 4.133.0 | -| `ClientPlatform` | **string* | :heavy_minus_sign: | N/A | Chrome | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Strong` | **bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call
Strong codes are used for Pin authentication flows
Non-Strong codes are used for `Plex.tv/link`
| | +| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | +| `ClientName` | **string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | +| `DeviceNickname` | **string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `ClientVersion` | **string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | +| `Platform` | **string* | :heavy_minus_sign: | The platform of the client application. | Roku | \ No newline at end of file diff --git a/docs/models/operations/getrecentlyaddedmetadata.md b/docs/models/operations/getrecentlyaddedmetadata.md index fe4f5c8..96e073d 100644 --- a/docs/models/operations/getrecentlyaddedmetadata.md +++ b/docs/models/operations/getrecentlyaddedmetadata.md @@ -52,6 +52,7 @@ | `Writer` | [][operations.Writer](../../models/operations/writer.md) | :heavy_minus_sign: | N/A | | | `Collection` | [][operations.Collection](../../models/operations/collection.md) | :heavy_minus_sign: | N/A | | | `Role` | [][operations.Role](../../models/operations/role.md) | :heavy_minus_sign: | N/A | | +| `Location` | [][operations.Location](../../models/operations/location.md) | :heavy_minus_sign: | N/A | | | `MediaGUID` | [][operations.MediaGUID](../../models/operations/mediaguid.md) | :heavy_minus_sign: | The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
| | | `UltraBlurColors` | [*operations.UltraBlurColors](../../models/operations/ultrablurcolors.md) | :heavy_minus_sign: | N/A | | | `MetaDataRating` | [][operations.MetaDataRating](../../models/operations/metadatarating.md) | :heavy_minus_sign: | N/A | | diff --git a/docs/models/operations/getrefreshlibrarymetadatarequest.md b/docs/models/operations/getrefreshlibrarymetadatarequest.md index 10044a8..6605721 100644 --- a/docs/models/operations/getrefreshlibrarymetadatarequest.md +++ b/docs/models/operations/getrefreshlibrarymetadatarequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | -| `Force` | [*operations.Force](../../models/operations/force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 | \ No newline at end of file +| `Force` | [*operations.Force](../../models/operations/force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 | +| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariescollection.md b/docs/models/operations/getsearchalllibrariescollection.md new file mode 100644 index 0000000..85aa09d --- /dev/null +++ b/docs/models/operations/getsearchalllibrariescollection.md @@ -0,0 +1,8 @@ +# GetSearchAllLibrariesCollection + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Tag` | **string* | :heavy_minus_sign: | N/A | Working NL Subs | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariescountry.md b/docs/models/operations/getsearchalllibrariescountry.md new file mode 100644 index 0000000..47ea282 --- /dev/null +++ b/docs/models/operations/getsearchalllibrariescountry.md @@ -0,0 +1,8 @@ +# GetSearchAllLibrariesCountry + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `Tag` | **string* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesdirector.md b/docs/models/operations/getsearchalllibrariesdirector.md new file mode 100644 index 0000000..53b5fed --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesdirector.md @@ -0,0 +1,8 @@ +# GetSearchAllLibrariesDirector + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Tag` | **string* | :heavy_minus_sign: | N/A | James Cameron | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesflattenseasons.md b/docs/models/operations/getsearchalllibrariesflattenseasons.md new file mode 100644 index 0000000..13fab5c --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesflattenseasons.md @@ -0,0 +1,9 @@ +# GetSearchAllLibrariesFlattenSeasons + + +## Values + +| Name | Value | +| ------------------------------------------ | ------------------------------------------ | +| `GetSearchAllLibrariesFlattenSeasonsFalse` | 0 | +| `GetSearchAllLibrariesFlattenSeasonsTrue` | 1 | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesgenre.md b/docs/models/operations/getsearchalllibrariesgenre.md new file mode 100644 index 0000000..e7d2af2 --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesgenre.md @@ -0,0 +1,8 @@ +# GetSearchAllLibrariesGenre + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Tag` | **string* | :heavy_minus_sign: | N/A | Adventure | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesglobals.md b/docs/models/operations/getsearchalllibrariesglobals.md new file mode 100644 index 0000000..6f4d3c6 --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesglobals.md @@ -0,0 +1,8 @@ +# GetSearchAllLibrariesGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrarieshasthumbnail.md b/docs/models/operations/getsearchalllibrarieshasthumbnail.md new file mode 100644 index 0000000..8543936 --- /dev/null +++ b/docs/models/operations/getsearchalllibrarieshasthumbnail.md @@ -0,0 +1,9 @@ +# GetSearchAllLibrariesHasThumbnail + + +## Values + +| Name | Value | +| ---------------------------------------- | ---------------------------------------- | +| `GetSearchAllLibrariesHasThumbnailFalse` | 0 | +| `GetSearchAllLibrariesHasThumbnailTrue` | 1 | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesimage.md b/docs/models/operations/getsearchalllibrariesimage.md new file mode 100644 index 0000000..930a024 --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesimage.md @@ -0,0 +1,10 @@ +# GetSearchAllLibrariesImage + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `Alt` | *string* | :heavy_check_mark: | N/A | Episode 1 | +| `Type` | [operations.GetSearchAllLibrariesLibraryType](../../models/operations/getsearchalllibrarieslibrarytype.md) | :heavy_check_mark: | N/A | background | +| `URL` | *string* | :heavy_check_mark: | N/A | /library/metadata/45521/thumb/1644710589 | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrarieslibrarytype.md b/docs/models/operations/getsearchalllibrarieslibrarytype.md new file mode 100644 index 0000000..57def26 --- /dev/null +++ b/docs/models/operations/getsearchalllibrarieslibrarytype.md @@ -0,0 +1,11 @@ +# GetSearchAllLibrariesLibraryType + + +## Values + +| Name | Value | +| --------------------------------------------- | --------------------------------------------- | +| `GetSearchAllLibrariesLibraryTypeCoverPoster` | coverPoster | +| `GetSearchAllLibrariesLibraryTypeBackground` | background | +| `GetSearchAllLibrariesLibraryTypeSnapshot` | snapshot | +| `GetSearchAllLibrariesLibraryTypeClearLogo` | clearLogo | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrarieslocation.md b/docs/models/operations/getsearchalllibrarieslocation.md new file mode 100644 index 0000000..c2e989d --- /dev/null +++ b/docs/models/operations/getsearchalllibrarieslocation.md @@ -0,0 +1,8 @@ +# GetSearchAllLibrariesLocation + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Path` | **string* | :heavy_minus_sign: | N/A | /TV Shows/House | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesmedia.md b/docs/models/operations/getsearchalllibrariesmedia.md new file mode 100644 index 0000000..6f32fd4 --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesmedia.md @@ -0,0 +1,25 @@ +# GetSearchAllLibrariesMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `ID` | *int* | :heavy_check_mark: | N/A | 119534 | +| `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 | +| `Bitrate` | **int* | :heavy_minus_sign: | N/A | 25025 | +| `Width` | **int* | :heavy_minus_sign: | N/A | 3840 | +| `Height` | **int* | :heavy_minus_sign: | N/A | 2072 | +| `AspectRatio` | **float64* | :heavy_minus_sign: | N/A | 1.85 | +| `AudioProfile` | **string* | :heavy_minus_sign: | N/A | dts | +| `AudioChannels` | **int* | :heavy_minus_sign: | N/A | 6 | +| `AudioCodec` | **string* | :heavy_minus_sign: | N/A | eac3 | +| `VideoCodec` | **string* | :heavy_minus_sign: | N/A | hevc | +| `VideoResolution` | **string* | :heavy_minus_sign: | N/A | 4k | +| `Container` | *string* | :heavy_check_mark: | N/A | mkv | +| `VideoFrameRate` | **string* | :heavy_minus_sign: | N/A | 24p | +| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main 10 | +| `HasVoiceActivity` | **bool* | :heavy_minus_sign: | N/A | false | +| `OptimizedForStreaming` | [*operations.GetSearchAllLibrariesOptimizedForStreaming](../../models/operations/getsearchalllibrariesoptimizedforstreaming.md) | :heavy_minus_sign: | N/A | 1 | +| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false | +| `Part` | [][operations.GetSearchAllLibrariesPart](../../models/operations/getsearchalllibrariespart.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesmediacontainer.md b/docs/models/operations/getsearchalllibrariesmediacontainer.md new file mode 100644 index 0000000..dc540cc --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesmediacontainer.md @@ -0,0 +1,9 @@ +# GetSearchAllLibrariesMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `Size` | *float64* | :heavy_check_mark: | N/A | +| `SearchResult` | [][operations.SearchResult](../../models/operations/searchresult.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesmediaguid.md b/docs/models/operations/getsearchalllibrariesmediaguid.md new file mode 100644 index 0000000..73d9d92 --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesmediaguid.md @@ -0,0 +1,8 @@ +# GetSearchAllLibrariesMediaGUID + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `ID` | *string* | :heavy_check_mark: | Can be one of the following formats:
imdb://tt13015952, tmdb://2434012, tvdb://7945991
| imdb://tt13015952 | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesmetadata.md b/docs/models/operations/getsearchalllibrariesmetadata.md new file mode 100644 index 0000000..39227dc --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesmetadata.md @@ -0,0 +1,81 @@ +# GetSearchAllLibrariesMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `RatingKey` | *string* | :heavy_check_mark: | The rating key (Media ID) of this media item.
Note: This is always an integer, but is represented as a string in the API.
| 58683 | +| `Key` | *string* | :heavy_check_mark: | N/A | /library/metadata/58683 | +| `GUID` | *string* | :heavy_check_mark: | N/A | plex://movie/5d7768ba96b655001fdc0408 | +| `Studio` | **string* | :heavy_minus_sign: | N/A | 20th Century Studios | +| `SkipChildren` | **bool* | :heavy_minus_sign: | N/A | false | +| `LibrarySectionID` | **int64* | :heavy_minus_sign: | N/A | 1 | +| `LibrarySectionTitle` | **string* | :heavy_minus_sign: | N/A | Movies | +| `LibrarySectionKey` | **string* | :heavy_minus_sign: | N/A | /library/sections/1 | +| `Type` | [operations.GetSearchAllLibrariesType](../../models/operations/getsearchalllibrariestype.md) | :heavy_check_mark: | The type of media content
| movie | +| `Title` | *string* | :heavy_check_mark: | N/A | Avatar: The Way of Water | +| `Slug` | **string* | :heavy_minus_sign: | N/A | 4-for-texas | +| `ContentRating` | **string* | :heavy_minus_sign: | N/A | PG-13 | +| `Summary` | *string* | :heavy_check_mark: | N/A | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home. | +| `Rating` | **float64* | :heavy_minus_sign: | N/A | 7.6 | +| `AudienceRating` | **float64* | :heavy_minus_sign: | N/A | 9.2 | +| `Year` | **int* | :heavy_minus_sign: | N/A | 2022 | +| `SeasonCount` | **int* | :heavy_minus_sign: | N/A | 2022 | +| `Tagline` | **string* | :heavy_minus_sign: | N/A | Return to Pandora. | +| `FlattenSeasons` | [*operations.GetSearchAllLibrariesFlattenSeasons](../../models/operations/getsearchalllibrariesflattenseasons.md) | :heavy_minus_sign: | N/A | 1 | +| `ShowOrdering` | [*operations.GetSearchAllLibrariesShowOrdering](../../models/operations/getsearchalllibrariesshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show
None = Library default,
tmdbAiring = The Movie Database (Aired),
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
| dvd | +| `Thumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 | +| `Art` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 | +| `Banner` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 | +| `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 | +| `OriginallyAvailableAt` | [*types.Date](../../types/date.md) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC | +| `AddedAt` | *int64* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | +| `UpdatedAt` | **int64* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | +| `AudienceRatingImage` | **string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `ChapterSource` | **string* | :heavy_minus_sign: | N/A | media | +| `PrimaryExtraKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58684 | +| `RatingImage` | **string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `GrandparentRatingKey` | **string* | :heavy_minus_sign: | N/A | 66 | +| `GrandparentGUID` | **string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | +| `GrandparentKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66 | +| `GrandparentTitle` | **string* | :heavy_minus_sign: | N/A | Caprica | +| `GrandparentThumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | +| `ParentSlug` | **string* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 | +| `GrandparentSlug` | **string* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 | +| `GrandparentArt` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 | +| `GrandparentTheme` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | +| `Media` | [][operations.GetSearchAllLibrariesMedia](../../models/operations/getsearchalllibrariesmedia.md) | :heavy_minus_sign: | The Media object is only included when type query is `4` or higher.
| | +| `Genre` | [][operations.GetSearchAllLibrariesGenre](../../models/operations/getsearchalllibrariesgenre.md) | :heavy_minus_sign: | N/A | | +| `Country` | [][operations.GetSearchAllLibrariesCountry](../../models/operations/getsearchalllibrariescountry.md) | :heavy_minus_sign: | N/A | | +| `Director` | [][operations.GetSearchAllLibrariesDirector](../../models/operations/getsearchalllibrariesdirector.md) | :heavy_minus_sign: | N/A | | +| `Writer` | [][operations.GetSearchAllLibrariesWriter](../../models/operations/getsearchalllibrarieswriter.md) | :heavy_minus_sign: | N/A | | +| `Collection` | [][operations.GetSearchAllLibrariesCollection](../../models/operations/getsearchalllibrariescollection.md) | :heavy_minus_sign: | N/A | | +| `Role` | [][operations.GetSearchAllLibrariesRole](../../models/operations/getsearchalllibrariesrole.md) | :heavy_minus_sign: | N/A | | +| `Location` | [][operations.GetSearchAllLibrariesLocation](../../models/operations/getsearchalllibrarieslocation.md) | :heavy_minus_sign: | N/A | | +| `MediaGUID` | [][operations.GetSearchAllLibrariesMediaGUID](../../models/operations/getsearchalllibrariesmediaguid.md) | :heavy_minus_sign: | The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
| | +| `UltraBlurColors` | [*operations.GetSearchAllLibrariesUltraBlurColors](../../models/operations/getsearchalllibrariesultrablurcolors.md) | :heavy_minus_sign: | N/A | | +| `MetaDataRating` | [][operations.GetSearchAllLibrariesMetaDataRating](../../models/operations/getsearchalllibrariesmetadatarating.md) | :heavy_minus_sign: | N/A | | +| `Image` | [][operations.GetSearchAllLibrariesImage](../../models/operations/getsearchalllibrariesimage.md) | :heavy_minus_sign: | N/A | | +| `TitleSort` | **string* | :heavy_minus_sign: | N/A | Whale | +| `ViewCount` | **int* | :heavy_minus_sign: | N/A | 1 | +| `LastViewedAt` | **int* | :heavy_minus_sign: | N/A | 1682752242 | +| `OriginalTitle` | **string* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 | +| `ViewOffset` | **int* | :heavy_minus_sign: | N/A | 5222500 | +| `SkipCount` | **int* | :heavy_minus_sign: | N/A | 1 | +| `Index` | **int* | :heavy_minus_sign: | N/A | 1 | +| `Theme` | **string* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 | +| `LeafCount` | **int* | :heavy_minus_sign: | N/A | 14 | +| `ViewedLeafCount` | **int* | :heavy_minus_sign: | N/A | 0 | +| `ChildCount` | **int* | :heavy_minus_sign: | N/A | 1 | +| `HasPremiumExtras` | **string* | :heavy_minus_sign: | N/A | 1 | +| `HasPremiumPrimaryExtra` | **string* | :heavy_minus_sign: | N/A | 1 | +| `ParentRatingKey` | **string* | :heavy_minus_sign: | The rating key of the parent item.
| 66 | +| `ParentGUID` | **string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | +| `ParentStudio` | **string* | :heavy_minus_sign: | N/A | UCP | +| `ParentKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66 | +| `ParentTitle` | **string* | :heavy_minus_sign: | N/A | Caprica | +| `ParentIndex` | **int* | :heavy_minus_sign: | N/A | 1 | +| `ParentYear` | **int* | :heavy_minus_sign: | N/A | 2010 | +| `ParentThumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | +| `ParentTheme` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesmetadatarating.md b/docs/models/operations/getsearchalllibrariesmetadatarating.md new file mode 100644 index 0000000..a347baf --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesmetadatarating.md @@ -0,0 +1,10 @@ +# GetSearchAllLibrariesMetaDataRating + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `Image` | *string* | :heavy_check_mark: | A URI or path to the rating image. | themoviedb://image.rating | +| `Value` | *float32* | :heavy_check_mark: | The value of the rating. | 3 | +| `Type` | *string* | :heavy_check_mark: | The type of rating (e.g., audience, critic). | audience | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesoptimizedforstreaming.md b/docs/models/operations/getsearchalllibrariesoptimizedforstreaming.md new file mode 100644 index 0000000..0de48b6 --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesoptimizedforstreaming.md @@ -0,0 +1,9 @@ +# GetSearchAllLibrariesOptimizedForStreaming + + +## Values + +| Name | Value | +| --------------------------------------------------- | --------------------------------------------------- | +| `GetSearchAllLibrariesOptimizedForStreamingDisable` | 0 | +| `GetSearchAllLibrariesOptimizedForStreamingEnable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariespart.md b/docs/models/operations/getsearchalllibrariespart.md new file mode 100644 index 0000000..e61374e --- /dev/null +++ b/docs/models/operations/getsearchalllibrariespart.md @@ -0,0 +1,20 @@ +# GetSearchAllLibrariesPart + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ID` | *int* | :heavy_check_mark: | N/A | 119542 | +| `Key` | *string* | :heavy_check_mark: | N/A | /library/parts/119542/1680457526/file.mkv | +| `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 | +| `File` | *string* | :heavy_check_mark: | N/A | /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv | +| `Size` | *int64* | :heavy_check_mark: | N/A | 36158371307 | +| `Container` | *string* | :heavy_check_mark: | The container format of the media file.
| mkv | +| `AudioProfile` | **string* | :heavy_minus_sign: | N/A | dts | +| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false | +| `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | false | +| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main 10 | +| `Indexes` | **string* | :heavy_minus_sign: | N/A | sd | +| `HasThumbnail` | [*operations.GetSearchAllLibrariesHasThumbnail](../../models/operations/getsearchalllibrarieshasthumbnail.md) | :heavy_minus_sign: | N/A | 1 | +| `Stream` | [][operations.GetSearchAllLibrariesStream](../../models/operations/getsearchalllibrariesstream.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesrequest.md b/docs/models/operations/getsearchalllibrariesrequest.md new file mode 100644 index 0000000..3ece3c8 --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesrequest.md @@ -0,0 +1,13 @@ +# GetSearchAllLibrariesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `Query` | *string* | :heavy_check_mark: | The search query term. | | +| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | +| `Limit` | **int64* | :heavy_minus_sign: | Limit the number of results returned. | | +| `SearchTypes` | [][operations.SearchTypes](../../models/operations/searchtypes.md) | :heavy_minus_sign: | A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv.
| movies,music,otherVideos,people,tv | +| `IncludeCollections` | [*operations.QueryParamIncludeCollections](../../models/operations/queryparamincludecollections.md) | :heavy_minus_sign: | Whether to include collections in the search results. | 1 | +| `IncludeExternalMedia` | [*operations.QueryParamIncludeExternalMedia](../../models/operations/queryparamincludeexternalmedia.md) | :heavy_minus_sign: | Whether to include external media in the search results. | 1 | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesresponse.md b/docs/models/operations/getsearchalllibrariesresponse.md new file mode 100644 index 0000000..e33dfc5 --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesresponse.md @@ -0,0 +1,11 @@ +# GetSearchAllLibrariesResponse + + +## 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.GetSearchAllLibrariesResponseBody](../../models/operations/getsearchalllibrariesresponsebody.md) | :heavy_minus_sign: | The libraries available on the Server | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesresponsebody.md b/docs/models/operations/getsearchalllibrariesresponsebody.md new file mode 100644 index 0000000..53f1d14 --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesresponsebody.md @@ -0,0 +1,10 @@ +# GetSearchAllLibrariesResponseBody + +The libraries available on the Server + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `MediaContainer` | [operations.GetSearchAllLibrariesMediaContainer](../../models/operations/getsearchalllibrariesmediacontainer.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesrole.md b/docs/models/operations/getsearchalllibrariesrole.md new file mode 100644 index 0000000..40f61ae --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesrole.md @@ -0,0 +1,13 @@ +# GetSearchAllLibrariesRole + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `ID` | **int64* | :heavy_minus_sign: | The ID of the tag or actor. | 294129 | +| `Filter` | **string* | :heavy_minus_sign: | The filter used to find the actor or tag. | actor=294129 | +| `Thumb` | **string* | :heavy_minus_sign: | The thumbnail of the actor | https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg | +| `Tag` | **string* | :heavy_minus_sign: | The name of the tag or actor. | Mike Smith | +| `TagKey` | **string* | :heavy_minus_sign: | Unique identifier for the tag. | 668e7e7b22bcad9064350c91 | +| `Role` | **string* | :heavy_minus_sign: | The role of the actor or tag in the media. | Self | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesshowordering.md b/docs/models/operations/getsearchalllibrariesshowordering.md new file mode 100644 index 0000000..a415a98 --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesshowordering.md @@ -0,0 +1,20 @@ +# GetSearchAllLibrariesShowOrdering + +Setting that indicates the episode ordering for the show +None = Library default, +tmdbAiring = The Movie Database (Aired), +aired = TheTVDB (Aired), +dvd = TheTVDB (DVD), +absolute = TheTVDB (Absolute)). + + + +## Values + +| Name | Value | +| --------------------------------------------- | --------------------------------------------- | +| `GetSearchAllLibrariesShowOrderingNone` | None | +| `GetSearchAllLibrariesShowOrderingTmdbAiring` | tmdbAiring | +| `GetSearchAllLibrariesShowOrderingAired` | aired | +| `GetSearchAllLibrariesShowOrderingDvd` | dvd | +| `GetSearchAllLibrariesShowOrderingAbsolute` | absolute | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesstream.md b/docs/models/operations/getsearchalllibrariesstream.md new file mode 100644 index 0000000..dc407cb --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesstream.md @@ -0,0 +1,45 @@ +# GetSearchAllLibrariesStream + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `ID` | *int64* | :heavy_check_mark: | N/A | 272796 | +| `StreamType` | *int64* | :heavy_check_mark: | Type of stream (1 = video, 2 = audio, 3 = subtitle) | 1 | +| `Default` | **bool* | :heavy_minus_sign: | Indicates if this is the default stream | true | +| `Selected` | **bool* | :heavy_minus_sign: | Indicates if the stream is selected | true | +| `Codec` | *string* | :heavy_check_mark: | Codec used by the stream | h264 | +| `Index` | *int64* | :heavy_check_mark: | The index of the stream | 0 | +| `Bitrate` | **int64* | :heavy_minus_sign: | The bitrate of the stream in kbps | 6273 | +| `ColorPrimaries` | **string* | :heavy_minus_sign: | The color primaries of the video stream | bt709 | +| `ColorRange` | **string* | :heavy_minus_sign: | The color range of the video stream | tv | +| `ColorSpace` | **string* | :heavy_minus_sign: | The color space of the video stream | bt709 | +| `ColorTrc` | **string* | :heavy_minus_sign: | The transfer characteristics (TRC) of the video stream | bt709 | +| `BitDepth` | **int64* | :heavy_minus_sign: | The bit depth of the video stream | 8 | +| `ChromaLocation` | **string* | :heavy_minus_sign: | The chroma location of the video stream | left | +| `StreamIdentifier` | **string* | :heavy_minus_sign: | The identifier of the video stream | 2 | +| `ChromaSubsampling` | **string* | :heavy_minus_sign: | The chroma subsampling format | 4:2:0 | +| `CodedHeight` | **int64* | :heavy_minus_sign: | The coded height of the video stream | 1088 | +| `CodedWidth` | **int64* | :heavy_minus_sign: | The coded width of the video stream | 1920 | +| `FrameRate` | **float64* | :heavy_minus_sign: | The frame rate of the video stream | 29.97 | +| `HasScalingMatrix` | **bool* | :heavy_minus_sign: | Indicates if the stream has a scaling matrix | false | +| `HearingImpaired` | **bool* | :heavy_minus_sign: | N/A | false | +| `ClosedCaptions` | **bool* | :heavy_minus_sign: | N/A | false | +| `EmbeddedInVideo` | **string* | :heavy_minus_sign: | N/A | 1 | +| `Height` | **int64* | :heavy_minus_sign: | The height of the video stream | 1080 | +| `Level` | **int64* | :heavy_minus_sign: | The level of the video codec | 40 | +| `Profile` | **string* | :heavy_minus_sign: | The profile of the video codec | main | +| `RefFrames` | **int64* | :heavy_minus_sign: | Number of reference frames | 4 | +| `ScanType` | **string* | :heavy_minus_sign: | The scan type (progressive or interlaced) | progressive | +| `Width` | **int64* | :heavy_minus_sign: | The width of the video stream | 1920 | +| `DisplayTitle` | **string* | :heavy_minus_sign: | Display title of the stream | 1080p (H.264) | +| `ExtendedDisplayTitle` | **string* | :heavy_minus_sign: | Extended display title of the stream | 1080p (H.264) | +| `Channels` | **int64* | :heavy_minus_sign: | Number of audio channels (for audio streams) | 2 | +| `Language` | **string* | :heavy_minus_sign: | The language of the stream (for audio/subtitle streams) | English | +| `LanguageTag` | **string* | :heavy_minus_sign: | Language tag of the stream | en | +| `LanguageCode` | **string* | :heavy_minus_sign: | Language code of the stream | eng | +| `AudioChannelLayout` | **string* | :heavy_minus_sign: | The audio channel layout | stereo | +| `SamplingRate` | **int64* | :heavy_minus_sign: | Sampling rate of the audio stream in Hz | 48000 | +| `Title` | **string* | :heavy_minus_sign: | Title of the subtitle track (for subtitle streams) | English | +| `CanAutoSync` | **bool* | :heavy_minus_sign: | Indicates if the subtitle stream can auto-sync | false | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariestype.md b/docs/models/operations/getsearchalllibrariestype.md new file mode 100644 index 0000000..75af348 --- /dev/null +++ b/docs/models/operations/getsearchalllibrariestype.md @@ -0,0 +1,14 @@ +# GetSearchAllLibrariesType + +The type of media content + + + +## Values + +| Name | Value | +| ---------------------------------- | ---------------------------------- | +| `GetSearchAllLibrariesTypeMovie` | movie | +| `GetSearchAllLibrariesTypeTvShow` | show | +| `GetSearchAllLibrariesTypeSeason` | season | +| `GetSearchAllLibrariesTypeEpisode` | episode | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesultrablurcolors.md b/docs/models/operations/getsearchalllibrariesultrablurcolors.md new file mode 100644 index 0000000..7b4e5d1 --- /dev/null +++ b/docs/models/operations/getsearchalllibrariesultrablurcolors.md @@ -0,0 +1,11 @@ +# GetSearchAllLibrariesUltraBlurColors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `TopLeft` | *string* | :heavy_check_mark: | N/A | 11333b | +| `TopRight` | *string* | :heavy_check_mark: | N/A | 0a232d | +| `BottomRight` | *string* | :heavy_check_mark: | N/A | 73958 | +| `BottomLeft` | *string* | :heavy_check_mark: | N/A | 1f5066 | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrarieswriter.md b/docs/models/operations/getsearchalllibrarieswriter.md new file mode 100644 index 0000000..93b629f --- /dev/null +++ b/docs/models/operations/getsearchalllibrarieswriter.md @@ -0,0 +1,8 @@ +# GetSearchAllLibrariesWriter + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Tag` | **string* | :heavy_minus_sign: | N/A | James Cameron | \ No newline at end of file diff --git a/docs/models/operations/getserverresourcesglobals.md b/docs/models/operations/getserverresourcesglobals.md index 8059ad2..07c1390 100644 --- a/docs/models/operations/getserverresourcesglobals.md +++ b/docs/models/operations/getserverresourcesglobals.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ClientID` | **string* | :heavy_minus_sign: | 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) | gcgzw5rz2xovp84b4vha3a40 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | \ No newline at end of file diff --git a/docs/models/operations/getserverresourcesrequest.md b/docs/models/operations/getserverresourcesrequest.md index 4156078..019194f 100644 --- a/docs/models/operations/getserverresourcesrequest.md +++ b/docs/models/operations/getserverresourcesrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `IncludeHTTPS` | [*operations.IncludeHTTPS](../../models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | -| `IncludeRelay` | [*operations.IncludeRelay](../../models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | -| `IncludeIPv6` | [*operations.IncludeIPv6](../../models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | -| `ClientID` | **string* | :heavy_minus_sign: | 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) | gcgzw5rz2xovp84b4vha3a40 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `IncludeHTTPS` | [*operations.IncludeHTTPS](../../models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | +| `IncludeRelay` | [*operations.IncludeRelay](../../models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | +| `IncludeIPv6` | [*operations.IncludeIPv6](../../models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | +| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | \ No newline at end of file diff --git a/docs/models/operations/getthumbimagerequest.md b/docs/models/operations/getthumbimagerequest.md index 1952462..4500cfe 100644 --- a/docs/models/operations/getthumbimagerequest.md +++ b/docs/models/operations/getthumbimagerequest.md @@ -10,4 +10,4 @@ | `Height` | *int64* | :heavy_check_mark: | N/A | 396 | | `MinSize` | *int64* | :heavy_check_mark: | N/A | 1 | | `Upscale` | *int64* | :heavy_check_mark: | N/A | 1 | -| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file +| `XPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/gettokenbypinidglobals.md b/docs/models/operations/gettokenbypinidglobals.md index cfe6698..5c51221 100644 --- a/docs/models/operations/gettokenbypinidglobals.md +++ b/docs/models/operations/gettokenbypinidglobals.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ClientID` | **string* | :heavy_minus_sign: | 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) | gcgzw5rz2xovp84b4vha3a40 | -| `ClientName` | **string* | :heavy_minus_sign: | N/A | Plex Web | -| `DeviceName` | **string* | :heavy_minus_sign: | N/A | Linux | -| `ClientVersion` | **string* | :heavy_minus_sign: | N/A | 4.133.0 | -| `ClientPlatform` | **string* | :heavy_minus_sign: | N/A | Chrome | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | +| `ClientName` | **string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | +| `DeviceNickname` | **string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `ClientVersion` | **string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | +| `Platform` | **string* | :heavy_minus_sign: | The platform of the client application. | Roku | \ No newline at end of file diff --git a/docs/models/operations/gettokenbypinidrequest.md b/docs/models/operations/gettokenbypinidrequest.md index e4353c3..be6ad8d 100644 --- a/docs/models/operations/gettokenbypinidrequest.md +++ b/docs/models/operations/gettokenbypinidrequest.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `PinID` | *int64* | :heavy_check_mark: | The PinID to retrieve an access token for | | -| `ClientID` | **string* | :heavy_minus_sign: | 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) | gcgzw5rz2xovp84b4vha3a40 | -| `ClientName` | **string* | :heavy_minus_sign: | N/A | Plex Web | -| `DeviceName` | **string* | :heavy_minus_sign: | N/A | Linux | -| `ClientVersion` | **string* | :heavy_minus_sign: | N/A | 4.133.0 | -| `ClientPlatform` | **string* | :heavy_minus_sign: | N/A | Chrome | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `PinID` | *int64* | :heavy_check_mark: | The PinID to retrieve an access token for | | +| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | +| `ClientName` | **string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | +| `DeviceNickname` | **string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `ClientVersion` | **string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | +| `Platform` | **string* | :heavy_minus_sign: | The platform of the client application. | Roku | \ No newline at end of file diff --git a/docs/models/operations/gettokendetailsfeatures.md b/docs/models/operations/gettokendetailsfeatures.md deleted file mode 100644 index 21f5c58..0000000 --- a/docs/models/operations/gettokendetailsfeatures.md +++ /dev/null @@ -1,102 +0,0 @@ -# GetTokenDetailsFeatures - - -## Values - -| Name | Value | -| ------------------------------------------------------------ | ------------------------------------------------------------ | -| `GetTokenDetailsFeaturesAndroidDolbyVision` | Android - Dolby Vision | -| `GetTokenDetailsFeaturesAndroidPiP` | Android - PiP | -| `GetTokenDetailsFeaturesCuSunset` | CU Sunset | -| `GetTokenDetailsFeaturesHrkEnableEur` | HRK_enable_EUR | -| `GetTokenDetailsFeaturesTrebleShowFeatures` | TREBLE-show-features | -| `GetTokenDetailsFeaturesAdCountdownTimer` | ad-countdown-timer | -| `GetTokenDetailsFeaturesAdaptiveBitrate` | adaptive_bitrate | -| `GetTokenDetailsFeaturesAlbumTypes` | album-types | -| `GetTokenDetailsFeaturesAllowDvr` | allow_dvr | -| `GetTokenDetailsFeaturesAmazonLoopDebug` | amazon-loop-debug | -| `GetTokenDetailsFeaturesAvodAdAnalysis` | avod-ad-analysis | -| `GetTokenDetailsFeaturesAvodNewMedia` | avod-new-media | -| `GetTokenDetailsFeaturesBlacklistGetSignin` | blacklist_get_signin | -| `GetTokenDetailsFeaturesBoostVoices` | boost-voices | -| `GetTokenDetailsFeaturesCameraUpload` | camera_upload | -| `GetTokenDetailsFeaturesClientRadioStations` | client-radio-stations | -| `GetTokenDetailsFeaturesCloudflareTurnstileRequired` | cloudflare-turnstile-required | -| `GetTokenDetailsFeaturesCloudsync` | cloudsync | -| `GetTokenDetailsFeaturesCollections` | collections | -| `GetTokenDetailsFeaturesCommentsAndRepliesPushNotifications` | comments_and_replies_push_notifications | -| `GetTokenDetailsFeaturesCommunityAccessPlexTv` | community_access_plex_tv | -| `GetTokenDetailsFeaturesCompanionsSonos` | companions_sonos | -| `GetTokenDetailsFeaturesContentFilter` | content_filter | -| `GetTokenDetailsFeaturesCustomHomeRemoval` | custom-home-removal | -| `GetTokenDetailsFeaturesDisableHomeUserFriendships` | disable_home_user_friendships | -| `GetTokenDetailsFeaturesDisableSharingFriendships` | disable_sharing_friendships | -| `GetTokenDetailsFeaturesDownloadsGating` | downloads-gating | -| `GetTokenDetailsFeaturesDrmSupport` | drm_support | -| `GetTokenDetailsFeaturesDvr` | dvr | -| `GetTokenDetailsFeaturesDvrBlockUnsupportedCountries` | dvr-block-unsupported-countries | -| `GetTokenDetailsFeaturesEpgRecentChannels` | epg-recent-channels | -| `GetTokenDetailsFeaturesExcludeRestrictions` | exclude restrictions | -| `GetTokenDetailsFeaturesFederatedAuth` | federated-auth | -| `GetTokenDetailsFeaturesFriendRequestPushNotifications` | friend_request_push_notifications | -| `GetTokenDetailsFeaturesGrandfatherSync` | grandfather-sync | -| `GetTokenDetailsFeaturesGuidedUpgrade` | guided-upgrade | -| `GetTokenDetailsFeaturesHardwareTranscoding` | hardware_transcoding | -| `GetTokenDetailsFeaturesHome` | home | -| `GetTokenDetailsFeaturesHwtranscode` | hwtranscode | -| `GetTokenDetailsFeaturesImaggaV2` | imagga-v2 | -| `GetTokenDetailsFeaturesIncreasePasswordComplexity` | increase-password-complexity | -| `GetTokenDetailsFeaturesIos14PrivacyBanner` | ios14-privacy-banner | -| `GetTokenDetailsFeaturesIterableNotificationTokens` | iterable-notification-tokens | -| `GetTokenDetailsFeaturesItemClusters` | item_clusters | -| `GetTokenDetailsFeaturesKeepPaymentMethod` | keep-payment-method | -| `GetTokenDetailsFeaturesKevinBacon` | kevin-bacon | -| `GetTokenDetailsFeaturesKoreaConsent` | korea-consent | -| `GetTokenDetailsFeaturesLeIsrgRootX1` | le_isrg_root_x1 | -| `GetTokenDetailsFeaturesLetsEncrypt` | lets_encrypt | -| `GetTokenDetailsFeaturesLightningDvrPivot` | lightning-dvr-pivot | -| `GetTokenDetailsFeaturesLiveTvSupportIncompleteSegments` | live-tv-support-incomplete-segments | -| `GetTokenDetailsFeaturesLivetv` | livetv | -| `GetTokenDetailsFeaturesLyrics` | lyrics | -| `GetTokenDetailsFeaturesMetadataSearch` | metadata_search | -| `GetTokenDetailsFeaturesMusicAnalysis` | music-analysis | -| `GetTokenDetailsFeaturesMusicVideos` | music_videos | -| `GetTokenDetailsFeaturesNewPlexPassPrices` | new_plex_pass_prices | -| `GetTokenDetailsFeaturesNewsProviderSunsetModal` | news-provider-sunset-modal | -| `GetTokenDetailsFeaturesNominatim` | nominatim | -| `GetTokenDetailsFeaturesPass` | pass | -| `GetTokenDetailsFeaturesPhotosFavorites` | photos-favorites | -| `GetTokenDetailsFeaturesPhotosMetadataEdition` | photos-metadata-edition | -| `GetTokenDetailsFeaturesPhotosV6Edit` | photosV6-edit | -| `GetTokenDetailsFeaturesPhotosV6TvAlbums` | photosV6-tv-albums | -| `GetTokenDetailsFeaturesPmsHealth` | pms_health | -| `GetTokenDetailsFeaturesPremiumDashboard` | premium-dashboard | -| `GetTokenDetailsFeaturesPremiumMusicMetadata` | premium_music_metadata | -| `GetTokenDetailsFeaturesRadio` | radio | -| `GetTokenDetailsFeaturesRateLimitClientToken` | rate-limit-client-token | -| `GetTokenDetailsFeaturesScrobblingServicePlexTv` | scrobbling-service-plex-tv | -| `GetTokenDetailsFeaturesSessionBandwidthRestrictions` | session_bandwidth_restrictions | -| `GetTokenDetailsFeaturesSessionKick` | session_kick | -| `GetTokenDetailsFeaturesSharedServerNotification` | shared_server_notification | -| `GetTokenDetailsFeaturesSharedSourceNotification` | shared_source_notification | -| `GetTokenDetailsFeaturesSigninNotification` | signin_notification | -| `GetTokenDetailsFeaturesSigninWithApple` | signin_with_apple | -| `GetTokenDetailsFeaturesSilenceRemoval` | silence-removal | -| `GetTokenDetailsFeaturesSleepTimer` | sleep-timer | -| `GetTokenDetailsFeaturesSpringServeAdProvider` | spring_serve_ad_provider | -| `GetTokenDetailsFeaturesSync` | sync | -| `GetTokenDetailsFeaturesSweetFades` | sweet-fades | -| `GetTokenDetailsFeaturesTranscoderCache` | transcoder_cache | -| `GetTokenDetailsFeaturesTrailers` | trailers | -| `GetTokenDetailsFeaturesTunerSharing` | tuner-sharing | -| `GetTokenDetailsFeaturesTwoFactorAuthentication` | two-factor-authentication | -| `GetTokenDetailsFeaturesUnsupportedtuners` | unsupportedtuners | -| `GetTokenDetailsFeaturesUpgrade3ds2` | upgrade-3ds2 | -| `GetTokenDetailsFeaturesVisualizers` | visualizers | -| `GetTokenDetailsFeaturesVodSchema` | vod-schema | -| `GetTokenDetailsFeaturesVodCloudflare` | vod_cloudflare | -| `GetTokenDetailsFeaturesVolumeLeveling` | volume-leveling | -| `GetTokenDetailsFeaturesWatchTogetherInvite` | watch-together-invite | -| `GetTokenDetailsFeaturesWatchlistRss` | watchlist-rss | -| `GetTokenDetailsFeaturesWebServerDashboard` | web_server_dashboard | -| `GetTokenDetailsFeaturesWebhooks` | webhooks | \ No newline at end of file diff --git a/docs/models/operations/gettokendetailssubscription.md b/docs/models/operations/gettokendetailssubscription.md index 03b631d..99f579c 100644 --- a/docs/models/operations/gettokendetailssubscription.md +++ b/docs/models/operations/gettokendetailssubscription.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| `Features` | [][operations.GetTokenDetailsFeatures](../../models/operations/gettokendetailsfeatures.md) | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | +| `Features` | []*string* | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | | `Active` | **bool* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | | `SubscribedAt` | **string* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | | `Status` | [*operations.GetTokenDetailsAuthenticationResponseStatus](../../models/operations/gettokendetailsauthenticationresponsestatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | diff --git a/docs/models/operations/gettopwatchedcontentrequest.md b/docs/models/operations/gettopwatchedcontentrequest.md index 3bd0c2b..bee174e 100644 --- a/docs/models/operations/gettopwatchedcontentrequest.md +++ b/docs/models/operations/gettopwatchedcontentrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Type` | [operations.GetTopWatchedContentQueryParamType](../../models/operations/gettopwatchedcontentqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | -| `IncludeGuids` | **int64* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | \ No newline at end of file +| `IncludeGuids` | **int64* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | +| `Type` | [operations.GetTopWatchedContentQueryParamType](../../models/operations/gettopwatchedcontentqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | \ No newline at end of file diff --git a/docs/models/operations/getwatchlistrequest.md b/docs/models/operations/getwatchlistrequest.md index 237870f..6ea21db 100644 --- a/docs/models/operations/getwatchlistrequest.md +++ b/docs/models/operations/getwatchlistrequest.md @@ -13,4 +13,4 @@ | `IncludeExternalMedia` | [*operations.IncludeExternalMedia](../../models/operations/includeexternalmedia.md) | :heavy_minus_sign: | include external media in the results
| | | `XPlexContainerStart` | **int* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | | `XPlexContainerSize` | **int* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | -| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file +| `XPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/models/operations/location.md b/docs/models/operations/location.md index 2f8684d..f3f73b1 100644 --- a/docs/models/operations/location.md +++ b/docs/models/operations/location.md @@ -5,5 +5,4 @@ | Field | Type | Required | Description | Example | | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `ID` | *int* | :heavy_check_mark: | N/A | 1 | -| `Path` | *string* | :heavy_check_mark: | N/A | /movies | \ No newline at end of file +| `Path` | **string* | :heavy_minus_sign: | N/A | /TV Shows/House | \ No newline at end of file diff --git a/docs/models/operations/media.md b/docs/models/operations/media.md index f6ad6cf..19ad131 100644 --- a/docs/models/operations/media.md +++ b/docs/models/operations/media.md @@ -6,19 +6,19 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `ID` | *int* | :heavy_check_mark: | N/A | 119534 | -| `Duration` | *int* | :heavy_check_mark: | N/A | 11558112 | -| `Bitrate` | *int* | :heavy_check_mark: | N/A | 25025 | -| `Width` | *int* | :heavy_check_mark: | N/A | 3840 | -| `Height` | *int* | :heavy_check_mark: | N/A | 2072 | -| `AspectRatio` | *float64* | :heavy_check_mark: | N/A | 1.85 | +| `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 | +| `Bitrate` | **int* | :heavy_minus_sign: | N/A | 25025 | +| `Width` | **int* | :heavy_minus_sign: | N/A | 3840 | +| `Height` | **int* | :heavy_minus_sign: | N/A | 2072 | +| `AspectRatio` | **float64* | :heavy_minus_sign: | N/A | 1.85 | | `AudioProfile` | **string* | :heavy_minus_sign: | N/A | dts | -| `AudioChannels` | *int* | :heavy_check_mark: | N/A | 6 | -| `AudioCodec` | *string* | :heavy_check_mark: | N/A | eac3 | -| `VideoCodec` | *string* | :heavy_check_mark: | N/A | hevc | -| `VideoResolution` | *string* | :heavy_check_mark: | N/A | 4k | +| `AudioChannels` | **int* | :heavy_minus_sign: | N/A | 6 | +| `AudioCodec` | **string* | :heavy_minus_sign: | N/A | eac3 | +| `VideoCodec` | **string* | :heavy_minus_sign: | N/A | hevc | +| `VideoResolution` | **string* | :heavy_minus_sign: | N/A | 4k | | `Container` | *string* | :heavy_check_mark: | N/A | mkv | -| `VideoFrameRate` | *string* | :heavy_check_mark: | N/A | 24p | -| `VideoProfile` | *string* | :heavy_check_mark: | N/A | main 10 | +| `VideoFrameRate` | **string* | :heavy_minus_sign: | N/A | 24p | +| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main 10 | | `HasVoiceActivity` | **bool* | :heavy_minus_sign: | N/A | false | | `OptimizedForStreaming` | [*operations.OptimizedForStreaming](../../models/operations/optimizedforstreaming.md) | :heavy_minus_sign: | N/A | 1 | | `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false | diff --git a/docs/models/operations/part.md b/docs/models/operations/part.md index dee08ea..ef3c4be 100644 --- a/docs/models/operations/part.md +++ b/docs/models/operations/part.md @@ -7,14 +7,14 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ID` | *int* | :heavy_check_mark: | N/A | 119542 | | `Key` | *string* | :heavy_check_mark: | N/A | /library/parts/119542/1680457526/file.mkv | -| `Duration` | *int* | :heavy_check_mark: | N/A | 11558112 | +| `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 | | `File` | *string* | :heavy_check_mark: | N/A | /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv | | `Size` | *int64* | :heavy_check_mark: | N/A | 36158371307 | | `Container` | *string* | :heavy_check_mark: | The container format of the media file.
| mkv | | `AudioProfile` | **string* | :heavy_minus_sign: | N/A | dts | | `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false | | `OptimizedForStreaming` | **bool* | :heavy_minus_sign: | N/A | false | -| `VideoProfile` | *string* | :heavy_check_mark: | N/A | main 10 | +| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main 10 | | `Indexes` | **string* | :heavy_minus_sign: | N/A | sd | | `HasThumbnail` | [*operations.HasThumbnail](../../models/operations/hasthumbnail.md) | :heavy_minus_sign: | N/A | 1 | | `Stream` | [][operations.Stream](../../models/operations/stream.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindataauthenticationfeatures.md b/docs/models/operations/postuserssignindataauthenticationfeatures.md deleted file mode 100644 index 9c543d7..0000000 --- a/docs/models/operations/postuserssignindataauthenticationfeatures.md +++ /dev/null @@ -1,102 +0,0 @@ -# PostUsersSignInDataAuthenticationFeatures - - -## Values - -| Name | Value | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `PostUsersSignInDataAuthenticationFeaturesAndroidDolbyVision` | Android - Dolby Vision | -| `PostUsersSignInDataAuthenticationFeaturesAndroidPiP` | Android - PiP | -| `PostUsersSignInDataAuthenticationFeaturesCuSunset` | CU Sunset | -| `PostUsersSignInDataAuthenticationFeaturesHrkEnableEur` | HRK_enable_EUR | -| `PostUsersSignInDataAuthenticationFeaturesTrebleShowFeatures` | TREBLE-show-features | -| `PostUsersSignInDataAuthenticationFeaturesAdCountdownTimer` | ad-countdown-timer | -| `PostUsersSignInDataAuthenticationFeaturesAdaptiveBitrate` | adaptive_bitrate | -| `PostUsersSignInDataAuthenticationFeaturesAlbumTypes` | album-types | -| `PostUsersSignInDataAuthenticationFeaturesAllowDvr` | allow_dvr | -| `PostUsersSignInDataAuthenticationFeaturesAmazonLoopDebug` | amazon-loop-debug | -| `PostUsersSignInDataAuthenticationFeaturesAvodAdAnalysis` | avod-ad-analysis | -| `PostUsersSignInDataAuthenticationFeaturesAvodNewMedia` | avod-new-media | -| `PostUsersSignInDataAuthenticationFeaturesBlacklistGetSignin` | blacklist_get_signin | -| `PostUsersSignInDataAuthenticationFeaturesBoostVoices` | boost-voices | -| `PostUsersSignInDataAuthenticationFeaturesCameraUpload` | camera_upload | -| `PostUsersSignInDataAuthenticationFeaturesClientRadioStations` | client-radio-stations | -| `PostUsersSignInDataAuthenticationFeaturesCloudflareTurnstileRequired` | cloudflare-turnstile-required | -| `PostUsersSignInDataAuthenticationFeaturesCloudsync` | cloudsync | -| `PostUsersSignInDataAuthenticationFeaturesCollections` | collections | -| `PostUsersSignInDataAuthenticationFeaturesCommentsAndRepliesPushNotifications` | comments_and_replies_push_notifications | -| `PostUsersSignInDataAuthenticationFeaturesCommunityAccessPlexTv` | community_access_plex_tv | -| `PostUsersSignInDataAuthenticationFeaturesCompanionsSonos` | companions_sonos | -| `PostUsersSignInDataAuthenticationFeaturesContentFilter` | content_filter | -| `PostUsersSignInDataAuthenticationFeaturesCustomHomeRemoval` | custom-home-removal | -| `PostUsersSignInDataAuthenticationFeaturesDisableHomeUserFriendships` | disable_home_user_friendships | -| `PostUsersSignInDataAuthenticationFeaturesDisableSharingFriendships` | disable_sharing_friendships | -| `PostUsersSignInDataAuthenticationFeaturesDownloadsGating` | downloads-gating | -| `PostUsersSignInDataAuthenticationFeaturesDrmSupport` | drm_support | -| `PostUsersSignInDataAuthenticationFeaturesDvr` | dvr | -| `PostUsersSignInDataAuthenticationFeaturesDvrBlockUnsupportedCountries` | dvr-block-unsupported-countries | -| `PostUsersSignInDataAuthenticationFeaturesEpgRecentChannels` | epg-recent-channels | -| `PostUsersSignInDataAuthenticationFeaturesExcludeRestrictions` | exclude restrictions | -| `PostUsersSignInDataAuthenticationFeaturesFederatedAuth` | federated-auth | -| `PostUsersSignInDataAuthenticationFeaturesFriendRequestPushNotifications` | friend_request_push_notifications | -| `PostUsersSignInDataAuthenticationFeaturesGrandfatherSync` | grandfather-sync | -| `PostUsersSignInDataAuthenticationFeaturesGuidedUpgrade` | guided-upgrade | -| `PostUsersSignInDataAuthenticationFeaturesHardwareTranscoding` | hardware_transcoding | -| `PostUsersSignInDataAuthenticationFeaturesHome` | home | -| `PostUsersSignInDataAuthenticationFeaturesHwtranscode` | hwtranscode | -| `PostUsersSignInDataAuthenticationFeaturesImaggaV2` | imagga-v2 | -| `PostUsersSignInDataAuthenticationFeaturesIncreasePasswordComplexity` | increase-password-complexity | -| `PostUsersSignInDataAuthenticationFeaturesIos14PrivacyBanner` | ios14-privacy-banner | -| `PostUsersSignInDataAuthenticationFeaturesIterableNotificationTokens` | iterable-notification-tokens | -| `PostUsersSignInDataAuthenticationFeaturesItemClusters` | item_clusters | -| `PostUsersSignInDataAuthenticationFeaturesKeepPaymentMethod` | keep-payment-method | -| `PostUsersSignInDataAuthenticationFeaturesKevinBacon` | kevin-bacon | -| `PostUsersSignInDataAuthenticationFeaturesKoreaConsent` | korea-consent | -| `PostUsersSignInDataAuthenticationFeaturesLeIsrgRootX1` | le_isrg_root_x1 | -| `PostUsersSignInDataAuthenticationFeaturesLetsEncrypt` | lets_encrypt | -| `PostUsersSignInDataAuthenticationFeaturesLightningDvrPivot` | lightning-dvr-pivot | -| `PostUsersSignInDataAuthenticationFeaturesLiveTvSupportIncompleteSegments` | live-tv-support-incomplete-segments | -| `PostUsersSignInDataAuthenticationFeaturesLivetv` | livetv | -| `PostUsersSignInDataAuthenticationFeaturesLyrics` | lyrics | -| `PostUsersSignInDataAuthenticationFeaturesMetadataSearch` | metadata_search | -| `PostUsersSignInDataAuthenticationFeaturesMusicAnalysis` | music-analysis | -| `PostUsersSignInDataAuthenticationFeaturesMusicVideos` | music_videos | -| `PostUsersSignInDataAuthenticationFeaturesNewPlexPassPrices` | new_plex_pass_prices | -| `PostUsersSignInDataAuthenticationFeaturesNewsProviderSunsetModal` | news-provider-sunset-modal | -| `PostUsersSignInDataAuthenticationFeaturesNominatim` | nominatim | -| `PostUsersSignInDataAuthenticationFeaturesPass` | pass | -| `PostUsersSignInDataAuthenticationFeaturesPhotosFavorites` | photos-favorites | -| `PostUsersSignInDataAuthenticationFeaturesPhotosMetadataEdition` | photos-metadata-edition | -| `PostUsersSignInDataAuthenticationFeaturesPhotosV6Edit` | photosV6-edit | -| `PostUsersSignInDataAuthenticationFeaturesPhotosV6TvAlbums` | photosV6-tv-albums | -| `PostUsersSignInDataAuthenticationFeaturesPmsHealth` | pms_health | -| `PostUsersSignInDataAuthenticationFeaturesPremiumDashboard` | premium-dashboard | -| `PostUsersSignInDataAuthenticationFeaturesPremiumMusicMetadata` | premium_music_metadata | -| `PostUsersSignInDataAuthenticationFeaturesRadio` | radio | -| `PostUsersSignInDataAuthenticationFeaturesRateLimitClientToken` | rate-limit-client-token | -| `PostUsersSignInDataAuthenticationFeaturesScrobblingServicePlexTv` | scrobbling-service-plex-tv | -| `PostUsersSignInDataAuthenticationFeaturesSessionBandwidthRestrictions` | session_bandwidth_restrictions | -| `PostUsersSignInDataAuthenticationFeaturesSessionKick` | session_kick | -| `PostUsersSignInDataAuthenticationFeaturesSharedServerNotification` | shared_server_notification | -| `PostUsersSignInDataAuthenticationFeaturesSharedSourceNotification` | shared_source_notification | -| `PostUsersSignInDataAuthenticationFeaturesSigninNotification` | signin_notification | -| `PostUsersSignInDataAuthenticationFeaturesSigninWithApple` | signin_with_apple | -| `PostUsersSignInDataAuthenticationFeaturesSilenceRemoval` | silence-removal | -| `PostUsersSignInDataAuthenticationFeaturesSleepTimer` | sleep-timer | -| `PostUsersSignInDataAuthenticationFeaturesSpringServeAdProvider` | spring_serve_ad_provider | -| `PostUsersSignInDataAuthenticationFeaturesSync` | sync | -| `PostUsersSignInDataAuthenticationFeaturesSweetFades` | sweet-fades | -| `PostUsersSignInDataAuthenticationFeaturesTranscoderCache` | transcoder_cache | -| `PostUsersSignInDataAuthenticationFeaturesTrailers` | trailers | -| `PostUsersSignInDataAuthenticationFeaturesTunerSharing` | tuner-sharing | -| `PostUsersSignInDataAuthenticationFeaturesTwoFactorAuthentication` | two-factor-authentication | -| `PostUsersSignInDataAuthenticationFeaturesUnsupportedtuners` | unsupportedtuners | -| `PostUsersSignInDataAuthenticationFeaturesUpgrade3ds2` | upgrade-3ds2 | -| `PostUsersSignInDataAuthenticationFeaturesVisualizers` | visualizers | -| `PostUsersSignInDataAuthenticationFeaturesVodSchema` | vod-schema | -| `PostUsersSignInDataAuthenticationFeaturesVodCloudflare` | vod_cloudflare | -| `PostUsersSignInDataAuthenticationFeaturesVolumeLeveling` | volume-leveling | -| `PostUsersSignInDataAuthenticationFeaturesWatchTogetherInvite` | watch-together-invite | -| `PostUsersSignInDataAuthenticationFeaturesWatchlistRss` | watchlist-rss | -| `PostUsersSignInDataAuthenticationFeaturesWebServerDashboard` | web_server_dashboard | -| `PostUsersSignInDataAuthenticationFeaturesWebhooks` | webhooks | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindataauthenticationsubscription.md b/docs/models/operations/postuserssignindataauthenticationsubscription.md index d94289a..8637d1c 100644 --- a/docs/models/operations/postuserssignindataauthenticationsubscription.md +++ b/docs/models/operations/postuserssignindataauthenticationsubscription.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `Features` | [][operations.PostUsersSignInDataAuthenticationFeatures](../../models/operations/postuserssignindataauthenticationfeatures.md) | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | +| `Features` | []*string* | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | | `Active` | **bool* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | | `SubscribedAt` | **string* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | | `Status` | [*operations.PostUsersSignInDataAuthenticationResponseStatus](../../models/operations/postuserssignindataauthenticationresponsestatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | diff --git a/docs/models/operations/postuserssignindatafeatures.md b/docs/models/operations/postuserssignindatafeatures.md deleted file mode 100644 index 7c5b11c..0000000 --- a/docs/models/operations/postuserssignindatafeatures.md +++ /dev/null @@ -1,102 +0,0 @@ -# PostUsersSignInDataFeatures - - -## Values - -| Name | Value | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `PostUsersSignInDataFeaturesAndroidDolbyVision` | Android - Dolby Vision | -| `PostUsersSignInDataFeaturesAndroidPiP` | Android - PiP | -| `PostUsersSignInDataFeaturesCuSunset` | CU Sunset | -| `PostUsersSignInDataFeaturesHrkEnableEur` | HRK_enable_EUR | -| `PostUsersSignInDataFeaturesTrebleShowFeatures` | TREBLE-show-features | -| `PostUsersSignInDataFeaturesAdCountdownTimer` | ad-countdown-timer | -| `PostUsersSignInDataFeaturesAdaptiveBitrate` | adaptive_bitrate | -| `PostUsersSignInDataFeaturesAlbumTypes` | album-types | -| `PostUsersSignInDataFeaturesAllowDvr` | allow_dvr | -| `PostUsersSignInDataFeaturesAmazonLoopDebug` | amazon-loop-debug | -| `PostUsersSignInDataFeaturesAvodAdAnalysis` | avod-ad-analysis | -| `PostUsersSignInDataFeaturesAvodNewMedia` | avod-new-media | -| `PostUsersSignInDataFeaturesBlacklistGetSignin` | blacklist_get_signin | -| `PostUsersSignInDataFeaturesBoostVoices` | boost-voices | -| `PostUsersSignInDataFeaturesCameraUpload` | camera_upload | -| `PostUsersSignInDataFeaturesClientRadioStations` | client-radio-stations | -| `PostUsersSignInDataFeaturesCloudflareTurnstileRequired` | cloudflare-turnstile-required | -| `PostUsersSignInDataFeaturesCloudsync` | cloudsync | -| `PostUsersSignInDataFeaturesCollections` | collections | -| `PostUsersSignInDataFeaturesCommentsAndRepliesPushNotifications` | comments_and_replies_push_notifications | -| `PostUsersSignInDataFeaturesCommunityAccessPlexTv` | community_access_plex_tv | -| `PostUsersSignInDataFeaturesCompanionsSonos` | companions_sonos | -| `PostUsersSignInDataFeaturesContentFilter` | content_filter | -| `PostUsersSignInDataFeaturesCustomHomeRemoval` | custom-home-removal | -| `PostUsersSignInDataFeaturesDisableHomeUserFriendships` | disable_home_user_friendships | -| `PostUsersSignInDataFeaturesDisableSharingFriendships` | disable_sharing_friendships | -| `PostUsersSignInDataFeaturesDownloadsGating` | downloads-gating | -| `PostUsersSignInDataFeaturesDrmSupport` | drm_support | -| `PostUsersSignInDataFeaturesDvr` | dvr | -| `PostUsersSignInDataFeaturesDvrBlockUnsupportedCountries` | dvr-block-unsupported-countries | -| `PostUsersSignInDataFeaturesEpgRecentChannels` | epg-recent-channels | -| `PostUsersSignInDataFeaturesExcludeRestrictions` | exclude restrictions | -| `PostUsersSignInDataFeaturesFederatedAuth` | federated-auth | -| `PostUsersSignInDataFeaturesFriendRequestPushNotifications` | friend_request_push_notifications | -| `PostUsersSignInDataFeaturesGrandfatherSync` | grandfather-sync | -| `PostUsersSignInDataFeaturesGuidedUpgrade` | guided-upgrade | -| `PostUsersSignInDataFeaturesHardwareTranscoding` | hardware_transcoding | -| `PostUsersSignInDataFeaturesHome` | home | -| `PostUsersSignInDataFeaturesHwtranscode` | hwtranscode | -| `PostUsersSignInDataFeaturesImaggaV2` | imagga-v2 | -| `PostUsersSignInDataFeaturesIncreasePasswordComplexity` | increase-password-complexity | -| `PostUsersSignInDataFeaturesIos14PrivacyBanner` | ios14-privacy-banner | -| `PostUsersSignInDataFeaturesIterableNotificationTokens` | iterable-notification-tokens | -| `PostUsersSignInDataFeaturesItemClusters` | item_clusters | -| `PostUsersSignInDataFeaturesKeepPaymentMethod` | keep-payment-method | -| `PostUsersSignInDataFeaturesKevinBacon` | kevin-bacon | -| `PostUsersSignInDataFeaturesKoreaConsent` | korea-consent | -| `PostUsersSignInDataFeaturesLeIsrgRootX1` | le_isrg_root_x1 | -| `PostUsersSignInDataFeaturesLetsEncrypt` | lets_encrypt | -| `PostUsersSignInDataFeaturesLightningDvrPivot` | lightning-dvr-pivot | -| `PostUsersSignInDataFeaturesLiveTvSupportIncompleteSegments` | live-tv-support-incomplete-segments | -| `PostUsersSignInDataFeaturesLivetv` | livetv | -| `PostUsersSignInDataFeaturesLyrics` | lyrics | -| `PostUsersSignInDataFeaturesMetadataSearch` | metadata_search | -| `PostUsersSignInDataFeaturesMusicAnalysis` | music-analysis | -| `PostUsersSignInDataFeaturesMusicVideos` | music_videos | -| `PostUsersSignInDataFeaturesNewPlexPassPrices` | new_plex_pass_prices | -| `PostUsersSignInDataFeaturesNewsProviderSunsetModal` | news-provider-sunset-modal | -| `PostUsersSignInDataFeaturesNominatim` | nominatim | -| `PostUsersSignInDataFeaturesPass` | pass | -| `PostUsersSignInDataFeaturesPhotosFavorites` | photos-favorites | -| `PostUsersSignInDataFeaturesPhotosMetadataEdition` | photos-metadata-edition | -| `PostUsersSignInDataFeaturesPhotosV6Edit` | photosV6-edit | -| `PostUsersSignInDataFeaturesPhotosV6TvAlbums` | photosV6-tv-albums | -| `PostUsersSignInDataFeaturesPmsHealth` | pms_health | -| `PostUsersSignInDataFeaturesPremiumDashboard` | premium-dashboard | -| `PostUsersSignInDataFeaturesPremiumMusicMetadata` | premium_music_metadata | -| `PostUsersSignInDataFeaturesRadio` | radio | -| `PostUsersSignInDataFeaturesRateLimitClientToken` | rate-limit-client-token | -| `PostUsersSignInDataFeaturesScrobblingServicePlexTv` | scrobbling-service-plex-tv | -| `PostUsersSignInDataFeaturesSessionBandwidthRestrictions` | session_bandwidth_restrictions | -| `PostUsersSignInDataFeaturesSessionKick` | session_kick | -| `PostUsersSignInDataFeaturesSharedServerNotification` | shared_server_notification | -| `PostUsersSignInDataFeaturesSharedSourceNotification` | shared_source_notification | -| `PostUsersSignInDataFeaturesSigninNotification` | signin_notification | -| `PostUsersSignInDataFeaturesSigninWithApple` | signin_with_apple | -| `PostUsersSignInDataFeaturesSilenceRemoval` | silence-removal | -| `PostUsersSignInDataFeaturesSleepTimer` | sleep-timer | -| `PostUsersSignInDataFeaturesSpringServeAdProvider` | spring_serve_ad_provider | -| `PostUsersSignInDataFeaturesSync` | sync | -| `PostUsersSignInDataFeaturesSweetFades` | sweet-fades | -| `PostUsersSignInDataFeaturesTranscoderCache` | transcoder_cache | -| `PostUsersSignInDataFeaturesTrailers` | trailers | -| `PostUsersSignInDataFeaturesTunerSharing` | tuner-sharing | -| `PostUsersSignInDataFeaturesTwoFactorAuthentication` | two-factor-authentication | -| `PostUsersSignInDataFeaturesUnsupportedtuners` | unsupportedtuners | -| `PostUsersSignInDataFeaturesUpgrade3ds2` | upgrade-3ds2 | -| `PostUsersSignInDataFeaturesVisualizers` | visualizers | -| `PostUsersSignInDataFeaturesVodSchema` | vod-schema | -| `PostUsersSignInDataFeaturesVodCloudflare` | vod_cloudflare | -| `PostUsersSignInDataFeaturesVolumeLeveling` | volume-leveling | -| `PostUsersSignInDataFeaturesWatchTogetherInvite` | watch-together-invite | -| `PostUsersSignInDataFeaturesWatchlistRss` | watchlist-rss | -| `PostUsersSignInDataFeaturesWebServerDashboard` | web_server_dashboard | -| `PostUsersSignInDataFeaturesWebhooks` | webhooks | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindataglobals.md b/docs/models/operations/postuserssignindataglobals.md index 01a33f5..fa80dd0 100644 --- a/docs/models/operations/postuserssignindataglobals.md +++ b/docs/models/operations/postuserssignindataglobals.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ClientID` | **string* | :heavy_minus_sign: | 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) | gcgzw5rz2xovp84b4vha3a40 | -| `ClientName` | **string* | :heavy_minus_sign: | N/A | Plex Web | -| `DeviceName` | **string* | :heavy_minus_sign: | N/A | Linux | -| `ClientVersion` | **string* | :heavy_minus_sign: | N/A | 4.133.0 | -| `ClientPlatform` | **string* | :heavy_minus_sign: | N/A | Chrome | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | +| `ClientName` | **string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | +| `DeviceNickname` | **string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `ClientVersion` | **string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | +| `Platform` | **string* | :heavy_minus_sign: | The platform of the client application. | Roku | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatarequest.md b/docs/models/operations/postuserssignindatarequest.md index 0ec2869..69054c8 100644 --- a/docs/models/operations/postuserssignindatarequest.md +++ b/docs/models/operations/postuserssignindatarequest.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ClientID` | **string* | :heavy_minus_sign: | 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) | gcgzw5rz2xovp84b4vha3a40 | -| `ClientName` | **string* | :heavy_minus_sign: | N/A | Plex Web | -| `DeviceName` | **string* | :heavy_minus_sign: | N/A | Linux | -| `ClientVersion` | **string* | :heavy_minus_sign: | N/A | 4.133.0 | -| `ClientPlatform` | **string* | :heavy_minus_sign: | N/A | Chrome | -| `RequestBody` | [*operations.PostUsersSignInDataRequestBody](../../models/operations/postuserssignindatarequestbody.md) | :heavy_minus_sign: | Login credentials | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | +| `ClientName` | **string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | +| `DeviceNickname` | **string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `ClientVersion` | **string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | +| `Platform` | **string* | :heavy_minus_sign: | The platform of the client application. | Roku | +| `RequestBody` | [*operations.PostUsersSignInDataRequestBody](../../models/operations/postuserssignindatarequestbody.md) | :heavy_minus_sign: | Login credentials | | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatasubscription.md b/docs/models/operations/postuserssignindatasubscription.md index 49591ef..6ba2e08 100644 --- a/docs/models/operations/postuserssignindatasubscription.md +++ b/docs/models/operations/postuserssignindatasubscription.md @@ -7,7 +7,7 @@ If the account’s Plex Pass subscription is active | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `Features` | [][operations.PostUsersSignInDataFeatures](../../models/operations/postuserssignindatafeatures.md) | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | +| `Features` | []*string* | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | | `Active` | **bool* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | | `SubscribedAt` | **string* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | | `Status` | [*operations.PostUsersSignInDataAuthenticationStatus](../../models/operations/postuserssignindataauthenticationstatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | diff --git a/docs/models/operations/queryparamincludecollections.md b/docs/models/operations/queryparamincludecollections.md new file mode 100644 index 0000000..8f3fae2 --- /dev/null +++ b/docs/models/operations/queryparamincludecollections.md @@ -0,0 +1,11 @@ +# QueryParamIncludeCollections + +Whether to include collections in the search results. + + +## Values + +| Name | Value | +| ------------------------------------- | ------------------------------------- | +| `QueryParamIncludeCollectionsDisable` | 0 | +| `QueryParamIncludeCollectionsEnable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/queryparamincludeexternalmedia.md b/docs/models/operations/queryparamincludeexternalmedia.md new file mode 100644 index 0000000..81a4c32 --- /dev/null +++ b/docs/models/operations/queryparamincludeexternalmedia.md @@ -0,0 +1,11 @@ +# QueryParamIncludeExternalMedia + +Whether to include external media in the search results. + + +## Values + +| Name | Value | +| --------------------------------------- | --------------------------------------- | +| `QueryParamIncludeExternalMediaDisable` | 0 | +| `QueryParamIncludeExternalMediaEnable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/searchresult.md b/docs/models/operations/searchresult.md new file mode 100644 index 0000000..50a1d83 --- /dev/null +++ b/docs/models/operations/searchresult.md @@ -0,0 +1,9 @@ +# SearchResult + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `Score` | *float32* | :heavy_check_mark: | N/A | +| `Metadata` | [operations.GetSearchAllLibrariesMetadata](../../models/operations/getsearchalllibrariesmetadata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/searchtypes.md b/docs/models/operations/searchtypes.md new file mode 100644 index 0000000..be57f3c --- /dev/null +++ b/docs/models/operations/searchtypes.md @@ -0,0 +1,12 @@ +# SearchTypes + + +## Values + +| Name | Value | +| ------------------------ | ------------------------ | +| `SearchTypesMovies` | movies | +| `SearchTypesMusic` | music | +| `SearchTypesOtherVideos` | otherVideos | +| `SearchTypesPeople` | people | +| `SearchTypesTv` | tv | \ No newline at end of file diff --git a/docs/models/operations/subscription.md b/docs/models/operations/subscription.md index 247c715..e0322b0 100644 --- a/docs/models/operations/subscription.md +++ b/docs/models/operations/subscription.md @@ -7,7 +7,7 @@ If the account’s Plex Pass subscription is active | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `Features` | [][operations.Features](../../models/operations/features.md) | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | +| `Features` | []*string* | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | | `Active` | **bool* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | | `SubscribedAt` | **string* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | | `Status` | [*operations.GetTokenDetailsAuthenticationStatus](../../models/operations/gettokendetailsauthenticationstatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | diff --git a/docs/models/sdkerrors/getsearchalllibrariesbadrequest.md b/docs/models/sdkerrors/getsearchalllibrariesbadrequest.md new file mode 100644 index 0000000..dcdf62f --- /dev/null +++ b/docs/models/sdkerrors/getsearchalllibrariesbadrequest.md @@ -0,0 +1,11 @@ +# GetSearchAllLibrariesBadRequest + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `Errors` | [][sdkerrors.GetSearchAllLibrariesErrors](../../models/sdkerrors/getsearchalllibrarieserrors.md) | :heavy_minus_sign: | N/A | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/sdkerrors/getsearchalllibrarieserrors.md b/docs/models/sdkerrors/getsearchalllibrarieserrors.md new file mode 100644 index 0000000..eb50afa --- /dev/null +++ b/docs/models/sdkerrors/getsearchalllibrarieserrors.md @@ -0,0 +1,10 @@ +# GetSearchAllLibrariesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `Code` | **int* | :heavy_minus_sign: | N/A | 1000 | +| `Message` | **string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `Status` | **int* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/sdkerrors/getsearchalllibrarieslibraryerrors.md b/docs/models/sdkerrors/getsearchalllibrarieslibraryerrors.md new file mode 100644 index 0000000..b0e9344 --- /dev/null +++ b/docs/models/sdkerrors/getsearchalllibrarieslibraryerrors.md @@ -0,0 +1,10 @@ +# GetSearchAllLibrariesLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `Code` | **int* | :heavy_minus_sign: | N/A | 1001 | +| `Message` | **string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `Status` | **int* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/sdkerrors/getsearchalllibrariesunauthorized.md b/docs/models/sdkerrors/getsearchalllibrariesunauthorized.md new file mode 100644 index 0000000..855151f --- /dev/null +++ b/docs/models/sdkerrors/getsearchalllibrariesunauthorized.md @@ -0,0 +1,11 @@ +# GetSearchAllLibrariesUnauthorized + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `Errors` | [][sdkerrors.GetSearchAllLibrariesLibraryErrors](../../models/sdkerrors/getsearchalllibrarieslibraryerrors.md) | :heavy_minus_sign: | N/A | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/sdks/activities/README.md b/docs/sdks/activities/README.md index e6b23a4..6db7536 100644 --- a/docs/sdks/activities/README.md +++ b/docs/sdks/activities/README.md @@ -35,11 +35,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -90,11 +90,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index c779382..e12778d 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -33,11 +33,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -92,11 +92,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -148,11 +148,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -203,11 +203,11 @@ import( func main() { s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index dd1b1f4..28649c5 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -32,11 +32,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -92,11 +92,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -148,11 +148,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -209,11 +209,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -267,11 +267,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index a454a48..c3b94d6 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -30,11 +30,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -89,11 +89,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -151,11 +151,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index 7a9afe7..a7a3d35 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -16,6 +16,7 @@ API Calls interacting with Plex Media Server Libraries * [GetLibraryItems](#getlibraryitems) - Get Library Items * [GetRefreshLibraryMetadata](#getrefreshlibrarymetadata) - Refresh Metadata Of The Library * [GetSearchLibrary](#getsearchlibrary) - Search Library +* [GetSearchAllLibraries](#getsearchalllibraries) - Search All Libraries * [GetMetaDataByRatingKey](#getmetadatabyratingkey) - Get Metadata by RatingKey * [GetMetadataChildren](#getmetadatachildren) - Get Items Children * [GetTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content @@ -39,11 +40,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -98,11 +99,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -181,11 +182,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -275,11 +276,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -332,11 +333,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -409,19 +410,19 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() res, err := s.Library.GetLibraryItems(ctx, operations.GetLibraryItemsRequest{ - SectionKey: 9518, Tag: operations.TagEdition, IncludeGuids: operations.IncludeGuidsEnable.ToPointer(), Type: operations.GetLibraryItemsQueryParamTypeTvShow.ToPointer(), + SectionKey: 9518, IncludeMeta: operations.GetLibraryItemsQueryParamIncludeMetaEnable.ToPointer(), XPlexContainerStart: plexgo.Int(0), XPlexContainerSize: plexgo.Int(50), @@ -475,11 +476,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -551,11 +552,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -590,6 +591,71 @@ func main() { | sdkerrors.GetSearchLibraryUnauthorized | 401 | application/json | | sdkerrors.SDKError | 4XX, 5XX | \*/\* | +## GetSearchAllLibraries + +Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type. + + +### Example Usage + +```go +package main + +import( + "github.com/LukeHagar/plexgo" + "context" + "github.com/LukeHagar/plexgo/models/operations" + "log" +) + +func main() { + s := plexgo.New( + plexgo.WithSecurity(""), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), + ) + + ctx := context.Background() + res, err := s.Library.GetSearchAllLibraries(ctx, operations.GetSearchAllLibrariesRequest{ + Query: "", + SearchTypes: []operations.SearchTypes{ + operations.SearchTypesPeople, + }, + IncludeCollections: operations.QueryParamIncludeCollectionsEnable.ToPointer(), + IncludeExternalMedia: operations.QueryParamIncludeExternalMediaEnable.ToPointer(), + }) + if err != nil { + log.Fatal(err) + } + if res.Object != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.GetSearchAllLibrariesRequest](../../models/operations/getsearchalllibrariesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | + +### Response + +**[*operations.GetSearchAllLibrariesResponse](../../models/operations/getsearchalllibrariesresponse.md), error** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| sdkerrors.GetSearchAllLibrariesBadRequest | 400 | application/json | +| sdkerrors.GetSearchAllLibrariesUnauthorized | 401 | application/json | +| sdkerrors.SDKError | 4XX, 5XX | \*/\* | + ## GetMetaDataByRatingKey This endpoint will return the metadata of a library item specified with the ratingKey. @@ -609,11 +675,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -666,11 +732,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -725,11 +791,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -783,11 +849,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index d523c24..19cd3ac 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -32,11 +32,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -111,11 +111,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -170,11 +170,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md index 25ff759..9979b83 100644 --- a/docs/sdks/media/README.md +++ b/docs/sdks/media/README.md @@ -32,11 +32,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -88,11 +88,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -145,11 +145,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -204,11 +204,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -268,11 +268,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index 65ca670..070b3b9 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -43,11 +43,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -104,11 +104,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -163,11 +163,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -220,11 +220,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -277,11 +277,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -340,11 +340,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -398,11 +398,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -456,11 +456,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -516,11 +516,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index e717e37..039f6bf 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -34,11 +34,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -89,11 +89,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -143,11 +143,11 @@ import( func main() { s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -198,11 +198,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -254,15 +254,15 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() - res, err := s.Plex.GetServerResources(ctx, operations.IncludeHTTPSEnable.ToPointer(), operations.IncludeRelayEnable.ToPointer(), operations.IncludeIPv6Enable.ToPointer(), plexgo.String("gcgzw5rz2xovp84b4vha3a40")) + res, err := s.Plex.GetServerResources(ctx, operations.IncludeHTTPSEnable.ToPointer(), operations.IncludeRelayEnable.ToPointer(), operations.IncludeIPv6Enable.ToPointer(), plexgo.String("3381b62b-9ab7-4e37-827b-203e9809eb58")) if err != nil { log.Fatal(err) } @@ -274,14 +274,14 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `includeHTTPS` | [*operations.IncludeHTTPS](../../models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | -| `includeRelay` | [*operations.IncludeRelay](../../models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | -| `includeIPv6` | [*operations.IncludeIPv6](../../models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | -| `clientID` | **string* | :heavy_minus_sign: | 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) | gcgzw5rz2xovp84b4vha3a40 | -| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | +| `includeHTTPS` | [*operations.IncludeHTTPS](../../models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | +| `includeRelay` | [*operations.IncludeRelay](../../models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | +| `includeIPv6` | [*operations.IncludeIPv6](../../models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | +| `clientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | +| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | | ### Response @@ -313,11 +313,11 @@ import( func main() { s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -368,11 +368,11 @@ import( func main() { s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/plexapi/README.md b/docs/sdks/plexapi/README.md index 1baeb06..e91fa37 100644 --- a/docs/sdks/plexapi/README.md +++ b/docs/sdks/plexapi/README.md @@ -25,4 +25,4 @@ The following SDKs are generated from the OpenAPI Specification. They are automa | Swift | [GitHub](https://github.com/LukeHagar/plexswift) | [Releases](https://github.com/LukeHagar/plexswift/releases) | - | | PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - | | Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - | -| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | - +| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | - diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 0b4a019..33fd6b2 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -42,11 +42,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -104,11 +104,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -162,11 +162,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index f4a5b23..87ec497 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -36,11 +36,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -91,11 +91,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -146,11 +146,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -201,11 +201,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -255,11 +255,11 @@ import( func main() { s := plexgo.New( - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -309,11 +309,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -366,11 +366,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -430,11 +430,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -453,7 +453,7 @@ func main() { | Parameter | Type | Required | Description | Example | | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | -| `xPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | +| `xPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | | `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | | ### Response @@ -486,11 +486,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index 9d705f3..76b6e7e 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -31,11 +31,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -87,11 +87,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -146,11 +146,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -201,11 +201,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/statistics/README.md b/docs/sdks/statistics/README.md index 1a515fe..9c0b5c2 100644 --- a/docs/sdks/statistics/README.md +++ b/docs/sdks/statistics/README.md @@ -30,11 +30,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -86,11 +86,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -142,11 +142,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md index cc3306f..f650da0 100644 --- a/docs/sdks/updater/README.md +++ b/docs/sdks/updater/README.md @@ -31,11 +31,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -87,11 +87,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -145,11 +145,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md index 11cae98..a5d8bb9 100644 --- a/docs/sdks/video/README.md +++ b/docs/sdks/video/README.md @@ -30,11 +30,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() @@ -98,11 +98,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/docs/sdks/watchlist/README.md b/docs/sdks/watchlist/README.md index 4d5b0e7..618911a 100644 --- a/docs/sdks/watchlist/README.md +++ b/docs/sdks/watchlist/README.md @@ -29,11 +29,11 @@ import( func main() { s := plexgo.New( plexgo.WithSecurity(""), - plexgo.WithClientID("gcgzw5rz2xovp84b4vha3a40"), - plexgo.WithClientName("Plex Web"), - plexgo.WithClientVersion("4.133.0"), - plexgo.WithClientPlatform("Chrome"), - plexgo.WithDeviceName("Linux"), + plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"), + plexgo.WithClientName("Plex for Roku"), + plexgo.WithClientVersion("2.4.1"), + plexgo.WithPlatform("Roku"), + plexgo.WithDeviceNickname("Roku 3"), ) ctx := context.Background() diff --git a/hubs.go b/hubs.go index 1a2f74b..64770af 100644 --- a/hubs.go +++ b/hubs.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -91,6 +92,16 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -99,11 +110,7 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -337,6 +344,16 @@ func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecen if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -345,11 +362,7 @@ func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecen httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -547,6 +560,16 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, sectionID float64, count *flo if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -555,11 +578,7 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, sectionID float64, count *flo httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/internal/globals/globals.go b/internal/globals/globals.go index a323d01..a60ff28 100644 --- a/internal/globals/globals.go +++ b/internal/globals/globals.go @@ -3,12 +3,16 @@ package globals type Globals struct { - // 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) - ClientID *string `queryParam:"style=form,explode=true,name=X-Plex-Client-Identifier"` - ClientName *string `queryParam:"style=form,explode=true,name=X-Plex-Product"` - ClientVersion *string `queryParam:"style=form,explode=true,name=X-Plex-Version"` - ClientPlatform *string `queryParam:"style=form,explode=true,name=X-Plex-Platform"` - DeviceName *string `queryParam:"style=form,explode=true,name=X-Plex-Device"` + // An opaque identifier unique to the client (UUID, serial number, or other unique device ID) + ClientID *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"` + // The name of the client application. (Plex Web, Plex Media Server, etc.) + ClientName *string `header:"style=simple,explode=false,name=X-Plex-Product"` + // The version of the client application. + ClientVersion *string `header:"style=simple,explode=false,name=X-Plex-Version"` + // The platform of the client application. + Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"` + // A relatively friendly name for the client device + DeviceNickname *string `header:"style=simple,explode=false,name=X-Plex-Device"` } func (o *Globals) GetClientID() *string { @@ -32,16 +36,16 @@ func (o *Globals) GetClientVersion() *string { return o.ClientVersion } -func (o *Globals) GetClientPlatform() *string { +func (o *Globals) GetPlatform() *string { if o == nil { return nil } - return o.ClientPlatform + return o.Platform } -func (o *Globals) GetDeviceName() *string { +func (o *Globals) GetDeviceNickname() *string { if o == nil { return nil } - return o.DeviceName + return o.DeviceNickname } diff --git a/library.go b/library.go index d8d14b0..d26c056 100644 --- a/library.go +++ b/library.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -91,6 +92,16 @@ func (s *Library) GetFileHash(ctx context.Context, url_ string, type_ *float64, if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -99,11 +110,7 @@ func (s *Library) GetFileHash(ctx context.Context, url_ string, type_ *float64, httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -316,6 +323,16 @@ func (s *Library) GetRecentlyAddedLibrary(ctx context.Context, request operation if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -324,11 +341,7 @@ func (s *Library) GetRecentlyAddedLibrary(ctx context.Context, request operation httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -563,6 +576,16 @@ func (s *Library) GetAllLibraries(ctx context.Context, opts ...operations.Option if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -571,11 +594,7 @@ func (s *Library) GetAllLibraries(ctx context.Context, opts ...operations.Option httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -799,8 +818,8 @@ func (s *Library) GetLibraryDetails(ctx context.Context, sectionKey int, include } request := operations.GetLibraryDetailsRequest{ - SectionKey: sectionKey, IncludeDetails: includeDetails, + SectionKey: sectionKey, } o := operations.Options{} @@ -852,6 +871,16 @@ func (s *Library) GetLibraryDetails(ctx context.Context, sectionKey int, include if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -860,11 +889,7 @@ func (s *Library) GetLibraryDetails(ctx context.Context, sectionKey int, include httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1098,6 +1123,16 @@ func (s *Library) DeleteLibrary(ctx context.Context, sectionKey int, opts ...ope if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1106,11 +1141,7 @@ func (s *Library) DeleteLibrary(ctx context.Context, sectionKey int, opts ...ope httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1342,6 +1373,16 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1350,11 +1391,7 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1540,8 +1577,8 @@ func (s *Library) GetRefreshLibraryMetadata(ctx context.Context, sectionKey int, } request := operations.GetRefreshLibraryMetadataRequest{ - SectionKey: sectionKey, Force: force, + SectionKey: sectionKey, } o := operations.Options{} @@ -1593,6 +1630,16 @@ func (s *Library) GetRefreshLibraryMetadata(ctx context.Context, sectionKey int, if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1601,11 +1648,7 @@ func (s *Library) GetRefreshLibraryMetadata(ctx context.Context, sectionKey int, httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1840,6 +1883,16 @@ func (s *Library) GetSearchLibrary(ctx context.Context, sectionKey int, type_ op if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1848,11 +1901,7 @@ func (s *Library) GetSearchLibrary(ctx context.Context, sectionKey int, type_ op httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -2027,6 +2076,264 @@ func (s *Library) GetSearchLibrary(ctx context.Context, sectionKey int, type_ op } +// GetSearchAllLibraries - Search All Libraries +// Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type. +func (s *Library) GetSearchAllLibraries(ctx context.Context, request operations.GetSearchAllLibrariesRequest, opts ...operations.Option) (*operations.GetSearchAllLibrariesResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "get-search-all-libraries", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + globals := operations.GetSearchAllLibrariesGlobals{ + ClientID: s.sdkConfiguration.Globals.ClientID, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/library/search") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + utils.PopulateHeaders(ctx, req, request, globals) + + if err := utils.PopulateQueryParams(ctx, req, request, globals); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "5XX", + }, + }, func() (*http.Response, error) { + if req.Body != nil { + copyBody, err := req.GetBody() + if err != nil { + return nil, err + } + req.Body = copyBody + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, backoff.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.GetSearchAllLibrariesResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + getRawBody := func() ([]byte, error) { + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + return rawBody, nil + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + var out operations.GetSearchAllLibrariesResponseBody + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.Object = &out + default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + var out sdkerrors.GetSearchAllLibrariesBadRequest + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + out.RawResponse = httpRes + return nil, &out + default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 401: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + var out sdkerrors.GetSearchAllLibrariesUnauthorized + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + out.RawResponse = httpRes + return nil, &out + default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := getRawBody() + if err != nil { + return nil, err + } + + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + // GetMetaDataByRatingKey - Get Metadata by RatingKey // This endpoint will return the metadata of a library item specified with the ratingKey. func (s *Library) GetMetaDataByRatingKey(ctx context.Context, ratingKey int64, opts ...operations.Option) (*operations.GetMetaDataByRatingKeyResponse, error) { @@ -2086,6 +2393,16 @@ func (s *Library) GetMetaDataByRatingKey(ctx context.Context, ratingKey int64, o if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -2094,11 +2411,7 @@ func (s *Library) GetMetaDataByRatingKey(ctx context.Context, ratingKey int64, o httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -2337,6 +2650,16 @@ func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, in if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -2345,11 +2668,7 @@ func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, in httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -2535,8 +2854,8 @@ func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.Get } request := operations.GetTopWatchedContentRequest{ - Type: type_, IncludeGuids: includeGuids, + Type: type_, } o := operations.Options{} @@ -2588,6 +2907,16 @@ func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.Get if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -2596,11 +2925,7 @@ func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.Get httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -2830,6 +3155,16 @@ func (s *Library) GetOnDeck(ctx context.Context, opts ...operations.Option) (*op if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -2838,11 +3173,7 @@ func (s *Library) GetOnDeck(ctx context.Context, opts ...operations.Option) (*op httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/log.go b/log.go index e293c10..9447999 100644 --- a/log.go +++ b/log.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -92,6 +93,16 @@ func (s *Log) LogLine(ctx context.Context, level operations.Level, message strin if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -100,11 +111,7 @@ func (s *Log) LogLine(ctx context.Context, level operations.Level, message strin httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -339,6 +346,16 @@ func (s *Log) LogMultiLine(ctx context.Context, request string, opts ...operatio if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -347,11 +364,7 @@ func (s *Log) LogMultiLine(ctx context.Context, request string, opts ...operatio httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -560,6 +573,16 @@ func (s *Log) EnablePaperTrail(ctx context.Context, opts ...operations.Option) ( if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -568,11 +591,7 @@ func (s *Log) EnablePaperTrail(ctx context.Context, opts ...operations.Option) ( httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/media.go b/media.go index 53ce471..09b1ec6 100644 --- a/media.go +++ b/media.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -90,6 +91,16 @@ func (s *Media) MarkPlayed(ctx context.Context, key float64, opts ...operations. if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -98,11 +109,7 @@ func (s *Media) MarkPlayed(ctx context.Context, key float64, opts ...operations. httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -319,6 +326,16 @@ func (s *Media) MarkUnplayed(ctx context.Context, key float64, opts ...operation if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -327,11 +344,7 @@ func (s *Media) MarkUnplayed(ctx context.Context, key float64, opts ...operation httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -550,6 +563,16 @@ func (s *Media) UpdatePlayProgress(ctx context.Context, key string, time float64 if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -558,11 +581,7 @@ func (s *Media) UpdatePlayProgress(ctx context.Context, key string, time float64 httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -762,6 +781,8 @@ func (s *Media) GetBannerImage(ctx context.Context, request operations.GetBanner req.Header.Set("Accept", "image/jpeg") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + utils.PopulateHeaders(ctx, req, request, nil) + if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } @@ -775,6 +796,16 @@ func (s *Media) GetBannerImage(ctx context.Context, request operations.GetBanner if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -783,11 +814,7 @@ func (s *Media) GetBannerImage(ctx context.Context, request operations.GetBanner httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1002,6 +1029,8 @@ func (s *Media) GetThumbImage(ctx context.Context, request operations.GetThumbIm req.Header.Set("Accept", "image/jpeg") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + utils.PopulateHeaders(ctx, req, request, nil) + if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } @@ -1015,6 +1044,16 @@ func (s *Media) GetThumbImage(ctx context.Context, request operations.GetThumbIm if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1023,11 +1062,7 @@ func (s *Media) GetThumbImage(ctx context.Context, request operations.GetThumbIm httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/models/operations/getalllibraries.go b/models/operations/getalllibraries.go index 56bf190..3298a50 100644 --- a/models/operations/getalllibraries.go +++ b/models/operations/getalllibraries.go @@ -6,19 +6,19 @@ import ( "net/http" ) -type Location struct { +type GetAllLibrariesLocation struct { ID int `json:"id"` Path string `json:"path"` } -func (o *Location) GetID() int { +func (o *GetAllLibrariesLocation) GetID() int { if o == nil { return 0 } return o.ID } -func (o *Location) GetPath() string { +func (o *GetAllLibrariesLocation) GetPath() string { if o == nil { return "" } @@ -48,9 +48,9 @@ type GetAllLibrariesDirectory struct { Content bool `json:"content"` Directory bool `json:"directory"` // Unix epoch datetime in seconds - ContentChangedAt int64 `json:"contentChangedAt"` - Hidden int `json:"hidden"` - Location []Location `json:"Location"` + ContentChangedAt int64 `json:"contentChangedAt"` + Hidden int `json:"hidden"` + Location []GetAllLibrariesLocation `json:"Location"` } func (o *GetAllLibrariesDirectory) GetAllowSync() bool { @@ -193,9 +193,9 @@ func (o *GetAllLibrariesDirectory) GetHidden() int { return o.Hidden } -func (o *GetAllLibrariesDirectory) GetLocation() []Location { +func (o *GetAllLibrariesDirectory) GetLocation() []GetAllLibrariesLocation { if o == nil { - return []Location{} + return []GetAllLibrariesLocation{} } return o.Location } diff --git a/models/operations/getbannerimage.go b/models/operations/getbannerimage.go index f0350cb..1018e0c 100644 --- a/models/operations/getbannerimage.go +++ b/models/operations/getbannerimage.go @@ -14,8 +14,8 @@ type GetBannerImageRequest struct { Height int64 `queryParam:"style=form,explode=true,name=height"` MinSize int64 `queryParam:"style=form,explode=true,name=minSize"` Upscale int64 `queryParam:"style=form,explode=true,name=upscale"` - // Plex Authentication Token - XPlexToken string `queryParam:"style=form,explode=true,name=X-Plex-Token"` + // An authentication token, obtained from plex.tv + XPlexToken string `header:"style=simple,explode=false,name=X-Plex-Token"` } func (o *GetBannerImageRequest) GetRatingKey() int64 { diff --git a/models/operations/getlibrarydetails.go b/models/operations/getlibrarydetails.go index 0a3d7ef..d761d90 100644 --- a/models/operations/getlibrarydetails.go +++ b/models/operations/getlibrarydetails.go @@ -38,14 +38,14 @@ func (e *IncludeDetails) UnmarshalJSON(data []byte) error { } type GetLibraryDetailsRequest struct { - // The unique key of the Plex library. - // Note: This is unique in the context of the Plex server. - // - SectionKey int `pathParam:"style=simple,explode=false,name=sectionKey"` // Whether or not to include details for a section (types, filters, and sorts). // Only exists for backwards compatibility, media providers other than the server libraries have it on always. // IncludeDetails *IncludeDetails `default:"0" queryParam:"style=form,explode=true,name=includeDetails"` + // The unique key of the Plex library. + // Note: This is unique in the context of the Plex server. + // + SectionKey int `pathParam:"style=simple,explode=false,name=sectionKey"` } func (g GetLibraryDetailsRequest) MarshalJSON() ([]byte, error) { @@ -59,13 +59,6 @@ func (g *GetLibraryDetailsRequest) UnmarshalJSON(data []byte) error { return nil } -func (o *GetLibraryDetailsRequest) GetSectionKey() int { - if o == nil { - return 0 - } - return o.SectionKey -} - func (o *GetLibraryDetailsRequest) GetIncludeDetails() *IncludeDetails { if o == nil { return nil @@ -73,6 +66,13 @@ func (o *GetLibraryDetailsRequest) GetIncludeDetails() *IncludeDetails { return o.IncludeDetails } +func (o *GetLibraryDetailsRequest) GetSectionKey() int { + if o == nil { + return 0 + } + return o.SectionKey +} + type GetLibraryDetailsDirectory struct { Key *string `json:"key,omitempty"` Title *string `json:"title,omitempty"` diff --git a/models/operations/getlibraryitems.go b/models/operations/getlibraryitems.go index 3d15a34..13aba30 100644 --- a/models/operations/getlibraryitems.go +++ b/models/operations/getlibraryitems.go @@ -181,10 +181,6 @@ func (e *GetLibraryItemsQueryParamIncludeMeta) UnmarshalJSON(data []byte) error } type GetLibraryItemsRequest struct { - // The unique key of the Plex library. - // Note: This is unique in the context of the Plex server. - // - SectionKey int `pathParam:"style=simple,explode=false,name=sectionKey"` // A key representing a specific tag within the section. Tag Tag `pathParam:"style=simple,explode=false,name=tag"` // Adds the Guids object to the response @@ -198,6 +194,10 @@ type GetLibraryItemsRequest struct { // E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries // Type *GetLibraryItemsQueryParamType `queryParam:"style=form,explode=true,name=type"` + // The unique key of the Plex library. + // Note: This is unique in the context of the Plex server. + // + SectionKey int `pathParam:"style=simple,explode=false,name=sectionKey"` // Adds the Meta object to the response // IncludeMeta *GetLibraryItemsQueryParamIncludeMeta `default:"0" queryParam:"style=form,explode=true,name=includeMeta"` @@ -224,13 +224,6 @@ func (g *GetLibraryItemsRequest) UnmarshalJSON(data []byte) error { return nil } -func (o *GetLibraryItemsRequest) GetSectionKey() int { - if o == nil { - return 0 - } - return o.SectionKey -} - func (o *GetLibraryItemsRequest) GetTag() Tag { if o == nil { return Tag("") @@ -252,6 +245,13 @@ func (o *GetLibraryItemsRequest) GetType() *GetLibraryItemsQueryParamType { return o.Type } +func (o *GetLibraryItemsRequest) GetSectionKey() int { + if o == nil { + return 0 + } + return o.SectionKey +} + func (o *GetLibraryItemsRequest) GetIncludeMeta() *GetLibraryItemsQueryParamIncludeMeta { if o == nil { return nil @@ -1080,7 +1080,7 @@ func (o *GetLibraryItemsStream) GetCanAutoSync() *bool { type GetLibraryItemsPart struct { ID int `json:"id"` Key string `json:"key"` - Duration int `json:"duration"` + Duration *int `json:"duration,omitempty"` File string `json:"file"` Size int64 `json:"size"` // The container format of the media file. @@ -1089,7 +1089,7 @@ type GetLibraryItemsPart struct { AudioProfile *string `json:"audioProfile,omitempty"` Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"` OptimizedForStreaming *bool `json:"optimizedForStreaming,omitempty"` - VideoProfile string `json:"videoProfile"` + VideoProfile *string `json:"videoProfile,omitempty"` Indexes *string `json:"indexes,omitempty"` HasThumbnail *GetLibraryItemsHasThumbnail `default:"0" json:"hasThumbnail"` Stream []GetLibraryItemsStream `json:"Stream,omitempty"` @@ -1120,9 +1120,9 @@ func (o *GetLibraryItemsPart) GetKey() string { return o.Key } -func (o *GetLibraryItemsPart) GetDuration() int { +func (o *GetLibraryItemsPart) GetDuration() *int { if o == nil { - return 0 + return nil } return o.Duration } @@ -1169,9 +1169,9 @@ func (o *GetLibraryItemsPart) GetOptimizedForStreaming() *bool { return o.OptimizedForStreaming } -func (o *GetLibraryItemsPart) GetVideoProfile() string { +func (o *GetLibraryItemsPart) GetVideoProfile() *string { if o == nil { - return "" + return nil } return o.VideoProfile } @@ -1199,19 +1199,19 @@ func (o *GetLibraryItemsPart) GetStream() []GetLibraryItemsStream { type GetLibraryItemsMedia struct { ID int `json:"id"` - Duration int `json:"duration"` - Bitrate int `json:"bitrate"` - Width int `json:"width"` - Height int `json:"height"` - AspectRatio float64 `json:"aspectRatio"` + Duration *int `json:"duration,omitempty"` + Bitrate *int `json:"bitrate,omitempty"` + Width *int `json:"width,omitempty"` + Height *int `json:"height,omitempty"` + AspectRatio *float64 `json:"aspectRatio,omitempty"` AudioProfile *string `json:"audioProfile,omitempty"` - AudioChannels int `json:"audioChannels"` - AudioCodec string `json:"audioCodec"` - VideoCodec string `json:"videoCodec"` - VideoResolution string `json:"videoResolution"` + AudioChannels *int `json:"audioChannels,omitempty"` + AudioCodec *string `json:"audioCodec,omitempty"` + VideoCodec *string `json:"videoCodec,omitempty"` + VideoResolution *string `json:"videoResolution,omitempty"` Container string `json:"container"` - VideoFrameRate string `json:"videoFrameRate"` - VideoProfile string `json:"videoProfile"` + VideoFrameRate *string `json:"videoFrameRate,omitempty"` + VideoProfile *string `json:"videoProfile,omitempty"` HasVoiceActivity *bool `json:"hasVoiceActivity,omitempty"` OptimizedForStreaming *GetLibraryItemsOptimizedForStreaming `default:"0" json:"optimizedForStreaming"` Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"` @@ -1236,37 +1236,37 @@ func (o *GetLibraryItemsMedia) GetID() int { return o.ID } -func (o *GetLibraryItemsMedia) GetDuration() int { +func (o *GetLibraryItemsMedia) GetDuration() *int { if o == nil { - return 0 + return nil } return o.Duration } -func (o *GetLibraryItemsMedia) GetBitrate() int { +func (o *GetLibraryItemsMedia) GetBitrate() *int { if o == nil { - return 0 + return nil } return o.Bitrate } -func (o *GetLibraryItemsMedia) GetWidth() int { +func (o *GetLibraryItemsMedia) GetWidth() *int { if o == nil { - return 0 + return nil } return o.Width } -func (o *GetLibraryItemsMedia) GetHeight() int { +func (o *GetLibraryItemsMedia) GetHeight() *int { if o == nil { - return 0 + return nil } return o.Height } -func (o *GetLibraryItemsMedia) GetAspectRatio() float64 { +func (o *GetLibraryItemsMedia) GetAspectRatio() *float64 { if o == nil { - return 0.0 + return nil } return o.AspectRatio } @@ -1278,30 +1278,30 @@ func (o *GetLibraryItemsMedia) GetAudioProfile() *string { return o.AudioProfile } -func (o *GetLibraryItemsMedia) GetAudioChannels() int { +func (o *GetLibraryItemsMedia) GetAudioChannels() *int { if o == nil { - return 0 + return nil } return o.AudioChannels } -func (o *GetLibraryItemsMedia) GetAudioCodec() string { +func (o *GetLibraryItemsMedia) GetAudioCodec() *string { if o == nil { - return "" + return nil } return o.AudioCodec } -func (o *GetLibraryItemsMedia) GetVideoCodec() string { +func (o *GetLibraryItemsMedia) GetVideoCodec() *string { if o == nil { - return "" + return nil } return o.VideoCodec } -func (o *GetLibraryItemsMedia) GetVideoResolution() string { +func (o *GetLibraryItemsMedia) GetVideoResolution() *string { if o == nil { - return "" + return nil } return o.VideoResolution } @@ -1313,16 +1313,16 @@ func (o *GetLibraryItemsMedia) GetContainer() string { return o.Container } -func (o *GetLibraryItemsMedia) GetVideoFrameRate() string { +func (o *GetLibraryItemsMedia) GetVideoFrameRate() *string { if o == nil { - return "" + return nil } return o.VideoFrameRate } -func (o *GetLibraryItemsMedia) GetVideoProfile() string { +func (o *GetLibraryItemsMedia) GetVideoProfile() *string { if o == nil { - return "" + return nil } return o.VideoProfile } @@ -1467,6 +1467,17 @@ func (o *GetLibraryItemsRole) GetRole() *string { return o.Role } +type GetLibraryItemsLocation struct { + Path *string `json:"path,omitempty"` +} + +func (o *GetLibraryItemsLocation) GetPath() *string { + if o == nil { + return nil + } + return o.Path +} + type GetLibraryItemsMediaGUID struct { // Can be one of the following formats: // imdb://tt13015952, tmdb://2434012, tvdb://7945991 @@ -1669,6 +1680,7 @@ type GetLibraryItemsMetadata struct { Writer []GetLibraryItemsWriter `json:"Writer,omitempty"` Collection []GetLibraryItemsCollection `json:"Collection,omitempty"` Role []GetLibraryItemsRole `json:"Role,omitempty"` + Location []GetLibraryItemsLocation `json:"Location,omitempty"` // The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. // MediaGUID []GetLibraryItemsMediaGUID `json:"Guid,omitempty"` @@ -2041,6 +2053,13 @@ func (o *GetLibraryItemsMetadata) GetRole() []GetLibraryItemsRole { return o.Role } +func (o *GetLibraryItemsMetadata) GetLocation() []GetLibraryItemsLocation { + if o == nil { + return nil + } + return o.Location +} + func (o *GetLibraryItemsMetadata) GetMediaGUID() []GetLibraryItemsMediaGUID { if o == nil { return nil diff --git a/models/operations/getmediaproviders.go b/models/operations/getmediaproviders.go index c18d2a7..6ca14ff 100644 --- a/models/operations/getmediaproviders.go +++ b/models/operations/getmediaproviders.go @@ -7,8 +7,8 @@ import ( ) type GetMediaProvidersRequest struct { - // Plex Authentication Token - XPlexToken string `queryParam:"style=form,explode=true,name=X-Plex-Token"` + // An authentication token, obtained from plex.tv + XPlexToken string `header:"style=simple,explode=false,name=X-Plex-Token"` } func (o *GetMediaProvidersRequest) GetXPlexToken() string { diff --git a/models/operations/getpin.go b/models/operations/getpin.go index c61252e..c6ce7fd 100644 --- a/models/operations/getpin.go +++ b/models/operations/getpin.go @@ -13,12 +13,16 @@ var GetPinServerList = []string{ } type GetPinGlobals struct { - // 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) - ClientID *string `queryParam:"style=form,explode=true,name=X-Plex-Client-Identifier"` - ClientName *string `queryParam:"style=form,explode=true,name=X-Plex-Product"` - DeviceName *string `queryParam:"style=form,explode=true,name=X-Plex-Device"` - ClientVersion *string `queryParam:"style=form,explode=true,name=X-Plex-Version"` - ClientPlatform *string `queryParam:"style=form,explode=true,name=X-Plex-Platform"` + // An opaque identifier unique to the client (UUID, serial number, or other unique device ID) + ClientID *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"` + // The name of the client application. (Plex Web, Plex Media Server, etc.) + ClientName *string `header:"style=simple,explode=false,name=X-Plex-Product"` + // A relatively friendly name for the client device + DeviceNickname *string `header:"style=simple,explode=false,name=X-Plex-Device"` + // The version of the client application. + ClientVersion *string `header:"style=simple,explode=false,name=X-Plex-Version"` + // The platform of the client application. + Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"` } func (o *GetPinGlobals) GetClientID() *string { @@ -35,11 +39,11 @@ func (o *GetPinGlobals) GetClientName() *string { return o.ClientName } -func (o *GetPinGlobals) GetDeviceName() *string { +func (o *GetPinGlobals) GetDeviceNickname() *string { if o == nil { return nil } - return o.DeviceName + return o.DeviceNickname } func (o *GetPinGlobals) GetClientVersion() *string { @@ -49,11 +53,11 @@ func (o *GetPinGlobals) GetClientVersion() *string { return o.ClientVersion } -func (o *GetPinGlobals) GetClientPlatform() *string { +func (o *GetPinGlobals) GetPlatform() *string { if o == nil { return nil } - return o.ClientPlatform + return o.Platform } type GetPinRequest struct { @@ -62,12 +66,16 @@ type GetPinRequest struct { // Non-Strong codes are used for `Plex.tv/link` // Strong *bool `default:"false" queryParam:"style=form,explode=true,name=strong"` - // 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) - ClientID *string `queryParam:"style=form,explode=true,name=X-Plex-Client-Identifier"` - ClientName *string `queryParam:"style=form,explode=true,name=X-Plex-Product"` - DeviceName *string `queryParam:"style=form,explode=true,name=X-Plex-Device"` - ClientVersion *string `queryParam:"style=form,explode=true,name=X-Plex-Version"` - ClientPlatform *string `queryParam:"style=form,explode=true,name=X-Plex-Platform"` + // An opaque identifier unique to the client (UUID, serial number, or other unique device ID) + ClientID *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"` + // The name of the client application. (Plex Web, Plex Media Server, etc.) + ClientName *string `header:"style=simple,explode=false,name=X-Plex-Product"` + // A relatively friendly name for the client device + DeviceNickname *string `header:"style=simple,explode=false,name=X-Plex-Device"` + // The version of the client application. + ClientVersion *string `header:"style=simple,explode=false,name=X-Plex-Version"` + // The platform of the client application. + Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"` } func (g GetPinRequest) MarshalJSON() ([]byte, error) { @@ -102,11 +110,11 @@ func (o *GetPinRequest) GetClientName() *string { return o.ClientName } -func (o *GetPinRequest) GetDeviceName() *string { +func (o *GetPinRequest) GetDeviceNickname() *string { if o == nil { return nil } - return o.DeviceName + return o.DeviceNickname } func (o *GetPinRequest) GetClientVersion() *string { @@ -116,11 +124,11 @@ func (o *GetPinRequest) GetClientVersion() *string { return o.ClientVersion } -func (o *GetPinRequest) GetClientPlatform() *string { +func (o *GetPinRequest) GetPlatform() *string { if o == nil { return nil } - return o.ClientPlatform + return o.Platform } // GeoData - Geo location data diff --git a/models/operations/getrecentlyadded.go b/models/operations/getrecentlyadded.go index 38ca491..06b31e8 100644 --- a/models/operations/getrecentlyadded.go +++ b/models/operations/getrecentlyadded.go @@ -992,7 +992,7 @@ func (o *Stream) GetCanAutoSync() *bool { type Part struct { ID int `json:"id"` Key string `json:"key"` - Duration int `json:"duration"` + Duration *int `json:"duration,omitempty"` File string `json:"file"` Size int64 `json:"size"` // The container format of the media file. @@ -1001,7 +1001,7 @@ type Part struct { AudioProfile *string `json:"audioProfile,omitempty"` Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"` OptimizedForStreaming *bool `json:"optimizedForStreaming,omitempty"` - VideoProfile string `json:"videoProfile"` + VideoProfile *string `json:"videoProfile,omitempty"` Indexes *string `json:"indexes,omitempty"` HasThumbnail *HasThumbnail `default:"0" json:"hasThumbnail"` Stream []Stream `json:"Stream,omitempty"` @@ -1032,9 +1032,9 @@ func (o *Part) GetKey() string { return o.Key } -func (o *Part) GetDuration() int { +func (o *Part) GetDuration() *int { if o == nil { - return 0 + return nil } return o.Duration } @@ -1081,9 +1081,9 @@ func (o *Part) GetOptimizedForStreaming() *bool { return o.OptimizedForStreaming } -func (o *Part) GetVideoProfile() string { +func (o *Part) GetVideoProfile() *string { if o == nil { - return "" + return nil } return o.VideoProfile } @@ -1111,19 +1111,19 @@ func (o *Part) GetStream() []Stream { type Media struct { ID int `json:"id"` - Duration int `json:"duration"` - Bitrate int `json:"bitrate"` - Width int `json:"width"` - Height int `json:"height"` - AspectRatio float64 `json:"aspectRatio"` + Duration *int `json:"duration,omitempty"` + Bitrate *int `json:"bitrate,omitempty"` + Width *int `json:"width,omitempty"` + Height *int `json:"height,omitempty"` + AspectRatio *float64 `json:"aspectRatio,omitempty"` AudioProfile *string `json:"audioProfile,omitempty"` - AudioChannels int `json:"audioChannels"` - AudioCodec string `json:"audioCodec"` - VideoCodec string `json:"videoCodec"` - VideoResolution string `json:"videoResolution"` + AudioChannels *int `json:"audioChannels,omitempty"` + AudioCodec *string `json:"audioCodec,omitempty"` + VideoCodec *string `json:"videoCodec,omitempty"` + VideoResolution *string `json:"videoResolution,omitempty"` Container string `json:"container"` - VideoFrameRate string `json:"videoFrameRate"` - VideoProfile string `json:"videoProfile"` + VideoFrameRate *string `json:"videoFrameRate,omitempty"` + VideoProfile *string `json:"videoProfile,omitempty"` HasVoiceActivity *bool `json:"hasVoiceActivity,omitempty"` OptimizedForStreaming *OptimizedForStreaming `default:"0" json:"optimizedForStreaming"` Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"` @@ -1148,37 +1148,37 @@ func (o *Media) GetID() int { return o.ID } -func (o *Media) GetDuration() int { +func (o *Media) GetDuration() *int { if o == nil { - return 0 + return nil } return o.Duration } -func (o *Media) GetBitrate() int { +func (o *Media) GetBitrate() *int { if o == nil { - return 0 + return nil } return o.Bitrate } -func (o *Media) GetWidth() int { +func (o *Media) GetWidth() *int { if o == nil { - return 0 + return nil } return o.Width } -func (o *Media) GetHeight() int { +func (o *Media) GetHeight() *int { if o == nil { - return 0 + return nil } return o.Height } -func (o *Media) GetAspectRatio() float64 { +func (o *Media) GetAspectRatio() *float64 { if o == nil { - return 0.0 + return nil } return o.AspectRatio } @@ -1190,30 +1190,30 @@ func (o *Media) GetAudioProfile() *string { return o.AudioProfile } -func (o *Media) GetAudioChannels() int { +func (o *Media) GetAudioChannels() *int { if o == nil { - return 0 + return nil } return o.AudioChannels } -func (o *Media) GetAudioCodec() string { +func (o *Media) GetAudioCodec() *string { if o == nil { - return "" + return nil } return o.AudioCodec } -func (o *Media) GetVideoCodec() string { +func (o *Media) GetVideoCodec() *string { if o == nil { - return "" + return nil } return o.VideoCodec } -func (o *Media) GetVideoResolution() string { +func (o *Media) GetVideoResolution() *string { if o == nil { - return "" + return nil } return o.VideoResolution } @@ -1225,16 +1225,16 @@ func (o *Media) GetContainer() string { return o.Container } -func (o *Media) GetVideoFrameRate() string { +func (o *Media) GetVideoFrameRate() *string { if o == nil { - return "" + return nil } return o.VideoFrameRate } -func (o *Media) GetVideoProfile() string { +func (o *Media) GetVideoProfile() *string { if o == nil { - return "" + return nil } return o.VideoProfile } @@ -1379,6 +1379,17 @@ func (o *Role) GetRole() *string { return o.Role } +type Location struct { + Path *string `json:"path,omitempty"` +} + +func (o *Location) GetPath() *string { + if o == nil { + return nil + } + return o.Path +} + type MediaGUID struct { // Can be one of the following formats: // imdb://tt13015952, tmdb://2434012, tvdb://7945991 @@ -1581,6 +1592,7 @@ type GetRecentlyAddedMetadata struct { Writer []Writer `json:"Writer,omitempty"` Collection []Collection `json:"Collection,omitempty"` Role []Role `json:"Role,omitempty"` + Location []Location `json:"Location,omitempty"` // The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. // MediaGUID []MediaGUID `json:"Guid,omitempty"` @@ -1953,6 +1965,13 @@ func (o *GetRecentlyAddedMetadata) GetRole() []Role { return o.Role } +func (o *GetRecentlyAddedMetadata) GetLocation() []Location { + if o == nil { + return nil + } + return o.Location +} + func (o *GetRecentlyAddedMetadata) GetMediaGUID() []MediaGUID { if o == nil { return nil diff --git a/models/operations/getrefreshlibrarymetadata.go b/models/operations/getrefreshlibrarymetadata.go index e71ac91..9687f20 100644 --- a/models/operations/getrefreshlibrarymetadata.go +++ b/models/operations/getrefreshlibrarymetadata.go @@ -36,19 +36,12 @@ func (e *Force) UnmarshalJSON(data []byte) error { } type GetRefreshLibraryMetadataRequest struct { + // Force the refresh even if the library is already being refreshed. + Force *Force `queryParam:"style=form,explode=true,name=force"` // The unique key of the Plex library. // Note: This is unique in the context of the Plex server. // SectionKey int `pathParam:"style=simple,explode=false,name=sectionKey"` - // Force the refresh even if the library is already being refreshed. - Force *Force `queryParam:"style=form,explode=true,name=force"` -} - -func (o *GetRefreshLibraryMetadataRequest) GetSectionKey() int { - if o == nil { - return 0 - } - return o.SectionKey } func (o *GetRefreshLibraryMetadataRequest) GetForce() *Force { @@ -58,6 +51,13 @@ func (o *GetRefreshLibraryMetadataRequest) GetForce() *Force { return o.Force } +func (o *GetRefreshLibraryMetadataRequest) GetSectionKey() int { + if o == nil { + return 0 + } + return o.SectionKey +} + type GetRefreshLibraryMetadataResponse struct { // HTTP response content type for this operation ContentType string diff --git a/models/operations/getsearchalllibraries.go b/models/operations/getsearchalllibraries.go new file mode 100644 index 0000000..56e8472 --- /dev/null +++ b/models/operations/getsearchalllibraries.go @@ -0,0 +1,1928 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "github.com/LukeHagar/plexgo/internal/utils" + "github.com/LukeHagar/plexgo/types" + "net/http" +) + +type GetSearchAllLibrariesGlobals struct { + // An opaque identifier unique to the client (UUID, serial number, or other unique device ID) + ClientID *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"` +} + +func (o *GetSearchAllLibrariesGlobals) GetClientID() *string { + if o == nil { + return nil + } + return o.ClientID +} + +type SearchTypes string + +const ( + SearchTypesMovies SearchTypes = "movies" + SearchTypesMusic SearchTypes = "music" + SearchTypesOtherVideos SearchTypes = "otherVideos" + SearchTypesPeople SearchTypes = "people" + SearchTypesTv SearchTypes = "tv" +) + +func (e SearchTypes) ToPointer() *SearchTypes { + return &e +} +func (e *SearchTypes) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "movies": + fallthrough + case "music": + fallthrough + case "otherVideos": + fallthrough + case "people": + fallthrough + case "tv": + *e = SearchTypes(v) + return nil + default: + return fmt.Errorf("invalid value for SearchTypes: %v", v) + } +} + +// QueryParamIncludeCollections - Whether to include collections in the search results. +type QueryParamIncludeCollections int + +const ( + QueryParamIncludeCollectionsDisable QueryParamIncludeCollections = 0 + QueryParamIncludeCollectionsEnable QueryParamIncludeCollections = 1 +) + +func (e QueryParamIncludeCollections) ToPointer() *QueryParamIncludeCollections { + return &e +} +func (e *QueryParamIncludeCollections) UnmarshalJSON(data []byte) error { + var v int + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case 0: + fallthrough + case 1: + *e = QueryParamIncludeCollections(v) + return nil + default: + return fmt.Errorf("invalid value for QueryParamIncludeCollections: %v", v) + } +} + +// QueryParamIncludeExternalMedia - Whether to include external media in the search results. +type QueryParamIncludeExternalMedia int + +const ( + QueryParamIncludeExternalMediaDisable QueryParamIncludeExternalMedia = 0 + QueryParamIncludeExternalMediaEnable QueryParamIncludeExternalMedia = 1 +) + +func (e QueryParamIncludeExternalMedia) ToPointer() *QueryParamIncludeExternalMedia { + return &e +} +func (e *QueryParamIncludeExternalMedia) UnmarshalJSON(data []byte) error { + var v int + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case 0: + fallthrough + case 1: + *e = QueryParamIncludeExternalMedia(v) + return nil + default: + return fmt.Errorf("invalid value for QueryParamIncludeExternalMedia: %v", v) + } +} + +type GetSearchAllLibrariesRequest struct { + // The search query term. + Query string `queryParam:"style=form,explode=true,name=query"` + // An opaque identifier unique to the client (UUID, serial number, or other unique device ID) + ClientID *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"` + // Limit the number of results returned. + Limit *int64 `queryParam:"style=form,explode=true,name=limit"` + // A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv. + // + SearchTypes []SearchTypes `queryParam:"style=form,explode=false,name=searchTypes"` + // Whether to include collections in the search results. + IncludeCollections *QueryParamIncludeCollections `default:"0" queryParam:"style=form,explode=true,name=includeCollections"` + // Whether to include external media in the search results. + IncludeExternalMedia *QueryParamIncludeExternalMedia `default:"0" queryParam:"style=form,explode=true,name=includeExternalMedia"` +} + +func (g GetSearchAllLibrariesRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetSearchAllLibrariesRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { + return err + } + return nil +} + +func (o *GetSearchAllLibrariesRequest) GetQuery() string { + if o == nil { + return "" + } + return o.Query +} + +func (o *GetSearchAllLibrariesRequest) GetClientID() *string { + if o == nil { + return nil + } + return o.ClientID +} + +func (o *GetSearchAllLibrariesRequest) GetLimit() *int64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *GetSearchAllLibrariesRequest) GetSearchTypes() []SearchTypes { + if o == nil { + return nil + } + return o.SearchTypes +} + +func (o *GetSearchAllLibrariesRequest) GetIncludeCollections() *QueryParamIncludeCollections { + if o == nil { + return nil + } + return o.IncludeCollections +} + +func (o *GetSearchAllLibrariesRequest) GetIncludeExternalMedia() *QueryParamIncludeExternalMedia { + if o == nil { + return nil + } + return o.IncludeExternalMedia +} + +// GetSearchAllLibrariesType - The type of media content +type GetSearchAllLibrariesType string + +const ( + GetSearchAllLibrariesTypeMovie GetSearchAllLibrariesType = "movie" + GetSearchAllLibrariesTypeTvShow GetSearchAllLibrariesType = "show" + GetSearchAllLibrariesTypeSeason GetSearchAllLibrariesType = "season" + GetSearchAllLibrariesTypeEpisode GetSearchAllLibrariesType = "episode" +) + +func (e GetSearchAllLibrariesType) ToPointer() *GetSearchAllLibrariesType { + return &e +} +func (e *GetSearchAllLibrariesType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "movie": + fallthrough + case "show": + fallthrough + case "season": + fallthrough + case "episode": + *e = GetSearchAllLibrariesType(v) + return nil + default: + return fmt.Errorf("invalid value for GetSearchAllLibrariesType: %v", v) + } +} + +type GetSearchAllLibrariesFlattenSeasons string + +const ( + GetSearchAllLibrariesFlattenSeasonsFalse GetSearchAllLibrariesFlattenSeasons = "0" + GetSearchAllLibrariesFlattenSeasonsTrue GetSearchAllLibrariesFlattenSeasons = "1" +) + +func (e GetSearchAllLibrariesFlattenSeasons) ToPointer() *GetSearchAllLibrariesFlattenSeasons { + return &e +} +func (e *GetSearchAllLibrariesFlattenSeasons) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "0": + fallthrough + case "1": + *e = GetSearchAllLibrariesFlattenSeasons(v) + return nil + default: + return fmt.Errorf("invalid value for GetSearchAllLibrariesFlattenSeasons: %v", v) + } +} + +// GetSearchAllLibrariesShowOrdering - Setting that indicates the episode ordering for the show +// None = Library default, +// tmdbAiring = The Movie Database (Aired), +// aired = TheTVDB (Aired), +// dvd = TheTVDB (DVD), +// absolute = TheTVDB (Absolute)). +type GetSearchAllLibrariesShowOrdering string + +const ( + GetSearchAllLibrariesShowOrderingNone GetSearchAllLibrariesShowOrdering = "None" + GetSearchAllLibrariesShowOrderingTmdbAiring GetSearchAllLibrariesShowOrdering = "tmdbAiring" + GetSearchAllLibrariesShowOrderingAired GetSearchAllLibrariesShowOrdering = "aired" + GetSearchAllLibrariesShowOrderingDvd GetSearchAllLibrariesShowOrdering = "dvd" + GetSearchAllLibrariesShowOrderingAbsolute GetSearchAllLibrariesShowOrdering = "absolute" +) + +func (e GetSearchAllLibrariesShowOrdering) ToPointer() *GetSearchAllLibrariesShowOrdering { + return &e +} +func (e *GetSearchAllLibrariesShowOrdering) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "None": + fallthrough + case "tmdbAiring": + fallthrough + case "aired": + fallthrough + case "dvd": + fallthrough + case "absolute": + *e = GetSearchAllLibrariesShowOrdering(v) + return nil + default: + return fmt.Errorf("invalid value for GetSearchAllLibrariesShowOrdering: %v", v) + } +} + +type GetSearchAllLibrariesOptimizedForStreaming int + +const ( + GetSearchAllLibrariesOptimizedForStreamingDisable GetSearchAllLibrariesOptimizedForStreaming = 0 + GetSearchAllLibrariesOptimizedForStreamingEnable GetSearchAllLibrariesOptimizedForStreaming = 1 +) + +func (e GetSearchAllLibrariesOptimizedForStreaming) ToPointer() *GetSearchAllLibrariesOptimizedForStreaming { + return &e +} +func (e *GetSearchAllLibrariesOptimizedForStreaming) UnmarshalJSON(data []byte) error { + var v int + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case 0: + fallthrough + case 1: + *e = GetSearchAllLibrariesOptimizedForStreaming(v) + return nil + default: + return fmt.Errorf("invalid value for GetSearchAllLibrariesOptimizedForStreaming: %v", v) + } +} + +type GetSearchAllLibrariesHasThumbnail string + +const ( + GetSearchAllLibrariesHasThumbnailFalse GetSearchAllLibrariesHasThumbnail = "0" + GetSearchAllLibrariesHasThumbnailTrue GetSearchAllLibrariesHasThumbnail = "1" +) + +func (e GetSearchAllLibrariesHasThumbnail) ToPointer() *GetSearchAllLibrariesHasThumbnail { + return &e +} +func (e *GetSearchAllLibrariesHasThumbnail) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "0": + fallthrough + case "1": + *e = GetSearchAllLibrariesHasThumbnail(v) + return nil + default: + return fmt.Errorf("invalid value for GetSearchAllLibrariesHasThumbnail: %v", v) + } +} + +type GetSearchAllLibrariesStream struct { + ID int64 `json:"id"` + // Type of stream (1 = video, 2 = audio, 3 = subtitle) + StreamType int64 `json:"streamType"` + // Indicates if this is the default stream + Default *bool `json:"default,omitempty"` + // Indicates if the stream is selected + Selected *bool `json:"selected,omitempty"` + // Codec used by the stream + Codec string `json:"codec"` + // The index of the stream + Index int64 `json:"index"` + // The bitrate of the stream in kbps + Bitrate *int64 `json:"bitrate,omitempty"` + // The color primaries of the video stream + ColorPrimaries *string `json:"colorPrimaries,omitempty"` + // The color range of the video stream + ColorRange *string `json:"colorRange,omitempty"` + // The color space of the video stream + ColorSpace *string `json:"colorSpace,omitempty"` + // The transfer characteristics (TRC) of the video stream + ColorTrc *string `json:"colorTrc,omitempty"` + // The bit depth of the video stream + BitDepth *int64 `json:"bitDepth,omitempty"` + // The chroma location of the video stream + ChromaLocation *string `json:"chromaLocation,omitempty"` + // The identifier of the video stream + StreamIdentifier *string `json:"streamIdentifier,omitempty"` + // The chroma subsampling format + ChromaSubsampling *string `json:"chromaSubsampling,omitempty"` + // The coded height of the video stream + CodedHeight *int64 `json:"codedHeight,omitempty"` + // The coded width of the video stream + CodedWidth *int64 `json:"codedWidth,omitempty"` + // The frame rate of the video stream + FrameRate *float64 `json:"frameRate,omitempty"` + // Indicates if the stream has a scaling matrix + HasScalingMatrix *bool `json:"hasScalingMatrix,omitempty"` + HearingImpaired *bool `json:"hearingImpaired,omitempty"` + ClosedCaptions *bool `json:"closedCaptions,omitempty"` + EmbeddedInVideo *string `json:"embeddedInVideo,omitempty"` + // The height of the video stream + Height *int64 `json:"height,omitempty"` + // The level of the video codec + Level *int64 `json:"level,omitempty"` + // The profile of the video codec + Profile *string `json:"profile,omitempty"` + // Number of reference frames + RefFrames *int64 `json:"refFrames,omitempty"` + // The scan type (progressive or interlaced) + ScanType *string `json:"scanType,omitempty"` + // The width of the video stream + Width *int64 `json:"width,omitempty"` + // Display title of the stream + DisplayTitle *string `json:"displayTitle,omitempty"` + // Extended display title of the stream + ExtendedDisplayTitle *string `json:"extendedDisplayTitle,omitempty"` + // Number of audio channels (for audio streams) + Channels *int64 `json:"channels,omitempty"` + // The language of the stream (for audio/subtitle streams) + Language *string `json:"language,omitempty"` + // Language tag of the stream + LanguageTag *string `json:"languageTag,omitempty"` + // Language code of the stream + LanguageCode *string `json:"languageCode,omitempty"` + // The audio channel layout + AudioChannelLayout *string `json:"audioChannelLayout,omitempty"` + // Sampling rate of the audio stream in Hz + SamplingRate *int64 `json:"samplingRate,omitempty"` + // Title of the subtitle track (for subtitle streams) + Title *string `json:"title,omitempty"` + // Indicates if the subtitle stream can auto-sync + CanAutoSync *bool `json:"canAutoSync,omitempty"` +} + +func (o *GetSearchAllLibrariesStream) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} + +func (o *GetSearchAllLibrariesStream) GetStreamType() int64 { + if o == nil { + return 0 + } + return o.StreamType +} + +func (o *GetSearchAllLibrariesStream) GetDefault() *bool { + if o == nil { + return nil + } + return o.Default +} + +func (o *GetSearchAllLibrariesStream) GetSelected() *bool { + if o == nil { + return nil + } + return o.Selected +} + +func (o *GetSearchAllLibrariesStream) GetCodec() string { + if o == nil { + return "" + } + return o.Codec +} + +func (o *GetSearchAllLibrariesStream) GetIndex() int64 { + if o == nil { + return 0 + } + return o.Index +} + +func (o *GetSearchAllLibrariesStream) GetBitrate() *int64 { + if o == nil { + return nil + } + return o.Bitrate +} + +func (o *GetSearchAllLibrariesStream) GetColorPrimaries() *string { + if o == nil { + return nil + } + return o.ColorPrimaries +} + +func (o *GetSearchAllLibrariesStream) GetColorRange() *string { + if o == nil { + return nil + } + return o.ColorRange +} + +func (o *GetSearchAllLibrariesStream) GetColorSpace() *string { + if o == nil { + return nil + } + return o.ColorSpace +} + +func (o *GetSearchAllLibrariesStream) GetColorTrc() *string { + if o == nil { + return nil + } + return o.ColorTrc +} + +func (o *GetSearchAllLibrariesStream) GetBitDepth() *int64 { + if o == nil { + return nil + } + return o.BitDepth +} + +func (o *GetSearchAllLibrariesStream) GetChromaLocation() *string { + if o == nil { + return nil + } + return o.ChromaLocation +} + +func (o *GetSearchAllLibrariesStream) GetStreamIdentifier() *string { + if o == nil { + return nil + } + return o.StreamIdentifier +} + +func (o *GetSearchAllLibrariesStream) GetChromaSubsampling() *string { + if o == nil { + return nil + } + return o.ChromaSubsampling +} + +func (o *GetSearchAllLibrariesStream) GetCodedHeight() *int64 { + if o == nil { + return nil + } + return o.CodedHeight +} + +func (o *GetSearchAllLibrariesStream) GetCodedWidth() *int64 { + if o == nil { + return nil + } + return o.CodedWidth +} + +func (o *GetSearchAllLibrariesStream) GetFrameRate() *float64 { + if o == nil { + return nil + } + return o.FrameRate +} + +func (o *GetSearchAllLibrariesStream) GetHasScalingMatrix() *bool { + if o == nil { + return nil + } + return o.HasScalingMatrix +} + +func (o *GetSearchAllLibrariesStream) GetHearingImpaired() *bool { + if o == nil { + return nil + } + return o.HearingImpaired +} + +func (o *GetSearchAllLibrariesStream) GetClosedCaptions() *bool { + if o == nil { + return nil + } + return o.ClosedCaptions +} + +func (o *GetSearchAllLibrariesStream) GetEmbeddedInVideo() *string { + if o == nil { + return nil + } + return o.EmbeddedInVideo +} + +func (o *GetSearchAllLibrariesStream) GetHeight() *int64 { + if o == nil { + return nil + } + return o.Height +} + +func (o *GetSearchAllLibrariesStream) GetLevel() *int64 { + if o == nil { + return nil + } + return o.Level +} + +func (o *GetSearchAllLibrariesStream) GetProfile() *string { + if o == nil { + return nil + } + return o.Profile +} + +func (o *GetSearchAllLibrariesStream) GetRefFrames() *int64 { + if o == nil { + return nil + } + return o.RefFrames +} + +func (o *GetSearchAllLibrariesStream) GetScanType() *string { + if o == nil { + return nil + } + return o.ScanType +} + +func (o *GetSearchAllLibrariesStream) GetWidth() *int64 { + if o == nil { + return nil + } + return o.Width +} + +func (o *GetSearchAllLibrariesStream) GetDisplayTitle() *string { + if o == nil { + return nil + } + return o.DisplayTitle +} + +func (o *GetSearchAllLibrariesStream) GetExtendedDisplayTitle() *string { + if o == nil { + return nil + } + return o.ExtendedDisplayTitle +} + +func (o *GetSearchAllLibrariesStream) GetChannels() *int64 { + if o == nil { + return nil + } + return o.Channels +} + +func (o *GetSearchAllLibrariesStream) GetLanguage() *string { + if o == nil { + return nil + } + return o.Language +} + +func (o *GetSearchAllLibrariesStream) GetLanguageTag() *string { + if o == nil { + return nil + } + return o.LanguageTag +} + +func (o *GetSearchAllLibrariesStream) GetLanguageCode() *string { + if o == nil { + return nil + } + return o.LanguageCode +} + +func (o *GetSearchAllLibrariesStream) GetAudioChannelLayout() *string { + if o == nil { + return nil + } + return o.AudioChannelLayout +} + +func (o *GetSearchAllLibrariesStream) GetSamplingRate() *int64 { + if o == nil { + return nil + } + return o.SamplingRate +} + +func (o *GetSearchAllLibrariesStream) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *GetSearchAllLibrariesStream) GetCanAutoSync() *bool { + if o == nil { + return nil + } + return o.CanAutoSync +} + +type GetSearchAllLibrariesPart struct { + ID int `json:"id"` + Key string `json:"key"` + Duration *int `json:"duration,omitempty"` + File string `json:"file"` + Size int64 `json:"size"` + // The container format of the media file. + // + Container string `json:"container"` + AudioProfile *string `json:"audioProfile,omitempty"` + Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"` + OptimizedForStreaming *bool `json:"optimizedForStreaming,omitempty"` + VideoProfile *string `json:"videoProfile,omitempty"` + Indexes *string `json:"indexes,omitempty"` + HasThumbnail *GetSearchAllLibrariesHasThumbnail `default:"0" json:"hasThumbnail"` + Stream []GetSearchAllLibrariesStream `json:"Stream,omitempty"` +} + +func (g GetSearchAllLibrariesPart) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetSearchAllLibrariesPart) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { + return err + } + return nil +} + +func (o *GetSearchAllLibrariesPart) GetID() int { + if o == nil { + return 0 + } + return o.ID +} + +func (o *GetSearchAllLibrariesPart) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *GetSearchAllLibrariesPart) GetDuration() *int { + if o == nil { + return nil + } + return o.Duration +} + +func (o *GetSearchAllLibrariesPart) GetFile() string { + if o == nil { + return "" + } + return o.File +} + +func (o *GetSearchAllLibrariesPart) GetSize() int64 { + if o == nil { + return 0 + } + return o.Size +} + +func (o *GetSearchAllLibrariesPart) GetContainer() string { + if o == nil { + return "" + } + return o.Container +} + +func (o *GetSearchAllLibrariesPart) GetAudioProfile() *string { + if o == nil { + return nil + } + return o.AudioProfile +} + +func (o *GetSearchAllLibrariesPart) GetHas64bitOffsets() *bool { + if o == nil { + return nil + } + return o.Has64bitOffsets +} + +func (o *GetSearchAllLibrariesPart) GetOptimizedForStreaming() *bool { + if o == nil { + return nil + } + return o.OptimizedForStreaming +} + +func (o *GetSearchAllLibrariesPart) GetVideoProfile() *string { + if o == nil { + return nil + } + return o.VideoProfile +} + +func (o *GetSearchAllLibrariesPart) GetIndexes() *string { + if o == nil { + return nil + } + return o.Indexes +} + +func (o *GetSearchAllLibrariesPart) GetHasThumbnail() *GetSearchAllLibrariesHasThumbnail { + if o == nil { + return nil + } + return o.HasThumbnail +} + +func (o *GetSearchAllLibrariesPart) GetStream() []GetSearchAllLibrariesStream { + if o == nil { + return nil + } + return o.Stream +} + +type GetSearchAllLibrariesMedia struct { + ID int `json:"id"` + Duration *int `json:"duration,omitempty"` + Bitrate *int `json:"bitrate,omitempty"` + Width *int `json:"width,omitempty"` + Height *int `json:"height,omitempty"` + AspectRatio *float64 `json:"aspectRatio,omitempty"` + AudioProfile *string `json:"audioProfile,omitempty"` + AudioChannels *int `json:"audioChannels,omitempty"` + AudioCodec *string `json:"audioCodec,omitempty"` + VideoCodec *string `json:"videoCodec,omitempty"` + VideoResolution *string `json:"videoResolution,omitempty"` + Container string `json:"container"` + VideoFrameRate *string `json:"videoFrameRate,omitempty"` + VideoProfile *string `json:"videoProfile,omitempty"` + HasVoiceActivity *bool `json:"hasVoiceActivity,omitempty"` + OptimizedForStreaming *GetSearchAllLibrariesOptimizedForStreaming `default:"0" json:"optimizedForStreaming"` + Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"` + Part []GetSearchAllLibrariesPart `json:"Part"` +} + +func (g GetSearchAllLibrariesMedia) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetSearchAllLibrariesMedia) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { + return err + } + return nil +} + +func (o *GetSearchAllLibrariesMedia) GetID() int { + if o == nil { + return 0 + } + return o.ID +} + +func (o *GetSearchAllLibrariesMedia) GetDuration() *int { + if o == nil { + return nil + } + return o.Duration +} + +func (o *GetSearchAllLibrariesMedia) GetBitrate() *int { + if o == nil { + return nil + } + return o.Bitrate +} + +func (o *GetSearchAllLibrariesMedia) GetWidth() *int { + if o == nil { + return nil + } + return o.Width +} + +func (o *GetSearchAllLibrariesMedia) GetHeight() *int { + if o == nil { + return nil + } + return o.Height +} + +func (o *GetSearchAllLibrariesMedia) GetAspectRatio() *float64 { + if o == nil { + return nil + } + return o.AspectRatio +} + +func (o *GetSearchAllLibrariesMedia) GetAudioProfile() *string { + if o == nil { + return nil + } + return o.AudioProfile +} + +func (o *GetSearchAllLibrariesMedia) GetAudioChannels() *int { + if o == nil { + return nil + } + return o.AudioChannels +} + +func (o *GetSearchAllLibrariesMedia) GetAudioCodec() *string { + if o == nil { + return nil + } + return o.AudioCodec +} + +func (o *GetSearchAllLibrariesMedia) GetVideoCodec() *string { + if o == nil { + return nil + } + return o.VideoCodec +} + +func (o *GetSearchAllLibrariesMedia) GetVideoResolution() *string { + if o == nil { + return nil + } + return o.VideoResolution +} + +func (o *GetSearchAllLibrariesMedia) GetContainer() string { + if o == nil { + return "" + } + return o.Container +} + +func (o *GetSearchAllLibrariesMedia) GetVideoFrameRate() *string { + if o == nil { + return nil + } + return o.VideoFrameRate +} + +func (o *GetSearchAllLibrariesMedia) GetVideoProfile() *string { + if o == nil { + return nil + } + return o.VideoProfile +} + +func (o *GetSearchAllLibrariesMedia) GetHasVoiceActivity() *bool { + if o == nil { + return nil + } + return o.HasVoiceActivity +} + +func (o *GetSearchAllLibrariesMedia) GetOptimizedForStreaming() *GetSearchAllLibrariesOptimizedForStreaming { + if o == nil { + return nil + } + return o.OptimizedForStreaming +} + +func (o *GetSearchAllLibrariesMedia) GetHas64bitOffsets() *bool { + if o == nil { + return nil + } + return o.Has64bitOffsets +} + +func (o *GetSearchAllLibrariesMedia) GetPart() []GetSearchAllLibrariesPart { + if o == nil { + return []GetSearchAllLibrariesPart{} + } + return o.Part +} + +type GetSearchAllLibrariesGenre struct { + Tag *string `json:"tag,omitempty"` +} + +func (o *GetSearchAllLibrariesGenre) GetTag() *string { + if o == nil { + return nil + } + return o.Tag +} + +type GetSearchAllLibrariesCountry struct { + Tag *string `json:"tag,omitempty"` +} + +func (o *GetSearchAllLibrariesCountry) GetTag() *string { + if o == nil { + return nil + } + return o.Tag +} + +type GetSearchAllLibrariesDirector struct { + Tag *string `json:"tag,omitempty"` +} + +func (o *GetSearchAllLibrariesDirector) GetTag() *string { + if o == nil { + return nil + } + return o.Tag +} + +type GetSearchAllLibrariesWriter struct { + Tag *string `json:"tag,omitempty"` +} + +func (o *GetSearchAllLibrariesWriter) GetTag() *string { + if o == nil { + return nil + } + return o.Tag +} + +type GetSearchAllLibrariesCollection struct { + Tag *string `json:"tag,omitempty"` +} + +func (o *GetSearchAllLibrariesCollection) GetTag() *string { + if o == nil { + return nil + } + return o.Tag +} + +type GetSearchAllLibrariesRole struct { + // The ID of the tag or actor. + ID *int64 `json:"id,omitempty"` + // The filter used to find the actor or tag. + Filter *string `json:"filter,omitempty"` + // The thumbnail of the actor + Thumb *string `json:"thumb,omitempty"` + // The name of the tag or actor. + Tag *string `json:"tag,omitempty"` + // Unique identifier for the tag. + TagKey *string `json:"tagKey,omitempty"` + // The role of the actor or tag in the media. + Role *string `json:"role,omitempty"` +} + +func (o *GetSearchAllLibrariesRole) GetID() *int64 { + if o == nil { + return nil + } + return o.ID +} + +func (o *GetSearchAllLibrariesRole) GetFilter() *string { + if o == nil { + return nil + } + return o.Filter +} + +func (o *GetSearchAllLibrariesRole) GetThumb() *string { + if o == nil { + return nil + } + return o.Thumb +} + +func (o *GetSearchAllLibrariesRole) GetTag() *string { + if o == nil { + return nil + } + return o.Tag +} + +func (o *GetSearchAllLibrariesRole) GetTagKey() *string { + if o == nil { + return nil + } + return o.TagKey +} + +func (o *GetSearchAllLibrariesRole) GetRole() *string { + if o == nil { + return nil + } + return o.Role +} + +type GetSearchAllLibrariesLocation struct { + Path *string `json:"path,omitempty"` +} + +func (o *GetSearchAllLibrariesLocation) GetPath() *string { + if o == nil { + return nil + } + return o.Path +} + +type GetSearchAllLibrariesMediaGUID struct { + // Can be one of the following formats: + // imdb://tt13015952, tmdb://2434012, tvdb://7945991 + // + ID string `json:"id"` +} + +func (o *GetSearchAllLibrariesMediaGUID) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type GetSearchAllLibrariesUltraBlurColors struct { + TopLeft string `json:"topLeft"` + TopRight string `json:"topRight"` + BottomRight string `json:"bottomRight"` + BottomLeft string `json:"bottomLeft"` +} + +func (o *GetSearchAllLibrariesUltraBlurColors) GetTopLeft() string { + if o == nil { + return "" + } + return o.TopLeft +} + +func (o *GetSearchAllLibrariesUltraBlurColors) GetTopRight() string { + if o == nil { + return "" + } + return o.TopRight +} + +func (o *GetSearchAllLibrariesUltraBlurColors) GetBottomRight() string { + if o == nil { + return "" + } + return o.BottomRight +} + +func (o *GetSearchAllLibrariesUltraBlurColors) GetBottomLeft() string { + if o == nil { + return "" + } + return o.BottomLeft +} + +type GetSearchAllLibrariesMetaDataRating struct { + // A URI or path to the rating image. + Image string `json:"image"` + // The value of the rating. + Value float32 `json:"value"` + // The type of rating (e.g., audience, critic). + Type string `json:"type"` +} + +func (o *GetSearchAllLibrariesMetaDataRating) GetImage() string { + if o == nil { + return "" + } + return o.Image +} + +func (o *GetSearchAllLibrariesMetaDataRating) GetValue() float32 { + if o == nil { + return 0.0 + } + return o.Value +} + +func (o *GetSearchAllLibrariesMetaDataRating) GetType() string { + if o == nil { + return "" + } + return o.Type +} + +type GetSearchAllLibrariesLibraryType string + +const ( + GetSearchAllLibrariesLibraryTypeCoverPoster GetSearchAllLibrariesLibraryType = "coverPoster" + GetSearchAllLibrariesLibraryTypeBackground GetSearchAllLibrariesLibraryType = "background" + GetSearchAllLibrariesLibraryTypeSnapshot GetSearchAllLibrariesLibraryType = "snapshot" + GetSearchAllLibrariesLibraryTypeClearLogo GetSearchAllLibrariesLibraryType = "clearLogo" +) + +func (e GetSearchAllLibrariesLibraryType) ToPointer() *GetSearchAllLibrariesLibraryType { + return &e +} +func (e *GetSearchAllLibrariesLibraryType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "coverPoster": + fallthrough + case "background": + fallthrough + case "snapshot": + fallthrough + case "clearLogo": + *e = GetSearchAllLibrariesLibraryType(v) + return nil + default: + return fmt.Errorf("invalid value for GetSearchAllLibrariesLibraryType: %v", v) + } +} + +type GetSearchAllLibrariesImage struct { + Alt string `json:"alt"` + Type GetSearchAllLibrariesLibraryType `json:"type"` + URL string `json:"url"` +} + +func (o *GetSearchAllLibrariesImage) GetAlt() string { + if o == nil { + return "" + } + return o.Alt +} + +func (o *GetSearchAllLibrariesImage) GetType() GetSearchAllLibrariesLibraryType { + if o == nil { + return GetSearchAllLibrariesLibraryType("") + } + return o.Type +} + +func (o *GetSearchAllLibrariesImage) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +type GetSearchAllLibrariesMetadata struct { + // The rating key (Media ID) of this media item. + // Note: This is always an integer, but is represented as a string in the API. + // + RatingKey string `json:"ratingKey"` + Key string `json:"key"` + GUID string `json:"guid"` + Studio *string `json:"studio,omitempty"` + SkipChildren *bool `json:"skipChildren,omitempty"` + LibrarySectionID *int64 `json:"librarySectionID,omitempty"` + LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"` + LibrarySectionKey *string `json:"librarySectionKey,omitempty"` + // The type of media content + // + Type GetSearchAllLibrariesType `json:"type"` + Title string `json:"title"` + Slug *string `json:"slug,omitempty"` + ContentRating *string `json:"contentRating,omitempty"` + Summary string `json:"summary"` + Rating *float64 `json:"rating,omitempty"` + AudienceRating *float64 `json:"audienceRating,omitempty"` + Year *int `json:"year,omitempty"` + SeasonCount *int `json:"seasonCount,omitempty"` + Tagline *string `json:"tagline,omitempty"` + FlattenSeasons *GetSearchAllLibrariesFlattenSeasons `default:"0" json:"flattenSeasons"` + // Setting that indicates the episode ordering for the show + // None = Library default, + // tmdbAiring = The Movie Database (Aired), + // aired = TheTVDB (Aired), + // dvd = TheTVDB (DVD), + // absolute = TheTVDB (Absolute)). + // + ShowOrdering *GetSearchAllLibrariesShowOrdering `json:"showOrdering,omitempty"` + Thumb *string `json:"thumb,omitempty"` + Art *string `json:"art,omitempty"` + Banner *string `json:"banner,omitempty"` + Duration *int `json:"duration,omitempty"` + OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"` + // Unix epoch datetime in seconds + AddedAt int64 `json:"addedAt"` + // Unix epoch datetime in seconds + UpdatedAt *int64 `json:"updatedAt,omitempty"` + AudienceRatingImage *string `json:"audienceRatingImage,omitempty"` + ChapterSource *string `json:"chapterSource,omitempty"` + PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"` + RatingImage *string `json:"ratingImage,omitempty"` + GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"` + GrandparentGUID *string `json:"grandparentGuid,omitempty"` + GrandparentKey *string `json:"grandparentKey,omitempty"` + GrandparentTitle *string `json:"grandparentTitle,omitempty"` + GrandparentThumb *string `json:"grandparentThumb,omitempty"` + ParentSlug *string `json:"parentSlug,omitempty"` + GrandparentSlug *string `json:"grandparentSlug,omitempty"` + GrandparentArt *string `json:"grandparentArt,omitempty"` + GrandparentTheme *string `json:"grandparentTheme,omitempty"` + // The Media object is only included when type query is `4` or higher. + // + Media []GetSearchAllLibrariesMedia `json:"Media,omitempty"` + Genre []GetSearchAllLibrariesGenre `json:"Genre,omitempty"` + Country []GetSearchAllLibrariesCountry `json:"Country,omitempty"` + Director []GetSearchAllLibrariesDirector `json:"Director,omitempty"` + Writer []GetSearchAllLibrariesWriter `json:"Writer,omitempty"` + Collection []GetSearchAllLibrariesCollection `json:"Collection,omitempty"` + Role []GetSearchAllLibrariesRole `json:"Role,omitempty"` + Location []GetSearchAllLibrariesLocation `json:"Location,omitempty"` + // The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. + // + MediaGUID []GetSearchAllLibrariesMediaGUID `json:"Guid,omitempty"` + UltraBlurColors *GetSearchAllLibrariesUltraBlurColors `json:"UltraBlurColors,omitempty"` + MetaDataRating []GetSearchAllLibrariesMetaDataRating `json:"Rating,omitempty"` + Image []GetSearchAllLibrariesImage `json:"Image,omitempty"` + TitleSort *string `json:"titleSort,omitempty"` + ViewCount *int `json:"viewCount,omitempty"` + LastViewedAt *int `json:"lastViewedAt,omitempty"` + OriginalTitle *string `json:"originalTitle,omitempty"` + ViewOffset *int `json:"viewOffset,omitempty"` + SkipCount *int `json:"skipCount,omitempty"` + Index *int `json:"index,omitempty"` + Theme *string `json:"theme,omitempty"` + LeafCount *int `json:"leafCount,omitempty"` + ViewedLeafCount *int `json:"viewedLeafCount,omitempty"` + ChildCount *int `json:"childCount,omitempty"` + HasPremiumExtras *string `json:"hasPremiumExtras,omitempty"` + HasPremiumPrimaryExtra *string `json:"hasPremiumPrimaryExtra,omitempty"` + // The rating key of the parent item. + // + ParentRatingKey *string `json:"parentRatingKey,omitempty"` + ParentGUID *string `json:"parentGuid,omitempty"` + ParentStudio *string `json:"parentStudio,omitempty"` + ParentKey *string `json:"parentKey,omitempty"` + ParentTitle *string `json:"parentTitle,omitempty"` + ParentIndex *int `json:"parentIndex,omitempty"` + ParentYear *int `json:"parentYear,omitempty"` + ParentThumb *string `json:"parentThumb,omitempty"` + ParentTheme *string `json:"parentTheme,omitempty"` +} + +func (g GetSearchAllLibrariesMetadata) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetSearchAllLibrariesMetadata) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { + return err + } + return nil +} + +func (o *GetSearchAllLibrariesMetadata) GetRatingKey() string { + if o == nil { + return "" + } + return o.RatingKey +} + +func (o *GetSearchAllLibrariesMetadata) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *GetSearchAllLibrariesMetadata) GetGUID() string { + if o == nil { + return "" + } + return o.GUID +} + +func (o *GetSearchAllLibrariesMetadata) GetStudio() *string { + if o == nil { + return nil + } + return o.Studio +} + +func (o *GetSearchAllLibrariesMetadata) GetSkipChildren() *bool { + if o == nil { + return nil + } + return o.SkipChildren +} + +func (o *GetSearchAllLibrariesMetadata) GetLibrarySectionID() *int64 { + if o == nil { + return nil + } + return o.LibrarySectionID +} + +func (o *GetSearchAllLibrariesMetadata) GetLibrarySectionTitle() *string { + if o == nil { + return nil + } + return o.LibrarySectionTitle +} + +func (o *GetSearchAllLibrariesMetadata) GetLibrarySectionKey() *string { + if o == nil { + return nil + } + return o.LibrarySectionKey +} + +func (o *GetSearchAllLibrariesMetadata) GetType() GetSearchAllLibrariesType { + if o == nil { + return GetSearchAllLibrariesType("") + } + return o.Type +} + +func (o *GetSearchAllLibrariesMetadata) GetTitle() string { + if o == nil { + return "" + } + return o.Title +} + +func (o *GetSearchAllLibrariesMetadata) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *GetSearchAllLibrariesMetadata) GetContentRating() *string { + if o == nil { + return nil + } + return o.ContentRating +} + +func (o *GetSearchAllLibrariesMetadata) GetSummary() string { + if o == nil { + return "" + } + return o.Summary +} + +func (o *GetSearchAllLibrariesMetadata) GetRating() *float64 { + if o == nil { + return nil + } + return o.Rating +} + +func (o *GetSearchAllLibrariesMetadata) GetAudienceRating() *float64 { + if o == nil { + return nil + } + return o.AudienceRating +} + +func (o *GetSearchAllLibrariesMetadata) GetYear() *int { + if o == nil { + return nil + } + return o.Year +} + +func (o *GetSearchAllLibrariesMetadata) GetSeasonCount() *int { + if o == nil { + return nil + } + return o.SeasonCount +} + +func (o *GetSearchAllLibrariesMetadata) GetTagline() *string { + if o == nil { + return nil + } + return o.Tagline +} + +func (o *GetSearchAllLibrariesMetadata) GetFlattenSeasons() *GetSearchAllLibrariesFlattenSeasons { + if o == nil { + return nil + } + return o.FlattenSeasons +} + +func (o *GetSearchAllLibrariesMetadata) GetShowOrdering() *GetSearchAllLibrariesShowOrdering { + if o == nil { + return nil + } + return o.ShowOrdering +} + +func (o *GetSearchAllLibrariesMetadata) GetThumb() *string { + if o == nil { + return nil + } + return o.Thumb +} + +func (o *GetSearchAllLibrariesMetadata) GetArt() *string { + if o == nil { + return nil + } + return o.Art +} + +func (o *GetSearchAllLibrariesMetadata) GetBanner() *string { + if o == nil { + return nil + } + return o.Banner +} + +func (o *GetSearchAllLibrariesMetadata) GetDuration() *int { + if o == nil { + return nil + } + return o.Duration +} + +func (o *GetSearchAllLibrariesMetadata) GetOriginallyAvailableAt() *types.Date { + if o == nil { + return nil + } + return o.OriginallyAvailableAt +} + +func (o *GetSearchAllLibrariesMetadata) GetAddedAt() int64 { + if o == nil { + return 0 + } + return o.AddedAt +} + +func (o *GetSearchAllLibrariesMetadata) GetUpdatedAt() *int64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetSearchAllLibrariesMetadata) GetAudienceRatingImage() *string { + if o == nil { + return nil + } + return o.AudienceRatingImage +} + +func (o *GetSearchAllLibrariesMetadata) GetChapterSource() *string { + if o == nil { + return nil + } + return o.ChapterSource +} + +func (o *GetSearchAllLibrariesMetadata) GetPrimaryExtraKey() *string { + if o == nil { + return nil + } + return o.PrimaryExtraKey +} + +func (o *GetSearchAllLibrariesMetadata) GetRatingImage() *string { + if o == nil { + return nil + } + return o.RatingImage +} + +func (o *GetSearchAllLibrariesMetadata) GetGrandparentRatingKey() *string { + if o == nil { + return nil + } + return o.GrandparentRatingKey +} + +func (o *GetSearchAllLibrariesMetadata) GetGrandparentGUID() *string { + if o == nil { + return nil + } + return o.GrandparentGUID +} + +func (o *GetSearchAllLibrariesMetadata) GetGrandparentKey() *string { + if o == nil { + return nil + } + return o.GrandparentKey +} + +func (o *GetSearchAllLibrariesMetadata) GetGrandparentTitle() *string { + if o == nil { + return nil + } + return o.GrandparentTitle +} + +func (o *GetSearchAllLibrariesMetadata) GetGrandparentThumb() *string { + if o == nil { + return nil + } + return o.GrandparentThumb +} + +func (o *GetSearchAllLibrariesMetadata) GetParentSlug() *string { + if o == nil { + return nil + } + return o.ParentSlug +} + +func (o *GetSearchAllLibrariesMetadata) GetGrandparentSlug() *string { + if o == nil { + return nil + } + return o.GrandparentSlug +} + +func (o *GetSearchAllLibrariesMetadata) GetGrandparentArt() *string { + if o == nil { + return nil + } + return o.GrandparentArt +} + +func (o *GetSearchAllLibrariesMetadata) GetGrandparentTheme() *string { + if o == nil { + return nil + } + return o.GrandparentTheme +} + +func (o *GetSearchAllLibrariesMetadata) GetMedia() []GetSearchAllLibrariesMedia { + if o == nil { + return nil + } + return o.Media +} + +func (o *GetSearchAllLibrariesMetadata) GetGenre() []GetSearchAllLibrariesGenre { + if o == nil { + return nil + } + return o.Genre +} + +func (o *GetSearchAllLibrariesMetadata) GetCountry() []GetSearchAllLibrariesCountry { + if o == nil { + return nil + } + return o.Country +} + +func (o *GetSearchAllLibrariesMetadata) GetDirector() []GetSearchAllLibrariesDirector { + if o == nil { + return nil + } + return o.Director +} + +func (o *GetSearchAllLibrariesMetadata) GetWriter() []GetSearchAllLibrariesWriter { + if o == nil { + return nil + } + return o.Writer +} + +func (o *GetSearchAllLibrariesMetadata) GetCollection() []GetSearchAllLibrariesCollection { + if o == nil { + return nil + } + return o.Collection +} + +func (o *GetSearchAllLibrariesMetadata) GetRole() []GetSearchAllLibrariesRole { + if o == nil { + return nil + } + return o.Role +} + +func (o *GetSearchAllLibrariesMetadata) GetLocation() []GetSearchAllLibrariesLocation { + if o == nil { + return nil + } + return o.Location +} + +func (o *GetSearchAllLibrariesMetadata) GetMediaGUID() []GetSearchAllLibrariesMediaGUID { + if o == nil { + return nil + } + return o.MediaGUID +} + +func (o *GetSearchAllLibrariesMetadata) GetUltraBlurColors() *GetSearchAllLibrariesUltraBlurColors { + if o == nil { + return nil + } + return o.UltraBlurColors +} + +func (o *GetSearchAllLibrariesMetadata) GetMetaDataRating() []GetSearchAllLibrariesMetaDataRating { + if o == nil { + return nil + } + return o.MetaDataRating +} + +func (o *GetSearchAllLibrariesMetadata) GetImage() []GetSearchAllLibrariesImage { + if o == nil { + return nil + } + return o.Image +} + +func (o *GetSearchAllLibrariesMetadata) GetTitleSort() *string { + if o == nil { + return nil + } + return o.TitleSort +} + +func (o *GetSearchAllLibrariesMetadata) GetViewCount() *int { + if o == nil { + return nil + } + return o.ViewCount +} + +func (o *GetSearchAllLibrariesMetadata) GetLastViewedAt() *int { + if o == nil { + return nil + } + return o.LastViewedAt +} + +func (o *GetSearchAllLibrariesMetadata) GetOriginalTitle() *string { + if o == nil { + return nil + } + return o.OriginalTitle +} + +func (o *GetSearchAllLibrariesMetadata) GetViewOffset() *int { + if o == nil { + return nil + } + return o.ViewOffset +} + +func (o *GetSearchAllLibrariesMetadata) GetSkipCount() *int { + if o == nil { + return nil + } + return o.SkipCount +} + +func (o *GetSearchAllLibrariesMetadata) GetIndex() *int { + if o == nil { + return nil + } + return o.Index +} + +func (o *GetSearchAllLibrariesMetadata) GetTheme() *string { + if o == nil { + return nil + } + return o.Theme +} + +func (o *GetSearchAllLibrariesMetadata) GetLeafCount() *int { + if o == nil { + return nil + } + return o.LeafCount +} + +func (o *GetSearchAllLibrariesMetadata) GetViewedLeafCount() *int { + if o == nil { + return nil + } + return o.ViewedLeafCount +} + +func (o *GetSearchAllLibrariesMetadata) GetChildCount() *int { + if o == nil { + return nil + } + return o.ChildCount +} + +func (o *GetSearchAllLibrariesMetadata) GetHasPremiumExtras() *string { + if o == nil { + return nil + } + return o.HasPremiumExtras +} + +func (o *GetSearchAllLibrariesMetadata) GetHasPremiumPrimaryExtra() *string { + if o == nil { + return nil + } + return o.HasPremiumPrimaryExtra +} + +func (o *GetSearchAllLibrariesMetadata) GetParentRatingKey() *string { + if o == nil { + return nil + } + return o.ParentRatingKey +} + +func (o *GetSearchAllLibrariesMetadata) GetParentGUID() *string { + if o == nil { + return nil + } + return o.ParentGUID +} + +func (o *GetSearchAllLibrariesMetadata) GetParentStudio() *string { + if o == nil { + return nil + } + return o.ParentStudio +} + +func (o *GetSearchAllLibrariesMetadata) GetParentKey() *string { + if o == nil { + return nil + } + return o.ParentKey +} + +func (o *GetSearchAllLibrariesMetadata) GetParentTitle() *string { + if o == nil { + return nil + } + return o.ParentTitle +} + +func (o *GetSearchAllLibrariesMetadata) GetParentIndex() *int { + if o == nil { + return nil + } + return o.ParentIndex +} + +func (o *GetSearchAllLibrariesMetadata) GetParentYear() *int { + if o == nil { + return nil + } + return o.ParentYear +} + +func (o *GetSearchAllLibrariesMetadata) GetParentThumb() *string { + if o == nil { + return nil + } + return o.ParentThumb +} + +func (o *GetSearchAllLibrariesMetadata) GetParentTheme() *string { + if o == nil { + return nil + } + return o.ParentTheme +} + +type SearchResult struct { + Score float32 `json:"score"` + Metadata GetSearchAllLibrariesMetadata `json:"Metadata"` +} + +func (o *SearchResult) GetScore() float32 { + if o == nil { + return 0.0 + } + return o.Score +} + +func (o *SearchResult) GetMetadata() GetSearchAllLibrariesMetadata { + if o == nil { + return GetSearchAllLibrariesMetadata{} + } + return o.Metadata +} + +type GetSearchAllLibrariesMediaContainer struct { + Size float64 `json:"size"` + SearchResult []SearchResult `json:"SearchResult"` +} + +func (o *GetSearchAllLibrariesMediaContainer) GetSize() float64 { + if o == nil { + return 0.0 + } + return o.Size +} + +func (o *GetSearchAllLibrariesMediaContainer) GetSearchResult() []SearchResult { + if o == nil { + return []SearchResult{} + } + return o.SearchResult +} + +// GetSearchAllLibrariesResponseBody - The libraries available on the Server +type GetSearchAllLibrariesResponseBody struct { + MediaContainer GetSearchAllLibrariesMediaContainer `json:"MediaContainer"` +} + +func (o *GetSearchAllLibrariesResponseBody) GetMediaContainer() GetSearchAllLibrariesMediaContainer { + if o == nil { + return GetSearchAllLibrariesMediaContainer{} + } + return o.MediaContainer +} + +type GetSearchAllLibrariesResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // The libraries available on the Server + Object *GetSearchAllLibrariesResponseBody +} + +func (o *GetSearchAllLibrariesResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetSearchAllLibrariesResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetSearchAllLibrariesResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *GetSearchAllLibrariesResponse) GetObject() *GetSearchAllLibrariesResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/models/operations/getserverresources.go b/models/operations/getserverresources.go index d0bb725..61fa0d5 100644 --- a/models/operations/getserverresources.go +++ b/models/operations/getserverresources.go @@ -15,8 +15,8 @@ var GetServerResourcesServerList = []string{ } type GetServerResourcesGlobals struct { - // 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) - ClientID *string `queryParam:"style=form,explode=true,name=X-Plex-Client-Identifier"` + // An opaque identifier unique to the client (UUID, serial number, or other unique device ID) + ClientID *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"` } func (o *GetServerResourcesGlobals) GetClientID() *string { @@ -117,8 +117,8 @@ type GetServerResourcesRequest struct { IncludeRelay *IncludeRelay `default:"0" queryParam:"style=form,explode=true,name=includeRelay"` // Include IPv6 entries in the results IncludeIPv6 *IncludeIPv6 `default:"0" queryParam:"style=form,explode=true,name=includeIPv6"` - // 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) - ClientID *string `queryParam:"style=form,explode=true,name=X-Plex-Client-Identifier"` + // An opaque identifier unique to the client (UUID, serial number, or other unique device ID) + ClientID *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"` } func (g GetServerResourcesRequest) MarshalJSON() ([]byte, error) { diff --git a/models/operations/getthumbimage.go b/models/operations/getthumbimage.go index 702c508..5eef232 100644 --- a/models/operations/getthumbimage.go +++ b/models/operations/getthumbimage.go @@ -14,8 +14,8 @@ type GetThumbImageRequest struct { Height int64 `queryParam:"style=form,explode=true,name=height"` MinSize int64 `queryParam:"style=form,explode=true,name=minSize"` Upscale int64 `queryParam:"style=form,explode=true,name=upscale"` - // Plex Authentication Token - XPlexToken string `queryParam:"style=form,explode=true,name=X-Plex-Token"` + // An authentication token, obtained from plex.tv + XPlexToken string `header:"style=simple,explode=false,name=X-Plex-Token"` } func (o *GetThumbImageRequest) GetRatingKey() int64 { diff --git a/models/operations/gettokenbypinid.go b/models/operations/gettokenbypinid.go index ce9c7f4..5f4ad99 100644 --- a/models/operations/gettokenbypinid.go +++ b/models/operations/gettokenbypinid.go @@ -13,12 +13,16 @@ var GetTokenByPinIDServerList = []string{ } type GetTokenByPinIDGlobals struct { - // 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) - ClientID *string `queryParam:"style=form,explode=true,name=X-Plex-Client-Identifier"` - ClientName *string `queryParam:"style=form,explode=true,name=X-Plex-Product"` - DeviceName *string `queryParam:"style=form,explode=true,name=X-Plex-Device"` - ClientVersion *string `queryParam:"style=form,explode=true,name=X-Plex-Version"` - ClientPlatform *string `queryParam:"style=form,explode=true,name=X-Plex-Platform"` + // An opaque identifier unique to the client (UUID, serial number, or other unique device ID) + ClientID *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"` + // The name of the client application. (Plex Web, Plex Media Server, etc.) + ClientName *string `header:"style=simple,explode=false,name=X-Plex-Product"` + // A relatively friendly name for the client device + DeviceNickname *string `header:"style=simple,explode=false,name=X-Plex-Device"` + // The version of the client application. + ClientVersion *string `header:"style=simple,explode=false,name=X-Plex-Version"` + // The platform of the client application. + Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"` } func (o *GetTokenByPinIDGlobals) GetClientID() *string { @@ -35,11 +39,11 @@ func (o *GetTokenByPinIDGlobals) GetClientName() *string { return o.ClientName } -func (o *GetTokenByPinIDGlobals) GetDeviceName() *string { +func (o *GetTokenByPinIDGlobals) GetDeviceNickname() *string { if o == nil { return nil } - return o.DeviceName + return o.DeviceNickname } func (o *GetTokenByPinIDGlobals) GetClientVersion() *string { @@ -49,22 +53,26 @@ func (o *GetTokenByPinIDGlobals) GetClientVersion() *string { return o.ClientVersion } -func (o *GetTokenByPinIDGlobals) GetClientPlatform() *string { +func (o *GetTokenByPinIDGlobals) GetPlatform() *string { if o == nil { return nil } - return o.ClientPlatform + return o.Platform } type GetTokenByPinIDRequest struct { // The PinID to retrieve an access token for PinID int64 `pathParam:"style=simple,explode=false,name=pinID"` - // 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) - ClientID *string `queryParam:"style=form,explode=true,name=X-Plex-Client-Identifier"` - ClientName *string `queryParam:"style=form,explode=true,name=X-Plex-Product"` - DeviceName *string `queryParam:"style=form,explode=true,name=X-Plex-Device"` - ClientVersion *string `queryParam:"style=form,explode=true,name=X-Plex-Version"` - ClientPlatform *string `queryParam:"style=form,explode=true,name=X-Plex-Platform"` + // An opaque identifier unique to the client (UUID, serial number, or other unique device ID) + ClientID *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"` + // The name of the client application. (Plex Web, Plex Media Server, etc.) + ClientName *string `header:"style=simple,explode=false,name=X-Plex-Product"` + // A relatively friendly name for the client device + DeviceNickname *string `header:"style=simple,explode=false,name=X-Plex-Device"` + // The version of the client application. + ClientVersion *string `header:"style=simple,explode=false,name=X-Plex-Version"` + // The platform of the client application. + Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"` } func (o *GetTokenByPinIDRequest) GetPinID() int64 { @@ -88,11 +96,11 @@ func (o *GetTokenByPinIDRequest) GetClientName() *string { return o.ClientName } -func (o *GetTokenByPinIDRequest) GetDeviceName() *string { +func (o *GetTokenByPinIDRequest) GetDeviceNickname() *string { if o == nil { return nil } - return o.DeviceName + return o.DeviceNickname } func (o *GetTokenByPinIDRequest) GetClientVersion() *string { @@ -102,11 +110,11 @@ func (o *GetTokenByPinIDRequest) GetClientVersion() *string { return o.ClientVersion } -func (o *GetTokenByPinIDRequest) GetClientPlatform() *string { +func (o *GetTokenByPinIDRequest) GetPlatform() *string { if o == nil { return nil } - return o.ClientPlatform + return o.Platform } // GetTokenByPinIDGeoData - Geo location data diff --git a/models/operations/gettokendetails.go b/models/operations/gettokendetails.go index 6779c63..6760d81 100644 --- a/models/operations/gettokendetails.go +++ b/models/operations/gettokendetails.go @@ -326,110 +326,6 @@ func (o *Services) GetStatus() GetTokenDetailsStatus { return o.Status } -type Features string - -const ( - FeaturesAndroidDolbyVision Features = "Android - Dolby Vision" - FeaturesAndroidPiP Features = "Android - PiP" - FeaturesCuSunset Features = "CU Sunset" - FeaturesHrkEnableEur Features = "HRK_enable_EUR" - FeaturesTrebleShowFeatures Features = "TREBLE-show-features" - FeaturesAdCountdownTimer Features = "ad-countdown-timer" - FeaturesAdaptiveBitrate Features = "adaptive_bitrate" - FeaturesAlbumTypes Features = "album-types" - FeaturesAllowDvr Features = "allow_dvr" - FeaturesAmazonLoopDebug Features = "amazon-loop-debug" - FeaturesAvodAdAnalysis Features = "avod-ad-analysis" - FeaturesAvodNewMedia Features = "avod-new-media" - FeaturesBlacklistGetSignin Features = "blacklist_get_signin" - FeaturesBoostVoices Features = "boost-voices" - FeaturesCameraUpload Features = "camera_upload" - FeaturesClientRadioStations Features = "client-radio-stations" - FeaturesCloudflareTurnstileRequired Features = "cloudflare-turnstile-required" - FeaturesCloudsync Features = "cloudsync" - FeaturesCollections Features = "collections" - FeaturesCommentsAndRepliesPushNotifications Features = "comments_and_replies_push_notifications" - FeaturesCommunityAccessPlexTv Features = "community_access_plex_tv" - FeaturesCompanionsSonos Features = "companions_sonos" - FeaturesContentFilter Features = "content_filter" - FeaturesCustomHomeRemoval Features = "custom-home-removal" - FeaturesDisableHomeUserFriendships Features = "disable_home_user_friendships" - FeaturesDisableSharingFriendships Features = "disable_sharing_friendships" - FeaturesDownloadsGating Features = "downloads-gating" - FeaturesDrmSupport Features = "drm_support" - FeaturesDvr Features = "dvr" - FeaturesDvrBlockUnsupportedCountries Features = "dvr-block-unsupported-countries" - FeaturesEpgRecentChannels Features = "epg-recent-channels" - FeaturesExcludeRestrictions Features = "exclude restrictions" - FeaturesFederatedAuth Features = "federated-auth" - FeaturesFriendRequestPushNotifications Features = "friend_request_push_notifications" - FeaturesGrandfatherSync Features = "grandfather-sync" - FeaturesGuidedUpgrade Features = "guided-upgrade" - FeaturesHardwareTranscoding Features = "hardware_transcoding" - FeaturesHome Features = "home" - FeaturesHwtranscode Features = "hwtranscode" - FeaturesImaggaV2 Features = "imagga-v2" - FeaturesIncreasePasswordComplexity Features = "increase-password-complexity" - FeaturesIos14PrivacyBanner Features = "ios14-privacy-banner" - FeaturesIterableNotificationTokens Features = "iterable-notification-tokens" - FeaturesItemClusters Features = "item_clusters" - FeaturesKeepPaymentMethod Features = "keep-payment-method" - FeaturesKevinBacon Features = "kevin-bacon" - FeaturesKoreaConsent Features = "korea-consent" - FeaturesLeIsrgRootX1 Features = "le_isrg_root_x1" - FeaturesLetsEncrypt Features = "lets_encrypt" - FeaturesLightningDvrPivot Features = "lightning-dvr-pivot" - FeaturesLiveTvSupportIncompleteSegments Features = "live-tv-support-incomplete-segments" - FeaturesLivetv Features = "livetv" - FeaturesLyrics Features = "lyrics" - FeaturesMetadataSearch Features = "metadata_search" - FeaturesMusicAnalysis Features = "music-analysis" - FeaturesMusicVideos Features = "music_videos" - FeaturesNewPlexPassPrices Features = "new_plex_pass_prices" - FeaturesNewsProviderSunsetModal Features = "news-provider-sunset-modal" - FeaturesNominatim Features = "nominatim" - FeaturesPass Features = "pass" - FeaturesPhotosFavorites Features = "photos-favorites" - FeaturesPhotosMetadataEdition Features = "photos-metadata-edition" - FeaturesPhotosV6Edit Features = "photosV6-edit" - FeaturesPhotosV6TvAlbums Features = "photosV6-tv-albums" - FeaturesPmsHealth Features = "pms_health" - FeaturesPremiumDashboard Features = "premium-dashboard" - FeaturesPremiumMusicMetadata Features = "premium_music_metadata" - FeaturesRadio Features = "radio" - FeaturesRateLimitClientToken Features = "rate-limit-client-token" - FeaturesScrobblingServicePlexTv Features = "scrobbling-service-plex-tv" - FeaturesSessionBandwidthRestrictions Features = "session_bandwidth_restrictions" - FeaturesSessionKick Features = "session_kick" - FeaturesSharedServerNotification Features = "shared_server_notification" - FeaturesSharedSourceNotification Features = "shared_source_notification" - FeaturesSigninNotification Features = "signin_notification" - FeaturesSigninWithApple Features = "signin_with_apple" - FeaturesSilenceRemoval Features = "silence-removal" - FeaturesSleepTimer Features = "sleep-timer" - FeaturesSpringServeAdProvider Features = "spring_serve_ad_provider" - FeaturesSync Features = "sync" - FeaturesSweetFades Features = "sweet-fades" - FeaturesTranscoderCache Features = "transcoder_cache" - FeaturesTrailers Features = "trailers" - FeaturesTunerSharing Features = "tuner-sharing" - FeaturesTwoFactorAuthentication Features = "two-factor-authentication" - FeaturesUnsupportedtuners Features = "unsupportedtuners" - FeaturesUpgrade3ds2 Features = "upgrade-3ds2" - FeaturesVisualizers Features = "visualizers" - FeaturesVodSchema Features = "vod-schema" - FeaturesVodCloudflare Features = "vod_cloudflare" - FeaturesVolumeLeveling Features = "volume-leveling" - FeaturesWatchTogetherInvite Features = "watch-together-invite" - FeaturesWatchlistRss Features = "watchlist-rss" - FeaturesWebServerDashboard Features = "web_server_dashboard" - FeaturesWebhooks Features = "webhooks" -) - -func (e Features) ToPointer() *Features { - return &e -} - // GetTokenDetailsAuthenticationStatus - String representation of subscriptionActive type GetTokenDetailsAuthenticationStatus string @@ -460,7 +356,7 @@ func (e *GetTokenDetailsAuthenticationStatus) UnmarshalJSON(data []byte) error { // Subscription - If the account’s Plex Pass subscription is active type Subscription struct { // List of features allowed on your Plex Pass subscription - Features []Features `json:"features,omitempty"` + Features []string `json:"features,omitempty"` // If the account's Plex Pass subscription is active Active *bool `json:"active,omitempty"` // Date the account subscribed to Plex Pass @@ -473,7 +369,7 @@ type Subscription struct { Plan *string `json:"plan,omitempty"` } -func (o *Subscription) GetFeatures() []Features { +func (o *Subscription) GetFeatures() []string { if o == nil { return nil } @@ -515,110 +411,6 @@ func (o *Subscription) GetPlan() *string { return o.Plan } -type GetTokenDetailsFeatures string - -const ( - GetTokenDetailsFeaturesAndroidDolbyVision GetTokenDetailsFeatures = "Android - Dolby Vision" - GetTokenDetailsFeaturesAndroidPiP GetTokenDetailsFeatures = "Android - PiP" - GetTokenDetailsFeaturesCuSunset GetTokenDetailsFeatures = "CU Sunset" - GetTokenDetailsFeaturesHrkEnableEur GetTokenDetailsFeatures = "HRK_enable_EUR" - GetTokenDetailsFeaturesTrebleShowFeatures GetTokenDetailsFeatures = "TREBLE-show-features" - GetTokenDetailsFeaturesAdCountdownTimer GetTokenDetailsFeatures = "ad-countdown-timer" - GetTokenDetailsFeaturesAdaptiveBitrate GetTokenDetailsFeatures = "adaptive_bitrate" - GetTokenDetailsFeaturesAlbumTypes GetTokenDetailsFeatures = "album-types" - GetTokenDetailsFeaturesAllowDvr GetTokenDetailsFeatures = "allow_dvr" - GetTokenDetailsFeaturesAmazonLoopDebug GetTokenDetailsFeatures = "amazon-loop-debug" - GetTokenDetailsFeaturesAvodAdAnalysis GetTokenDetailsFeatures = "avod-ad-analysis" - GetTokenDetailsFeaturesAvodNewMedia GetTokenDetailsFeatures = "avod-new-media" - GetTokenDetailsFeaturesBlacklistGetSignin GetTokenDetailsFeatures = "blacklist_get_signin" - GetTokenDetailsFeaturesBoostVoices GetTokenDetailsFeatures = "boost-voices" - GetTokenDetailsFeaturesCameraUpload GetTokenDetailsFeatures = "camera_upload" - GetTokenDetailsFeaturesClientRadioStations GetTokenDetailsFeatures = "client-radio-stations" - GetTokenDetailsFeaturesCloudflareTurnstileRequired GetTokenDetailsFeatures = "cloudflare-turnstile-required" - GetTokenDetailsFeaturesCloudsync GetTokenDetailsFeatures = "cloudsync" - GetTokenDetailsFeaturesCollections GetTokenDetailsFeatures = "collections" - GetTokenDetailsFeaturesCommentsAndRepliesPushNotifications GetTokenDetailsFeatures = "comments_and_replies_push_notifications" - GetTokenDetailsFeaturesCommunityAccessPlexTv GetTokenDetailsFeatures = "community_access_plex_tv" - GetTokenDetailsFeaturesCompanionsSonos GetTokenDetailsFeatures = "companions_sonos" - GetTokenDetailsFeaturesContentFilter GetTokenDetailsFeatures = "content_filter" - GetTokenDetailsFeaturesCustomHomeRemoval GetTokenDetailsFeatures = "custom-home-removal" - GetTokenDetailsFeaturesDisableHomeUserFriendships GetTokenDetailsFeatures = "disable_home_user_friendships" - GetTokenDetailsFeaturesDisableSharingFriendships GetTokenDetailsFeatures = "disable_sharing_friendships" - GetTokenDetailsFeaturesDownloadsGating GetTokenDetailsFeatures = "downloads-gating" - GetTokenDetailsFeaturesDrmSupport GetTokenDetailsFeatures = "drm_support" - GetTokenDetailsFeaturesDvr GetTokenDetailsFeatures = "dvr" - GetTokenDetailsFeaturesDvrBlockUnsupportedCountries GetTokenDetailsFeatures = "dvr-block-unsupported-countries" - GetTokenDetailsFeaturesEpgRecentChannels GetTokenDetailsFeatures = "epg-recent-channels" - GetTokenDetailsFeaturesExcludeRestrictions GetTokenDetailsFeatures = "exclude restrictions" - GetTokenDetailsFeaturesFederatedAuth GetTokenDetailsFeatures = "federated-auth" - GetTokenDetailsFeaturesFriendRequestPushNotifications GetTokenDetailsFeatures = "friend_request_push_notifications" - GetTokenDetailsFeaturesGrandfatherSync GetTokenDetailsFeatures = "grandfather-sync" - GetTokenDetailsFeaturesGuidedUpgrade GetTokenDetailsFeatures = "guided-upgrade" - GetTokenDetailsFeaturesHardwareTranscoding GetTokenDetailsFeatures = "hardware_transcoding" - GetTokenDetailsFeaturesHome GetTokenDetailsFeatures = "home" - GetTokenDetailsFeaturesHwtranscode GetTokenDetailsFeatures = "hwtranscode" - GetTokenDetailsFeaturesImaggaV2 GetTokenDetailsFeatures = "imagga-v2" - GetTokenDetailsFeaturesIncreasePasswordComplexity GetTokenDetailsFeatures = "increase-password-complexity" - GetTokenDetailsFeaturesIos14PrivacyBanner GetTokenDetailsFeatures = "ios14-privacy-banner" - GetTokenDetailsFeaturesIterableNotificationTokens GetTokenDetailsFeatures = "iterable-notification-tokens" - GetTokenDetailsFeaturesItemClusters GetTokenDetailsFeatures = "item_clusters" - GetTokenDetailsFeaturesKeepPaymentMethod GetTokenDetailsFeatures = "keep-payment-method" - GetTokenDetailsFeaturesKevinBacon GetTokenDetailsFeatures = "kevin-bacon" - GetTokenDetailsFeaturesKoreaConsent GetTokenDetailsFeatures = "korea-consent" - GetTokenDetailsFeaturesLeIsrgRootX1 GetTokenDetailsFeatures = "le_isrg_root_x1" - GetTokenDetailsFeaturesLetsEncrypt GetTokenDetailsFeatures = "lets_encrypt" - GetTokenDetailsFeaturesLightningDvrPivot GetTokenDetailsFeatures = "lightning-dvr-pivot" - GetTokenDetailsFeaturesLiveTvSupportIncompleteSegments GetTokenDetailsFeatures = "live-tv-support-incomplete-segments" - GetTokenDetailsFeaturesLivetv GetTokenDetailsFeatures = "livetv" - GetTokenDetailsFeaturesLyrics GetTokenDetailsFeatures = "lyrics" - GetTokenDetailsFeaturesMetadataSearch GetTokenDetailsFeatures = "metadata_search" - GetTokenDetailsFeaturesMusicAnalysis GetTokenDetailsFeatures = "music-analysis" - GetTokenDetailsFeaturesMusicVideos GetTokenDetailsFeatures = "music_videos" - GetTokenDetailsFeaturesNewPlexPassPrices GetTokenDetailsFeatures = "new_plex_pass_prices" - GetTokenDetailsFeaturesNewsProviderSunsetModal GetTokenDetailsFeatures = "news-provider-sunset-modal" - GetTokenDetailsFeaturesNominatim GetTokenDetailsFeatures = "nominatim" - GetTokenDetailsFeaturesPass GetTokenDetailsFeatures = "pass" - GetTokenDetailsFeaturesPhotosFavorites GetTokenDetailsFeatures = "photos-favorites" - GetTokenDetailsFeaturesPhotosMetadataEdition GetTokenDetailsFeatures = "photos-metadata-edition" - GetTokenDetailsFeaturesPhotosV6Edit GetTokenDetailsFeatures = "photosV6-edit" - GetTokenDetailsFeaturesPhotosV6TvAlbums GetTokenDetailsFeatures = "photosV6-tv-albums" - GetTokenDetailsFeaturesPmsHealth GetTokenDetailsFeatures = "pms_health" - GetTokenDetailsFeaturesPremiumDashboard GetTokenDetailsFeatures = "premium-dashboard" - GetTokenDetailsFeaturesPremiumMusicMetadata GetTokenDetailsFeatures = "premium_music_metadata" - GetTokenDetailsFeaturesRadio GetTokenDetailsFeatures = "radio" - GetTokenDetailsFeaturesRateLimitClientToken GetTokenDetailsFeatures = "rate-limit-client-token" - GetTokenDetailsFeaturesScrobblingServicePlexTv GetTokenDetailsFeatures = "scrobbling-service-plex-tv" - GetTokenDetailsFeaturesSessionBandwidthRestrictions GetTokenDetailsFeatures = "session_bandwidth_restrictions" - GetTokenDetailsFeaturesSessionKick GetTokenDetailsFeatures = "session_kick" - GetTokenDetailsFeaturesSharedServerNotification GetTokenDetailsFeatures = "shared_server_notification" - GetTokenDetailsFeaturesSharedSourceNotification GetTokenDetailsFeatures = "shared_source_notification" - GetTokenDetailsFeaturesSigninNotification GetTokenDetailsFeatures = "signin_notification" - GetTokenDetailsFeaturesSigninWithApple GetTokenDetailsFeatures = "signin_with_apple" - GetTokenDetailsFeaturesSilenceRemoval GetTokenDetailsFeatures = "silence-removal" - GetTokenDetailsFeaturesSleepTimer GetTokenDetailsFeatures = "sleep-timer" - GetTokenDetailsFeaturesSpringServeAdProvider GetTokenDetailsFeatures = "spring_serve_ad_provider" - GetTokenDetailsFeaturesSync GetTokenDetailsFeatures = "sync" - GetTokenDetailsFeaturesSweetFades GetTokenDetailsFeatures = "sweet-fades" - GetTokenDetailsFeaturesTranscoderCache GetTokenDetailsFeatures = "transcoder_cache" - GetTokenDetailsFeaturesTrailers GetTokenDetailsFeatures = "trailers" - GetTokenDetailsFeaturesTunerSharing GetTokenDetailsFeatures = "tuner-sharing" - GetTokenDetailsFeaturesTwoFactorAuthentication GetTokenDetailsFeatures = "two-factor-authentication" - GetTokenDetailsFeaturesUnsupportedtuners GetTokenDetailsFeatures = "unsupportedtuners" - GetTokenDetailsFeaturesUpgrade3ds2 GetTokenDetailsFeatures = "upgrade-3ds2" - GetTokenDetailsFeaturesVisualizers GetTokenDetailsFeatures = "visualizers" - GetTokenDetailsFeaturesVodSchema GetTokenDetailsFeatures = "vod-schema" - GetTokenDetailsFeaturesVodCloudflare GetTokenDetailsFeatures = "vod_cloudflare" - GetTokenDetailsFeaturesVolumeLeveling GetTokenDetailsFeatures = "volume-leveling" - GetTokenDetailsFeaturesWatchTogetherInvite GetTokenDetailsFeatures = "watch-together-invite" - GetTokenDetailsFeaturesWatchlistRss GetTokenDetailsFeatures = "watchlist-rss" - GetTokenDetailsFeaturesWebServerDashboard GetTokenDetailsFeatures = "web_server_dashboard" - GetTokenDetailsFeaturesWebhooks GetTokenDetailsFeatures = "webhooks" -) - -func (e GetTokenDetailsFeatures) ToPointer() *GetTokenDetailsFeatures { - return &e -} - // GetTokenDetailsAuthenticationResponseStatus - String representation of subscriptionActive type GetTokenDetailsAuthenticationResponseStatus string @@ -648,7 +440,7 @@ func (e *GetTokenDetailsAuthenticationResponseStatus) UnmarshalJSON(data []byte) type GetTokenDetailsSubscription struct { // List of features allowed on your Plex Pass subscription - Features []GetTokenDetailsFeatures `json:"features,omitempty"` + Features []string `json:"features,omitempty"` // If the account's Plex Pass subscription is active Active *bool `json:"active,omitempty"` // Date the account subscribed to Plex Pass @@ -661,7 +453,7 @@ type GetTokenDetailsSubscription struct { Plan *string `json:"plan,omitempty"` } -func (o *GetTokenDetailsSubscription) GetFeatures() []GetTokenDetailsFeatures { +func (o *GetTokenDetailsSubscription) GetFeatures() []string { if o == nil { return nil } diff --git a/models/operations/gettopwatchedcontent.go b/models/operations/gettopwatchedcontent.go index dc33c79..6b94b9a 100644 --- a/models/operations/gettopwatchedcontent.go +++ b/models/operations/gettopwatchedcontent.go @@ -49,6 +49,9 @@ func (e *GetTopWatchedContentQueryParamType) UnmarshalJSON(data []byte) error { } type GetTopWatchedContentRequest struct { + // Adds the Guids object to the response + // + IncludeGuids *int64 `queryParam:"style=form,explode=true,name=includeGuids"` // The type of media to retrieve. // 1 = movie // 2 = show @@ -57,16 +60,6 @@ type GetTopWatchedContentRequest struct { // E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries // Type GetTopWatchedContentQueryParamType `queryParam:"style=form,explode=true,name=type"` - // Adds the Guids object to the response - // - IncludeGuids *int64 `queryParam:"style=form,explode=true,name=includeGuids"` -} - -func (o *GetTopWatchedContentRequest) GetType() GetTopWatchedContentQueryParamType { - if o == nil { - return GetTopWatchedContentQueryParamType(0) - } - return o.Type } func (o *GetTopWatchedContentRequest) GetIncludeGuids() *int64 { @@ -76,6 +69,13 @@ func (o *GetTopWatchedContentRequest) GetIncludeGuids() *int64 { return o.IncludeGuids } +func (o *GetTopWatchedContentRequest) GetType() GetTopWatchedContentQueryParamType { + if o == nil { + return GetTopWatchedContentQueryParamType(0) + } + return o.Type +} + type GetTopWatchedContentGenre struct { ID *int `json:"id,omitempty"` Filter *string `json:"filter,omitempty"` diff --git a/models/operations/getwatchlist.go b/models/operations/getwatchlist.go index 68716aa..4c03837 100644 --- a/models/operations/getwatchlist.go +++ b/models/operations/getwatchlist.go @@ -156,8 +156,8 @@ type GetWatchListRequest struct { // By default this is 50 // XPlexContainerSize *int `default:"50" queryParam:"style=form,explode=true,name=X-Plex-Container-Size"` - // Plex Authentication Token - XPlexToken string `queryParam:"style=form,explode=true,name=X-Plex-Token"` + // An authentication token, obtained from plex.tv + XPlexToken string `header:"style=simple,explode=false,name=X-Plex-Token"` } func (g GetWatchListRequest) MarshalJSON() ([]byte, error) { diff --git a/models/operations/postuserssignindata.go b/models/operations/postuserssignindata.go index ef9ff57..a69172f 100644 --- a/models/operations/postuserssignindata.go +++ b/models/operations/postuserssignindata.go @@ -15,12 +15,16 @@ var PostUsersSignInDataServerList = []string{ } type PostUsersSignInDataGlobals struct { - // 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) - ClientID *string `queryParam:"style=form,explode=true,name=X-Plex-Client-Identifier"` - ClientName *string `queryParam:"style=form,explode=true,name=X-Plex-Product"` - DeviceName *string `queryParam:"style=form,explode=true,name=X-Plex-Device"` - ClientVersion *string `queryParam:"style=form,explode=true,name=X-Plex-Version"` - ClientPlatform *string `queryParam:"style=form,explode=true,name=X-Plex-Platform"` + // An opaque identifier unique to the client (UUID, serial number, or other unique device ID) + ClientID *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"` + // The name of the client application. (Plex Web, Plex Media Server, etc.) + ClientName *string `header:"style=simple,explode=false,name=X-Plex-Product"` + // A relatively friendly name for the client device + DeviceNickname *string `header:"style=simple,explode=false,name=X-Plex-Device"` + // The version of the client application. + ClientVersion *string `header:"style=simple,explode=false,name=X-Plex-Version"` + // The platform of the client application. + Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"` } func (o *PostUsersSignInDataGlobals) GetClientID() *string { @@ -37,11 +41,11 @@ func (o *PostUsersSignInDataGlobals) GetClientName() *string { return o.ClientName } -func (o *PostUsersSignInDataGlobals) GetDeviceName() *string { +func (o *PostUsersSignInDataGlobals) GetDeviceNickname() *string { if o == nil { return nil } - return o.DeviceName + return o.DeviceNickname } func (o *PostUsersSignInDataGlobals) GetClientVersion() *string { @@ -51,11 +55,11 @@ func (o *PostUsersSignInDataGlobals) GetClientVersion() *string { return o.ClientVersion } -func (o *PostUsersSignInDataGlobals) GetClientPlatform() *string { +func (o *PostUsersSignInDataGlobals) GetPlatform() *string { if o == nil { return nil } - return o.ClientPlatform + return o.Platform } // PostUsersSignInDataRequestBody - Login credentials @@ -106,12 +110,16 @@ func (o *PostUsersSignInDataRequestBody) GetVerificationCode() *string { } type PostUsersSignInDataRequest struct { - // 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) - ClientID *string `queryParam:"style=form,explode=true,name=X-Plex-Client-Identifier"` - ClientName *string `queryParam:"style=form,explode=true,name=X-Plex-Product"` - DeviceName *string `queryParam:"style=form,explode=true,name=X-Plex-Device"` - ClientVersion *string `queryParam:"style=form,explode=true,name=X-Plex-Version"` - ClientPlatform *string `queryParam:"style=form,explode=true,name=X-Plex-Platform"` + // An opaque identifier unique to the client (UUID, serial number, or other unique device ID) + ClientID *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"` + // The name of the client application. (Plex Web, Plex Media Server, etc.) + ClientName *string `header:"style=simple,explode=false,name=X-Plex-Product"` + // A relatively friendly name for the client device + DeviceNickname *string `header:"style=simple,explode=false,name=X-Plex-Device"` + // The version of the client application. + ClientVersion *string `header:"style=simple,explode=false,name=X-Plex-Version"` + // The platform of the client application. + Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"` // Login credentials RequestBody *PostUsersSignInDataRequestBody `request:"mediaType=application/x-www-form-urlencoded"` } @@ -130,11 +138,11 @@ func (o *PostUsersSignInDataRequest) GetClientName() *string { return o.ClientName } -func (o *PostUsersSignInDataRequest) GetDeviceName() *string { +func (o *PostUsersSignInDataRequest) GetDeviceNickname() *string { if o == nil { return nil } - return o.DeviceName + return o.DeviceNickname } func (o *PostUsersSignInDataRequest) GetClientVersion() *string { @@ -144,11 +152,11 @@ func (o *PostUsersSignInDataRequest) GetClientVersion() *string { return o.ClientVersion } -func (o *PostUsersSignInDataRequest) GetClientPlatform() *string { +func (o *PostUsersSignInDataRequest) GetPlatform() *string { if o == nil { return nil } - return o.ClientPlatform + return o.Platform } func (o *PostUsersSignInDataRequest) GetRequestBody() *PostUsersSignInDataRequestBody { @@ -470,110 +478,6 @@ func (o *PostUsersSignInDataServices) GetStatus() PostUsersSignInDataStatus { return o.Status } -type PostUsersSignInDataFeatures string - -const ( - PostUsersSignInDataFeaturesAndroidDolbyVision PostUsersSignInDataFeatures = "Android - Dolby Vision" - PostUsersSignInDataFeaturesAndroidPiP PostUsersSignInDataFeatures = "Android - PiP" - PostUsersSignInDataFeaturesCuSunset PostUsersSignInDataFeatures = "CU Sunset" - PostUsersSignInDataFeaturesHrkEnableEur PostUsersSignInDataFeatures = "HRK_enable_EUR" - PostUsersSignInDataFeaturesTrebleShowFeatures PostUsersSignInDataFeatures = "TREBLE-show-features" - PostUsersSignInDataFeaturesAdCountdownTimer PostUsersSignInDataFeatures = "ad-countdown-timer" - PostUsersSignInDataFeaturesAdaptiveBitrate PostUsersSignInDataFeatures = "adaptive_bitrate" - PostUsersSignInDataFeaturesAlbumTypes PostUsersSignInDataFeatures = "album-types" - PostUsersSignInDataFeaturesAllowDvr PostUsersSignInDataFeatures = "allow_dvr" - PostUsersSignInDataFeaturesAmazonLoopDebug PostUsersSignInDataFeatures = "amazon-loop-debug" - PostUsersSignInDataFeaturesAvodAdAnalysis PostUsersSignInDataFeatures = "avod-ad-analysis" - PostUsersSignInDataFeaturesAvodNewMedia PostUsersSignInDataFeatures = "avod-new-media" - PostUsersSignInDataFeaturesBlacklistGetSignin PostUsersSignInDataFeatures = "blacklist_get_signin" - PostUsersSignInDataFeaturesBoostVoices PostUsersSignInDataFeatures = "boost-voices" - PostUsersSignInDataFeaturesCameraUpload PostUsersSignInDataFeatures = "camera_upload" - PostUsersSignInDataFeaturesClientRadioStations PostUsersSignInDataFeatures = "client-radio-stations" - PostUsersSignInDataFeaturesCloudflareTurnstileRequired PostUsersSignInDataFeatures = "cloudflare-turnstile-required" - PostUsersSignInDataFeaturesCloudsync PostUsersSignInDataFeatures = "cloudsync" - PostUsersSignInDataFeaturesCollections PostUsersSignInDataFeatures = "collections" - PostUsersSignInDataFeaturesCommentsAndRepliesPushNotifications PostUsersSignInDataFeatures = "comments_and_replies_push_notifications" - PostUsersSignInDataFeaturesCommunityAccessPlexTv PostUsersSignInDataFeatures = "community_access_plex_tv" - PostUsersSignInDataFeaturesCompanionsSonos PostUsersSignInDataFeatures = "companions_sonos" - PostUsersSignInDataFeaturesContentFilter PostUsersSignInDataFeatures = "content_filter" - PostUsersSignInDataFeaturesCustomHomeRemoval PostUsersSignInDataFeatures = "custom-home-removal" - PostUsersSignInDataFeaturesDisableHomeUserFriendships PostUsersSignInDataFeatures = "disable_home_user_friendships" - PostUsersSignInDataFeaturesDisableSharingFriendships PostUsersSignInDataFeatures = "disable_sharing_friendships" - PostUsersSignInDataFeaturesDownloadsGating PostUsersSignInDataFeatures = "downloads-gating" - PostUsersSignInDataFeaturesDrmSupport PostUsersSignInDataFeatures = "drm_support" - PostUsersSignInDataFeaturesDvr PostUsersSignInDataFeatures = "dvr" - PostUsersSignInDataFeaturesDvrBlockUnsupportedCountries PostUsersSignInDataFeatures = "dvr-block-unsupported-countries" - PostUsersSignInDataFeaturesEpgRecentChannels PostUsersSignInDataFeatures = "epg-recent-channels" - PostUsersSignInDataFeaturesExcludeRestrictions PostUsersSignInDataFeatures = "exclude restrictions" - PostUsersSignInDataFeaturesFederatedAuth PostUsersSignInDataFeatures = "federated-auth" - PostUsersSignInDataFeaturesFriendRequestPushNotifications PostUsersSignInDataFeatures = "friend_request_push_notifications" - PostUsersSignInDataFeaturesGrandfatherSync PostUsersSignInDataFeatures = "grandfather-sync" - PostUsersSignInDataFeaturesGuidedUpgrade PostUsersSignInDataFeatures = "guided-upgrade" - PostUsersSignInDataFeaturesHardwareTranscoding PostUsersSignInDataFeatures = "hardware_transcoding" - PostUsersSignInDataFeaturesHome PostUsersSignInDataFeatures = "home" - PostUsersSignInDataFeaturesHwtranscode PostUsersSignInDataFeatures = "hwtranscode" - PostUsersSignInDataFeaturesImaggaV2 PostUsersSignInDataFeatures = "imagga-v2" - PostUsersSignInDataFeaturesIncreasePasswordComplexity PostUsersSignInDataFeatures = "increase-password-complexity" - PostUsersSignInDataFeaturesIos14PrivacyBanner PostUsersSignInDataFeatures = "ios14-privacy-banner" - PostUsersSignInDataFeaturesIterableNotificationTokens PostUsersSignInDataFeatures = "iterable-notification-tokens" - PostUsersSignInDataFeaturesItemClusters PostUsersSignInDataFeatures = "item_clusters" - PostUsersSignInDataFeaturesKeepPaymentMethod PostUsersSignInDataFeatures = "keep-payment-method" - PostUsersSignInDataFeaturesKevinBacon PostUsersSignInDataFeatures = "kevin-bacon" - PostUsersSignInDataFeaturesKoreaConsent PostUsersSignInDataFeatures = "korea-consent" - PostUsersSignInDataFeaturesLeIsrgRootX1 PostUsersSignInDataFeatures = "le_isrg_root_x1" - PostUsersSignInDataFeaturesLetsEncrypt PostUsersSignInDataFeatures = "lets_encrypt" - PostUsersSignInDataFeaturesLightningDvrPivot PostUsersSignInDataFeatures = "lightning-dvr-pivot" - PostUsersSignInDataFeaturesLiveTvSupportIncompleteSegments PostUsersSignInDataFeatures = "live-tv-support-incomplete-segments" - PostUsersSignInDataFeaturesLivetv PostUsersSignInDataFeatures = "livetv" - PostUsersSignInDataFeaturesLyrics PostUsersSignInDataFeatures = "lyrics" - PostUsersSignInDataFeaturesMetadataSearch PostUsersSignInDataFeatures = "metadata_search" - PostUsersSignInDataFeaturesMusicAnalysis PostUsersSignInDataFeatures = "music-analysis" - PostUsersSignInDataFeaturesMusicVideos PostUsersSignInDataFeatures = "music_videos" - PostUsersSignInDataFeaturesNewPlexPassPrices PostUsersSignInDataFeatures = "new_plex_pass_prices" - PostUsersSignInDataFeaturesNewsProviderSunsetModal PostUsersSignInDataFeatures = "news-provider-sunset-modal" - PostUsersSignInDataFeaturesNominatim PostUsersSignInDataFeatures = "nominatim" - PostUsersSignInDataFeaturesPass PostUsersSignInDataFeatures = "pass" - PostUsersSignInDataFeaturesPhotosFavorites PostUsersSignInDataFeatures = "photos-favorites" - PostUsersSignInDataFeaturesPhotosMetadataEdition PostUsersSignInDataFeatures = "photos-metadata-edition" - PostUsersSignInDataFeaturesPhotosV6Edit PostUsersSignInDataFeatures = "photosV6-edit" - PostUsersSignInDataFeaturesPhotosV6TvAlbums PostUsersSignInDataFeatures = "photosV6-tv-albums" - PostUsersSignInDataFeaturesPmsHealth PostUsersSignInDataFeatures = "pms_health" - PostUsersSignInDataFeaturesPremiumDashboard PostUsersSignInDataFeatures = "premium-dashboard" - PostUsersSignInDataFeaturesPremiumMusicMetadata PostUsersSignInDataFeatures = "premium_music_metadata" - PostUsersSignInDataFeaturesRadio PostUsersSignInDataFeatures = "radio" - PostUsersSignInDataFeaturesRateLimitClientToken PostUsersSignInDataFeatures = "rate-limit-client-token" - PostUsersSignInDataFeaturesScrobblingServicePlexTv PostUsersSignInDataFeatures = "scrobbling-service-plex-tv" - PostUsersSignInDataFeaturesSessionBandwidthRestrictions PostUsersSignInDataFeatures = "session_bandwidth_restrictions" - PostUsersSignInDataFeaturesSessionKick PostUsersSignInDataFeatures = "session_kick" - PostUsersSignInDataFeaturesSharedServerNotification PostUsersSignInDataFeatures = "shared_server_notification" - PostUsersSignInDataFeaturesSharedSourceNotification PostUsersSignInDataFeatures = "shared_source_notification" - PostUsersSignInDataFeaturesSigninNotification PostUsersSignInDataFeatures = "signin_notification" - PostUsersSignInDataFeaturesSigninWithApple PostUsersSignInDataFeatures = "signin_with_apple" - PostUsersSignInDataFeaturesSilenceRemoval PostUsersSignInDataFeatures = "silence-removal" - PostUsersSignInDataFeaturesSleepTimer PostUsersSignInDataFeatures = "sleep-timer" - PostUsersSignInDataFeaturesSpringServeAdProvider PostUsersSignInDataFeatures = "spring_serve_ad_provider" - PostUsersSignInDataFeaturesSync PostUsersSignInDataFeatures = "sync" - PostUsersSignInDataFeaturesSweetFades PostUsersSignInDataFeatures = "sweet-fades" - PostUsersSignInDataFeaturesTranscoderCache PostUsersSignInDataFeatures = "transcoder_cache" - PostUsersSignInDataFeaturesTrailers PostUsersSignInDataFeatures = "trailers" - PostUsersSignInDataFeaturesTunerSharing PostUsersSignInDataFeatures = "tuner-sharing" - PostUsersSignInDataFeaturesTwoFactorAuthentication PostUsersSignInDataFeatures = "two-factor-authentication" - PostUsersSignInDataFeaturesUnsupportedtuners PostUsersSignInDataFeatures = "unsupportedtuners" - PostUsersSignInDataFeaturesUpgrade3ds2 PostUsersSignInDataFeatures = "upgrade-3ds2" - PostUsersSignInDataFeaturesVisualizers PostUsersSignInDataFeatures = "visualizers" - PostUsersSignInDataFeaturesVodSchema PostUsersSignInDataFeatures = "vod-schema" - PostUsersSignInDataFeaturesVodCloudflare PostUsersSignInDataFeatures = "vod_cloudflare" - PostUsersSignInDataFeaturesVolumeLeveling PostUsersSignInDataFeatures = "volume-leveling" - PostUsersSignInDataFeaturesWatchTogetherInvite PostUsersSignInDataFeatures = "watch-together-invite" - PostUsersSignInDataFeaturesWatchlistRss PostUsersSignInDataFeatures = "watchlist-rss" - PostUsersSignInDataFeaturesWebServerDashboard PostUsersSignInDataFeatures = "web_server_dashboard" - PostUsersSignInDataFeaturesWebhooks PostUsersSignInDataFeatures = "webhooks" -) - -func (e PostUsersSignInDataFeatures) ToPointer() *PostUsersSignInDataFeatures { - return &e -} - // PostUsersSignInDataAuthenticationStatus - String representation of subscriptionActive type PostUsersSignInDataAuthenticationStatus string @@ -604,7 +508,7 @@ func (e *PostUsersSignInDataAuthenticationStatus) UnmarshalJSON(data []byte) err // PostUsersSignInDataSubscription - If the account’s Plex Pass subscription is active type PostUsersSignInDataSubscription struct { // List of features allowed on your Plex Pass subscription - Features []PostUsersSignInDataFeatures `json:"features,omitempty"` + Features []string `json:"features,omitempty"` // If the account's Plex Pass subscription is active Active *bool `json:"active,omitempty"` // Date the account subscribed to Plex Pass @@ -617,7 +521,7 @@ type PostUsersSignInDataSubscription struct { Plan *string `json:"plan,omitempty"` } -func (o *PostUsersSignInDataSubscription) GetFeatures() []PostUsersSignInDataFeatures { +func (o *PostUsersSignInDataSubscription) GetFeatures() []string { if o == nil { return nil } @@ -659,110 +563,6 @@ func (o *PostUsersSignInDataSubscription) GetPlan() *string { return o.Plan } -type PostUsersSignInDataAuthenticationFeatures string - -const ( - PostUsersSignInDataAuthenticationFeaturesAndroidDolbyVision PostUsersSignInDataAuthenticationFeatures = "Android - Dolby Vision" - PostUsersSignInDataAuthenticationFeaturesAndroidPiP PostUsersSignInDataAuthenticationFeatures = "Android - PiP" - PostUsersSignInDataAuthenticationFeaturesCuSunset PostUsersSignInDataAuthenticationFeatures = "CU Sunset" - PostUsersSignInDataAuthenticationFeaturesHrkEnableEur PostUsersSignInDataAuthenticationFeatures = "HRK_enable_EUR" - PostUsersSignInDataAuthenticationFeaturesTrebleShowFeatures PostUsersSignInDataAuthenticationFeatures = "TREBLE-show-features" - PostUsersSignInDataAuthenticationFeaturesAdCountdownTimer PostUsersSignInDataAuthenticationFeatures = "ad-countdown-timer" - PostUsersSignInDataAuthenticationFeaturesAdaptiveBitrate PostUsersSignInDataAuthenticationFeatures = "adaptive_bitrate" - PostUsersSignInDataAuthenticationFeaturesAlbumTypes PostUsersSignInDataAuthenticationFeatures = "album-types" - PostUsersSignInDataAuthenticationFeaturesAllowDvr PostUsersSignInDataAuthenticationFeatures = "allow_dvr" - PostUsersSignInDataAuthenticationFeaturesAmazonLoopDebug PostUsersSignInDataAuthenticationFeatures = "amazon-loop-debug" - PostUsersSignInDataAuthenticationFeaturesAvodAdAnalysis PostUsersSignInDataAuthenticationFeatures = "avod-ad-analysis" - PostUsersSignInDataAuthenticationFeaturesAvodNewMedia PostUsersSignInDataAuthenticationFeatures = "avod-new-media" - PostUsersSignInDataAuthenticationFeaturesBlacklistGetSignin PostUsersSignInDataAuthenticationFeatures = "blacklist_get_signin" - PostUsersSignInDataAuthenticationFeaturesBoostVoices PostUsersSignInDataAuthenticationFeatures = "boost-voices" - PostUsersSignInDataAuthenticationFeaturesCameraUpload PostUsersSignInDataAuthenticationFeatures = "camera_upload" - PostUsersSignInDataAuthenticationFeaturesClientRadioStations PostUsersSignInDataAuthenticationFeatures = "client-radio-stations" - PostUsersSignInDataAuthenticationFeaturesCloudflareTurnstileRequired PostUsersSignInDataAuthenticationFeatures = "cloudflare-turnstile-required" - PostUsersSignInDataAuthenticationFeaturesCloudsync PostUsersSignInDataAuthenticationFeatures = "cloudsync" - PostUsersSignInDataAuthenticationFeaturesCollections PostUsersSignInDataAuthenticationFeatures = "collections" - PostUsersSignInDataAuthenticationFeaturesCommentsAndRepliesPushNotifications PostUsersSignInDataAuthenticationFeatures = "comments_and_replies_push_notifications" - PostUsersSignInDataAuthenticationFeaturesCommunityAccessPlexTv PostUsersSignInDataAuthenticationFeatures = "community_access_plex_tv" - PostUsersSignInDataAuthenticationFeaturesCompanionsSonos PostUsersSignInDataAuthenticationFeatures = "companions_sonos" - PostUsersSignInDataAuthenticationFeaturesContentFilter PostUsersSignInDataAuthenticationFeatures = "content_filter" - PostUsersSignInDataAuthenticationFeaturesCustomHomeRemoval PostUsersSignInDataAuthenticationFeatures = "custom-home-removal" - PostUsersSignInDataAuthenticationFeaturesDisableHomeUserFriendships PostUsersSignInDataAuthenticationFeatures = "disable_home_user_friendships" - PostUsersSignInDataAuthenticationFeaturesDisableSharingFriendships PostUsersSignInDataAuthenticationFeatures = "disable_sharing_friendships" - PostUsersSignInDataAuthenticationFeaturesDownloadsGating PostUsersSignInDataAuthenticationFeatures = "downloads-gating" - PostUsersSignInDataAuthenticationFeaturesDrmSupport PostUsersSignInDataAuthenticationFeatures = "drm_support" - PostUsersSignInDataAuthenticationFeaturesDvr PostUsersSignInDataAuthenticationFeatures = "dvr" - PostUsersSignInDataAuthenticationFeaturesDvrBlockUnsupportedCountries PostUsersSignInDataAuthenticationFeatures = "dvr-block-unsupported-countries" - PostUsersSignInDataAuthenticationFeaturesEpgRecentChannels PostUsersSignInDataAuthenticationFeatures = "epg-recent-channels" - PostUsersSignInDataAuthenticationFeaturesExcludeRestrictions PostUsersSignInDataAuthenticationFeatures = "exclude restrictions" - PostUsersSignInDataAuthenticationFeaturesFederatedAuth PostUsersSignInDataAuthenticationFeatures = "federated-auth" - PostUsersSignInDataAuthenticationFeaturesFriendRequestPushNotifications PostUsersSignInDataAuthenticationFeatures = "friend_request_push_notifications" - PostUsersSignInDataAuthenticationFeaturesGrandfatherSync PostUsersSignInDataAuthenticationFeatures = "grandfather-sync" - PostUsersSignInDataAuthenticationFeaturesGuidedUpgrade PostUsersSignInDataAuthenticationFeatures = "guided-upgrade" - PostUsersSignInDataAuthenticationFeaturesHardwareTranscoding PostUsersSignInDataAuthenticationFeatures = "hardware_transcoding" - PostUsersSignInDataAuthenticationFeaturesHome PostUsersSignInDataAuthenticationFeatures = "home" - PostUsersSignInDataAuthenticationFeaturesHwtranscode PostUsersSignInDataAuthenticationFeatures = "hwtranscode" - PostUsersSignInDataAuthenticationFeaturesImaggaV2 PostUsersSignInDataAuthenticationFeatures = "imagga-v2" - PostUsersSignInDataAuthenticationFeaturesIncreasePasswordComplexity PostUsersSignInDataAuthenticationFeatures = "increase-password-complexity" - PostUsersSignInDataAuthenticationFeaturesIos14PrivacyBanner PostUsersSignInDataAuthenticationFeatures = "ios14-privacy-banner" - PostUsersSignInDataAuthenticationFeaturesIterableNotificationTokens PostUsersSignInDataAuthenticationFeatures = "iterable-notification-tokens" - PostUsersSignInDataAuthenticationFeaturesItemClusters PostUsersSignInDataAuthenticationFeatures = "item_clusters" - PostUsersSignInDataAuthenticationFeaturesKeepPaymentMethod PostUsersSignInDataAuthenticationFeatures = "keep-payment-method" - PostUsersSignInDataAuthenticationFeaturesKevinBacon PostUsersSignInDataAuthenticationFeatures = "kevin-bacon" - PostUsersSignInDataAuthenticationFeaturesKoreaConsent PostUsersSignInDataAuthenticationFeatures = "korea-consent" - PostUsersSignInDataAuthenticationFeaturesLeIsrgRootX1 PostUsersSignInDataAuthenticationFeatures = "le_isrg_root_x1" - PostUsersSignInDataAuthenticationFeaturesLetsEncrypt PostUsersSignInDataAuthenticationFeatures = "lets_encrypt" - PostUsersSignInDataAuthenticationFeaturesLightningDvrPivot PostUsersSignInDataAuthenticationFeatures = "lightning-dvr-pivot" - PostUsersSignInDataAuthenticationFeaturesLiveTvSupportIncompleteSegments PostUsersSignInDataAuthenticationFeatures = "live-tv-support-incomplete-segments" - PostUsersSignInDataAuthenticationFeaturesLivetv PostUsersSignInDataAuthenticationFeatures = "livetv" - PostUsersSignInDataAuthenticationFeaturesLyrics PostUsersSignInDataAuthenticationFeatures = "lyrics" - PostUsersSignInDataAuthenticationFeaturesMetadataSearch PostUsersSignInDataAuthenticationFeatures = "metadata_search" - PostUsersSignInDataAuthenticationFeaturesMusicAnalysis PostUsersSignInDataAuthenticationFeatures = "music-analysis" - PostUsersSignInDataAuthenticationFeaturesMusicVideos PostUsersSignInDataAuthenticationFeatures = "music_videos" - PostUsersSignInDataAuthenticationFeaturesNewPlexPassPrices PostUsersSignInDataAuthenticationFeatures = "new_plex_pass_prices" - PostUsersSignInDataAuthenticationFeaturesNewsProviderSunsetModal PostUsersSignInDataAuthenticationFeatures = "news-provider-sunset-modal" - PostUsersSignInDataAuthenticationFeaturesNominatim PostUsersSignInDataAuthenticationFeatures = "nominatim" - PostUsersSignInDataAuthenticationFeaturesPass PostUsersSignInDataAuthenticationFeatures = "pass" - PostUsersSignInDataAuthenticationFeaturesPhotosFavorites PostUsersSignInDataAuthenticationFeatures = "photos-favorites" - PostUsersSignInDataAuthenticationFeaturesPhotosMetadataEdition PostUsersSignInDataAuthenticationFeatures = "photos-metadata-edition" - PostUsersSignInDataAuthenticationFeaturesPhotosV6Edit PostUsersSignInDataAuthenticationFeatures = "photosV6-edit" - PostUsersSignInDataAuthenticationFeaturesPhotosV6TvAlbums PostUsersSignInDataAuthenticationFeatures = "photosV6-tv-albums" - PostUsersSignInDataAuthenticationFeaturesPmsHealth PostUsersSignInDataAuthenticationFeatures = "pms_health" - PostUsersSignInDataAuthenticationFeaturesPremiumDashboard PostUsersSignInDataAuthenticationFeatures = "premium-dashboard" - PostUsersSignInDataAuthenticationFeaturesPremiumMusicMetadata PostUsersSignInDataAuthenticationFeatures = "premium_music_metadata" - PostUsersSignInDataAuthenticationFeaturesRadio PostUsersSignInDataAuthenticationFeatures = "radio" - PostUsersSignInDataAuthenticationFeaturesRateLimitClientToken PostUsersSignInDataAuthenticationFeatures = "rate-limit-client-token" - PostUsersSignInDataAuthenticationFeaturesScrobblingServicePlexTv PostUsersSignInDataAuthenticationFeatures = "scrobbling-service-plex-tv" - PostUsersSignInDataAuthenticationFeaturesSessionBandwidthRestrictions PostUsersSignInDataAuthenticationFeatures = "session_bandwidth_restrictions" - PostUsersSignInDataAuthenticationFeaturesSessionKick PostUsersSignInDataAuthenticationFeatures = "session_kick" - PostUsersSignInDataAuthenticationFeaturesSharedServerNotification PostUsersSignInDataAuthenticationFeatures = "shared_server_notification" - PostUsersSignInDataAuthenticationFeaturesSharedSourceNotification PostUsersSignInDataAuthenticationFeatures = "shared_source_notification" - PostUsersSignInDataAuthenticationFeaturesSigninNotification PostUsersSignInDataAuthenticationFeatures = "signin_notification" - PostUsersSignInDataAuthenticationFeaturesSigninWithApple PostUsersSignInDataAuthenticationFeatures = "signin_with_apple" - PostUsersSignInDataAuthenticationFeaturesSilenceRemoval PostUsersSignInDataAuthenticationFeatures = "silence-removal" - PostUsersSignInDataAuthenticationFeaturesSleepTimer PostUsersSignInDataAuthenticationFeatures = "sleep-timer" - PostUsersSignInDataAuthenticationFeaturesSpringServeAdProvider PostUsersSignInDataAuthenticationFeatures = "spring_serve_ad_provider" - PostUsersSignInDataAuthenticationFeaturesSync PostUsersSignInDataAuthenticationFeatures = "sync" - PostUsersSignInDataAuthenticationFeaturesSweetFades PostUsersSignInDataAuthenticationFeatures = "sweet-fades" - PostUsersSignInDataAuthenticationFeaturesTranscoderCache PostUsersSignInDataAuthenticationFeatures = "transcoder_cache" - PostUsersSignInDataAuthenticationFeaturesTrailers PostUsersSignInDataAuthenticationFeatures = "trailers" - PostUsersSignInDataAuthenticationFeaturesTunerSharing PostUsersSignInDataAuthenticationFeatures = "tuner-sharing" - PostUsersSignInDataAuthenticationFeaturesTwoFactorAuthentication PostUsersSignInDataAuthenticationFeatures = "two-factor-authentication" - PostUsersSignInDataAuthenticationFeaturesUnsupportedtuners PostUsersSignInDataAuthenticationFeatures = "unsupportedtuners" - PostUsersSignInDataAuthenticationFeaturesUpgrade3ds2 PostUsersSignInDataAuthenticationFeatures = "upgrade-3ds2" - PostUsersSignInDataAuthenticationFeaturesVisualizers PostUsersSignInDataAuthenticationFeatures = "visualizers" - PostUsersSignInDataAuthenticationFeaturesVodSchema PostUsersSignInDataAuthenticationFeatures = "vod-schema" - PostUsersSignInDataAuthenticationFeaturesVodCloudflare PostUsersSignInDataAuthenticationFeatures = "vod_cloudflare" - PostUsersSignInDataAuthenticationFeaturesVolumeLeveling PostUsersSignInDataAuthenticationFeatures = "volume-leveling" - PostUsersSignInDataAuthenticationFeaturesWatchTogetherInvite PostUsersSignInDataAuthenticationFeatures = "watch-together-invite" - PostUsersSignInDataAuthenticationFeaturesWatchlistRss PostUsersSignInDataAuthenticationFeatures = "watchlist-rss" - PostUsersSignInDataAuthenticationFeaturesWebServerDashboard PostUsersSignInDataAuthenticationFeatures = "web_server_dashboard" - PostUsersSignInDataAuthenticationFeaturesWebhooks PostUsersSignInDataAuthenticationFeatures = "webhooks" -) - -func (e PostUsersSignInDataAuthenticationFeatures) ToPointer() *PostUsersSignInDataAuthenticationFeatures { - return &e -} - // PostUsersSignInDataAuthenticationResponseStatus - String representation of subscriptionActive type PostUsersSignInDataAuthenticationResponseStatus string @@ -792,7 +592,7 @@ func (e *PostUsersSignInDataAuthenticationResponseStatus) UnmarshalJSON(data []b type PostUsersSignInDataAuthenticationSubscription struct { // List of features allowed on your Plex Pass subscription - Features []PostUsersSignInDataAuthenticationFeatures `json:"features,omitempty"` + Features []string `json:"features,omitempty"` // If the account's Plex Pass subscription is active Active *bool `json:"active,omitempty"` // Date the account subscribed to Plex Pass @@ -805,7 +605,7 @@ type PostUsersSignInDataAuthenticationSubscription struct { Plan *string `json:"plan,omitempty"` } -func (o *PostUsersSignInDataAuthenticationSubscription) GetFeatures() []PostUsersSignInDataAuthenticationFeatures { +func (o *PostUsersSignInDataAuthenticationSubscription) GetFeatures() []string { if o == nil { return nil } diff --git a/models/sdkerrors/getsearchalllibraries.go b/models/sdkerrors/getsearchalllibraries.go new file mode 100644 index 0000000..3363e4d --- /dev/null +++ b/models/sdkerrors/getsearchalllibraries.go @@ -0,0 +1,90 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package sdkerrors + +import ( + "encoding/json" + "net/http" +) + +type GetSearchAllLibrariesLibraryErrors struct { + Code *int `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Status *int `json:"status,omitempty"` +} + +func (o *GetSearchAllLibrariesLibraryErrors) GetCode() *int { + if o == nil { + return nil + } + return o.Code +} + +func (o *GetSearchAllLibrariesLibraryErrors) GetMessage() *string { + if o == nil { + return nil + } + return o.Message +} + +func (o *GetSearchAllLibrariesLibraryErrors) GetStatus() *int { + if o == nil { + return nil + } + return o.Status +} + +// GetSearchAllLibrariesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +type GetSearchAllLibrariesUnauthorized struct { + Errors []GetSearchAllLibrariesLibraryErrors `json:"errors,omitempty"` + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response `json:"-"` +} + +var _ error = &GetSearchAllLibrariesUnauthorized{} + +func (e *GetSearchAllLibrariesUnauthorized) Error() string { + data, _ := json.Marshal(e) + return string(data) +} + +type GetSearchAllLibrariesErrors struct { + Code *int `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Status *int `json:"status,omitempty"` +} + +func (o *GetSearchAllLibrariesErrors) GetCode() *int { + if o == nil { + return nil + } + return o.Code +} + +func (o *GetSearchAllLibrariesErrors) GetMessage() *string { + if o == nil { + return nil + } + return o.Message +} + +func (o *GetSearchAllLibrariesErrors) GetStatus() *int { + if o == nil { + return nil + } + return o.Status +} + +// GetSearchAllLibrariesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. +type GetSearchAllLibrariesBadRequest struct { + Errors []GetSearchAllLibrariesErrors `json:"errors,omitempty"` + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response `json:"-"` +} + +var _ error = &GetSearchAllLibrariesBadRequest{} + +func (e *GetSearchAllLibrariesBadRequest) Error() string { + data, _ := json.Marshal(e) + return string(data) +} diff --git a/playlists.go b/playlists.go index d6789be..59242a5 100644 --- a/playlists.go +++ b/playlists.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -91,6 +92,16 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -99,11 +110,7 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -342,6 +349,16 @@ func (s *Playlists) GetPlaylists(ctx context.Context, playlistType *operations.P if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -350,11 +367,7 @@ func (s *Playlists) GetPlaylists(ctx context.Context, playlistType *operations.P httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -589,6 +602,16 @@ func (s *Playlists) GetPlaylist(ctx context.Context, playlistID float64, opts .. if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -597,11 +620,7 @@ func (s *Playlists) GetPlaylist(ctx context.Context, playlistID float64, opts .. httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -835,6 +854,16 @@ func (s *Playlists) DeletePlaylist(ctx context.Context, playlistID float64, opts if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -843,11 +872,7 @@ func (s *Playlists) DeletePlaylist(ctx context.Context, playlistID float64, opts httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1066,6 +1091,16 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, playlistID float64, titl if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1074,11 +1109,7 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, playlistID float64, titl httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1299,6 +1330,16 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64, if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1307,11 +1348,7 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64, httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1545,6 +1582,16 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, playlistID float6 if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1553,11 +1600,7 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, playlistID float6 httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1777,6 +1820,16 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64, if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1785,11 +1838,7 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64, httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -2029,6 +2078,16 @@ func (s *Playlists) UploadPlaylist(ctx context.Context, path string, force opera if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -2037,11 +2096,7 @@ func (s *Playlists) UploadPlaylist(ctx context.Context, path string, force opera httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/plex.go b/plex.go index 6119daa..99713e5 100644 --- a/plex.go +++ b/plex.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -87,6 +88,16 @@ func (s *Plex) GetCompanionsData(ctx context.Context, opts ...operations.Option) if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -95,11 +106,7 @@ func (s *Plex) GetCompanionsData(ctx context.Context, opts ...operations.Option) httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -334,6 +341,16 @@ func (s *Plex) GetUserFriends(ctx context.Context, opts ...operations.Option) (* if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -342,11 +359,7 @@ func (s *Plex) GetUserFriends(ctx context.Context, opts ...operations.Option) (* httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -577,6 +590,16 @@ func (s *Plex) GetGeoData(ctx context.Context, opts ...operations.Option) (*oper if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -585,11 +608,7 @@ func (s *Plex) GetGeoData(ctx context.Context, opts ...operations.Option) (*oper httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -819,6 +838,16 @@ func (s *Plex) GetHomeData(ctx context.Context, opts ...operations.Option) (*ope if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -827,11 +856,7 @@ func (s *Plex) GetHomeData(ctx context.Context, opts ...operations.Option) (*ope httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1068,6 +1093,8 @@ func (s *Plex) GetServerResources(ctx context.Context, includeHTTPS *operations. req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + utils.PopulateHeaders(ctx, req, request, globals) + if err := utils.PopulateQueryParams(ctx, req, request, globals); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } @@ -1081,6 +1108,16 @@ func (s *Plex) GetServerResources(ctx context.Context, includeHTTPS *operations. if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1089,11 +1126,7 @@ func (s *Plex) GetServerResources(ctx context.Context, includeHTTPS *operations. httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1281,9 +1314,9 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt globals := operations.GetPinGlobals{ ClientID: s.sdkConfiguration.Globals.ClientID, ClientName: s.sdkConfiguration.Globals.ClientName, - DeviceName: s.sdkConfiguration.Globals.DeviceName, + DeviceNickname: s.sdkConfiguration.Globals.DeviceNickname, ClientVersion: s.sdkConfiguration.Globals.ClientVersion, - ClientPlatform: s.sdkConfiguration.Globals.ClientPlatform, + Platform: s.sdkConfiguration.Globals.Platform, } o := operations.Options{} @@ -1327,6 +1360,8 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + utils.PopulateHeaders(ctx, req, request, globals) + if err := utils.PopulateQueryParams(ctx, req, request, globals); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } @@ -1336,6 +1371,16 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1344,11 +1389,7 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1513,9 +1554,9 @@ func (s *Plex) GetTokenByPinID(ctx context.Context, request operations.GetTokenB globals := operations.GetTokenByPinIDGlobals{ ClientID: s.sdkConfiguration.Globals.ClientID, ClientName: s.sdkConfiguration.Globals.ClientName, - DeviceName: s.sdkConfiguration.Globals.DeviceName, + DeviceNickname: s.sdkConfiguration.Globals.DeviceNickname, ClientVersion: s.sdkConfiguration.Globals.ClientVersion, - ClientPlatform: s.sdkConfiguration.Globals.ClientPlatform, + Platform: s.sdkConfiguration.Globals.Platform, } o := operations.Options{} @@ -1559,15 +1600,23 @@ func (s *Plex) GetTokenByPinID(ctx context.Context, request operations.GetTokenB req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateQueryParams(ctx, req, request, globals); err != nil { - return nil, fmt.Errorf("error populating query params: %w", err) - } + utils.PopulateHeaders(ctx, req, request, globals) globalRetryConfig := s.sdkConfiguration.RetryConfig retryConfig := o.Retries if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1576,11 +1625,7 @@ func (s *Plex) GetTokenByPinID(ctx context.Context, request operations.GetTokenB httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/plexapi.go b/plexapi.go index b0ebcee..dc3e256 100644 --- a/plexapi.go +++ b/plexapi.go @@ -302,17 +302,17 @@ func WithClientVersion(clientVersion string) SDKOption { } } -// WithClientPlatform allows setting the ClientPlatform parameter for all supported operations -func WithClientPlatform(clientPlatform string) SDKOption { +// WithPlatform allows setting the Platform parameter for all supported operations +func WithPlatform(platform string) SDKOption { return func(sdk *PlexAPI) { - sdk.sdkConfiguration.Globals.ClientPlatform = &clientPlatform + sdk.sdkConfiguration.Globals.Platform = &platform } } -// WithDeviceName allows setting the DeviceName parameter for all supported operations -func WithDeviceName(deviceName string) SDKOption { +// WithDeviceNickname allows setting the DeviceNickname parameter for all supported operations +func WithDeviceNickname(deviceNickname string) SDKOption { return func(sdk *PlexAPI) { - sdk.sdkConfiguration.Globals.DeviceName = &deviceName + sdk.sdkConfiguration.Globals.DeviceNickname = &deviceNickname } } @@ -335,9 +335,9 @@ func New(opts ...SDKOption) *PlexAPI { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "0.0.3", - SDKVersion: "0.14.0", - GenVersion: "2.428.1", - UserAgent: "speakeasy-sdk/go 0.14.0 2.428.1 0.0.3 github.com/LukeHagar/plexgo", + SDKVersion: "0.15.0", + GenVersion: "2.429.0", + UserAgent: "speakeasy-sdk/go 0.15.0 2.429.0 0.0.3 github.com/LukeHagar/plexgo", Globals: globals.Globals{}, ServerDefaults: []map[string]string{ { diff --git a/search.go b/search.go index 3f033bf..4b606ff 100644 --- a/search.go +++ b/search.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -104,6 +105,16 @@ func (s *Search) PerformSearch(ctx context.Context, query string, sectionID *flo if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -112,11 +123,7 @@ func (s *Search) PerformSearch(ctx context.Context, query string, sectionID *flo httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -338,6 +345,16 @@ func (s *Search) PerformVoiceSearch(ctx context.Context, query string, sectionID if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -346,11 +363,7 @@ func (s *Search) PerformVoiceSearch(ctx context.Context, query string, sectionID httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -567,6 +580,16 @@ func (s *Search) GetSearchResults(ctx context.Context, query string, opts ...ope if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -575,11 +598,7 @@ func (s *Search) GetSearchResults(ctx context.Context, query string, opts ...ope httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/server.go b/server.go index 19f9ce6..1939b08 100644 --- a/server.go +++ b/server.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -82,6 +83,16 @@ func (s *Server) GetServerCapabilities(ctx context.Context, opts ...operations.O if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -90,11 +101,7 @@ func (s *Server) GetServerCapabilities(ctx context.Context, opts ...operations.O httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -324,6 +331,16 @@ func (s *Server) GetServerPreferences(ctx context.Context, opts ...operations.Op if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -332,11 +349,7 @@ func (s *Server) GetServerPreferences(ctx context.Context, opts ...operations.Op httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -566,6 +579,16 @@ func (s *Server) GetAvailableClients(ctx context.Context, opts ...operations.Opt if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -574,11 +597,7 @@ func (s *Server) GetAvailableClients(ctx context.Context, opts ...operations.Opt httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -808,6 +827,16 @@ func (s *Server) GetDevices(ctx context.Context, opts ...operations.Option) (*op if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -816,11 +845,7 @@ func (s *Server) GetDevices(ctx context.Context, opts ...operations.Option) (*op httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1046,6 +1071,16 @@ func (s *Server) GetServerIdentity(ctx context.Context, opts ...operations.Optio if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1054,11 +1089,7 @@ func (s *Server) GetServerIdentity(ctx context.Context, opts ...operations.Optio httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1265,6 +1296,16 @@ func (s *Server) GetMyPlexAccount(ctx context.Context, opts ...operations.Option if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1273,11 +1314,7 @@ func (s *Server) GetMyPlexAccount(ctx context.Context, opts ...operations.Option httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1511,6 +1548,16 @@ func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResi if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1519,11 +1566,7 @@ func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResi httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1727,9 +1770,7 @@ func (s *Server) GetMediaProviders(ctx context.Context, xPlexToken string, opts 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) - } + utils.PopulateHeaders(ctx, req, request, nil) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1740,6 +1781,16 @@ func (s *Server) GetMediaProviders(ctx context.Context, xPlexToken string, opts if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1748,11 +1799,7 @@ func (s *Server) GetMediaProviders(ctx context.Context, xPlexToken string, opts httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -1982,6 +2029,16 @@ func (s *Server) GetServerList(ctx context.Context, opts ...operations.Option) ( if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -1990,11 +2047,7 @@ func (s *Server) GetServerList(ctx context.Context, opts ...operations.Option) ( httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/sessions.go b/sessions.go index fbdf664..562767f 100644 --- a/sessions.go +++ b/sessions.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -82,6 +83,16 @@ func (s *Sessions) GetSessions(ctx context.Context, opts ...operations.Option) ( if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -90,11 +101,7 @@ func (s *Sessions) GetSessions(ctx context.Context, opts ...operations.Option) ( httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -335,6 +342,16 @@ func (s *Sessions) GetSessionHistory(ctx context.Context, sort *string, accountI if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -343,11 +360,7 @@ func (s *Sessions) GetSessionHistory(ctx context.Context, sort *string, accountI httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -577,6 +590,16 @@ func (s *Sessions) GetTranscodeSessions(ctx context.Context, opts ...operations. if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -585,11 +608,7 @@ func (s *Sessions) GetTranscodeSessions(ctx context.Context, opts ...operations. httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -823,6 +842,16 @@ func (s *Sessions) StopTranscodeSession(ctx context.Context, sessionKey string, if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -831,11 +860,7 @@ func (s *Sessions) StopTranscodeSession(ctx context.Context, sessionKey string, httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/statistics.go b/statistics.go index 5517a4b..1e8ed0f 100644 --- a/statistics.go +++ b/statistics.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -90,6 +91,16 @@ func (s *Statistics) GetStatistics(ctx context.Context, timespan *int64, opts .. if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -98,11 +109,7 @@ func (s *Statistics) GetStatistics(ctx context.Context, timespan *int64, opts .. httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -340,6 +347,16 @@ func (s *Statistics) GetResourcesStatistics(ctx context.Context, timespan *int64 if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -348,11 +365,7 @@ func (s *Statistics) GetResourcesStatistics(ctx context.Context, timespan *int64 httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -590,6 +603,16 @@ func (s *Statistics) GetBandwidthStatistics(ctx context.Context, timespan *int64 if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -598,11 +621,7 @@ func (s *Statistics) GetBandwidthStatistics(ctx context.Context, timespan *int64 httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/updater.go b/updater.go index 81899a2..47a9b7c 100644 --- a/updater.go +++ b/updater.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -83,6 +84,16 @@ func (s *Updater) GetUpdateStatus(ctx context.Context, opts ...operations.Option if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -91,11 +102,7 @@ func (s *Updater) GetUpdateStatus(ctx context.Context, opts ...operations.Option httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -333,6 +340,16 @@ func (s *Updater) CheckForUpdates(ctx context.Context, download *operations.Down if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -341,11 +358,7 @@ func (s *Updater) CheckForUpdates(ctx context.Context, download *operations.Down httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -563,6 +576,16 @@ func (s *Updater) ApplyUpdates(ctx context.Context, tonight *operations.Tonight, if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -571,11 +594,7 @@ func (s *Updater) ApplyUpdates(ctx context.Context, tonight *operations.Tonight, httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/video.go b/video.go index 3125844..b0daf0e 100644 --- a/video.go +++ b/video.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -86,6 +87,16 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -94,11 +105,7 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { @@ -311,6 +318,16 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations. if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -319,11 +336,7 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations. httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil { diff --git a/watchlist.go b/watchlist.go index df7cc74..5104a26 100644 --- a/watchlist.go +++ b/watchlist.go @@ -10,6 +10,7 @@ import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" "github.com/LukeHagar/plexgo/models/sdkerrors" + "github.com/LukeHagar/plexgo/retry" "github.com/cenkalti/backoff/v4" "io" "net/http" @@ -77,6 +78,8 @@ func (s *Watchlist) GetWatchList(ctx context.Context, request operations.GetWatc req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + utils.PopulateHeaders(ctx, req, request, nil) + if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { return nil, fmt.Errorf("error populating query params: %w", err) } @@ -90,6 +93,16 @@ func (s *Watchlist) GetWatchList(ctx context.Context, request operations.GetWatc if retryConfig == nil { if globalRetryConfig != nil { retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 500, + MaxInterval: 60000, + Exponent: 1.5, + MaxElapsedTime: 3600000, + }, + RetryConnectionErrors: true, + } } } @@ -98,11 +111,7 @@ func (s *Watchlist) GetWatchList(ctx context.Context, request operations.GetWatc httpRes, err = utils.Retry(ctx, utils.Retries{ Config: retryConfig, StatusCodes: []string{ - "429", - "500", - "502", - "503", - "504", + "5XX", }, }, func() (*http.Response, error) { if req.Body != nil {