Compare commits

..

2 Commits

Author SHA1 Message Date
speakeasybot
6db5d8fb30 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.484.1 2025-02-06 00:10:27 +00:00
speakeasybot
89fbd6238e ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.476.2 2025-01-28 00:10:16 +00:00
47 changed files with 1634 additions and 125 deletions

File diff suppressed because one or more lines are too long

View File

@@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
go:
version: 0.17.2
version: 0.17.4
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.476.0
speakeasyVersion: 1.484.1
sources:
my-source:
sourceNamespace: my-source
@@ -9,19 +9,19 @@ sources:
- main
plexapi:
sourceNamespace: plexapi
sourceRevisionDigest: sha256:b146684d2d813daa8ba29e432a12334838753d0b20183beca8178a74ec4d895a
sourceBlobDigest: sha256:58f51c4319fcda931d63950fd926e8650e20a2e1375e356bf3a930111e246a58
sourceRevisionDigest: sha256:0b88c8bfc41def63e19e91fdd4d51bab07cb947cc3d39d2b44e8523a209cec10
sourceBlobDigest: sha256:89d5b8427d4fb61b25751aebbaf71f9613958e9e91073fc084fed2c2ec62ce55
tags:
- latest
- speakeasy-sdk-regen-1737763744
- speakeasy-sdk-regen-1738800558
targets:
plexgo:
source: plexapi
sourceNamespace: plexapi
sourceRevisionDigest: sha256:b146684d2d813daa8ba29e432a12334838753d0b20183beca8178a74ec4d895a
sourceBlobDigest: sha256:58f51c4319fcda931d63950fd926e8650e20a2e1375e356bf3a930111e246a58
sourceRevisionDigest: sha256:0b88c8bfc41def63e19e91fdd4d51bab07cb947cc3d39d2b44e8523a209cec10
sourceBlobDigest: sha256:89d5b8427d4fb61b25751aebbaf71f9613958e9e91073fc084fed2c2ec62ce55
codeSamplesNamespace: code-samples-go-plexgo
codeSamplesRevisionDigest: sha256:a9b4a5597cc8dc7e97e7ce3e68de850538878f6a879c0b400ae0d4757f7f8743
codeSamplesRevisionDigest: sha256:56fbdcee207bdfb0340ee02eaeacfb389357affe2899881837f41fa2b7b5b043
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest

View File

@@ -144,6 +144,8 @@ 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
* [GetGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media
* [GetCountriesLibrary](docs/sdks/library/README.md#getcountrieslibrary) - Get Countries of library media
* [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

View File

@@ -1002,4 +1002,24 @@ Based on:
### Generated
- [go v0.17.2] .
### Releases
- [Go v0.17.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.17.2 - .
- [Go v0.17.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.17.2 - .
## 2025-01-28 00:08:53
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.476.2 (2.495.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.17.3] .
### Releases
- [Go v0.17.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.17.3 - .
## 2025-02-06 00:09:00
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.484.1 (2.503.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.17.4] .
### Releases
- [Go v0.17.4] https://github.com/LukeHagar/plexgo/releases/tag/v0.17.4 - .

View File

@@ -128,19 +128,19 @@ actions:
x-codeSamples:
- lang: go
label: added
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Hubs.GetRecentlyAdded(ctx, operations.GetRecentlyAddedRequest{\n ContentDirectoryID: 470161,\n SectionID: plexgo.Int64(2),\n Type: operations.TypeTvShow,\n IncludeMeta: operations.IncludeMetaEnable.ToPointer(),\n XPlexContainerStart: plexgo.Int(0),\n XPlexContainerSize: plexgo.Int(50),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Hubs.GetRecentlyAdded(ctx, operations.GetRecentlyAddedRequest{\n ContentDirectoryID: 470161,\n SectionID: plexgo.Int64(2),\n Type: operations.TypeTvShow,\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
- target: $["paths"]["/hubs/search"]["get"]
update:
x-codeSamples:
- lang: go
label: performSearch
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Search.PerformSearch(ctx, \"dylan\", nil, plexgo.Float64(5))\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Search.PerformSearch(ctx, \"dylan\", nil, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
- target: $["paths"]["/hubs/search/voice"]["get"]
update:
x-codeSamples:
- lang: go
label: performVoiceSearch
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Search.PerformVoiceSearch(ctx, \"dead+poop\", nil, plexgo.Float64(5))\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Search.PerformVoiceSearch(ctx, \"dead+poop\", nil, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
- target: $["paths"]["/hubs/sections/{sectionId}"]["get"]
update:
x-codeSamples:
@@ -200,13 +200,13 @@ actions:
x-codeSamples:
- lang: go
label: library
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetRecentlyAddedLibrary(ctx, operations.GetRecentlyAddedLibraryRequest{\n ContentDirectoryID: plexgo.Int64(2),\n PinnedContentDirectoryID: []int64{\n 3,\n 5,\n 7,\n 13,\n 12,\n 1,\n 6,\n 14,\n 2,\n 10,\n 16,\n 17,\n },\n SectionID: plexgo.Int64(2),\n Type: operations.QueryParamTypeTvShow,\n IncludeMeta: operations.QueryParamIncludeMetaEnable.ToPointer(),\n XPlexContainerStart: plexgo.Int(0),\n XPlexContainerSize: plexgo.Int(50),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetRecentlyAddedLibrary(ctx, operations.GetRecentlyAddedLibraryRequest{\n ContentDirectoryID: plexgo.Int64(2),\n PinnedContentDirectoryID: []int64{\n 3,\n 5,\n 7,\n 13,\n 12,\n 1,\n 6,\n 14,\n 2,\n 10,\n 16,\n 17,\n },\n SectionID: plexgo.Int64(2),\n Type: operations.QueryParamTypeTvShow,\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
- target: $["paths"]["/library/search"]["get"]
update:
x-codeSamples:
- lang: go
label: libraries
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetSearchAllLibraries(ctx, operations.GetSearchAllLibrariesRequest{\n Query: \"<value>\",\n ClientID: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n SearchTypes: []operations.SearchTypes{\n operations.SearchTypesPeople,\n },\n IncludeCollections: operations.QueryParamIncludeCollectionsEnable.ToPointer(),\n IncludeExternalMedia: operations.QueryParamIncludeExternalMediaEnable.ToPointer(),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetSearchAllLibraries(ctx, operations.GetSearchAllLibrariesRequest{\n Query: \"<value>\",\n ClientID: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n SearchTypes: []operations.SearchTypes{\n operations.SearchTypesPeople,\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
- target: $["paths"]["/library/sections"]["get"]
update:
x-codeSamples:
@@ -218,7 +218,7 @@ actions:
x-codeSamples:
- lang: go
label: list
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Watchlist.GetWatchList(ctx, operations.GetWatchListRequest{\n Filter: operations.FilterAvailable,\n XPlexContainerStart: plexgo.Int(0),\n XPlexContainerSize: plexgo.Int(50),\n XPlexToken: \"CV5xoxjTpFKUzBTShsaf\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Watchlist.GetWatchList(ctx, operations.GetWatchListRequest{\n Filter: operations.FilterAvailable,\n XPlexToken: \"CV5xoxjTpFKUzBTShsaf\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
- target: $["paths"]["/library/sections/{sectionKey}"]["delete"]
update:
x-codeSamples:
@@ -230,7 +230,19 @@ actions:
x-codeSamples:
- lang: go
label: details
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetLibraryDetails(ctx, 9518, operations.IncludeDetailsZero.ToPointer())\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetLibraryDetails(ctx, 9518, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
- target: $["paths"]["/library/sections/{sectionKey}/country"]["get"]
update:
x-codeSamples:
- lang: go
label: library
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetCountriesLibrary(ctx, 9518)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
- target: $["paths"]["/library/sections/{sectionKey}/genre"]["get"]
update:
x-codeSamples:
- lang: go
label: library
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetGenresLibrary(ctx, 9518)\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
- target: $["paths"]["/library/sections/{sectionKey}/refresh"]["get"]
update:
x-codeSamples:
@@ -248,7 +260,7 @@ actions:
x-codeSamples:
- lang: go
label: items
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetLibraryItems(ctx, operations.GetLibraryItemsRequest{\n Tag: operations.TagEdition,\n IncludeGuids: operations.IncludeGuidsEnable.ToPointer(),\n Type: operations.GetLibraryItemsQueryParamTypeTvShow.ToPointer(),\n SectionKey: 9518,\n IncludeMeta: operations.GetLibraryItemsQueryParamIncludeMetaEnable.ToPointer(),\n XPlexContainerStart: plexgo.Int(0),\n XPlexContainerSize: plexgo.Int(50),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Library.GetLibraryItems(ctx, operations.GetLibraryItemsRequest{\n Tag: operations.TagEdition,\n Type: operations.GetLibraryItemsQueryParamTypeTvShow.ToPointer(),\n SectionKey: 9518,\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Object != nil {\n // handle response\n }\n}"
- target: $["paths"]["/log"]["get"]
update:
x-codeSamples:
@@ -290,7 +302,7 @@ actions:
x-codeSamples:
- lang: go
label: getPin
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New()\n\n res, err := s.Plex.GetPin(ctx, operations.GetPinRequest{\n Strong: plexgo.Bool(false),\n ClientID: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n ClientName: plexgo.String(\"Plex for Roku\"),\n DeviceNickname: plexgo.String(\"Roku 3\"),\n ClientVersion: plexgo.String(\"2.4.1\"),\n Platform: plexgo.String(\"Roku\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.AuthPinContainer != nil {\n // handle response\n }\n}"
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New()\n\n res, err := s.Plex.GetPin(ctx, operations.GetPinRequest{\n ClientID: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n ClientName: plexgo.String(\"Plex for Roku\"),\n DeviceNickname: plexgo.String(\"Roku 3\"),\n ClientVersion: plexgo.String(\"2.4.1\"),\n Platform: plexgo.String(\"Roku\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.AuthPinContainer != nil {\n // handle response\n }\n}"
- target: $["paths"]["/pins/{pinID}"]["get"]
update:
x-codeSamples:
@@ -356,7 +368,7 @@ actions:
x-codeSamples:
- lang: go
label: resources
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Plex.GetServerResources(ctx, \"3381b62b-9ab7-4e37-827b-203e9809eb58\", operations.IncludeHTTPSEnable.ToPointer(), operations.IncludeRelayEnable.ToPointer(), operations.IncludeIPv6Enable.ToPointer())\n if err != nil {\n log.Fatal(err)\n }\n if res.PlexDevices != nil {\n // handle response\n }\n}"
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New(\n plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Plex.GetServerResources(ctx, \"3381b62b-9ab7-4e37-827b-203e9809eb58\", nil, nil, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res.PlexDevices != nil {\n // handle response\n }\n}"
- target: $["paths"]["/search"]["get"]
update:
x-codeSamples:
@@ -452,7 +464,7 @@ actions:
x-codeSamples:
- lang: go
label: data
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New()\n\n res, err := s.Authentication.PostUsersSignInData(ctx, operations.PostUsersSignInDataRequest{\n ClientID: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n ClientName: plexgo.String(\"Plex for Roku\"),\n DeviceNickname: plexgo.String(\"Roku 3\"),\n ClientVersion: plexgo.String(\"2.4.1\"),\n Platform: plexgo.String(\"Roku\"),\n RequestBody: &operations.PostUsersSignInDataRequestBody{\n Login: \"username@email.com\",\n Password: \"password123\",\n RememberMe: plexgo.Bool(false),\n VerificationCode: plexgo.String(\"123456\"),\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.UserPlexAccount != nil {\n // handle response\n }\n}"
source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := plexgo.New()\n\n res, err := s.Authentication.PostUsersSignInData(ctx, operations.PostUsersSignInDataRequest{\n ClientID: \"3381b62b-9ab7-4e37-827b-203e9809eb58\",\n ClientName: plexgo.String(\"Plex for Roku\"),\n DeviceNickname: plexgo.String(\"Roku 3\"),\n ClientVersion: plexgo.String(\"2.4.1\"),\n Platform: plexgo.String(\"Roku\"),\n RequestBody: &operations.PostUsersSignInDataRequestBody{\n Login: \"username@email.com\",\n Password: \"password123\",\n VerificationCode: plexgo.String(\"123456\"),\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.UserPlexAccount != nil {\n // handle response\n }\n}"
- target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"]
update:
x-codeSamples:

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryDirectory
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
| `FastKey` | *string* | :heavy_check_mark: | N/A | /library/sections/2/all?country=15491 |
| `Key` | *string* | :heavy_check_mark: | N/A | 15491 |
| `Title` | *string* | :heavy_check_mark: | N/A | Japan |

View File

@@ -0,0 +1,22 @@
# GetCountriesLibraryMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `Size` | *float64* | :heavy_check_mark: | N/A | 50 |
| `Offset` | **int* | :heavy_minus_sign: | N/A | |
| `TotalSize` | **int* | :heavy_minus_sign: | N/A | |
| `Identifier` | *string* | :heavy_check_mark: | N/A | com.plexapp.plugins.library |
| `AllowSync` | *bool* | :heavy_check_mark: | N/A | false |
| `Art` | *string* | :heavy_check_mark: | N/A | /:/resources/show-fanart.jpg |
| `Content` | *string* | :heavy_check_mark: | N/A | secondary |
| `MediaTagPrefix` | *string* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ |
| `MediaTagVersion` | *int64* | :heavy_check_mark: | N/A | 1734362201 |
| `Nocache` | *bool* | :heavy_check_mark: | N/A | true |
| `Thumb` | *string* | :heavy_check_mark: | N/A | /:/resources/show.png |
| `Title1` | *string* | :heavy_check_mark: | N/A | TV Series |
| `Title2` | *string* | :heavy_check_mark: | N/A | By Country |
| `ViewGroup` | *string* | :heavy_check_mark: | N/A | secondary |
| `Directory` | [][operations.GetCountriesLibraryDirectory](../../models/operations/getcountrieslibrarydirectory.md) | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# GetCountriesLibraryRequest
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |

View File

@@ -0,0 +1,11 @@
# GetCountriesLibraryResponse
## 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.GetCountriesLibraryResponseBody](../../models/operations/getcountrieslibraryresponsebody.md) | :heavy_minus_sign: | Successful response containing media container data. |

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryResponseBody
Successful response containing media container data.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*operations.GetCountriesLibraryMediaContainer](../../models/operations/getcountrieslibrarymediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryDirectory
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- |
| `FastKey` | *string* | :heavy_check_mark: | N/A | /library/sections/10/all?genre=89 |
| `Key` | *string* | :heavy_check_mark: | N/A | 89 |
| `Title` | *string* | :heavy_check_mark: | N/A | Action |
| `Type` | *string* | :heavy_check_mark: | N/A | genre |

View File

@@ -0,0 +1,22 @@
# GetGenresLibraryMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `Size` | *float64* | :heavy_check_mark: | N/A | 50 |
| `Offset` | **int* | :heavy_minus_sign: | N/A | |
| `TotalSize` | **int* | :heavy_minus_sign: | N/A | |
| `Identifier` | *string* | :heavy_check_mark: | N/A | com.plexapp.plugins.library |
| `AllowSync` | *bool* | :heavy_check_mark: | N/A | false |
| `Art` | *string* | :heavy_check_mark: | N/A | /:/resources/show-fanart.jpg |
| `Content` | *string* | :heavy_check_mark: | N/A | secondary |
| `MediaTagPrefix` | *string* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ |
| `MediaTagVersion` | *int64* | :heavy_check_mark: | N/A | 1734362201 |
| `Nocache` | *bool* | :heavy_check_mark: | N/A | true |
| `Thumb` | *string* | :heavy_check_mark: | N/A | /:/resources/show.png |
| `Title1` | *string* | :heavy_check_mark: | N/A | TV Shows (Reality) |
| `Title2` | *string* | :heavy_check_mark: | N/A | By Genre |
| `ViewGroup` | *string* | :heavy_check_mark: | N/A | secondary |
| `Directory` | [][operations.GetGenresLibraryDirectory](../../models/operations/getgenreslibrarydirectory.md) | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# GetGenresLibraryRequest
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryResponse
## 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.GetGenresLibraryResponseBody](../../models/operations/getgenreslibraryresponsebody.md) | :heavy_minus_sign: | Successful response containing media container data. |

View File

@@ -0,0 +1,10 @@
# GetGenresLibraryResponseBody
Successful response containing media container data.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*operations.GetGenresLibraryMediaContainer](../../models/operations/getgenreslibrarymediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -26,7 +26,7 @@
| `FlattenSeasons` | [*operations.GetLibraryItemsFlattenSeasons](../../models/operations/getlibraryitemsflattenseasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 |
| `EpisodeSort` | [*operations.GetLibraryItemsEpisodeSort](../../models/operations/getlibraryitemsepisodesort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
| `EnableCreditsMarkerGeneration` | [*operations.GetLibraryItemsEnableCreditsMarkerGeneration](../../models/operations/getlibraryitemsenablecreditsmarkergeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
| `ShowOrdering` | [*operations.GetLibraryItemsShowOrdering](../../models/operations/getlibraryitemsshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
| `ShowOrdering` | [*operations.GetLibraryItemsShowOrdering](../../models/operations/getlibraryitemsshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>aired = TheTVDB (Aired),<br/>dvd = TheTVDB (DVD),<br/>absolute = TheTVDB (Absolute)).<br/> | absolute |
| `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 |

View File

@@ -1,11 +1,11 @@
# GetLibraryItemsShowOrdering
Setting that indicates the episode ordering for the show
Setting that indicates the episode ordering for the show.
None = Library default,
tmdbAiring = The Movie Database (Aired),
tvdbAiring = TheTVDB (Aired),
tvdbDvd = TheTVDB (DVD),
tvdbAbsolute = TheTVDB (Absolute)).
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
@@ -15,6 +15,6 @@ tvdbAbsolute = TheTVDB (Absolute)).
| ----------------------------------------- | ----------------------------------------- |
| `GetLibraryItemsShowOrderingNone` | None |
| `GetLibraryItemsShowOrderingTmdbAiring` | tmdbAiring |
| `GetLibraryItemsShowOrderingTvdbAiring` | tvdbAiring |
| `GetLibraryItemsShowOrderingTvdbDvd` | tvdbDvd |
| `GetLibraryItemsShowOrderingTvdbAbsolute` | tvdbAbsolute |
| `GetLibraryItemsShowOrderingTvdbAired` | aired |
| `GetLibraryItemsShowOrderingTvdbDvd` | dvd |
| `GetLibraryItemsShowOrderingTvdbAbsolute` | absolute |

View File

@@ -9,6 +9,6 @@
| `Offset` | **int* | :heavy_minus_sign: | N/A | |
| `TotalSize` | **int* | :heavy_minus_sign: | N/A | |
| `Identifier` | **string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | |
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | false |
| `Meta` | [*operations.Meta](../../models/operations/meta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/> | |
| `Metadata` | [][operations.GetRecentlyAddedMetadata](../../models/operations/getrecentlyaddedmetadata.md) | :heavy_minus_sign: | N/A | |

View File

@@ -26,7 +26,7 @@
| `FlattenSeasons` | [*operations.FlattenSeasons](../../models/operations/flattenseasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 |
| `EpisodeSort` | [*operations.EpisodeSort](../../models/operations/episodesort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
| `EnableCreditsMarkerGeneration` | [*operations.EnableCreditsMarkerGeneration](../../models/operations/enablecreditsmarkergeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
| `ShowOrdering` | [*operations.ShowOrdering](../../models/operations/showordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
| `ShowOrdering` | [*operations.ShowOrdering](../../models/operations/showordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>aired = TheTVDB (Aired),<br/>dvd = TheTVDB (DVD),<br/>absolute = TheTVDB (Absolute)).<br/> | absolute |
| `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 |

View File

@@ -26,7 +26,7 @@
| `FlattenSeasons` | [*operations.GetSearchAllLibrariesFlattenSeasons](../../models/operations/getsearchalllibrariesflattenseasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 |
| `EpisodeSort` | [*operations.GetSearchAllLibrariesEpisodeSort](../../models/operations/getsearchalllibrariesepisodesort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
| `EnableCreditsMarkerGeneration` | [*operations.GetSearchAllLibrariesEnableCreditsMarkerGeneration](../../models/operations/getsearchalllibrariesenablecreditsmarkergeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
| `ShowOrdering` | [*operations.GetSearchAllLibrariesShowOrdering](../../models/operations/getsearchalllibrariesshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
| `ShowOrdering` | [*operations.GetSearchAllLibrariesShowOrdering](../../models/operations/getsearchalllibrariesshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>aired = TheTVDB (Aired),<br/>dvd = TheTVDB (DVD),<br/>absolute = TheTVDB (Absolute)).<br/> | absolute |
| `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 |

View File

@@ -1,11 +1,11 @@
# GetSearchAllLibrariesShowOrdering
Setting that indicates the episode ordering for the show
Setting that indicates the episode ordering for the show.
None = Library default,
tmdbAiring = The Movie Database (Aired),
tvdbAiring = TheTVDB (Aired),
tvdbDvd = TheTVDB (DVD),
tvdbAbsolute = TheTVDB (Absolute)).
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
@@ -15,6 +15,6 @@ tvdbAbsolute = TheTVDB (Absolute)).
| ----------------------------------------------- | ----------------------------------------------- |
| `GetSearchAllLibrariesShowOrderingNone` | None |
| `GetSearchAllLibrariesShowOrderingTmdbAiring` | tmdbAiring |
| `GetSearchAllLibrariesShowOrderingTvdbAiring` | tvdbAiring |
| `GetSearchAllLibrariesShowOrderingTvdbDvd` | tvdbDvd |
| `GetSearchAllLibrariesShowOrderingTvdbAbsolute` | tvdbAbsolute |
| `GetSearchAllLibrariesShowOrderingTvdbAired` | aired |
| `GetSearchAllLibrariesShowOrderingTvdbDvd` | dvd |
| `GetSearchAllLibrariesShowOrderingTvdbAbsolute` | absolute |

View File

@@ -1,11 +1,11 @@
# ShowOrdering
Setting that indicates the episode ordering for the show
Setting that indicates the episode ordering for the show.
None = Library default,
tmdbAiring = The Movie Database (Aired),
tvdbAiring = TheTVDB (Aired),
tvdbDvd = TheTVDB (DVD),
tvdbAbsolute = TheTVDB (Absolute)).
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
@@ -15,6 +15,6 @@ tvdbAbsolute = TheTVDB (Absolute)).
| -------------------------- | -------------------------- |
| `ShowOrderingNone` | None |
| `ShowOrderingTmdbAiring` | tmdbAiring |
| `ShowOrderingTvdbAiring` | tvdbAiring |
| `ShowOrderingTvdbDvd` | tvdbDvd |
| `ShowOrderingTvdbAbsolute` | tvdbAbsolute |
| `ShowOrderingTvdbAired` | aired |
| `ShowOrderingTvdbDvd` | dvd |
| `ShowOrderingTvdbAbsolute` | absolute |

View File

@@ -0,0 +1,11 @@
# GetCountriesLibraryBadRequest
Bad Request - A parameter was not specified, or was specified incorrectly.
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `Errors` | [][sdkerrors.GetCountriesLibraryErrors](../../models/sdkerrors/getcountrieslibraryerrors.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 |

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryErrors
## 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 |

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryLibraryErrors
## 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 |

View File

@@ -0,0 +1,11 @@
# GetCountriesLibraryUnauthorized
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `Errors` | [][sdkerrors.GetCountriesLibraryLibraryErrors](../../models/sdkerrors/getcountrieslibrarylibraryerrors.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 |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryBadRequest
Bad Request - A parameter was not specified, or was specified incorrectly.
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `Errors` | [][sdkerrors.GetGenresLibraryErrors](../../models/sdkerrors/getgenreslibraryerrors.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 |

View File

@@ -0,0 +1,10 @@
# GetGenresLibraryErrors
## 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 |

View File

@@ -0,0 +1,10 @@
# GetGenresLibraryLibraryErrors
## 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 |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryUnauthorized
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `Errors` | [][sdkerrors.GetGenresLibraryLibraryErrors](../../models/sdkerrors/getgenreslibrarylibraryerrors.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 |

View File

@@ -203,7 +203,6 @@ func main() {
RequestBody: &operations.PostUsersSignInDataRequestBody{
Login: "username@email.com",
Password: "password123",
RememberMe: plexgo.Bool(false),
VerificationCode: plexgo.String("123456"),
},
})

View File

@@ -93,9 +93,6 @@ func main() {
ContentDirectoryID: 470161,
SectionID: plexgo.Int64(2),
Type: operations.TypeTvShow,
IncludeMeta: operations.IncludeMetaEnable.ToPointer(),
XPlexContainerStart: plexgo.Int(0),
XPlexContainerSize: plexgo.Int(50),
})
if err != nil {
log.Fatal(err)

View File

@@ -16,6 +16,8 @@ API Calls interacting with Plex Media Server Libraries
* [GetLibraryItems](#getlibraryitems) - Get Library Items
* [GetRefreshLibraryMetadata](#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
* [GetSearchLibrary](#getsearchlibrary) - Search Library
* [GetGenresLibrary](#getgenreslibrary) - Get Genres of library media
* [GetCountriesLibrary](#getcountrieslibrary) - Get Countries of library media
* [GetSearchAllLibraries](#getsearchalllibraries) - Search All Libraries
* [GetMetaDataByRatingKey](#getmetadatabyratingkey) - Get Metadata by RatingKey
* [GetMetadataChildren](#getmetadatachildren) - Get Items Children
@@ -117,9 +119,6 @@ func main() {
},
SectionID: plexgo.Int64(2),
Type: operations.QueryParamTypeTvShow,
IncludeMeta: operations.QueryParamIncludeMetaEnable.ToPointer(),
XPlexContainerStart: plexgo.Int(0),
XPlexContainerSize: plexgo.Int(50),
})
if err != nil {
log.Fatal(err)
@@ -258,7 +257,6 @@ package main
import(
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
@@ -269,7 +267,7 @@ func main() {
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Library.GetLibraryDetails(ctx, 9518, operations.IncludeDetailsZero.ToPointer())
res, err := s.Library.GetLibraryDetails(ctx, 9518, nil)
if err != nil {
log.Fatal(err)
}
@@ -398,12 +396,8 @@ func main() {
res, err := s.Library.GetLibraryItems(ctx, operations.GetLibraryItemsRequest{
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),
})
if err != nil {
log.Fatal(err)
@@ -561,6 +555,112 @@ func main() {
| sdkerrors.GetSearchLibraryUnauthorized | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
## GetGenresLibrary
Retrieves a list of all the genres that are found for the media in this library.
### Example Usage
```go
package main
import(
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Library.GetGenresLibrary(ctx, 9518)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
### Response
**[*operations.GetGenresLibraryResponse](../../models/operations/getgenreslibraryresponse.md), error**
### Errors
| Error Type | Status Code | Content Type |
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
| sdkerrors.GetGenresLibraryBadRequest | 400 | application/json |
| sdkerrors.GetGenresLibraryUnauthorized | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
## GetCountriesLibrary
Retrieves a list of all the countries that are found for the media in this library.
### Example Usage
```go
package main
import(
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Library.GetCountriesLibrary(ctx, 9518)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
### Response
**[*operations.GetCountriesLibraryResponse](../../models/operations/getcountrieslibraryresponse.md), error**
### Errors
| Error Type | Status Code | Content Type |
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
| sdkerrors.GetCountriesLibraryBadRequest | 400 | application/json |
| sdkerrors.GetCountriesLibraryUnauthorized | 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.
@@ -591,8 +691,6 @@ func main() {
SearchTypes: []operations.SearchTypes{
operations.SearchTypesPeople,
},
IncludeCollections: operations.QueryParamIncludeCollectionsEnable.ToPointer(),
IncludeExternalMedia: operations.QueryParamIncludeExternalMediaEnable.ToPointer(),
})
if err != nil {
log.Fatal(err)

View File

@@ -230,7 +230,6 @@ package main
import(
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
@@ -241,7 +240,7 @@ func main() {
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Plex.GetServerResources(ctx, "3381b62b-9ab7-4e37-827b-203e9809eb58", operations.IncludeHTTPSEnable.ToPointer(), operations.IncludeRelayEnable.ToPointer(), operations.IncludeIPv6Enable.ToPointer())
res, err := s.Plex.GetServerResources(ctx, "3381b62b-9ab7-4e37-827b-203e9809eb58", nil, nil, nil)
if err != nil {
log.Fatal(err)
}
@@ -296,7 +295,6 @@ func main() {
s := plexgo.New()
res, err := s.Plex.GetPin(ctx, operations.GetPinRequest{
Strong: plexgo.Bool(false),
ClientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
ClientName: plexgo.String("Plex for Roku"),
DeviceNickname: plexgo.String("Roku 3"),

View File

@@ -46,7 +46,7 @@ func main() {
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Search.PerformSearch(ctx, "dylan", nil, plexgo.Float64(5))
res, err := s.Search.PerformSearch(ctx, "dylan", nil, nil)
if err != nil {
log.Fatal(err)
}
@@ -104,7 +104,7 @@ func main() {
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Search.PerformVoiceSearch(ctx, "dead+poop", nil, plexgo.Float64(5))
res, err := s.Search.PerformVoiceSearch(ctx, "dead+poop", nil, nil)
if err != nil {
log.Fatal(err)
}

View File

@@ -35,8 +35,6 @@ func main() {
res, err := s.Watchlist.GetWatchList(ctx, operations.GetWatchListRequest{
Filter: operations.FilterAvailable,
XPlexContainerStart: plexgo.Int(0),
XPlexContainerSize: plexgo.Int(50),
XPlexToken: "CV5xoxjTpFKUzBTShsaf",
})
if err != nil {

View File

@@ -2046,6 +2046,506 @@ func (s *Library) GetSearchLibrary(ctx context.Context, sectionKey int, type_ op
}
// GetGenresLibrary - Get Genres of library media
// Retrieves a list of all the genres that are found for the media in this library.
func (s *Library) GetGenresLibrary(ctx context.Context, sectionKey int, opts ...operations.Option) (*operations.GetGenresLibraryResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-genres-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetGenresLibraryRequest{
SectionKey: sectionKey,
}
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}
for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}
var baseURL string
if o.ServerURL == nil {
baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
} else {
baseURL = *o.ServerURL
}
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionKey}/genre", request, nil)
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)
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}
var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}
return nil, retry.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "404", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.GetGenresLibraryResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
switch {
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out operations.GetGenresLibraryResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.Object = &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.GetGenresLibraryBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.GetGenresLibraryUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 404:
fallthrough
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}
// GetCountriesLibrary - Get Countries of library media
// Retrieves a list of all the countries that are found for the media in this library.
func (s *Library) GetCountriesLibrary(ctx context.Context, sectionKey int, opts ...operations.Option) (*operations.GetCountriesLibraryResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-countries-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetCountriesLibraryRequest{
SectionKey: sectionKey,
}
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}
for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}
var baseURL string
if o.ServerURL == nil {
baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
} else {
baseURL = *o.ServerURL
}
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionKey}/country", request, nil)
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)
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}
globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}
var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil {
copyBody, err := req.GetBody()
if err != nil {
return nil, err
}
req.Body = copyBody
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}
return nil, retry.Permanent(err)
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})
if err != nil {
return nil, err
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "404", "4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}
res := &operations.GetCountriesLibraryResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
switch {
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out operations.GetCountriesLibraryResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.Object = &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.GetCountriesLibraryBadRequest
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
var out sdkerrors.GetCountriesLibraryUnauthorized
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
out.RawResponse = httpRes
return nil, &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 404:
fallthrough
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}
// 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) {

View File

@@ -0,0 +1,222 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetCountriesLibraryRequest 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"`
}
func (o *GetCountriesLibraryRequest) GetSectionKey() int {
if o == nil {
return 0
}
return o.SectionKey
}
type GetCountriesLibraryDirectory struct {
FastKey string `json:"fastKey"`
Key string `json:"key"`
Title string `json:"title"`
}
func (o *GetCountriesLibraryDirectory) GetFastKey() string {
if o == nil {
return ""
}
return o.FastKey
}
func (o *GetCountriesLibraryDirectory) GetKey() string {
if o == nil {
return ""
}
return o.Key
}
func (o *GetCountriesLibraryDirectory) GetTitle() string {
if o == nil {
return ""
}
return o.Title
}
type GetCountriesLibraryMediaContainer struct {
Size float64 `json:"size"`
Offset *int `json:"offset,omitempty"`
TotalSize *int `json:"totalSize,omitempty"`
Identifier string `json:"identifier"`
AllowSync bool `json:"allowSync"`
Art string `json:"art"`
Content string `json:"content"`
MediaTagPrefix string `json:"mediaTagPrefix"`
MediaTagVersion int64 `json:"mediaTagVersion"`
Nocache bool `json:"nocache"`
Thumb string `json:"thumb"`
Title1 string `json:"title1"`
Title2 string `json:"title2"`
ViewGroup string `json:"viewGroup"`
Directory []GetCountriesLibraryDirectory `json:"Directory,omitempty"`
}
func (o *GetCountriesLibraryMediaContainer) GetSize() float64 {
if o == nil {
return 0.0
}
return o.Size
}
func (o *GetCountriesLibraryMediaContainer) GetOffset() *int {
if o == nil {
return nil
}
return o.Offset
}
func (o *GetCountriesLibraryMediaContainer) GetTotalSize() *int {
if o == nil {
return nil
}
return o.TotalSize
}
func (o *GetCountriesLibraryMediaContainer) GetIdentifier() string {
if o == nil {
return ""
}
return o.Identifier
}
func (o *GetCountriesLibraryMediaContainer) GetAllowSync() bool {
if o == nil {
return false
}
return o.AllowSync
}
func (o *GetCountriesLibraryMediaContainer) GetArt() string {
if o == nil {
return ""
}
return o.Art
}
func (o *GetCountriesLibraryMediaContainer) GetContent() string {
if o == nil {
return ""
}
return o.Content
}
func (o *GetCountriesLibraryMediaContainer) GetMediaTagPrefix() string {
if o == nil {
return ""
}
return o.MediaTagPrefix
}
func (o *GetCountriesLibraryMediaContainer) GetMediaTagVersion() int64 {
if o == nil {
return 0
}
return o.MediaTagVersion
}
func (o *GetCountriesLibraryMediaContainer) GetNocache() bool {
if o == nil {
return false
}
return o.Nocache
}
func (o *GetCountriesLibraryMediaContainer) GetThumb() string {
if o == nil {
return ""
}
return o.Thumb
}
func (o *GetCountriesLibraryMediaContainer) GetTitle1() string {
if o == nil {
return ""
}
return o.Title1
}
func (o *GetCountriesLibraryMediaContainer) GetTitle2() string {
if o == nil {
return ""
}
return o.Title2
}
func (o *GetCountriesLibraryMediaContainer) GetViewGroup() string {
if o == nil {
return ""
}
return o.ViewGroup
}
func (o *GetCountriesLibraryMediaContainer) GetDirectory() []GetCountriesLibraryDirectory {
if o == nil {
return nil
}
return o.Directory
}
// GetCountriesLibraryResponseBody - Successful response containing media container data.
type GetCountriesLibraryResponseBody struct {
MediaContainer *GetCountriesLibraryMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetCountriesLibraryResponseBody) GetMediaContainer() *GetCountriesLibraryMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetCountriesLibraryResponse 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
// Successful response containing media container data.
Object *GetCountriesLibraryResponseBody
}
func (o *GetCountriesLibraryResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetCountriesLibraryResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetCountriesLibraryResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetCountriesLibraryResponse) GetObject() *GetCountriesLibraryResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,230 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetGenresLibraryRequest 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"`
}
func (o *GetGenresLibraryRequest) GetSectionKey() int {
if o == nil {
return 0
}
return o.SectionKey
}
type GetGenresLibraryDirectory struct {
FastKey string `json:"fastKey"`
Key string `json:"key"`
Title string `json:"title"`
Type string `json:"type"`
}
func (o *GetGenresLibraryDirectory) GetFastKey() string {
if o == nil {
return ""
}
return o.FastKey
}
func (o *GetGenresLibraryDirectory) GetKey() string {
if o == nil {
return ""
}
return o.Key
}
func (o *GetGenresLibraryDirectory) GetTitle() string {
if o == nil {
return ""
}
return o.Title
}
func (o *GetGenresLibraryDirectory) GetType() string {
if o == nil {
return ""
}
return o.Type
}
type GetGenresLibraryMediaContainer struct {
Size float64 `json:"size"`
Offset *int `json:"offset,omitempty"`
TotalSize *int `json:"totalSize,omitempty"`
Identifier string `json:"identifier"`
AllowSync bool `json:"allowSync"`
Art string `json:"art"`
Content string `json:"content"`
MediaTagPrefix string `json:"mediaTagPrefix"`
MediaTagVersion int64 `json:"mediaTagVersion"`
Nocache bool `json:"nocache"`
Thumb string `json:"thumb"`
Title1 string `json:"title1"`
Title2 string `json:"title2"`
ViewGroup string `json:"viewGroup"`
Directory []GetGenresLibraryDirectory `json:"Directory,omitempty"`
}
func (o *GetGenresLibraryMediaContainer) GetSize() float64 {
if o == nil {
return 0.0
}
return o.Size
}
func (o *GetGenresLibraryMediaContainer) GetOffset() *int {
if o == nil {
return nil
}
return o.Offset
}
func (o *GetGenresLibraryMediaContainer) GetTotalSize() *int {
if o == nil {
return nil
}
return o.TotalSize
}
func (o *GetGenresLibraryMediaContainer) GetIdentifier() string {
if o == nil {
return ""
}
return o.Identifier
}
func (o *GetGenresLibraryMediaContainer) GetAllowSync() bool {
if o == nil {
return false
}
return o.AllowSync
}
func (o *GetGenresLibraryMediaContainer) GetArt() string {
if o == nil {
return ""
}
return o.Art
}
func (o *GetGenresLibraryMediaContainer) GetContent() string {
if o == nil {
return ""
}
return o.Content
}
func (o *GetGenresLibraryMediaContainer) GetMediaTagPrefix() string {
if o == nil {
return ""
}
return o.MediaTagPrefix
}
func (o *GetGenresLibraryMediaContainer) GetMediaTagVersion() int64 {
if o == nil {
return 0
}
return o.MediaTagVersion
}
func (o *GetGenresLibraryMediaContainer) GetNocache() bool {
if o == nil {
return false
}
return o.Nocache
}
func (o *GetGenresLibraryMediaContainer) GetThumb() string {
if o == nil {
return ""
}
return o.Thumb
}
func (o *GetGenresLibraryMediaContainer) GetTitle1() string {
if o == nil {
return ""
}
return o.Title1
}
func (o *GetGenresLibraryMediaContainer) GetTitle2() string {
if o == nil {
return ""
}
return o.Title2
}
func (o *GetGenresLibraryMediaContainer) GetViewGroup() string {
if o == nil {
return ""
}
return o.ViewGroup
}
func (o *GetGenresLibraryMediaContainer) GetDirectory() []GetGenresLibraryDirectory {
if o == nil {
return nil
}
return o.Directory
}
// GetGenresLibraryResponseBody - Successful response containing media container data.
type GetGenresLibraryResponseBody struct {
MediaContainer *GetGenresLibraryMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetGenresLibraryResponseBody) GetMediaContainer() *GetGenresLibraryMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetGenresLibraryResponse 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
// Successful response containing media container data.
Object *GetGenresLibraryResponseBody
}
func (o *GetGenresLibraryResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetGenresLibraryResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetGenresLibraryResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetGenresLibraryResponse) GetObject() *GetGenresLibraryResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -716,20 +716,20 @@ func (e *GetLibraryItemsEnableCreditsMarkerGeneration) UnmarshalJSON(data []byte
}
}
// GetLibraryItemsShowOrdering - Setting that indicates the episode ordering for the show
// GetLibraryItemsShowOrdering - Setting that indicates the episode ordering for the show.
// None = Library default,
// tmdbAiring = The Movie Database (Aired),
// tvdbAiring = TheTVDB (Aired),
// tvdbDvd = TheTVDB (DVD),
// tvdbAbsolute = TheTVDB (Absolute)).
// aired = TheTVDB (Aired),
// dvd = TheTVDB (DVD),
// absolute = TheTVDB (Absolute)).
type GetLibraryItemsShowOrdering string
const (
GetLibraryItemsShowOrderingNone GetLibraryItemsShowOrdering = "None"
GetLibraryItemsShowOrderingTmdbAiring GetLibraryItemsShowOrdering = "tmdbAiring"
GetLibraryItemsShowOrderingTvdbAiring GetLibraryItemsShowOrdering = "tvdbAiring"
GetLibraryItemsShowOrderingTvdbDvd GetLibraryItemsShowOrdering = "tvdbDvd"
GetLibraryItemsShowOrderingTvdbAbsolute GetLibraryItemsShowOrdering = "tvdbAbsolute"
GetLibraryItemsShowOrderingTvdbAired GetLibraryItemsShowOrdering = "aired"
GetLibraryItemsShowOrderingTvdbDvd GetLibraryItemsShowOrdering = "dvd"
GetLibraryItemsShowOrderingTvdbAbsolute GetLibraryItemsShowOrdering = "absolute"
)
func (e GetLibraryItemsShowOrdering) ToPointer() *GetLibraryItemsShowOrdering {
@@ -745,11 +745,11 @@ func (e *GetLibraryItemsShowOrdering) UnmarshalJSON(data []byte) error {
fallthrough
case "tmdbAiring":
fallthrough
case "tvdbAiring":
case "aired":
fallthrough
case "tvdbDvd":
case "dvd":
fallthrough
case "tvdbAbsolute":
case "absolute":
*e = GetLibraryItemsShowOrdering(v)
return nil
default:
@@ -1719,12 +1719,12 @@ type GetLibraryItemsMetadata struct {
EpisodeSort *GetLibraryItemsEpisodeSort `json:"episodeSort,omitempty"`
// Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
EnableCreditsMarkerGeneration *GetLibraryItemsEnableCreditsMarkerGeneration `json:"enableCreditsMarkerGeneration,omitempty"`
// Setting that indicates the episode ordering for the show
// Setting that indicates the episode ordering for the show.
// None = Library default,
// tmdbAiring = The Movie Database (Aired),
// tvdbAiring = TheTVDB (Aired),
// tvdbDvd = TheTVDB (DVD),
// tvdbAbsolute = TheTVDB (Absolute)).
// aired = TheTVDB (Aired),
// dvd = TheTVDB (DVD),
// absolute = TheTVDB (Absolute)).
//
ShowOrdering *GetLibraryItemsShowOrdering `json:"showOrdering,omitempty"`
Thumb *string `json:"thumb,omitempty"`

View File

@@ -625,20 +625,20 @@ func (e *EnableCreditsMarkerGeneration) UnmarshalJSON(data []byte) error {
}
}
// ShowOrdering - Setting that indicates the episode ordering for the show
// ShowOrdering - Setting that indicates the episode ordering for the show.
// None = Library default,
// tmdbAiring = The Movie Database (Aired),
// tvdbAiring = TheTVDB (Aired),
// tvdbDvd = TheTVDB (DVD),
// tvdbAbsolute = TheTVDB (Absolute)).
// aired = TheTVDB (Aired),
// dvd = TheTVDB (DVD),
// absolute = TheTVDB (Absolute)).
type ShowOrdering string
const (
ShowOrderingNone ShowOrdering = "None"
ShowOrderingTmdbAiring ShowOrdering = "tmdbAiring"
ShowOrderingTvdbAiring ShowOrdering = "tvdbAiring"
ShowOrderingTvdbDvd ShowOrdering = "tvdbDvd"
ShowOrderingTvdbAbsolute ShowOrdering = "tvdbAbsolute"
ShowOrderingTvdbAired ShowOrdering = "aired"
ShowOrderingTvdbDvd ShowOrdering = "dvd"
ShowOrderingTvdbAbsolute ShowOrdering = "absolute"
)
func (e ShowOrdering) ToPointer() *ShowOrdering {
@@ -654,11 +654,11 @@ func (e *ShowOrdering) UnmarshalJSON(data []byte) error {
fallthrough
case "tmdbAiring":
fallthrough
case "tvdbAiring":
case "aired":
fallthrough
case "tvdbDvd":
case "dvd":
fallthrough
case "tvdbAbsolute":
case "absolute":
*e = ShowOrdering(v)
return nil
default:
@@ -1628,12 +1628,12 @@ type GetRecentlyAddedMetadata struct {
EpisodeSort *EpisodeSort `json:"episodeSort,omitempty"`
// Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
EnableCreditsMarkerGeneration *EnableCreditsMarkerGeneration `json:"enableCreditsMarkerGeneration,omitempty"`
// Setting that indicates the episode ordering for the show
// Setting that indicates the episode ordering for the show.
// None = Library default,
// tmdbAiring = The Movie Database (Aired),
// tvdbAiring = TheTVDB (Aired),
// tvdbDvd = TheTVDB (DVD),
// tvdbAbsolute = TheTVDB (Absolute)).
// aired = TheTVDB (Aired),
// dvd = TheTVDB (DVD),
// absolute = TheTVDB (Absolute)).
//
ShowOrdering *ShowOrdering `json:"showOrdering,omitempty"`
Thumb *string `json:"thumb,omitempty"`

View File

@@ -288,20 +288,20 @@ func (e *GetSearchAllLibrariesEnableCreditsMarkerGeneration) UnmarshalJSON(data
}
}
// GetSearchAllLibrariesShowOrdering - Setting that indicates the episode ordering for the show
// GetSearchAllLibrariesShowOrdering - Setting that indicates the episode ordering for the show.
// None = Library default,
// tmdbAiring = The Movie Database (Aired),
// tvdbAiring = TheTVDB (Aired),
// tvdbDvd = TheTVDB (DVD),
// tvdbAbsolute = TheTVDB (Absolute)).
// aired = TheTVDB (Aired),
// dvd = TheTVDB (DVD),
// absolute = TheTVDB (Absolute)).
type GetSearchAllLibrariesShowOrdering string
const (
GetSearchAllLibrariesShowOrderingNone GetSearchAllLibrariesShowOrdering = "None"
GetSearchAllLibrariesShowOrderingTmdbAiring GetSearchAllLibrariesShowOrdering = "tmdbAiring"
GetSearchAllLibrariesShowOrderingTvdbAiring GetSearchAllLibrariesShowOrdering = "tvdbAiring"
GetSearchAllLibrariesShowOrderingTvdbDvd GetSearchAllLibrariesShowOrdering = "tvdbDvd"
GetSearchAllLibrariesShowOrderingTvdbAbsolute GetSearchAllLibrariesShowOrdering = "tvdbAbsolute"
GetSearchAllLibrariesShowOrderingTvdbAired GetSearchAllLibrariesShowOrdering = "aired"
GetSearchAllLibrariesShowOrderingTvdbDvd GetSearchAllLibrariesShowOrdering = "dvd"
GetSearchAllLibrariesShowOrderingTvdbAbsolute GetSearchAllLibrariesShowOrdering = "absolute"
)
func (e GetSearchAllLibrariesShowOrdering) ToPointer() *GetSearchAllLibrariesShowOrdering {
@@ -317,11 +317,11 @@ func (e *GetSearchAllLibrariesShowOrdering) UnmarshalJSON(data []byte) error {
fallthrough
case "tmdbAiring":
fallthrough
case "tvdbAiring":
case "aired":
fallthrough
case "tvdbDvd":
case "dvd":
fallthrough
case "tvdbAbsolute":
case "absolute":
*e = GetSearchAllLibrariesShowOrdering(v)
return nil
default:
@@ -1291,12 +1291,12 @@ type GetSearchAllLibrariesMetadata struct {
EpisodeSort *GetSearchAllLibrariesEpisodeSort `json:"episodeSort,omitempty"`
// Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
EnableCreditsMarkerGeneration *GetSearchAllLibrariesEnableCreditsMarkerGeneration `json:"enableCreditsMarkerGeneration,omitempty"`
// Setting that indicates the episode ordering for the show
// Setting that indicates the episode ordering for the show.
// None = Library default,
// tmdbAiring = The Movie Database (Aired),
// tvdbAiring = TheTVDB (Aired),
// tvdbDvd = TheTVDB (DVD),
// tvdbAbsolute = TheTVDB (Absolute)).
// aired = TheTVDB (Aired),
// dvd = TheTVDB (DVD),
// absolute = TheTVDB (Absolute)).
//
ShowOrdering *GetSearchAllLibrariesShowOrdering `json:"showOrdering,omitempty"`
Thumb *string `json:"thumb,omitempty"`

View File

@@ -0,0 +1,90 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package sdkerrors
import (
"encoding/json"
"net/http"
)
type GetCountriesLibraryLibraryErrors struct {
Code *int `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *int `json:"status,omitempty"`
}
func (o *GetCountriesLibraryLibraryErrors) GetCode() *int {
if o == nil {
return nil
}
return o.Code
}
func (o *GetCountriesLibraryLibraryErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetCountriesLibraryLibraryErrors) GetStatus() *int {
if o == nil {
return nil
}
return o.Status
}
// GetCountriesLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetCountriesLibraryUnauthorized struct {
Errors []GetCountriesLibraryLibraryErrors `json:"errors,omitempty"`
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response `json:"-"`
}
var _ error = &GetCountriesLibraryUnauthorized{}
func (e *GetCountriesLibraryUnauthorized) Error() string {
data, _ := json.Marshal(e)
return string(data)
}
type GetCountriesLibraryErrors struct {
Code *int `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *int `json:"status,omitempty"`
}
func (o *GetCountriesLibraryErrors) GetCode() *int {
if o == nil {
return nil
}
return o.Code
}
func (o *GetCountriesLibraryErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetCountriesLibraryErrors) GetStatus() *int {
if o == nil {
return nil
}
return o.Status
}
// GetCountriesLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
type GetCountriesLibraryBadRequest struct {
Errors []GetCountriesLibraryErrors `json:"errors,omitempty"`
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response `json:"-"`
}
var _ error = &GetCountriesLibraryBadRequest{}
func (e *GetCountriesLibraryBadRequest) Error() string {
data, _ := json.Marshal(e)
return string(data)
}

View File

@@ -0,0 +1,90 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package sdkerrors
import (
"encoding/json"
"net/http"
)
type GetGenresLibraryLibraryErrors struct {
Code *int `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *int `json:"status,omitempty"`
}
func (o *GetGenresLibraryLibraryErrors) GetCode() *int {
if o == nil {
return nil
}
return o.Code
}
func (o *GetGenresLibraryLibraryErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetGenresLibraryLibraryErrors) GetStatus() *int {
if o == nil {
return nil
}
return o.Status
}
// GetGenresLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetGenresLibraryUnauthorized struct {
Errors []GetGenresLibraryLibraryErrors `json:"errors,omitempty"`
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response `json:"-"`
}
var _ error = &GetGenresLibraryUnauthorized{}
func (e *GetGenresLibraryUnauthorized) Error() string {
data, _ := json.Marshal(e)
return string(data)
}
type GetGenresLibraryErrors struct {
Code *int `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *int `json:"status,omitempty"`
}
func (o *GetGenresLibraryErrors) GetCode() *int {
if o == nil {
return nil
}
return o.Code
}
func (o *GetGenresLibraryErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetGenresLibraryErrors) GetStatus() *int {
if o == nil {
return nil
}
return o.Status
}
// GetGenresLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
type GetGenresLibraryBadRequest struct {
Errors []GetGenresLibraryErrors `json:"errors,omitempty"`
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response `json:"-"`
}
var _ error = &GetGenresLibraryBadRequest{}
func (e *GetGenresLibraryBadRequest) Error() string {
data, _ := json.Marshal(e)
return string(data)
}

View File

@@ -298,9 +298,9 @@ func New(opts ...SDKOption) *PlexAPI {
sdkConfiguration: sdkConfiguration{
Language: "go",
OpenAPIDocVersion: "0.0.3",
SDKVersion: "0.17.2",
GenVersion: "2.496.0",
UserAgent: "speakeasy-sdk/go 0.17.2 2.496.0 0.0.3 github.com/LukeHagar/plexgo",
SDKVersion: "0.17.4",
GenVersion: "2.503.2",
UserAgent: "speakeasy-sdk/go 0.17.4 2.503.2 0.0.3 github.com/LukeHagar/plexgo",
ServerDefaults: []map[string]string{
{
"protocol": "https",

View File

@@ -712,15 +712,15 @@ func (s *Updater) ApplyUpdates(ctx context.Context, tonight *operations.Tonight,
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
case httpRes.StatusCode == 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err