From 4b10ba72ca2c08f3985f4218c02b99184428d611 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sat, 21 Sep 2024 00:21:00 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2 --- .speakeasy/gen.lock | 70 +++- .speakeasy/gen.yaml | 3 +- .speakeasy/workflow.lock | 12 +- LukeHagar/PlexAPI/SDK/Activities.cs | 52 ++- LukeHagar/PlexAPI/SDK/Authentication.cs | 114 +++---- LukeHagar/PlexAPI/SDK/Butler.cs | 112 +++---- LukeHagar/PlexAPI/SDK/Hubs.cs | 58 ++-- LukeHagar/PlexAPI/SDK/Library.cs | 300 ++++++------------ LukeHagar/PlexAPI/SDK/Log.cs | 66 ++-- .../PlexAPI/SDK/LukeHagar.PlexAPI.SDK.csproj | 2 +- LukeHagar/PlexAPI/SDK/Media.cs | 118 +++---- .../PlexAPI/SDK/Models/Components/Security.cs | 2 +- .../SDK/Models/Requests/AutoSelectSubtitle.cs | 41 +-- .../SDK/Models/Requests/Connections.cs | 26 +- .../Requests/DefaultSubtitleAccessibility.cs | 43 +-- .../Models/Requests/DefaultSubtitleForced.cs | 41 +-- .../Requests/GetAllLibrariesDirectory.cs | 48 +-- .../Requests/GetAllLibrariesMediaContainer.cs | 2 +- .../Requests/GetAllLibrariesResponseBody.cs | 2 +- .../Models/Requests/GetLibraryItemsField.cs | 30 ++ .../Requests/GetLibraryItemsFieldType.cs | 26 ++ .../Models/Requests/GetLibraryItemsFilter.cs | 33 ++ .../Requests/GetLibraryItemsMediaContainer.cs | 36 ++- .../Requests/GetLibraryItemsMetadata.cs | 26 +- .../Requests/GetLibraryItemsOperator.cs | 24 ++ .../Models/Requests/GetLibraryItemsRequest.cs | 4 +- .../Models/Requests/GetLibraryItemsSort.cs | 36 +++ .../Models/Requests/GetLibraryItemsType.cs | 41 +++ .../SDK/Models/Requests/GetPinRequest.cs | 12 - .../GetPlaylistContentsQueryParamType.cs | 8 +- .../Requests/GetServerResourcesRequest.cs | 18 +- .../Models/Requests/GetTokenByPinIdRequest.cs | 12 - .../GetTokenDetailsUserPlexAccount.cs | 4 +- .../GetTopWatchedContentQueryParamType.cs | 8 +- .../SDK/Models/Requests/IncludeGuids.cs | 4 +- .../SDK/Models/Requests/IncludeHttps.cs | 4 +- .../SDK/Models/Requests/IncludeIPv6.cs | 4 +- .../SDK/Models/Requests/IncludeMeta.cs | 4 +- .../SDK/Models/Requests/IncludeRelay.cs | 4 +- .../PlexAPI/SDK/Models/Requests/Location.cs | 4 +- .../PlexAPI/SDK/Models/Requests/MediaGuid.cs | 29 ++ .../Models/Requests/MediaReviewsVisibility.cs | 7 +- LukeHagar/PlexAPI/SDK/Models/Requests/Meta.cs | 33 ++ .../PostUsersSignInDataAutoSelectSubtitle.cs | 41 +-- ...sSignInDataDefaultSubtitleAccessibility.cs | 43 +-- ...ostUsersSignInDataDefaultSubtitleForced.cs | 41 +-- ...stUsersSignInDataMediaReviewsVisibility.cs | 7 +- .../Requests/PostUsersSignInDataRequest.cs | 36 --- .../PostUsersSignInDataUserPlexAccount.cs | 4 +- .../PostUsersSignInDataUserProfile.cs | 19 +- .../PostUsersSignInDataWatchedIndicator.cs | 44 +-- .../PlexAPI/SDK/Models/Requests/Protocol.cs | 60 ++++ .../SDK/Models/Requests/QueryParamType.cs | 8 +- LukeHagar/PlexAPI/SDK/Models/Requests/Type.cs | 8 +- .../Models/Requests/UploadPlaylistRequest.cs | 6 + .../SDK/Models/Requests/UserProfile.cs | 19 +- .../SDK/Models/Requests/WatchedIndicator.cs | 44 +-- LukeHagar/PlexAPI/SDK/Playlists.cs | 221 +++++-------- LukeHagar/PlexAPI/SDK/Plex.cs | 197 ++++-------- LukeHagar/PlexAPI/SDK/PlexAPI.cs | 6 +- LukeHagar/PlexAPI/SDK/Search.cs | 72 ++--- LukeHagar/PlexAPI/SDK/Server.cs | 228 +++++-------- LukeHagar/PlexAPI/SDK/Sessions.cs | 104 +++--- LukeHagar/PlexAPI/SDK/Statistics.cs | 84 ++--- LukeHagar/PlexAPI/SDK/Updater.cs | 72 ++--- LukeHagar/PlexAPI/SDK/Video.cs | 46 +-- LukeHagar/PlexAPI/SDK/Watchlist.cs | 32 +- NUGET.md | 23 +- README.md | 23 +- RELEASES.md | 12 +- codeSamples.yaml | 68 ++-- docs/Models/Requests/AutoSelectSubtitle.md | 8 +- docs/Models/Requests/Connections.md | 18 +- .../Requests/DefaultSubtitleAccessibility.md | 10 +- docs/Models/Requests/DefaultSubtitleForced.md | 8 +- .../Requests/GetAllLibrariesDirectory.md | 42 +-- .../Requests/GetAllLibrariesMediaContainer.md | 2 +- .../Requests/GetAllLibrariesResponseBody.md | 2 +- docs/Models/Requests/GetLibraryItemsField.md | 11 + .../Requests/GetLibraryItemsFieldType.md | 9 + docs/Models/Requests/GetLibraryItemsFilter.md | 12 + .../Requests/GetLibraryItemsMediaContainer.md | 37 +-- .../Requests/GetLibraryItemsMetadata.md | 17 +- .../Requests/GetLibraryItemsOperator.md | 9 + docs/Models/Requests/GetLibraryItemsSort.md | 13 + docs/Models/Requests/GetLibraryItemsType.md | 14 + docs/Models/Requests/GetPinRequest.md | 15 +- .../GetPlaylistContentsQueryParamType.md | 12 +- .../Requests/GetServerResourcesRequest.md | 11 +- .../Models/Requests/GetTokenByPinIdRequest.md | 7 +- .../GetTokenDetailsUserPlexAccount.md | 4 +- .../GetTopWatchedContentQueryParamType.md | 12 +- docs/Models/Requests/IncludeGuids.md | 8 +- docs/Models/Requests/IncludeHttps.md | 8 +- docs/Models/Requests/IncludeIPv6.md | 8 +- docs/Models/Requests/IncludeMeta.md | 8 +- docs/Models/Requests/IncludeRelay.md | 8 +- docs/Models/Requests/Location.md | 4 +- docs/Models/Requests/MediaGuid.md | 8 + .../Models/Requests/MediaReviewsVisibility.md | 10 +- docs/Models/Requests/Meta.md | 12 + docs/Models/Requests/PlexDevice.md | 52 +-- .../PostUsersSignInDataAutoSelectSubtitle.md | 8 +- ...sSignInDataDefaultSubtitleAccessibility.md | 10 +- ...ostUsersSignInDataDefaultSubtitleForced.md | 8 +- ...stUsersSignInDataMediaReviewsVisibility.md | 10 +- .../Requests/PostUsersSignInDataRequest.md | 9 - .../PostUsersSignInDataUserPlexAccount.md | 4 +- .../PostUsersSignInDataUserProfile.md | 20 +- .../PostUsersSignInDataWatchedIndicator.md | 10 +- docs/Models/Requests/Protocol.md | 11 + docs/Models/Requests/QueryParamType.md | 12 +- docs/Models/Requests/Type.md | 12 +- docs/Models/Requests/UploadPlaylistRequest.md | 3 +- docs/Models/Requests/UserProfile.md | 20 +- docs/Models/Requests/WatchedIndicator.md | 10 +- docs/sdks/authentication/README.md | 26 +- docs/sdks/hubs/README.md | 4 +- docs/sdks/library/README.md | 12 +- docs/sdks/playlists/README.md | 12 +- docs/sdks/plex/README.md | 34 +- docs/sdks/search/README.md | 6 +- docs/sdks/server/README.md | 6 +- 123 files changed, 1656 insertions(+), 2081 deletions(-) create mode 100644 LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsField.cs create mode 100644 LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsFieldType.cs create mode 100644 LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsFilter.cs create mode 100644 LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsOperator.cs create mode 100644 LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsSort.cs create mode 100644 LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsType.cs create mode 100644 LukeHagar/PlexAPI/SDK/Models/Requests/MediaGuid.cs create mode 100644 LukeHagar/PlexAPI/SDK/Models/Requests/Meta.cs delete mode 100644 LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataRequest.cs create mode 100644 LukeHagar/PlexAPI/SDK/Models/Requests/Protocol.cs create mode 100644 docs/Models/Requests/GetLibraryItemsField.md create mode 100644 docs/Models/Requests/GetLibraryItemsFieldType.md create mode 100644 docs/Models/Requests/GetLibraryItemsFilter.md create mode 100644 docs/Models/Requests/GetLibraryItemsOperator.md create mode 100644 docs/Models/Requests/GetLibraryItemsSort.md create mode 100644 docs/Models/Requests/GetLibraryItemsType.md create mode 100644 docs/Models/Requests/MediaGuid.md create mode 100644 docs/Models/Requests/Meta.md delete mode 100644 docs/Models/Requests/PostUsersSignInDataRequest.md create mode 100644 docs/Models/Requests/Protocol.md diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 0a21ef0..2dcac98 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 5a8dbcbc-e0ee-41f0-9d84-b8b50567d1e9 management: - docChecksum: 5bf578a672589649d8ed83c3927c50a6 + docChecksum: 1b63d7c28734a44b0339f405b186b290 docVersion: 0.0.3 - speakeasyVersion: 1.399.2 - generationVersion: 2.416.6 - releaseVersion: 0.6.11 - configChecksum: 8310a6a4fe6e2e061b86f130456df5af + speakeasyVersion: 1.401.2 + generationVersion: 2.421.3 + releaseVersion: 0.7.0 + configChecksum: d15dbdbd0a0b939c46391f2e9af2522c repoURL: https://github.com/LukeHagar/plexcsharp.git repoSubDirectory: . published: true @@ -14,10 +14,11 @@ features: csharp: additionalDependencies: 0.1.0 constsAndDefaults: 0.0.1 - core: 3.9.19 + core: 3.10.0 deprecations: 2.81.2 + enums: 2.82.0 errors: 0.0.2 - flattening: 2.81.2 + flattening: 2.81.3 globalSecurity: 2.83.6 globalSecurityCallbacks: 0.1.0 globalSecurityFlattening: 0.1.0 @@ -439,15 +440,21 @@ generatedFiles: - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryHubsWriter.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsCountry.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsDirector.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsField.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsFieldType.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsFilter.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsGenre.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsMedia.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsMediaContainer.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsMetadata.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsOperator.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsPart.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsRequest.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsResponse.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsResponseBody.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsRole.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsSort.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsType.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsWriter.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetMediaProvidersDirectory.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetMediaProvidersMediaContainer.cs @@ -639,8 +646,10 @@ generatedFiles: - LukeHagar/PlexAPI/SDK/Models/Requests/MarkUnplayedResponse.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Media.cs - LukeHagar/PlexAPI/SDK/Models/Requests/MediaContainer.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/MediaGuid.cs - LukeHagar/PlexAPI/SDK/Models/Requests/MediaProvider.cs - LukeHagar/PlexAPI/SDK/Models/Requests/MediaReviewsVisibility.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/Meta.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Metadata.cs - LukeHagar/PlexAPI/SDK/Models/Requests/MinSize.cs - LukeHagar/PlexAPI/SDK/Models/Requests/MyPlex.cs @@ -667,7 +676,6 @@ generatedFiles: - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataFeatures.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataMailingListStatus.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataMediaReviewsVisibility.cs - - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataRequest.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataRequestBody.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataResponse.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataServices.cs @@ -678,6 +686,7 @@ generatedFiles: - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataUserProfile.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataWatchedIndicator.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Producer.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/Protocol.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Provider.cs - LukeHagar/PlexAPI/SDK/Models/Requests/QueryParamFilter.cs - LukeHagar/PlexAPI/SDK/Models/Requests/QueryParamForce.cs @@ -1155,15 +1164,21 @@ generatedFiles: - docs/Models/Requests/GetLibraryHubsWriter.md - docs/Models/Requests/GetLibraryItemsCountry.md - docs/Models/Requests/GetLibraryItemsDirector.md + - docs/Models/Requests/GetLibraryItemsField.md + - docs/Models/Requests/GetLibraryItemsFieldType.md + - docs/Models/Requests/GetLibraryItemsFilter.md - docs/Models/Requests/GetLibraryItemsGenre.md - docs/Models/Requests/GetLibraryItemsMedia.md - docs/Models/Requests/GetLibraryItemsMediaContainer.md - docs/Models/Requests/GetLibraryItemsMetadata.md + - docs/Models/Requests/GetLibraryItemsOperator.md - docs/Models/Requests/GetLibraryItemsPart.md - docs/Models/Requests/GetLibraryItemsRequest.md - docs/Models/Requests/GetLibraryItemsResponse.md - docs/Models/Requests/GetLibraryItemsResponseBody.md - docs/Models/Requests/GetLibraryItemsRole.md + - docs/Models/Requests/GetLibraryItemsSort.md + - docs/Models/Requests/GetLibraryItemsType.md - docs/Models/Requests/GetLibraryItemsWriter.md - docs/Models/Requests/GetMediaProvidersDirectory.md - docs/Models/Requests/GetMediaProvidersMediaContainer.md @@ -1355,8 +1370,10 @@ generatedFiles: - docs/Models/Requests/MarkUnplayedResponse.md - docs/Models/Requests/Media.md - docs/Models/Requests/MediaContainer.md + - docs/Models/Requests/MediaGuid.md - docs/Models/Requests/MediaProvider.md - docs/Models/Requests/MediaReviewsVisibility.md + - docs/Models/Requests/Meta.md - docs/Models/Requests/Metadata.md - docs/Models/Requests/MinSize.md - docs/Models/Requests/MyPlex.md @@ -1383,7 +1400,6 @@ generatedFiles: - docs/Models/Requests/PostUsersSignInDataFeatures.md - docs/Models/Requests/PostUsersSignInDataMailingListStatus.md - docs/Models/Requests/PostUsersSignInDataMediaReviewsVisibility.md - - docs/Models/Requests/PostUsersSignInDataRequest.md - docs/Models/Requests/PostUsersSignInDataRequestBody.md - docs/Models/Requests/PostUsersSignInDataResponse.md - docs/Models/Requests/PostUsersSignInDataServices.md @@ -1394,6 +1410,7 @@ generatedFiles: - docs/Models/Requests/PostUsersSignInDataUserProfile.md - docs/Models/Requests/PostUsersSignInDataWatchedIndicator.md - docs/Models/Requests/Producer.md + - docs/Models/Requests/Protocol.md - docs/Models/Requests/Provider.md - docs/Models/Requests/QueryParamFilter.md - docs/Models/Requests/QueryParamForce.md @@ -1525,7 +1542,7 @@ examples: width: 110 height: 165 opacity: 100 - blur: 20 + blur: 0 minSize: 1 upscale: 0 url: "/library/metadata/49564/thumb/1654258204" @@ -1782,10 +1799,10 @@ examples: "": parameters: query: - X-Plex-Product: Plex Web - X-Plex-Device: Linux - X-Plex-Version: 4.133.0 - X-Plex-Platform: Chrome + X-Plex-Product: "Plex Web" + X-Plex-Device: "Linux" + X-Plex-Version: "4.133.0" + X-Plex-Platform: "Chrome" 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} @@ -1936,6 +1953,24 @@ examples: application/json: {"errors": []} "400": application/json: {"errors": []} + speakeasy-default-get-library-items: + parameters: + path: + sectionKey: 9518 + tag: "edition" + query: + includeGuids: 1 + includeMeta: 1 + type: 2 + X-Plex-Container-Start: 0 + X-Plex-Container-Size: 50 + responses: + "200": + application/json: {"MediaContainer": {"size": 70, "allowSync": true, "art": "/:/resources/movie-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionID": "", "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", "type": "movie", "title": "Avatar: The Way of Water", "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, "tagline": "Return to Pandora.", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1680457607, "updatedAt": 1703239236, "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", "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, "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "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", "videoProfile": "main 10"}, {"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", "videoProfile": "main 10"}, {"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", "videoProfile": "main 10"}]}], "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"}], "Role": [{"tag": "Sigourney Weaver"}, {"tag": "Sigourney Weaver"}, {"tag": "Sigourney Weaver"}], "Guid": [{"id": "imdb://tt13015952"}], "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", "type": "movie", "title": "Avatar: The Way of Water", "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, "tagline": "Return to Pandora.", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1680457607, "updatedAt": 1703239236, "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", "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, "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "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", "videoProfile": "main 10"}]}], "Genre": [], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Role": [{"tag": "Sigourney Weaver"}, {"tag": "Sigourney Weaver"}, {"tag": "Sigourney Weaver"}], "Guid": [{"id": "imdb://tt13015952"}], "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": + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-refresh-library-metadata: speakeasy-default-get-refresh-library-metadata: parameters: @@ -2181,6 +2216,7 @@ examples: query: path: "/home/barkley/playlist.m3u" force: 0 + sectionID: 1 responses: "401": application/json: {"errors": []} @@ -2201,7 +2237,7 @@ examples: speakeasy-default-get-source-connection-information: parameters: query: - source: "server://client-identifier" + source: "provider://provider-identifier" responses: "401": application/json: {"errors": []} @@ -2225,7 +2261,7 @@ examples: application/x-www-form-urlencoded: {"login": "username@email.com", "password": "password123", "verificationCode": "123456"} responses: "201": - application/json: {"adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": [], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1721154902, "locale": null, "mailingListActive": false, "mailingListStatus": "unsubscribed", "maxHomeSize": 15, "pin": "string", "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": "1", "defaultSubtitleAccessibility": "1", "defaultSubtitleForced": "0", "watchedIndicator": "1", "mediaReviewsVisibility": 0}, "protected": false, "rememberExpiresAt": 1722364046, "restricted": false, "roles": ["string"], "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online"}], "subscription": {"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}, "subscriptionDescription": "string", "subscriptions": [{"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f", "pastSubscriptions": [{"id": "string", "mode": "string", "renewsAt": "string", "endsAt": "1556281940", "canceled": "0", "gracePeriod": "0", "onHold": "0", "canReactivate": "0", "canUpgrade": "0", "canDowngrade": "0", "canConvert": "0", "type": "plexpass", "transfer": "string", "state": "ended", "billing": {"paymentMethodId": 569045}}], "trials": [{}]} + application/json: {"adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": ["[]"], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1556281940, "locale": null, "mailingListActive": false, "mailingListStatus": "unsubscribed", "maxHomeSize": 15, "pin": "string", "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": 1, "defaultSubtitleAccessibility": 1, "defaultSubtitleForced": 1, "watchedIndicator": 1, "mediaReviewsVisibility": 1}, "protected": false, "rememberExpiresAt": 1556281940, "restricted": false, "roles": ["string"], "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online"}], "subscription": {"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}, "subscriptionDescription": "string", "subscriptions": [{"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f", "pastSubscriptions": [{"id": "string", "mode": "string", "renewsAt": 1556281940, "endsAt": 1556281940, "canceled": false, "gracePeriod": false, "onHold": false, "canReactivate": false, "canUpgrade": false, "canDowngrade": false, "canConvert": false, "type": "plexpass", "transfer": "string", "state": "ended", "billing": {"paymentMethodId": 481656}}], "trials": [{}]} "401": application/json: {"errors": []} "400": @@ -2406,7 +2442,7 @@ examples: speakeasy-default-get-token-details: responses: "200": - application/json: {"adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": [], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1721154902, "locale": null, "mailingListActive": false, "mailingListStatus": "unsubscribed", "maxHomeSize": 15, "pin": "string", "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": "1", "defaultSubtitleAccessibility": "1", "defaultSubtitleForced": "0", "watchedIndicator": "1", "mediaReviewsVisibility": 0}, "protected": false, "rememberExpiresAt": 1722364046, "restricted": false, "roles": ["string"], "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online"}], "subscription": {"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}, "subscriptionDescription": "string", "subscriptions": [{"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f"} + application/json: {"adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": ["[]"], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1556281940, "locale": null, "mailingListActive": false, "mailingListStatus": "unsubscribed", "maxHomeSize": 15, "pin": "string", "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": 1, "defaultSubtitleAccessibility": 1, "defaultSubtitleForced": 1, "watchedIndicator": 1, "mediaReviewsVisibility": 1}, "protected": false, "rememberExpiresAt": 1556281940, "restricted": false, "roles": ["string"], "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online"}], "subscription": {"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}, "subscriptionDescription": "string", "subscriptions": [{"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f"} "400": application/json: {"errors": []} "401": diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 9b79f0b..a5d029a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true csharp: - version: 0.6.11 + version: 0.7.0 additionalDependencies: [] author: LukeHagar clientServerStatusCodesAsErrors: true @@ -35,3 +35,4 @@ csharp: packageName: LukeHagar.PlexAPI.SDK packageTags: Plex Media Server SDK responseFormat: envelope + sourceDirectory: "" diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index d616abe..d8490ff 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.399.2 +speakeasyVersion: 1.401.2 sources: my-source: sourceNamespace: my-source @@ -16,8 +16,8 @@ sources: - main plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:327e4a83099f910e042784ecc571fcbc4c9a6d8ba169b4ba181afb890a9936cc - sourceBlobDigest: sha256:a652fa39754f0c22a1454f628fe84983b34662ee8a153a3461d50b833f8bc5c2 + sourceRevisionDigest: sha256:5aa71ad96ca6de91143ee513c9880e08e555e7748fb4b5f8d069c6ab0c8f3069 + sourceBlobDigest: sha256:1cbef844e2856c2eabba4bd6d677d96c572fed13b27978d0d953aa06b224c02f tags: - latest - main @@ -25,10 +25,10 @@ targets: plexcsharp: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:327e4a83099f910e042784ecc571fcbc4c9a6d8ba169b4ba181afb890a9936cc - sourceBlobDigest: sha256:a652fa39754f0c22a1454f628fe84983b34662ee8a153a3461d50b833f8bc5c2 + sourceRevisionDigest: sha256:5aa71ad96ca6de91143ee513c9880e08e555e7748fb4b5f8d069c6ab0c8f3069 + sourceBlobDigest: sha256:1cbef844e2856c2eabba4bd6d677d96c572fed13b27978d0d953aa06b224c02f codeSamplesNamespace: code-samples-csharp-plexcsharp - codeSamplesRevisionDigest: sha256:38727400da12a8aad5060ffb4f689fd6953c723a61591af0436d5f6a782796b1 + codeSamplesRevisionDigest: sha256:f7febae6230f9bc151d99328c2b771c41002cc699d664ef857e752d9cd213bc2 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/LukeHagar/PlexAPI/SDK/Activities.cs b/LukeHagar/PlexAPI/SDK/Activities.cs index d8b8636..a862f6d 100644 --- a/LukeHagar/PlexAPI/SDK/Activities.cs +++ b/LukeHagar/PlexAPI/SDK/Activities.cs @@ -74,10 +74,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -154,10 +154,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -167,10 +165,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -180,19 +176,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task CancelServerActivitiesAsync(string activityUUID) @@ -265,10 +257,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -278,19 +268,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Authentication.cs b/LukeHagar/PlexAPI/SDK/Authentication.cs index 80a7b46..a09b696 100644 --- a/LukeHagar/PlexAPI/SDK/Authentication.cs +++ b/LukeHagar/PlexAPI/SDK/Authentication.cs @@ -69,7 +69,7 @@ namespace LukeHagar.PlexAPI.SDK /// Sign in user with username and password and return user data with Plex authentication token /// /// - Task PostUsersSignInDataAsync(string? clientID = null, PostUsersSignInDataRequestBody? requestBody = null, string? serverUrl = null); + Task PostUsersSignInDataAsync(PostUsersSignInDataRequestBody? request = null, string? serverUrl = null); } /// @@ -95,10 +95,10 @@ namespace LukeHagar.PlexAPI.SDK }; public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -182,10 +182,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -195,19 +193,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetSourceConnectionInformationAsync(string source) @@ -280,10 +274,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -293,19 +285,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetTokenDetailsAsync(string? serverUrl = null) @@ -377,10 +365,8 @@ namespace LukeHagar.PlexAPI.SDK response.UserPlexAccount = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -390,10 +376,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -403,42 +387,32 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - public async Task PostUsersSignInDataAsync(string? clientID = null, PostUsersSignInDataRequestBody? requestBody = null, string? serverUrl = null) + public async Task PostUsersSignInDataAsync(PostUsersSignInDataRequestBody? request = null, string? serverUrl = null) { - var request = new PostUsersSignInDataRequest() - { - ClientID = clientID, - RequestBody = requestBody, - }; - request.ClientID ??= SDKConfiguration.ClientID; - string baseUrl = Utilities.TemplateUrl(PostUsersSignInDataServerList[0], new Dictionary(){ }); if (serverUrl != null) { baseUrl = serverUrl; } - var urlString = URLBuilder.Build(baseUrl, "/users/signin", request); + + var urlString = baseUrl + "/users/signin"; var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "form", false, true); + var serializedBody = RequestBodySerializer.Serialize(request, "Request", "form", false, true); if (serializedBody != null) { httpRequest.Content = serializedBody; @@ -494,10 +468,8 @@ namespace LukeHagar.PlexAPI.SDK response.UserPlexAccount = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -507,10 +479,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -520,19 +490,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Butler.cs b/LukeHagar/PlexAPI/SDK/Butler.cs index 0b01f48..5758a2c 100644 --- a/LukeHagar/PlexAPI/SDK/Butler.cs +++ b/LukeHagar/PlexAPI/SDK/Butler.cs @@ -101,10 +101,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -181,10 +181,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -194,10 +192,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -207,19 +203,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task StartAllTasksAsync() @@ -289,10 +281,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -302,19 +292,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task StopAllTasksAsync() @@ -384,10 +370,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -397,19 +381,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task StartTaskAsync(TaskName taskName) @@ -482,10 +462,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -495,19 +473,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task StopTaskAsync(PathParamTaskName taskName) @@ -580,10 +554,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -593,19 +565,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 404 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Hubs.cs b/LukeHagar/PlexAPI/SDK/Hubs.cs index 5d169b9..9c44a6e 100644 --- a/LukeHagar/PlexAPI/SDK/Hubs.cs +++ b/LukeHagar/PlexAPI/SDK/Hubs.cs @@ -63,10 +63,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -147,10 +147,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -160,10 +158,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -173,19 +169,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetLibraryHubsAsync(double sectionId, double? count = null, QueryParamOnlyTransient? onlyTransient = null) @@ -257,10 +249,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -270,10 +260,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -283,19 +271,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Library.cs b/LukeHagar/PlexAPI/SDK/Library.cs index 5d246a8..71f2483 100644 --- a/LukeHagar/PlexAPI/SDK/Library.cs +++ b/LukeHagar/PlexAPI/SDK/Library.cs @@ -241,10 +241,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -328,10 +328,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -341,19 +339,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetRecentlyAddedAsync(int? xPlexContainerStart = null, int? xPlexContainerSize = null) @@ -424,10 +418,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -437,10 +429,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -450,19 +440,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetAllLibrariesAsync() @@ -529,10 +515,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -542,10 +526,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -555,19 +537,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = null) @@ -638,10 +616,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -651,10 +627,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -664,19 +638,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task DeleteLibraryAsync(int sectionKey) @@ -749,10 +719,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -762,19 +730,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetLibraryItemsAsync(GetLibraryItemsRequest request) @@ -840,10 +804,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -853,10 +815,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -866,19 +826,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetRefreshLibraryMetadataAsync(int sectionKey, Force? force = null) @@ -952,10 +908,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -965,19 +919,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetSearchLibraryAsync(int sectionKey, QueryParamType type) @@ -1048,10 +998,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -1061,10 +1009,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -1074,19 +1020,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetMetaDataByRatingKeyAsync(long ratingKey) @@ -1156,10 +1098,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -1169,10 +1109,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -1182,19 +1120,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetMetadataChildrenAsync(double ratingKey, string? includeElements = null) @@ -1265,10 +1199,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -1278,10 +1210,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -1291,19 +1221,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null) @@ -1374,10 +1300,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -1387,10 +1311,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -1400,19 +1322,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetOnDeckAsync() @@ -1479,10 +1397,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -1492,10 +1408,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -1505,19 +1419,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Log.cs b/LukeHagar/PlexAPI/SDK/Log.cs index fa1d370..91e87f3 100644 --- a/LukeHagar/PlexAPI/SDK/Log.cs +++ b/LukeHagar/PlexAPI/SDK/Log.cs @@ -94,10 +94,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -182,10 +182,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -195,19 +193,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task LogMultiLineAsync(string request) @@ -283,10 +277,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -296,19 +288,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task EnablePaperTrailAsync() @@ -378,10 +366,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -391,19 +377,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 403 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/LukeHagar.PlexAPI.SDK.csproj b/LukeHagar/PlexAPI/SDK/LukeHagar.PlexAPI.SDK.csproj index c8ae8d1..74f8beb 100644 --- a/LukeHagar/PlexAPI/SDK/LukeHagar.PlexAPI.SDK.csproj +++ b/LukeHagar/PlexAPI/SDK/LukeHagar.PlexAPI.SDK.csproj @@ -3,7 +3,7 @@ true LukeHagar.PlexAPI.SDK - 0.6.11 + 0.7.0 net8.0 LukeHagar Copyright (c) LukeHagar 2024 diff --git a/LukeHagar/PlexAPI/SDK/Media.cs b/LukeHagar/PlexAPI/SDK/Media.cs index 870e571..f9f7d22 100644 --- a/LukeHagar/PlexAPI/SDK/Media.cs +++ b/LukeHagar/PlexAPI/SDK/Media.cs @@ -90,10 +90,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -176,10 +176,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -189,19 +187,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task MarkUnplayedAsync(double key) @@ -274,10 +268,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -287,19 +279,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task UpdatePlayProgressAsync(string key, double time, string state) @@ -374,10 +362,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -387,19 +373,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetBannerImageAsync(GetBannerImageRequest request) @@ -464,10 +446,8 @@ namespace LukeHagar.PlexAPI.SDK response.Bytes = await httpResponse.Content.ReadAsByteArrayAsync(); return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -477,10 +457,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -490,19 +468,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetThumbImageAsync(GetThumbImageRequest request) @@ -567,10 +541,8 @@ namespace LukeHagar.PlexAPI.SDK response.Bytes = await httpResponse.Content.ReadAsByteArrayAsync(); return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -580,10 +552,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -593,19 +563,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Components/Security.cs b/LukeHagar/PlexAPI/SDK/Models/Components/Security.cs index 7c4637a..7f78381 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Components/Security.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Components/Security.cs @@ -14,7 +14,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Components public class Security { - [SpeakeasyMetadata("security:scheme=true,type=apiKey,subType=query,name=X-Plex-Token")] + [SpeakeasyMetadata("security:scheme=true,type=apiKey,subType=header,name=X-Plex-Token")] public string? AccessToken { get; set; } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/AutoSelectSubtitle.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/AutoSelectSubtitle.cs index fd12541..112c467 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/AutoSelectSubtitle.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/AutoSelectSubtitle.cs @@ -10,51 +10,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { using LukeHagar.PlexAPI.SDK.Utils; - using Newtonsoft.Json; - using System; /// /// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) /// public enum AutoSelectSubtitle { - [JsonProperty("0")] - Zero, - [JsonProperty("1")] - One, - } - - public static class AutoSelectSubtitleExtension - { - public static string Value(this AutoSelectSubtitle value) - { - return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); - } - - public static AutoSelectSubtitle ToEnum(this string value) - { - foreach(var field in typeof(AutoSelectSubtitle).GetFields()) - { - var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); - if (attributes.Length == 0) - { - continue; - } - - var attribute = attributes[0] as JsonPropertyAttribute; - if (attribute != null && attribute.PropertyName == value) - { - var enumVal = field.GetValue(null); - - if (enumVal is AutoSelectSubtitle) - { - return (AutoSelectSubtitle)enumVal; - } - } - } - - throw new Exception($"Unknown value {value} for enum AutoSelectSubtitle"); - } + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/Connections.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/Connections.cs index 395ceac..c220f78 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/Connections.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/Connections.cs @@ -9,30 +9,52 @@ #nullable enable namespace LukeHagar.PlexAPI.SDK.Models.Requests { + using LukeHagar.PlexAPI.SDK.Models.Requests; using LukeHagar.PlexAPI.SDK.Utils; using Newtonsoft.Json; public class Connections { + /// + /// The protocol used for the connection (http, https, etc) + /// [JsonProperty("protocol")] - public string Protocol { get; set; } = default!; + public Protocol Protocol { get; set; } = default!; + /// + /// The (ip) address or domain name used for the connection + /// [JsonProperty("address")] public string Address { get; set; } = default!; + /// + /// The port used for the connection + /// [JsonProperty("port")] - public double Port { get; set; } = default!; + public int Port { get; set; } = default!; + /// + /// The full URI of the connection + /// [JsonProperty("uri")] public string Uri { get; set; } = default!; + /// + /// If the connection is local address + /// [JsonProperty("local")] public bool Local { get; set; } = default!; + /// + /// If the connection is relayed through plex.direct + /// [JsonProperty("relay")] public bool Relay { get; set; } = default!; + /// + /// If the connection is using IPv6 + /// [JsonProperty("IPv6")] public bool IPv6 { get; set; } = default!; } diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/DefaultSubtitleAccessibility.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/DefaultSubtitleAccessibility.cs index 5945cc0..2cfa801 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/DefaultSubtitleAccessibility.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/DefaultSubtitleAccessibility.cs @@ -10,51 +10,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { using LukeHagar.PlexAPI.SDK.Utils; - using Newtonsoft.Json; - using System; /// - /// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) + /// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles) /// public enum DefaultSubtitleAccessibility { - [JsonProperty("0")] - Zero, - [JsonProperty("1")] - One, - } - - public static class DefaultSubtitleAccessibilityExtension - { - public static string Value(this DefaultSubtitleAccessibility value) - { - return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); - } - - public static DefaultSubtitleAccessibility ToEnum(this string value) - { - foreach(var field in typeof(DefaultSubtitleAccessibility).GetFields()) - { - var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); - if (attributes.Length == 0) - { - continue; - } - - var attribute = attributes[0] as JsonPropertyAttribute; - if (attribute != null && attribute.PropertyName == value) - { - var enumVal = field.GetValue(null); - - if (enumVal is DefaultSubtitleAccessibility) - { - return (DefaultSubtitleAccessibility)enumVal; - } - } - } - - throw new Exception($"Unknown value {value} for enum DefaultSubtitleAccessibility"); - } + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/DefaultSubtitleForced.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/DefaultSubtitleForced.cs index 7c0699b..6f46977 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/DefaultSubtitleForced.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/DefaultSubtitleForced.cs @@ -10,51 +10,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { using LukeHagar.PlexAPI.SDK.Utils; - using Newtonsoft.Json; - using System; /// /// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) /// public enum DefaultSubtitleForced { - [JsonProperty("0")] - Zero, - [JsonProperty("1")] - One, - } - - public static class DefaultSubtitleForcedExtension - { - public static string Value(this DefaultSubtitleForced value) - { - return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); - } - - public static DefaultSubtitleForced ToEnum(this string value) - { - foreach(var field in typeof(DefaultSubtitleForced).GetFields()) - { - var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); - if (attributes.Length == 0) - { - continue; - } - - var attribute = attributes[0] as JsonPropertyAttribute; - if (attribute != null && attribute.PropertyName == value) - { - var enumVal = field.GetValue(null); - - if (enumVal is DefaultSubtitleForced) - { - return (DefaultSubtitleForced)enumVal; - } - } - } - - throw new Exception($"Unknown value {value} for enum DefaultSubtitleForced"); - } + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetAllLibrariesDirectory.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetAllLibrariesDirectory.cs index c4dac46..8d4b26c 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetAllLibrariesDirectory.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetAllLibrariesDirectory.cs @@ -18,75 +18,75 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { [JsonProperty("allowSync")] - public bool? AllowSync { get; set; } + public bool AllowSync { get; set; } = default!; [JsonProperty("art")] - public string? Art { get; set; } + public string Art { get; set; } = default!; [JsonProperty("composite")] - public string? Composite { get; set; } + public string Composite { get; set; } = default!; [JsonProperty("filters")] - public bool? Filters { get; set; } + public bool Filters { get; set; } = default!; [JsonProperty("refreshing")] - public bool? Refreshing { get; set; } + public bool Refreshing { get; set; } = default!; [JsonProperty("thumb")] - public string? Thumb { get; set; } + public string Thumb { get; set; } = default!; [JsonProperty("key")] - public string? Key { get; set; } + public string Key { get; set; } = default!; [JsonProperty("type")] - public string? Type { get; set; } + public string Type { get; set; } = default!; [JsonProperty("title")] - public string? Title { get; set; } + public string Title { get; set; } = default!; [JsonProperty("agent")] - public string? Agent { get; set; } + public string Agent { get; set; } = default!; [JsonProperty("scanner")] - public string? Scanner { get; set; } + public string Scanner { get; set; } = default!; [JsonProperty("language")] - public string? Language { get; set; } + public string Language { get; set; } = default!; [JsonProperty("uuid")] - public string? Uuid { get; set; } + public string Uuid { get; set; } = default!; /// - /// Unix epoch datetime + /// Unix epoch datetime in seconds /// [JsonProperty("updatedAt")] - public long? UpdatedAt { get; set; } + public long UpdatedAt { get; set; } = default!; /// - /// Unix epoch datetime + /// Unix epoch datetime in seconds /// [JsonProperty("createdAt")] - public long? CreatedAt { get; set; } + public long CreatedAt { get; set; } = default!; /// - /// Unix epoch datetime + /// Unix epoch datetime in seconds /// [JsonProperty("scannedAt")] - public long? ScannedAt { get; set; } + public long ScannedAt { get; set; } = default!; [JsonProperty("content")] - public bool? Content { get; set; } + public bool Content { get; set; } = default!; [JsonProperty("directory")] - public bool? Directory { get; set; } + public bool Directory { get; set; } = default!; [JsonProperty("contentChangedAt")] - public int? ContentChangedAt { get; set; } + public int ContentChangedAt { get; set; } = default!; [JsonProperty("hidden")] - public int? Hidden { get; set; } + public int Hidden { get; set; } = default!; [JsonProperty("Location")] - public List? Location { get; set; } + public List Location { get; set; } = default!; } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetAllLibrariesMediaContainer.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetAllLibrariesMediaContainer.cs index 29f5011..7e56c6d 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetAllLibrariesMediaContainer.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetAllLibrariesMediaContainer.cs @@ -27,6 +27,6 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests public string Title1 { get; set; } = default!; [JsonProperty("Directory")] - public List? Directory { get; set; } + public List Directory { get; set; } = default!; } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetAllLibrariesResponseBody.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetAllLibrariesResponseBody.cs index 0d196c4..177ab44 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetAllLibrariesResponseBody.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetAllLibrariesResponseBody.cs @@ -20,6 +20,6 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { [JsonProperty("MediaContainer")] - public GetAllLibrariesMediaContainer? MediaContainer { get; set; } + public GetAllLibrariesMediaContainer MediaContainer { get; set; } = default!; } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsField.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsField.cs new file mode 100644 index 0000000..6c6c659 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsField.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + + public class GetLibraryItemsField + { + + [JsonProperty("key")] + public string Key { get; set; } = default!; + + [JsonProperty("title")] + public string Title { get; set; } = default!; + + [JsonProperty("type")] + public string Type { get; set; } = default!; + + [JsonProperty("subType")] + public string? SubType { get; set; } + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsFieldType.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsFieldType.cs new file mode 100644 index 0000000..aa56e71 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsFieldType.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Models.Requests; + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + + public class GetLibraryItemsFieldType + { + + [JsonProperty("type")] + public string Type { get; set; } = default!; + + [JsonProperty("Operator")] + public List Operator { get; set; } = default!; + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsFilter.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsFilter.cs new file mode 100644 index 0000000..47244ed --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsFilter.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + + public class GetLibraryItemsFilter + { + + [JsonProperty("filter")] + public string Filter { get; set; } = default!; + + [JsonProperty("filterType")] + public string FilterType { get; set; } = default!; + + [JsonProperty("key")] + public string Key { get; set; } = default!; + + [JsonProperty("title")] + public string Title { get; set; } = default!; + + [JsonProperty("type")] + public string Type { get; set; } = default!; + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsMediaContainer.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsMediaContainer.cs index 594b36c..374a556 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsMediaContainer.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsMediaContainer.cs @@ -19,43 +19,43 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { [JsonProperty("size")] - public int? Size { get; set; } + public int Size { get; set; } = default!; [JsonProperty("allowSync")] - public bool? AllowSync { get; set; } + public bool AllowSync { get; set; } = default!; [JsonProperty("art")] - public string? Art { get; set; } + public string Art { get; set; } = default!; [JsonProperty("identifier")] - public string? Identifier { get; set; } + public string Identifier { get; set; } = default!; [JsonProperty("librarySectionID")] - public LibrarySectionID? LibrarySectionID { get; set; } + public LibrarySectionID LibrarySectionID { get; set; } = default!; [JsonProperty("librarySectionTitle")] - public string? LibrarySectionTitle { get; set; } + public string LibrarySectionTitle { get; set; } = default!; [JsonProperty("librarySectionUUID")] - public string? LibrarySectionUUID { get; set; } + public string LibrarySectionUUID { get; set; } = default!; [JsonProperty("mediaTagPrefix")] - public string? MediaTagPrefix { get; set; } + public string MediaTagPrefix { get; set; } = default!; [JsonProperty("mediaTagVersion")] - public int? MediaTagVersion { get; set; } + public int MediaTagVersion { get; set; } = default!; [JsonProperty("thumb")] - public string? Thumb { get; set; } + public string Thumb { get; set; } = default!; [JsonProperty("title1")] - public string? Title1 { get; set; } + public string Title1 { get; set; } = default!; [JsonProperty("title2")] - public string? Title2 { get; set; } + public string Title2 { get; set; } = default!; [JsonProperty("viewGroup")] - public string? ViewGroup { get; set; } + public string ViewGroup { get; set; } = default!; [JsonProperty("viewMode")] public int? ViewMode { get; set; } @@ -65,5 +65,15 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests [JsonProperty("Metadata")] public List? Metadata { get; set; } + + /// + /// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
+ /// + /// + /// + /// + ///
+ [JsonProperty("Meta")] + public Meta? Meta { get; set; } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsMetadata.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsMetadata.cs index f9741f7..4f0b758 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsMetadata.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsMetadata.cs @@ -19,22 +19,22 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { [JsonProperty("ratingKey")] - public string? RatingKey { get; set; } + public string RatingKey { get; set; } = default!; [JsonProperty("key")] - public string? Key { get; set; } + public string Key { get; set; } = default!; [JsonProperty("guid")] - public string? Guid { get; set; } + public string Guid { get; set; } = default!; [JsonProperty("studio")] public string? Studio { get; set; } [JsonProperty("type")] - public string? Type { get; set; } + public string Type { get; set; } = default!; [JsonProperty("title")] - public string? Title { get; set; } + public string Title { get; set; } = default!; [JsonProperty("contentRating")] public string? ContentRating { get; set; } @@ -49,7 +49,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests public double? AudienceRating { get; set; } [JsonProperty("year")] - public int? Year { get; set; } + public int Year { get; set; } = default!; [JsonProperty("tagline")] public string? Tagline { get; set; } @@ -61,7 +61,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests public string? Art { get; set; } [JsonProperty("duration")] - public int? Duration { get; set; } + public int Duration { get; set; } = default!; [JsonProperty("originallyAvailableAt")] public LocalDate? OriginallyAvailableAt { get; set; } @@ -106,7 +106,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests public string? GrandparentTheme { get; set; } [JsonProperty("Media")] - public List? Media { get; set; } + public List Media { get; set; } = default!; [JsonProperty("Genre")] public List? Genre { get; set; } @@ -123,6 +123,16 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests [JsonProperty("Role")] public List? Role { get; set; } + /// + /// The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
+ /// + /// + /// + /// + ///
+ [JsonProperty("Guid")] + public List? MediaGuid { get; set; } + [JsonProperty("titleSort")] public string? TitleSort { get; set; } diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsOperator.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsOperator.cs new file mode 100644 index 0000000..017ed04 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsOperator.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + + public class GetLibraryItemsOperator + { + + [JsonProperty("key")] + public string Key { get; set; } = default!; + + [JsonProperty("title")] + public string Title { get; set; } = default!; + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsRequest.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsRequest.cs index 587c35c..c46d13c 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsRequest.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsRequest.cs @@ -55,7 +55,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests /// ///
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGuids")] - public IncludeGuids? IncludeGuids { get; set; } + public IncludeGuids? IncludeGuids { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeGuids.Disable; /// /// Adds the Meta object to the response
@@ -65,7 +65,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests /// ///
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeMeta")] - public IncludeMeta? IncludeMeta { get; set; } + public IncludeMeta? IncludeMeta { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeMeta.Disable; /// /// The index of the first item to return. If not specified, the first item will be returned.
diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsSort.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsSort.cs new file mode 100644 index 0000000..4463815 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsSort.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + + public class GetLibraryItemsSort + { + + [JsonProperty("default")] + public string? Default { get; set; } + + [JsonProperty("defaultDirection")] + public string DefaultDirection { get; set; } = default!; + + [JsonProperty("descKey")] + public string? DescKey { get; set; } + + [JsonProperty("firstCharacterKey")] + public string? FirstCharacterKey { get; set; } + + [JsonProperty("key")] + public string Key { get; set; } = default!; + + [JsonProperty("title")] + public string Title { get; set; } = default!; + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsType.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsType.cs new file mode 100644 index 0000000..8b13080 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetLibraryItemsType.cs @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Models.Requests; + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + + public class GetLibraryItemsType + { + + [JsonProperty("key")] + public string Key { get; set; } = default!; + + [JsonProperty("type")] + public string Type { get; set; } = default!; + + [JsonProperty("title")] + public string Title { get; set; } = default!; + + [JsonProperty("active")] + public bool Active { get; set; } = default!; + + [JsonProperty("Filter")] + public List? Filter { get; set; } + + [JsonProperty("Sort")] + public List? Sort { get; set; } + + [JsonProperty("Field")] + public List? Field { get; set; } + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetPinRequest.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetPinRequest.cs index ce4cf6c..c8a7eba 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetPinRequest.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetPinRequest.cs @@ -26,18 +26,6 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests [SpeakeasyMetadata("queryParam:style=form,explode=true,name=strong")] public bool? Strong { get; set; } = false; - /// - /// 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)
- /// - ///
- ///
- [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")] - public string? ClientID { get; set; } - [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Product")] public string? ClientName { get; set; } diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetPlaylistContentsQueryParamType.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetPlaylistContentsQueryParamType.cs index bceb5b7..aca1ca8 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetPlaylistContentsQueryParamType.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetPlaylistContentsQueryParamType.cs @@ -25,10 +25,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests ///
public enum GetPlaylistContentsQueryParamType { - One = 1, - Two = 2, - Three = 3, - Four = 4, + Movie = 1, + Show = 2, + Season = 3, + Episode = 4, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetServerResourcesRequest.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetServerResourcesRequest.cs index 75a9946..9a6f8df 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetServerResourcesRequest.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetServerResourcesRequest.cs @@ -15,23 +15,11 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests public class GetServerResourcesRequest { - /// - /// 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)
- /// - ///
- ///
- [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")] - public string? ClientID { get; set; } - /// /// Include Https entries in the results /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeHttps")] - public IncludeHttps? IncludeHttps { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeHttps.Zero; + public IncludeHttps? IncludeHttps { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeHttps.Disable; /// /// Include Relay addresses in the results
@@ -42,12 +30,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests /// ///
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeRelay")] - public IncludeRelay? IncludeRelay { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeRelay.Zero; + public IncludeRelay? IncludeRelay { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeRelay.Disable; /// /// Include IPv6 entries in the results /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeIPv6")] - public IncludeIPv6? IncludeIPv6 { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeIPv6.Zero; + public IncludeIPv6? IncludeIPv6 { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeIPv6.Disable; } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetTokenByPinIdRequest.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetTokenByPinIdRequest.cs index 2f65f31..c09ba40 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetTokenByPinIdRequest.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetTokenByPinIdRequest.cs @@ -19,17 +19,5 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=pinID")] public long PinID { get; set; } = default!; - - /// - /// 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)
- /// - ///
- ///
- [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")] - public string? ClientID { get; set; } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetTokenDetailsUserPlexAccount.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetTokenDetailsUserPlexAccount.cs index ba2a364..eb0ba5f 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetTokenDetailsUserPlexAccount.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetTokenDetailsUserPlexAccount.cs @@ -136,7 +136,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests public int Id { get; set; } = default!; /// - /// Unix epoch datetime + /// Unix epoch datetime in seconds /// [JsonProperty("joinedAt")] public long JoinedAt { get; set; } = default!; @@ -182,7 +182,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests public bool? Protected { get; set; } = false; /// - /// Unix epoch datetime + /// Unix epoch datetime in seconds /// [JsonProperty("rememberExpiresAt")] public long RememberExpiresAt { get; set; } = default!; diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentQueryParamType.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentQueryParamType.cs index 52ce760..70476ae 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentQueryParamType.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentQueryParamType.cs @@ -25,10 +25,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests /// public enum GetTopWatchedContentQueryParamType { - One = 1, - Two = 2, - Three = 3, - Four = 4, + Movie = 1, + Show = 2, + Season = 3, + Episode = 4, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeGuids.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeGuids.cs index 03549cb..5545760 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeGuids.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeGuids.cs @@ -20,8 +20,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests /// public enum IncludeGuids { - Zero = 0, - One = 1, + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeHttps.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeHttps.cs index b20572f..d6673d2 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeHttps.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeHttps.cs @@ -16,8 +16,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests /// public enum IncludeHttps { - Zero = 0, - One = 1, + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeIPv6.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeIPv6.cs index 4815ad4..c96553a 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeIPv6.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeIPv6.cs @@ -16,8 +16,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests /// public enum IncludeIPv6 { - Zero = 0, - One = 1, + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeMeta.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeMeta.cs index 8c9b5f3..fb906f6 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeMeta.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeMeta.cs @@ -20,8 +20,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests /// public enum IncludeMeta { - Zero = 0, - One = 1, + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeRelay.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeRelay.cs index 6a32618..00e3d46 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeRelay.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/IncludeRelay.cs @@ -21,8 +21,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests /// public enum IncludeRelay { - Zero = 0, - One = 1, + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/Location.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/Location.cs index 807bc55..5710e3b 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/Location.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/Location.cs @@ -16,9 +16,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { [JsonProperty("id")] - public int? Id { get; set; } + public int Id { get; set; } = default!; [JsonProperty("path")] - public string? Path { get; set; } + public string Path { get; set; } = default!; } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/MediaGuid.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/MediaGuid.cs new file mode 100644 index 0000000..54ae9b5 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/MediaGuid.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + + public class MediaGuid + { + + /// + /// Can be one of the following formats:
+ /// + /// + /// imdb://tt13015952, tmdb://2434012, tvdb://7945991
+ /// + ///
+ ///
+ [JsonProperty("id")] + public string Id { get; set; } = default!; + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/MediaReviewsVisibility.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/MediaReviewsVisibility.cs index 9950426..6129963 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/MediaReviewsVisibility.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/MediaReviewsVisibility.cs @@ -11,10 +11,13 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { using LukeHagar.PlexAPI.SDK.Utils; + /// + /// Whether or not the account has media reviews visibility enabled + /// public enum MediaReviewsVisibility { - Zero = 0, - One = 1, + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/Meta.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/Meta.cs new file mode 100644 index 0000000..5293d9a --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/Meta.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Models.Requests; + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + + /// + /// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
+ /// + /// + /// + /// + ///
+ public class Meta + { + + [JsonProperty("Type")] + public List? Type { get; set; } + + [JsonProperty("FieldType")] + public List? FieldType { get; set; } + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataAutoSelectSubtitle.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataAutoSelectSubtitle.cs index 5da13e9..1895510 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataAutoSelectSubtitle.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataAutoSelectSubtitle.cs @@ -10,51 +10,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { using LukeHagar.PlexAPI.SDK.Utils; - using Newtonsoft.Json; - using System; /// /// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) /// public enum PostUsersSignInDataAutoSelectSubtitle { - [JsonProperty("0")] - Zero, - [JsonProperty("1")] - One, - } - - public static class PostUsersSignInDataAutoSelectSubtitleExtension - { - public static string Value(this PostUsersSignInDataAutoSelectSubtitle value) - { - return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); - } - - public static PostUsersSignInDataAutoSelectSubtitle ToEnum(this string value) - { - foreach(var field in typeof(PostUsersSignInDataAutoSelectSubtitle).GetFields()) - { - var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); - if (attributes.Length == 0) - { - continue; - } - - var attribute = attributes[0] as JsonPropertyAttribute; - if (attribute != null && attribute.PropertyName == value) - { - var enumVal = field.GetValue(null); - - if (enumVal is PostUsersSignInDataAutoSelectSubtitle) - { - return (PostUsersSignInDataAutoSelectSubtitle)enumVal; - } - } - } - - throw new Exception($"Unknown value {value} for enum PostUsersSignInDataAutoSelectSubtitle"); - } + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataDefaultSubtitleAccessibility.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataDefaultSubtitleAccessibility.cs index b4f765f..03ecfac 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataDefaultSubtitleAccessibility.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataDefaultSubtitleAccessibility.cs @@ -10,51 +10,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { using LukeHagar.PlexAPI.SDK.Utils; - using Newtonsoft.Json; - using System; /// - /// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) + /// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles) /// public enum PostUsersSignInDataDefaultSubtitleAccessibility { - [JsonProperty("0")] - Zero, - [JsonProperty("1")] - One, - } - - public static class PostUsersSignInDataDefaultSubtitleAccessibilityExtension - { - public static string Value(this PostUsersSignInDataDefaultSubtitleAccessibility value) - { - return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); - } - - public static PostUsersSignInDataDefaultSubtitleAccessibility ToEnum(this string value) - { - foreach(var field in typeof(PostUsersSignInDataDefaultSubtitleAccessibility).GetFields()) - { - var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); - if (attributes.Length == 0) - { - continue; - } - - var attribute = attributes[0] as JsonPropertyAttribute; - if (attribute != null && attribute.PropertyName == value) - { - var enumVal = field.GetValue(null); - - if (enumVal is PostUsersSignInDataDefaultSubtitleAccessibility) - { - return (PostUsersSignInDataDefaultSubtitleAccessibility)enumVal; - } - } - } - - throw new Exception($"Unknown value {value} for enum PostUsersSignInDataDefaultSubtitleAccessibility"); - } + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataDefaultSubtitleForced.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataDefaultSubtitleForced.cs index 747befc..0e552c3 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataDefaultSubtitleForced.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataDefaultSubtitleForced.cs @@ -10,51 +10,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { using LukeHagar.PlexAPI.SDK.Utils; - using Newtonsoft.Json; - using System; /// /// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) /// public enum PostUsersSignInDataDefaultSubtitleForced { - [JsonProperty("0")] - Zero, - [JsonProperty("1")] - One, - } - - public static class PostUsersSignInDataDefaultSubtitleForcedExtension - { - public static string Value(this PostUsersSignInDataDefaultSubtitleForced value) - { - return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); - } - - public static PostUsersSignInDataDefaultSubtitleForced ToEnum(this string value) - { - foreach(var field in typeof(PostUsersSignInDataDefaultSubtitleForced).GetFields()) - { - var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); - if (attributes.Length == 0) - { - continue; - } - - var attribute = attributes[0] as JsonPropertyAttribute; - if (attribute != null && attribute.PropertyName == value) - { - var enumVal = field.GetValue(null); - - if (enumVal is PostUsersSignInDataDefaultSubtitleForced) - { - return (PostUsersSignInDataDefaultSubtitleForced)enumVal; - } - } - } - - throw new Exception($"Unknown value {value} for enum PostUsersSignInDataDefaultSubtitleForced"); - } + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataMediaReviewsVisibility.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataMediaReviewsVisibility.cs index b73e216..e32a1f5 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataMediaReviewsVisibility.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataMediaReviewsVisibility.cs @@ -11,10 +11,13 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { using LukeHagar.PlexAPI.SDK.Utils; + /// + /// Whether or not the account has media reviews visibility enabled + /// public enum PostUsersSignInDataMediaReviewsVisibility { - Zero = 0, - One = 1, + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataRequest.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataRequest.cs deleted file mode 100644 index 4436f8c..0000000 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataRequest.cs +++ /dev/null @@ -1,36 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace LukeHagar.PlexAPI.SDK.Models.Requests -{ - using LukeHagar.PlexAPI.SDK.Models.Requests; - using LukeHagar.PlexAPI.SDK.Utils; - - public class PostUsersSignInDataRequest - { - - /// - /// 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)
- /// - ///
- ///
- [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")] - public string? ClientID { get; set; } - - /// - /// Login credentials - /// - [SpeakeasyMetadata("request:mediaType=application/x-www-form-urlencoded")] - public PostUsersSignInDataRequestBody? RequestBody { get; set; } - } -} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataUserPlexAccount.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataUserPlexAccount.cs index 4caca92..d42cb9b 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataUserPlexAccount.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataUserPlexAccount.cs @@ -136,7 +136,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests public int Id { get; set; } = default!; /// - /// Unix epoch datetime + /// Unix epoch datetime in seconds /// [JsonProperty("joinedAt")] public long JoinedAt { get; set; } = default!; @@ -182,7 +182,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests public bool? Protected { get; set; } = false; /// - /// Unix epoch datetime + /// Unix epoch datetime in seconds /// [JsonProperty("rememberExpiresAt")] public long RememberExpiresAt { get; set; } = default!; diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataUserProfile.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataUserProfile.cs index 5496381..f4ff31c 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataUserProfile.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataUserProfile.cs @@ -34,28 +34,19 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests [JsonProperty("defaultSubtitleLanguage", NullValueHandling = NullValueHandling.Include)] public string? DefaultSubtitleLanguage { get; set; } - /// - /// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) - /// [JsonProperty("autoSelectSubtitle")] - public PostUsersSignInDataAutoSelectSubtitle? AutoSelectSubtitle { get; set; } + public PostUsersSignInDataAutoSelectSubtitle? AutoSelectSubtitle { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.PostUsersSignInDataAutoSelectSubtitle.Disable; - /// - /// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) - /// [JsonProperty("defaultSubtitleAccessibility")] - public PostUsersSignInDataDefaultSubtitleAccessibility? DefaultSubtitleAccessibility { get; set; } + public PostUsersSignInDataDefaultSubtitleAccessibility? DefaultSubtitleAccessibility { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.PostUsersSignInDataDefaultSubtitleAccessibility.Disable; - /// - /// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) - /// [JsonProperty("defaultSubtitleForced")] - public PostUsersSignInDataDefaultSubtitleForced? DefaultSubtitleForced { get; set; } + public PostUsersSignInDataDefaultSubtitleForced? DefaultSubtitleForced { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.PostUsersSignInDataDefaultSubtitleForced.Disable; [JsonProperty("watchedIndicator")] - public PostUsersSignInDataWatchedIndicator? WatchedIndicator { get; set; } + public PostUsersSignInDataWatchedIndicator? WatchedIndicator { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.PostUsersSignInDataWatchedIndicator.Disable; [JsonProperty("mediaReviewsVisibility")] - public PostUsersSignInDataMediaReviewsVisibility? MediaReviewsVisibility { get; set; } + public PostUsersSignInDataMediaReviewsVisibility? MediaReviewsVisibility { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.PostUsersSignInDataMediaReviewsVisibility.Disable; } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataWatchedIndicator.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataWatchedIndicator.cs index 2c1060a..279de5e 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataWatchedIndicator.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataWatchedIndicator.cs @@ -10,48 +10,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { using LukeHagar.PlexAPI.SDK.Utils; - using Newtonsoft.Json; - using System; + /// + /// Whether or not media watched indicators are enabled (little orange dot on media) + /// public enum PostUsersSignInDataWatchedIndicator { - [JsonProperty("0")] - Zero, - [JsonProperty("1")] - One, - } - - public static class PostUsersSignInDataWatchedIndicatorExtension - { - public static string Value(this PostUsersSignInDataWatchedIndicator value) - { - return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); - } - - public static PostUsersSignInDataWatchedIndicator ToEnum(this string value) - { - foreach(var field in typeof(PostUsersSignInDataWatchedIndicator).GetFields()) - { - var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); - if (attributes.Length == 0) - { - continue; - } - - var attribute = attributes[0] as JsonPropertyAttribute; - if (attribute != null && attribute.PropertyName == value) - { - var enumVal = field.GetValue(null); - - if (enumVal is PostUsersSignInDataWatchedIndicator) - { - return (PostUsersSignInDataWatchedIndicator)enumVal; - } - } - } - - throw new Exception($"Unknown value {value} for enum PostUsersSignInDataWatchedIndicator"); - } + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/Protocol.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/Protocol.cs new file mode 100644 index 0000000..5156355 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/Protocol.cs @@ -0,0 +1,60 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + using System; + + /// + /// The protocol used for the connection (http, https, etc) + /// + public enum Protocol + { + [JsonProperty("http")] + Http, + [JsonProperty("https")] + Https, + } + + public static class ProtocolExtension + { + public static string Value(this Protocol value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static Protocol ToEnum(this string value) + { + foreach(var field in typeof(Protocol).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is Protocol) + { + return (Protocol)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum Protocol"); + } + } + +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/QueryParamType.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/QueryParamType.cs index 76f5b93..616f9c4 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/QueryParamType.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/QueryParamType.cs @@ -25,10 +25,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests /// public enum QueryParamType { - One = 1, - Two = 2, - Three = 3, - Four = 4, + Movie = 1, + Show = 2, + Season = 3, + Episode = 4, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/Type.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/Type.cs index ff67e13..47e04e3 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/Type.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/Type.cs @@ -25,10 +25,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests /// public enum Type { - One = 1, - Two = 2, - Three = 3, - Four = 4, + Movie = 1, + Show = 2, + Season = 3, + Episode = 4, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/UploadPlaylistRequest.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/UploadPlaylistRequest.cs index 263f792..3bcfe37 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/UploadPlaylistRequest.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/UploadPlaylistRequest.cs @@ -42,5 +42,11 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=force")] public QueryParamForce Force { get; set; } = default!; + + /// + /// Possibly the section ID to upload the playlist to, we are not certain. + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=sectionID")] + public long SectionID { get; set; } = 1; } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/UserProfile.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/UserProfile.cs index 544cf72..4b1468e 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/UserProfile.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/UserProfile.cs @@ -34,28 +34,19 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests [JsonProperty("defaultSubtitleLanguage", NullValueHandling = NullValueHandling.Include)] public string? DefaultSubtitleLanguage { get; set; } - /// - /// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) - /// [JsonProperty("autoSelectSubtitle")] - public AutoSelectSubtitle? AutoSelectSubtitle { get; set; } + public AutoSelectSubtitle? AutoSelectSubtitle { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.AutoSelectSubtitle.Disable; - /// - /// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) - /// [JsonProperty("defaultSubtitleAccessibility")] - public DefaultSubtitleAccessibility? DefaultSubtitleAccessibility { get; set; } + public DefaultSubtitleAccessibility? DefaultSubtitleAccessibility { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.DefaultSubtitleAccessibility.Disable; - /// - /// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) - /// [JsonProperty("defaultSubtitleForced")] - public DefaultSubtitleForced? DefaultSubtitleForced { get; set; } + public DefaultSubtitleForced? DefaultSubtitleForced { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.DefaultSubtitleForced.Disable; [JsonProperty("watchedIndicator")] - public WatchedIndicator? WatchedIndicator { get; set; } + public WatchedIndicator? WatchedIndicator { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.WatchedIndicator.Disable; [JsonProperty("mediaReviewsVisibility")] - public MediaReviewsVisibility? MediaReviewsVisibility { get; set; } + public MediaReviewsVisibility? MediaReviewsVisibility { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.MediaReviewsVisibility.Disable; } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/WatchedIndicator.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/WatchedIndicator.cs index 19eaf9c..ce00ba2 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/WatchedIndicator.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/WatchedIndicator.cs @@ -10,48 +10,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests { using LukeHagar.PlexAPI.SDK.Utils; - using Newtonsoft.Json; - using System; + /// + /// Whether or not media watched indicators are enabled (little orange dot on media) + /// public enum WatchedIndicator { - [JsonProperty("0")] - Zero, - [JsonProperty("1")] - One, - } - - public static class WatchedIndicatorExtension - { - public static string Value(this WatchedIndicator value) - { - return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); - } - - public static WatchedIndicator ToEnum(this string value) - { - foreach(var field in typeof(WatchedIndicator).GetFields()) - { - var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); - if (attributes.Length == 0) - { - continue; - } - - var attribute = attributes[0] as JsonPropertyAttribute; - if (attribute != null && attribute.PropertyName == value) - { - var enumVal = field.GetValue(null); - - if (enumVal is WatchedIndicator) - { - return (WatchedIndicator)enumVal; - } - } - } - - throw new Exception($"Unknown value {value} for enum WatchedIndicator"); - } + Disable = 0, + Enable = 1, } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Playlists.cs b/LukeHagar/PlexAPI/SDK/Playlists.cs index 2fe25ba..38a6c29 100644 --- a/LukeHagar/PlexAPI/SDK/Playlists.cs +++ b/LukeHagar/PlexAPI/SDK/Playlists.cs @@ -129,7 +129,7 @@ namespace LukeHagar.PlexAPI.SDK /// /// /// - Task UploadPlaylistAsync(string path, QueryParamForce force); + Task UploadPlaylistAsync(string path, QueryParamForce force, long sectionID); } /// @@ -146,10 +146,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -225,10 +225,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -238,10 +236,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -251,19 +247,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetPlaylistsAsync(PlaylistType? playlistType = null, QueryParamSmart? smart = null) @@ -334,10 +326,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -347,10 +337,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -360,19 +348,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetPlaylistAsync(double playlistID) @@ -442,10 +426,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -455,10 +437,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -468,19 +448,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task DeletePlaylistAsync(double playlistID) @@ -553,10 +529,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -566,19 +540,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task UpdatePlaylistAsync(double playlistID, string? title = null, string? summary = null) @@ -653,10 +623,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -666,19 +634,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetPlaylistContentsAsync(double playlistID, GetPlaylistContentsQueryParamType type) @@ -749,10 +713,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -762,10 +724,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -775,19 +735,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task ClearPlaylistContentsAsync(double playlistID) @@ -860,10 +816,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -873,19 +827,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task AddPlaylistContentsAsync(double playlistID, string uri, double? playQueueID = null) @@ -957,10 +907,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -970,10 +918,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -983,27 +929,24 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - public async Task UploadPlaylistAsync(string path, QueryParamForce force) + public async Task UploadPlaylistAsync(string path, QueryParamForce force, long sectionID) { var request = new UploadPlaylistRequest() { Path = path, Force = force, + SectionID = sectionID, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/playlists/upload", request); @@ -1069,10 +1012,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -1082,19 +1023,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Plex.cs b/LukeHagar/PlexAPI/SDK/Plex.cs index 909809f..010b6b5 100644 --- a/LukeHagar/PlexAPI/SDK/Plex.cs +++ b/LukeHagar/PlexAPI/SDK/Plex.cs @@ -75,7 +75,7 @@ namespace LukeHagar.PlexAPI.SDK /// Get Plex server access tokens and server connections /// /// - Task GetServerResourcesAsync(string? clientID = null, IncludeHttps? includeHttps = null, IncludeRelay? includeRelay = null, IncludeIPv6? includeIPv6 = null, string? serverUrl = null); + Task GetServerResourcesAsync(IncludeHttps? includeHttps = null, IncludeRelay? includeRelay = null, IncludeIPv6? includeIPv6 = null, string? serverUrl = null); /// /// Get a Pin @@ -93,7 +93,7 @@ namespace LukeHagar.PlexAPI.SDK /// Retrieve an Access Token from Plex.tv after the Pin has been authenticated /// /// - Task GetTokenByPinIdAsync(long pinID, string? clientID = null, string? serverUrl = null); + Task GetTokenByPinIdAsync(long pinID, string? serverUrl = null); } /// @@ -143,10 +143,10 @@ namespace LukeHagar.PlexAPI.SDK }; public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -228,10 +228,8 @@ namespace LukeHagar.PlexAPI.SDK response.ResponseBodies = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -241,10 +239,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -254,19 +250,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetUserFriendsAsync(string? serverUrl = null) @@ -338,10 +330,8 @@ namespace LukeHagar.PlexAPI.SDK response.Friends = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -351,10 +341,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -364,19 +352,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetGeoDataAsync(string? serverUrl = null) @@ -443,10 +427,8 @@ namespace LukeHagar.PlexAPI.SDK response.GeoData = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -456,10 +438,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -469,19 +449,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetHomeDataAsync() @@ -548,10 +524,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -561,10 +535,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -574,32 +546,25 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - public async Task GetServerResourcesAsync(string? clientID = null, IncludeHttps? includeHttps = null, IncludeRelay? includeRelay = null, IncludeIPv6? includeIPv6 = null, string? serverUrl = null) + public async Task GetServerResourcesAsync(IncludeHttps? includeHttps = null, IncludeRelay? includeRelay = null, IncludeIPv6? includeIPv6 = null, string? serverUrl = null) { var request = new GetServerResourcesRequest() { - ClientID = clientID, IncludeHttps = includeHttps, IncludeRelay = includeRelay, IncludeIPv6 = includeIPv6, }; - request.ClientID ??= SDKConfiguration.ClientID; - string baseUrl = Utilities.TemplateUrl(GetServerResourcesServerList[0], new Dictionary(){ }); if (serverUrl != null) @@ -666,10 +631,8 @@ namespace LukeHagar.PlexAPI.SDK response.PlexDevices = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -679,10 +642,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -692,24 +653,19 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetPinAsync(GetPinRequest? request = null, string? serverUrl = null) { - request.ClientID ??= SDKConfiguration.ClientID; request.ClientName ??= SDKConfiguration.ClientName; request.ClientVersion ??= SDKConfiguration.ClientVersion; request.ClientPlatform ??= SDKConfiguration.ClientPlatform; @@ -776,10 +732,8 @@ namespace LukeHagar.PlexAPI.SDK response.AuthPinContainer = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -789,30 +743,23 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - public async Task GetTokenByPinIdAsync(long pinID, string? clientID = null, string? serverUrl = null) + public async Task GetTokenByPinIdAsync(long pinID, string? serverUrl = null) { var request = new GetTokenByPinIdRequest() { PinID = pinID, - ClientID = clientID, }; - request.ClientID ??= SDKConfiguration.ClientID; - string baseUrl = Utilities.TemplateUrl(GetTokenByPinIdServerList[0], new Dictionary(){ }); if (serverUrl != null) @@ -874,10 +821,8 @@ namespace LukeHagar.PlexAPI.SDK response.AuthPinContainer = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -887,10 +832,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 404) { @@ -900,19 +843,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/PlexAPI.cs b/LukeHagar/PlexAPI/SDK/PlexAPI.cs index e1eed47..831fd2a 100644 --- a/LukeHagar/PlexAPI/SDK/PlexAPI.cs +++ b/LukeHagar/PlexAPI/SDK/PlexAPI.cs @@ -275,10 +275,10 @@ namespace LukeHagar.PlexAPI.SDK public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private int _serverIndex = 0; private ISpeakeasyHttpClient _client; diff --git a/LukeHagar/PlexAPI/SDK/Search.cs b/LukeHagar/PlexAPI/SDK/Search.cs index b4cd3a5..6218fb1 100644 --- a/LukeHagar/PlexAPI/SDK/Search.cs +++ b/LukeHagar/PlexAPI/SDK/Search.cs @@ -87,10 +87,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -175,10 +175,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -188,19 +186,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task PerformVoiceSearchAsync(string query, double? sectionId = null, double? limit = null) @@ -275,10 +269,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -288,19 +280,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetSearchResultsAsync(string query) @@ -370,10 +358,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -383,10 +369,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -396,19 +380,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Server.cs b/LukeHagar/PlexAPI/SDK/Server.cs index b906a84..4645fed 100644 --- a/LukeHagar/PlexAPI/SDK/Server.cs +++ b/LukeHagar/PlexAPI/SDK/Server.cs @@ -126,10 +126,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -206,10 +206,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -219,10 +217,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -232,19 +228,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetServerPreferencesAsync() @@ -311,10 +303,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -324,10 +314,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -337,19 +325,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetAvailableClientsAsync() @@ -416,10 +400,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -429,10 +411,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -442,19 +422,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetDevicesAsync() @@ -521,10 +497,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -534,10 +508,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -547,19 +519,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetServerIdentityAsync() @@ -621,10 +589,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 408) { @@ -634,19 +600,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetMyPlexAccountAsync() @@ -713,10 +675,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -726,10 +686,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -739,19 +697,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetResizedPhotoAsync(GetResizedPhotoRequest request) @@ -820,10 +774,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -833,19 +785,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetMediaProvidersAsync(string xPlexToken) @@ -915,10 +863,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -928,10 +874,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -941,19 +885,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetServerListAsync() @@ -1020,10 +960,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -1033,10 +971,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -1046,19 +982,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Sessions.cs b/LukeHagar/PlexAPI/SDK/Sessions.cs index 42281ae..d7ed0c1 100644 --- a/LukeHagar/PlexAPI/SDK/Sessions.cs +++ b/LukeHagar/PlexAPI/SDK/Sessions.cs @@ -80,10 +80,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -160,10 +160,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -173,10 +171,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -186,19 +182,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetSessionHistoryAsync(string? sort = null, long? accountId = null, QueryParamFilter? filter = null, long? librarySectionID = null) @@ -271,10 +263,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -284,10 +274,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -297,19 +285,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetTranscodeSessionsAsync() @@ -376,10 +360,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -389,10 +371,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -402,19 +382,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task StopTranscodeSessionAsync(string sessionKey) @@ -487,10 +463,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -500,19 +474,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Statistics.cs b/LukeHagar/PlexAPI/SDK/Statistics.cs index a0d8717..dde5b1b 100644 --- a/LukeHagar/PlexAPI/SDK/Statistics.cs +++ b/LukeHagar/PlexAPI/SDK/Statistics.cs @@ -71,10 +71,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -154,10 +154,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -167,10 +165,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -180,19 +176,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetResourcesStatisticsAsync(long? timespan = null) @@ -262,10 +254,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -275,10 +265,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -288,19 +276,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task GetBandwidthStatisticsAsync(long? timespan = null) @@ -370,10 +354,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -383,10 +365,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -396,19 +376,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Updater.cs b/LukeHagar/PlexAPI/SDK/Updater.cs index 1882445..b63ec40 100644 --- a/LukeHagar/PlexAPI/SDK/Updater.cs +++ b/LukeHagar/PlexAPI/SDK/Updater.cs @@ -74,10 +74,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -154,10 +154,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -167,10 +165,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -180,19 +176,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task CheckForUpdatesAsync(Download? download = null) @@ -265,10 +257,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -278,19 +268,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task ApplyUpdatesAsync(Tonight? tonight = null, Skip? skip = null) @@ -364,10 +350,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -377,19 +361,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode == 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Video.cs b/LukeHagar/PlexAPI/SDK/Video.cs index 772e964..4ffdc5f 100644 --- a/LukeHagar/PlexAPI/SDK/Video.cs +++ b/LukeHagar/PlexAPI/SDK/Video.cs @@ -62,10 +62,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -144,10 +144,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -157,19 +155,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } public async Task StartUniversalTranscodeAsync(StartUniversalTranscodeRequest request) @@ -238,10 +232,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -251,19 +243,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Watchlist.cs b/LukeHagar/PlexAPI/SDK/Watchlist.cs index 6aaca0a..830ac2c 100644 --- a/LukeHagar/PlexAPI/SDK/Watchlist.cs +++ b/LukeHagar/PlexAPI/SDK/Watchlist.cs @@ -59,10 +59,10 @@ namespace LukeHagar.PlexAPI.SDK }; public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.6.11"; - private const string _sdkGenVersion = "2.416.6"; + private const string _sdkVersion = "0.7.0"; + private const string _sdkGenVersion = "2.421.3"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.6.11 2.416.6 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -143,10 +143,8 @@ namespace LukeHagar.PlexAPI.SDK response.Object = obj; return response; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 400) { @@ -156,10 +154,8 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode == 401) { @@ -169,19 +165,15 @@ namespace LukeHagar.PlexAPI.SDK obj!.RawResponse = httpResponse; throw obj!; } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } } \ No newline at end of file diff --git a/NUGET.md b/NUGET.md index 18e1a6a..58385ca 100644 --- a/NUGET.md +++ b/NUGET.md @@ -32,7 +32,7 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); 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. +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 `GetPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration. ### Available Globals @@ -59,7 +59,6 @@ using LukeHagar.PlexAPI.SDK.Models.Requests; using LukeHagar.PlexAPI.SDK.Models.Components; var sdk = new PlexAPI( - accessToken: "", clientID: "gcgzw5rz2xovp84b4vha3a40", clientName: "Plex Web", clientVersion: "4.133.0", @@ -67,12 +66,9 @@ var sdk = new PlexAPI( deviceName: "Linux" ); -var res = await sdk.Plex.GetServerResourcesAsync( - clientID: "gcgzw5rz2xovp84b4vha3a40", - includeHttps: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeHttps.One, - includeRelay: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeRelay.One, - includeIPv6: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeIPv6.One -); +GetPinRequest req = new GetPinRequest() {}; + +var res = await sdk.Plex.GetPinAsync(req); // handle response ``` @@ -116,15 +112,18 @@ catch (Exception ex) { if (ex is GetServerCapabilitiesBadRequest) { - // handle exception + // Handle exception data + throw; } else if (ex is GetServerCapabilitiesUnauthorized) { - // handle exception + // Handle exception data + throw; } - else if (ex is LukeHagar.PlexAPI.SDK.Models.Errors.SDKException) + else if (ex is Models.Errors.SDKException) { - // handle exception + // Handle default exception + throw; } } ``` diff --git a/README.md b/README.md index 2c80953..e77ac62 100644 --- a/README.md +++ b/README.md @@ -266,7 +266,7 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); 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. +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 `GetPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration. ### Available Globals @@ -293,7 +293,6 @@ using LukeHagar.PlexAPI.SDK.Models.Requests; using LukeHagar.PlexAPI.SDK.Models.Components; var sdk = new PlexAPI( - accessToken: "", clientID: "gcgzw5rz2xovp84b4vha3a40", clientName: "Plex Web", clientVersion: "4.133.0", @@ -301,12 +300,9 @@ var sdk = new PlexAPI( deviceName: "Linux" ); -var res = await sdk.Plex.GetServerResourcesAsync( - clientID: "gcgzw5rz2xovp84b4vha3a40", - includeHttps: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeHttps.One, - includeRelay: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeRelay.One, - includeIPv6: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeIPv6.One -); +GetPinRequest req = new GetPinRequest() {}; + +var res = await sdk.Plex.GetPinAsync(req); // handle response ``` @@ -350,15 +346,18 @@ catch (Exception ex) { if (ex is GetServerCapabilitiesBadRequest) { - // handle exception + // Handle exception data + throw; } else if (ex is GetServerCapabilitiesUnauthorized) { - // handle exception + // Handle exception data + throw; } - else if (ex is LukeHagar.PlexAPI.SDK.Models.Errors.SDKException) + else if (ex is Models.Errors.SDKException) { - // handle exception + // Handle default exception + throw; } } ``` diff --git a/RELEASES.md b/RELEASES.md index da3e9b7..725a811 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -234,4 +234,14 @@ Based on: ### Generated - [csharp v0.6.11] . ### Releases -- [NuGet v0.6.11] https://www.nuget.org/packages/LukeHagar.PlexAPI.SDK/0.6.11 - . \ No newline at end of file +- [NuGet v0.6.11] https://www.nuget.org/packages/LukeHagar.PlexAPI.SDK/0.6.11 - . + +## 2024-09-21 00:19:36 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.401.2 (2.421.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v0.7.0] . +### Releases +- [NuGet v0.7.0] https://www.nuget.org/packages/LukeHagar.PlexAPI.SDK/0.7.0 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index b94dc76..5a63465 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -470,8 +470,8 @@ actions: ); var res = await sdk.Search.PerformSearchAsync( - query: "arnold", - sectionId: 9372.7D, + query: "dylan", + sectionId: 5838.67D, limit: 5D ); @@ -497,7 +497,7 @@ actions: var res = await sdk.Search.PerformVoiceSearchAsync( query: "dead+poop", - sectionId: 4094.8D, + sectionId: 4094.80D, limit: 5D ); @@ -523,8 +523,8 @@ actions: var res = await sdk.Hubs.GetLibraryHubsAsync( sectionId: 6728.76D, - count: 9010.22D, - onlyTransient: LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamOnlyTransient.Zero + count: 639.24D, + onlyTransient: LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamOnlyTransient.One ); // handle response @@ -568,7 +568,7 @@ actions: ); var res = await sdk.Library.GetTopWatchedContentAsync( - type: LukeHagar.PlexAPI.SDK.Models.Requests.GetTopWatchedContentQueryParamType.Two, + type: LukeHagar.PlexAPI.SDK.Models.Requests.GetTopWatchedContentQueryParamType.Show, includeGuids: 1 ); @@ -671,7 +671,7 @@ actions: ); var res = await sdk.Library.GetMetadataChildrenAsync( - ratingKey: 1539.14D, + ratingKey: 1539.15D, includeElements: "" ); @@ -896,7 +896,7 @@ actions: var res = await sdk.Library.GetSearchLibraryAsync( sectionKey: 9518, - type: LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamType.Two + type: LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamType.Show ); // handle response @@ -922,9 +922,9 @@ actions: GetLibraryItemsRequest req = new GetLibraryItemsRequest() { SectionKey = 9518, Tag = LukeHagar.PlexAPI.SDK.Models.Requests.Tag.Edition, - IncludeGuids = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeGuids.One, - IncludeMeta = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeMeta.One, - Type = LukeHagar.PlexAPI.SDK.Models.Requests.Type.Two, + IncludeGuids = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeGuids.Enable, + IncludeMeta = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeMeta.Enable, + Type = LukeHagar.PlexAPI.SDK.Models.Requests.Type.Show, XPlexContainerStart = 0, XPlexContainerSize = 50, }; @@ -1070,9 +1070,9 @@ actions: Width = 110D, Height = 165D, Opacity = 100, - Blur = 4000D, - MinSize = LukeHagar.PlexAPI.SDK.Models.Requests.MinSize.Zero, - Upscale = LukeHagar.PlexAPI.SDK.Models.Requests.Upscale.Zero, + Blur = 0D, + MinSize = LukeHagar.PlexAPI.SDK.Models.Requests.MinSize.One, + Upscale = LukeHagar.PlexAPI.SDK.Models.Requests.Upscale.One, Url = "/library/metadata/49564/thumb/1654258204", }; @@ -1120,10 +1120,7 @@ actions: deviceName: "Linux" ); - var res = await sdk.Plex.GetTokenByPinIdAsync( - pinID: 408895, - clientID: "gcgzw5rz2xovp84b4vha3a40" - ); + var res = await sdk.Plex.GetTokenByPinIdAsync(pinID: 408895); // handle response - target: $["paths"]["/playlists"]["get"] @@ -1174,7 +1171,7 @@ actions: Title = "", Type = LukeHagar.PlexAPI.SDK.Models.Requests.CreatePlaylistQueryParamType.Photo, Smart = LukeHagar.PlexAPI.SDK.Models.Requests.Smart.One, - Uri = "https://inborn-brochure.biz", + Uri = "https://hoarse-testing.info/", }; var res = await sdk.Playlists.CreatePlaylistAsync(req); @@ -1201,7 +1198,8 @@ actions: var res = await sdk.Playlists.UploadPlaylistAsync( path: "/home/barkley/playlist.m3u", - force: LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamForce.Zero + force: LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamForce.Zero, + sectionID: 1 ); // handle response @@ -1269,7 +1267,7 @@ actions: ); var res = await sdk.Playlists.UpdatePlaylistAsync( - playlistID: 3915D, + playlistID: 3915.00D, title: "", summary: "" ); @@ -1318,7 +1316,7 @@ actions: var res = await sdk.Playlists.GetPlaylistContentsAsync( playlistID: 5004.46D, - type: LukeHagar.PlexAPI.SDK.Models.Requests.GetPlaylistContentsQueryParamType.Two + type: LukeHagar.PlexAPI.SDK.Models.Requests.GetPlaylistContentsQueryParamType.Show ); // handle response @@ -1342,7 +1340,7 @@ actions: ); var res = await sdk.Playlists.AddPlaylistContentsAsync( - playlistID: 8502.01D, + playlistID: 8502.00D, uri: "server://12345/com.plexapp.plugins.library/library/metadata/1", playQueueID: 123D ); @@ -1368,10 +1366,9 @@ actions: ); var res = await sdk.Plex.GetServerResourcesAsync( - clientID: "gcgzw5rz2xovp84b4vha3a40", - includeHttps: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeHttps.One, - includeRelay: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeRelay.One, - includeIPv6: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeIPv6.One + includeHttps: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeHttps.Enable, + includeRelay: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeRelay.Enable, + includeIPv6: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeIPv6.Enable ); // handle response @@ -1416,7 +1413,7 @@ actions: deviceName: "Linux" ); - var res = await sdk.Authentication.GetSourceConnectionInformationAsync(source: "server://client-identifier"); + var res = await sdk.Authentication.GetSourceConnectionInformationAsync(source: "provider://provider-identifier"); // handle response - target: $["paths"]["/security/token"]["get"] @@ -1729,14 +1726,13 @@ actions: deviceName: "Linux" ); - var res = await sdk.Authentication.PostUsersSignInDataAsync( - clientID: "gcgzw5rz2xovp84b4vha3a40", - requestBody: new PostUsersSignInDataRequestBody() { - Login = "username@email.com", - Password = "password123", - VerificationCode = "123456", - } - ); + PostUsersSignInDataRequestBody req = new PostUsersSignInDataRequestBody() { + Login = "username@email.com", + Password = "password123", + VerificationCode = "123456", + }; + + var res = await sdk.Authentication.PostUsersSignInDataAsync(req); // handle response - target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"] diff --git a/docs/Models/Requests/AutoSelectSubtitle.md b/docs/Models/Requests/AutoSelectSubtitle.md index d72ead1..2104db2 100644 --- a/docs/Models/Requests/AutoSelectSubtitle.md +++ b/docs/Models/Requests/AutoSelectSubtitle.md @@ -5,7 +5,7 @@ The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign aud ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/Connections.md b/docs/Models/Requests/Connections.md index 09f2e52..43c71ac 100644 --- a/docs/Models/Requests/Connections.md +++ b/docs/Models/Requests/Connections.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `Protocol` | *string* | :heavy_check_mark: | N/A | -| `Address` | *string* | :heavy_check_mark: | N/A | -| `Port` | *double* | :heavy_check_mark: | N/A | -| `Uri` | *string* | :heavy_check_mark: | N/A | -| `Local` | *bool* | :heavy_check_mark: | N/A | -| `Relay` | *bool* | :heavy_check_mark: | N/A | -| `IPv6` | *bool* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `Protocol` | [Protocol](../../Models/Requests/Protocol.md) | :heavy_check_mark: | The protocol used for the connection (http, https, etc) | +| `Address` | *string* | :heavy_check_mark: | The (ip) address or domain name used for the connection | +| `Port` | *int* | :heavy_check_mark: | The port used for the connection | +| `Uri` | *string* | :heavy_check_mark: | The full URI of the connection | +| `Local` | *bool* | :heavy_check_mark: | If the connection is local address | +| `Relay` | *bool* | :heavy_check_mark: | If the connection is relayed through plex.direct | +| `IPv6` | *bool* | :heavy_check_mark: | If the connection is using IPv6 | \ No newline at end of file diff --git a/docs/Models/Requests/DefaultSubtitleAccessibility.md b/docs/Models/Requests/DefaultSubtitleAccessibility.md index 07a0180..592d982 100644 --- a/docs/Models/Requests/DefaultSubtitleAccessibility.md +++ b/docs/Models/Requests/DefaultSubtitleAccessibility.md @@ -1,11 +1,11 @@ # DefaultSubtitleAccessibility -The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) +The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles) ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/DefaultSubtitleForced.md b/docs/Models/Requests/DefaultSubtitleForced.md index 99dbddb..6270cf9 100644 --- a/docs/Models/Requests/DefaultSubtitleForced.md +++ b/docs/Models/Requests/DefaultSubtitleForced.md @@ -5,7 +5,7 @@ The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/GetAllLibrariesDirectory.md b/docs/Models/Requests/GetAllLibrariesDirectory.md index f02234a..777af90 100644 --- a/docs/Models/Requests/GetAllLibrariesDirectory.md +++ b/docs/Models/Requests/GetAllLibrariesDirectory.md @@ -5,24 +5,24 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | true | -| `Art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | -| `Composite` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 | -| `Filters` | *bool* | :heavy_minus_sign: | N/A | true | -| `Refreshing` | *bool* | :heavy_minus_sign: | N/A | false | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | -| `Key` | *string* | :heavy_minus_sign: | N/A | 1 | -| `Type` | *string* | :heavy_minus_sign: | N/A | movie | -| `Title` | *string* | :heavy_minus_sign: | N/A | Movies | -| `Agent` | *string* | :heavy_minus_sign: | N/A | tv.plex.agents.movie | -| `Scanner` | *string* | :heavy_minus_sign: | N/A | Plex Movie | -| `Language` | *string* | :heavy_minus_sign: | N/A | en-US | -| `Uuid` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `UpdatedAt` | *long* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 | -| `CreatedAt` | *long* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 | -| `ScannedAt` | *long* | :heavy_minus_sign: | Unix epoch datetime | 1556281940 | -| `Content` | *bool* | :heavy_minus_sign: | N/A | true | -| `Directory` | *bool* | :heavy_minus_sign: | N/A | true | -| `ContentChangedAt` | *int* | :heavy_minus_sign: | N/A | 3192854 | -| `Hidden` | *int* | :heavy_minus_sign: | N/A | 0 | -| `Location` | List<[Location](../../Models/Requests/Location.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `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` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | +| `CreatedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | +| `ScannedAt` | *long* | :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` | *int* | :heavy_check_mark: | N/A | 3192854 | +| `Hidden` | *int* | :heavy_check_mark: | N/A | 0 | +| `Location` | List<[Location](../../Models/Requests/Location.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetAllLibrariesMediaContainer.md b/docs/Models/Requests/GetAllLibrariesMediaContainer.md index d353447..823dceb 100644 --- a/docs/Models/Requests/GetAllLibrariesMediaContainer.md +++ b/docs/Models/Requests/GetAllLibrariesMediaContainer.md @@ -8,4 +8,4 @@ | `Size` | *int* | :heavy_check_mark: | N/A | 5 | | `AllowSync` | *bool* | :heavy_check_mark: | N/A | false | | `Title1` | *string* | :heavy_check_mark: | N/A | Plex Library | -| `Directory` | List<[GetAllLibrariesDirectory](../../Models/Requests/GetAllLibrariesDirectory.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `Directory` | List<[GetAllLibrariesDirectory](../../Models/Requests/GetAllLibrariesDirectory.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetAllLibrariesResponseBody.md b/docs/Models/Requests/GetAllLibrariesResponseBody.md index 8066514..b492321 100644 --- a/docs/Models/Requests/GetAllLibrariesResponseBody.md +++ b/docs/Models/Requests/GetAllLibrariesResponseBody.md @@ -7,4 +7,4 @@ The libraries available on the Server | Field | Type | Required | Description | | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `MediaContainer` | [GetAllLibrariesMediaContainer](../../Models/Requests/GetAllLibrariesMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `MediaContainer` | [GetAllLibrariesMediaContainer](../../Models/Requests/GetAllLibrariesMediaContainer.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsField.md b/docs/Models/Requests/GetLibraryItemsField.md new file mode 100644 index 0000000..d102ed3 --- /dev/null +++ b/docs/Models/Requests/GetLibraryItemsField.md @@ -0,0 +1,11 @@ +# GetLibraryItemsField + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Key` | *string* | :heavy_check_mark: | N/A | show.title | +| `Title` | *string* | :heavy_check_mark: | N/A | Show Title | +| `Type` | *string* | :heavy_check_mark: | N/A | string | +| `SubType` | *string* | :heavy_minus_sign: | N/A | rating | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsFieldType.md b/docs/Models/Requests/GetLibraryItemsFieldType.md new file mode 100644 index 0000000..de402f0 --- /dev/null +++ b/docs/Models/Requests/GetLibraryItemsFieldType.md @@ -0,0 +1,9 @@ +# GetLibraryItemsFieldType + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `Type` | *string* | :heavy_check_mark: | N/A | tag | +| `Operator` | List<[GetLibraryItemsOperator](../../Models/Requests/GetLibraryItemsOperator.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsFilter.md b/docs/Models/Requests/GetLibraryItemsFilter.md new file mode 100644 index 0000000..9585aa3 --- /dev/null +++ b/docs/Models/Requests/GetLibraryItemsFilter.md @@ -0,0 +1,12 @@ +# GetLibraryItemsFilter + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `Filter` | *string* | :heavy_check_mark: | N/A | genre | +| `FilterType` | *string* | :heavy_check_mark: | N/A | string | +| `Key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/genre?type=2 | +| `Title` | *string* | :heavy_check_mark: | N/A | Genre | +| `Type` | *string* | :heavy_check_mark: | N/A | filter | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsMediaContainer.md b/docs/Models/Requests/GetLibraryItemsMediaContainer.md index 03e2549..b6ecf0c 100644 --- a/docs/Models/Requests/GetLibraryItemsMediaContainer.md +++ b/docs/Models/Requests/GetLibraryItemsMediaContainer.md @@ -3,21 +3,22 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 70 | -| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | true | -| `Art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | -| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `LibrarySectionID` | [LibrarySectionID](../../Models/Requests/LibrarySectionID.md) | :heavy_minus_sign: | N/A | | -| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `LibrarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1701731894 | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | -| `Title1` | *string* | :heavy_minus_sign: | N/A | Movies | -| `Title2` | *string* | :heavy_minus_sign: | N/A | Recently Released | -| `ViewGroup` | *string* | :heavy_minus_sign: | N/A | movie | -| `ViewMode` | *int* | :heavy_minus_sign: | N/A | 65592 | -| `MixedParents` | *bool* | :heavy_minus_sign: | N/A | true | -| `Metadata` | List<[GetLibraryItemsMetadata](../../Models/Requests/GetLibraryItemsMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_check_mark: | N/A | 70 | +| `AllowSync` | *bool* | :heavy_check_mark: | N/A | true | +| `Art` | *string* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg | +| `Identifier` | *string* | :heavy_check_mark: | N/A | com.plexapp.plugins.library | +| `LibrarySectionID` | [LibrarySectionID](../../Models/Requests/LibrarySectionID.md) | :heavy_check_mark: | N/A | | +| `LibrarySectionTitle` | *string* | :heavy_check_mark: | N/A | Movies | +| `LibrarySectionUUID` | *string* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `MediaTagPrefix` | *string* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ | +| `MediaTagVersion` | *int* | :heavy_check_mark: | N/A | 1701731894 | +| `Thumb` | *string* | :heavy_check_mark: | N/A | /:/resources/movie.png | +| `Title1` | *string* | :heavy_check_mark: | N/A | Movies | +| `Title2` | *string* | :heavy_check_mark: | N/A | Recently Released | +| `ViewGroup` | *string* | :heavy_check_mark: | N/A | movie | +| `ViewMode` | *int* | :heavy_minus_sign: | N/A | 65592 | +| `MixedParents` | *bool* | :heavy_minus_sign: | N/A | true | +| `Metadata` | List<[GetLibraryItemsMetadata](../../Models/Requests/GetLibraryItemsMetadata.md)> | :heavy_minus_sign: | N/A | | +| `Meta` | [Meta](../../Models/Requests/Meta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
| | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsMetadata.md b/docs/Models/Requests/GetLibraryItemsMetadata.md index 145fc4b..25da448 100644 --- a/docs/Models/Requests/GetLibraryItemsMetadata.md +++ b/docs/Models/Requests/GetLibraryItemsMetadata.md @@ -5,21 +5,21 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 58683 | -| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683 | -| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d7768ba96b655001fdc0408 | +| `RatingKey` | *string* | :heavy_check_mark: | N/A | 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 | -| `Type` | *string* | :heavy_minus_sign: | N/A | movie | -| `Title` | *string* | :heavy_minus_sign: | N/A | Avatar: The Way of Water | +| `Type` | *string* | :heavy_check_mark: | N/A | movie | +| `Title` | *string* | :heavy_check_mark: | N/A | Avatar: The Way of Water | | `ContentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | | `Summary` | *string* | :heavy_minus_sign: | 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` | *double* | :heavy_minus_sign: | N/A | 7.6 | | `AudienceRating` | *double* | :heavy_minus_sign: | N/A | 9.2 | -| `Year` | *int* | :heavy_minus_sign: | N/A | 2022 | +| `Year` | *int* | :heavy_check_mark: | N/A | 2022 | | `Tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. | | `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 | | `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 11558112 | +| `Duration` | *int* | :heavy_check_mark: | N/A | 11558112 | | `OriginallyAvailableAt` | [LocalDate](https://nodatime.org/3.1.x/api/NodaTime.LocalDate.html) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC | | `AddedAt` | *int* | :heavy_minus_sign: | N/A | 1680457607 | | `UpdatedAt` | *int* | :heavy_minus_sign: | N/A | 1703239236 | @@ -34,12 +34,13 @@ | `GrandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | | `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` | List<[GetLibraryItemsMedia](../../Models/Requests/GetLibraryItemsMedia.md)> | :heavy_minus_sign: | N/A | | +| `Media` | List<[GetLibraryItemsMedia](../../Models/Requests/GetLibraryItemsMedia.md)> | :heavy_check_mark: | N/A | | | `Genre` | List<[GetLibraryItemsGenre](../../Models/Requests/GetLibraryItemsGenre.md)> | :heavy_minus_sign: | N/A | | | `Country` | List<[GetLibraryItemsCountry](../../Models/Requests/GetLibraryItemsCountry.md)> | :heavy_minus_sign: | N/A | | | `Director` | List<[GetLibraryItemsDirector](../../Models/Requests/GetLibraryItemsDirector.md)> | :heavy_minus_sign: | N/A | | | `Writer` | List<[GetLibraryItemsWriter](../../Models/Requests/GetLibraryItemsWriter.md)> | :heavy_minus_sign: | N/A | | | `Role` | List<[GetLibraryItemsRole](../../Models/Requests/GetLibraryItemsRole.md)> | :heavy_minus_sign: | N/A | | +| `MediaGuid` | List<[MediaGuid](../../Models/Requests/MediaGuid.md)> | :heavy_minus_sign: | The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
| | | `TitleSort` | *string* | :heavy_minus_sign: | N/A | Whale | | `ViewCount` | *int* | :heavy_minus_sign: | N/A | 1 | | `LastViewedAt` | *int* | :heavy_minus_sign: | N/A | 1682752242 | diff --git a/docs/Models/Requests/GetLibraryItemsOperator.md b/docs/Models/Requests/GetLibraryItemsOperator.md new file mode 100644 index 0000000..58c7b30 --- /dev/null +++ b/docs/Models/Requests/GetLibraryItemsOperator.md @@ -0,0 +1,9 @@ +# GetLibraryItemsOperator + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Key` | *string* | :heavy_check_mark: | N/A | = | +| `Title` | *string* | :heavy_check_mark: | N/A | is | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsSort.md b/docs/Models/Requests/GetLibraryItemsSort.md new file mode 100644 index 0000000..2dc0d77 --- /dev/null +++ b/docs/Models/Requests/GetLibraryItemsSort.md @@ -0,0 +1,13 @@ +# GetLibraryItemsSort + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `Default` | *string* | :heavy_minus_sign: | N/A | asc | +| `DefaultDirection` | *string* | :heavy_check_mark: | N/A | asc | +| `DescKey` | *string* | :heavy_minus_sign: | N/A | titleSort:desc | +| `FirstCharacterKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/2/firstCharacter | +| `Key` | *string* | :heavy_check_mark: | N/A | titleSort | +| `Title` | *string* | :heavy_check_mark: | N/A | Title | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsType.md b/docs/Models/Requests/GetLibraryItemsType.md new file mode 100644 index 0000000..82e4368 --- /dev/null +++ b/docs/Models/Requests/GetLibraryItemsType.md @@ -0,0 +1,14 @@ +# GetLibraryItemsType + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `Key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/all?type=2 | +| `Type` | *string* | :heavy_check_mark: | N/A | show | +| `Title` | *string* | :heavy_check_mark: | N/A | TV Shows | +| `Active` | *bool* | :heavy_check_mark: | N/A | false | +| `Filter` | List<[GetLibraryItemsFilter](../../Models/Requests/GetLibraryItemsFilter.md)> | :heavy_minus_sign: | N/A | | +| `Sort` | List<[GetLibraryItemsSort](../../Models/Requests/GetLibraryItemsSort.md)> | :heavy_minus_sign: | N/A | | +| `Field` | List<[GetLibraryItemsField](../../Models/Requests/GetLibraryItemsField.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetPinRequest.md b/docs/Models/Requests/GetPinRequest.md index 140b423..96cb4b8 100644 --- a/docs/Models/Requests/GetPinRequest.md +++ b/docs/Models/Requests/GetPinRequest.md @@ -3,11 +3,10 @@ ## 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`
| | +| `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 diff --git a/docs/Models/Requests/GetPlaylistContentsQueryParamType.md b/docs/Models/Requests/GetPlaylistContentsQueryParamType.md index 695573b..6aa241f 100644 --- a/docs/Models/Requests/GetPlaylistContentsQueryParamType.md +++ b/docs/Models/Requests/GetPlaylistContentsQueryParamType.md @@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season ## Values -| Name | Value | -| ------- | ------- | -| `One` | 1 | -| `Two` | 2 | -| `Three` | 3 | -| `Four` | 4 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Movie` | 1 | +| `Show` | 2 | +| `Season` | 3 | +| `Episode` | 4 | \ No newline at end of file diff --git a/docs/Models/Requests/GetServerResourcesRequest.md b/docs/Models/Requests/GetServerResourcesRequest.md index a0b24c4..f622f40 100644 --- a/docs/Models/Requests/GetServerResourcesRequest.md +++ b/docs/Models/Requests/GetServerResourcesRequest.md @@ -3,9 +3,8 @@ ## 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 | -| `IncludeHttps` | [IncludeHttps](../../Models/Requests/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | -| `IncludeRelay` | [IncludeRelay](../../Models/Requests/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | -| `IncludeIPv6` | [IncludeIPv6](../../Models/Requests/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `IncludeHttps` | [IncludeHttps](../../Models/Requests/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | +| `IncludeRelay` | [IncludeRelay](../../Models/Requests/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | +| `IncludeIPv6` | [IncludeIPv6](../../Models/Requests/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/GetTokenByPinIdRequest.md b/docs/Models/Requests/GetTokenByPinIdRequest.md index 841e4c5..d2d03e9 100644 --- a/docs/Models/Requests/GetTokenByPinIdRequest.md +++ b/docs/Models/Requests/GetTokenByPinIdRequest.md @@ -3,7 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `PinID` | *long* | :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 | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `PinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | \ No newline at end of file diff --git a/docs/Models/Requests/GetTokenDetailsUserPlexAccount.md b/docs/Models/Requests/GetTokenDetailsUserPlexAccount.md index 820b3c1..f74339d 100644 --- a/docs/Models/Requests/GetTokenDetailsUserPlexAccount.md +++ b/docs/Models/Requests/GetTokenDetailsUserPlexAccount.md @@ -26,7 +26,7 @@ Logged in user details | `HomeAdmin` | *bool* | :heavy_minus_sign: | If the account is the Plex Home admin | | | `HomeSize` | *int* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 | | `Id` | *int* | :heavy_check_mark: | The Plex account ID | 13692262 | -| `JoinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 1556281940 | +| `JoinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | | `Locale` | *string* | :heavy_check_mark: | The account locale | | | `MailingListActive` | *bool* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | | | `MailingListStatus` | [MailingListStatus](../../Models/Requests/MailingListStatus.md) | :heavy_check_mark: | Your current mailing list status | | @@ -34,7 +34,7 @@ Logged in user details | ~~`Pin`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

[Might be removed] The hashed Plex Home PIN | | | `Profile` | [UserProfile](../../Models/Requests/UserProfile.md) | :heavy_check_mark: | N/A | | | `Protected` | *bool* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | | -| `RememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 1556281940 | +| `RememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | | `Restricted` | *bool* | :heavy_minus_sign: | If the account is a Plex Home managed user | | | `Roles` | List<*string*> | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | | | `ScrobbleTypes` | *string* | :heavy_check_mark: | Unknown | | diff --git a/docs/Models/Requests/GetTopWatchedContentQueryParamType.md b/docs/Models/Requests/GetTopWatchedContentQueryParamType.md index af56352..e61f114 100644 --- a/docs/Models/Requests/GetTopWatchedContentQueryParamType.md +++ b/docs/Models/Requests/GetTopWatchedContentQueryParamType.md @@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season ## Values -| Name | Value | -| ------- | ------- | -| `One` | 1 | -| `Two` | 2 | -| `Three` | 3 | -| `Four` | 4 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Movie` | 1 | +| `Show` | 2 | +| `Season` | 3 | +| `Episode` | 4 | \ No newline at end of file diff --git a/docs/Models/Requests/IncludeGuids.md b/docs/Models/Requests/IncludeGuids.md index 1c116a3..eaba0b9 100644 --- a/docs/Models/Requests/IncludeGuids.md +++ b/docs/Models/Requests/IncludeGuids.md @@ -6,7 +6,7 @@ Adds the Guids object to the response ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/IncludeHttps.md b/docs/Models/Requests/IncludeHttps.md index 8f1d81a..94382d4 100644 --- a/docs/Models/Requests/IncludeHttps.md +++ b/docs/Models/Requests/IncludeHttps.md @@ -5,7 +5,7 @@ Include Https entries in the results ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/IncludeIPv6.md b/docs/Models/Requests/IncludeIPv6.md index 96e4493..0b70e65 100644 --- a/docs/Models/Requests/IncludeIPv6.md +++ b/docs/Models/Requests/IncludeIPv6.md @@ -5,7 +5,7 @@ Include IPv6 entries in the results ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/IncludeMeta.md b/docs/Models/Requests/IncludeMeta.md index 4ea608c..0f180eb 100644 --- a/docs/Models/Requests/IncludeMeta.md +++ b/docs/Models/Requests/IncludeMeta.md @@ -6,7 +6,7 @@ Adds the Meta object to the response ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/IncludeRelay.md b/docs/Models/Requests/IncludeRelay.md index 3fd2058..2136d5a 100644 --- a/docs/Models/Requests/IncludeRelay.md +++ b/docs/Models/Requests/IncludeRelay.md @@ -7,7 +7,7 @@ E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/Location.md b/docs/Models/Requests/Location.md index 905e369..0d167b4 100644 --- a/docs/Models/Requests/Location.md +++ b/docs/Models/Requests/Location.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `Id` | *int* | :heavy_minus_sign: | N/A | 1 | -| `Path` | *string* | :heavy_minus_sign: | N/A | /movies | \ No newline at end of file +| `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/Requests/MediaGuid.md b/docs/Models/Requests/MediaGuid.md new file mode 100644 index 0000000..f86ed3f --- /dev/null +++ b/docs/Models/Requests/MediaGuid.md @@ -0,0 +1,8 @@ +# MediaGuid + + +## 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/Requests/MediaReviewsVisibility.md b/docs/Models/Requests/MediaReviewsVisibility.md index 4d78804..b36e802 100644 --- a/docs/Models/Requests/MediaReviewsVisibility.md +++ b/docs/Models/Requests/MediaReviewsVisibility.md @@ -1,9 +1,11 @@ # MediaReviewsVisibility +Whether or not the account has media reviews visibility enabled + ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/Meta.md b/docs/Models/Requests/Meta.md new file mode 100644 index 0000000..01b66a3 --- /dev/null +++ b/docs/Models/Requests/Meta.md @@ -0,0 +1,12 @@ +# Meta + +The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. + + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `Type` | List<[GetLibraryItemsType](../../Models/Requests/GetLibraryItemsType.md)> | :heavy_minus_sign: | N/A | +| `FieldType` | List<[GetLibraryItemsFieldType](../../Models/Requests/GetLibraryItemsFieldType.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/PlexDevice.md b/docs/Models/Requests/PlexDevice.md index 4776791..ce74b53 100644 --- a/docs/Models/Requests/PlexDevice.md +++ b/docs/Models/Requests/PlexDevice.md @@ -3,29 +3,29 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `Name` | *string* | :heavy_check_mark: | N/A | -| `Product` | *string* | :heavy_check_mark: | N/A | -| `ProductVersion` | *string* | :heavy_check_mark: | N/A | -| `Platform` | *string* | :heavy_check_mark: | N/A | -| `PlatformVersion` | *string* | :heavy_check_mark: | N/A | -| `Device` | *string* | :heavy_check_mark: | N/A | -| `ClientIdentifier` | *string* | :heavy_check_mark: | N/A | -| `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | -| `LastSeenAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | -| `Provides` | *string* | :heavy_check_mark: | N/A | -| `OwnerId` | *long* | :heavy_check_mark: | ownerId is null when the device is owned by the token used to send the request | -| `SourceTitle` | *string* | :heavy_check_mark: | N/A | -| `PublicAddress` | *string* | :heavy_check_mark: | N/A | -| `AccessToken` | *string* | :heavy_check_mark: | N/A | -| `Owned` | *bool* | :heavy_check_mark: | N/A | -| `Home` | *bool* | :heavy_check_mark: | N/A | -| `Synced` | *bool* | :heavy_check_mark: | N/A | -| `Relay` | *bool* | :heavy_check_mark: | N/A | -| `Presence` | *bool* | :heavy_check_mark: | N/A | -| `HttpsRequired` | *bool* | :heavy_check_mark: | N/A | -| `PublicAddressMatches` | *bool* | :heavy_check_mark: | N/A | -| `DnsRebindingProtection` | *bool* | :heavy_check_mark: | N/A | -| `NatLoopbackSupported` | *bool* | :heavy_check_mark: | N/A | -| `Connections` | List<[Connections](../../Models/Requests/Connections.md)> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `Name` | *string* | :heavy_check_mark: | N/A | | +| `Product` | *string* | :heavy_check_mark: | N/A | | +| `ProductVersion` | *string* | :heavy_check_mark: | N/A | | +| `Platform` | *string* | :heavy_check_mark: | N/A | | +| `PlatformVersion` | *string* | :heavy_check_mark: | N/A | | +| `Device` | *string* | :heavy_check_mark: | N/A | | +| `ClientIdentifier` | *string* | :heavy_check_mark: | N/A | | +| `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | 2019-06-24T11:38:02Z | +| `LastSeenAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_check_mark: | N/A | 2019-06-24T11:38:02Z | +| `Provides` | *string* | :heavy_check_mark: | N/A | | +| `OwnerId` | *long* | :heavy_check_mark: | ownerId is null when the device is owned by the token used to send the request | | +| `SourceTitle` | *string* | :heavy_check_mark: | N/A | | +| `PublicAddress` | *string* | :heavy_check_mark: | N/A | | +| `AccessToken` | *string* | :heavy_check_mark: | N/A | | +| `Owned` | *bool* | :heavy_check_mark: | N/A | | +| `Home` | *bool* | :heavy_check_mark: | N/A | | +| `Synced` | *bool* | :heavy_check_mark: | N/A | | +| `Relay` | *bool* | :heavy_check_mark: | N/A | | +| `Presence` | *bool* | :heavy_check_mark: | N/A | | +| `HttpsRequired` | *bool* | :heavy_check_mark: | N/A | | +| `PublicAddressMatches` | *bool* | :heavy_check_mark: | N/A | | +| `DnsRebindingProtection` | *bool* | :heavy_check_mark: | N/A | | +| `NatLoopbackSupported` | *bool* | :heavy_check_mark: | N/A | | +| `Connections` | List<[Connections](../../Models/Requests/Connections.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/PostUsersSignInDataAutoSelectSubtitle.md b/docs/Models/Requests/PostUsersSignInDataAutoSelectSubtitle.md index 4e22309..a1932db 100644 --- a/docs/Models/Requests/PostUsersSignInDataAutoSelectSubtitle.md +++ b/docs/Models/Requests/PostUsersSignInDataAutoSelectSubtitle.md @@ -5,7 +5,7 @@ The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign aud ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/PostUsersSignInDataDefaultSubtitleAccessibility.md b/docs/Models/Requests/PostUsersSignInDataDefaultSubtitleAccessibility.md index 3986a78..254dd69 100644 --- a/docs/Models/Requests/PostUsersSignInDataDefaultSubtitleAccessibility.md +++ b/docs/Models/Requests/PostUsersSignInDataDefaultSubtitleAccessibility.md @@ -1,11 +1,11 @@ # PostUsersSignInDataDefaultSubtitleAccessibility -The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) +The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles) ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/PostUsersSignInDataDefaultSubtitleForced.md b/docs/Models/Requests/PostUsersSignInDataDefaultSubtitleForced.md index 4106d94..df66898 100644 --- a/docs/Models/Requests/PostUsersSignInDataDefaultSubtitleForced.md +++ b/docs/Models/Requests/PostUsersSignInDataDefaultSubtitleForced.md @@ -5,7 +5,7 @@ The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/PostUsersSignInDataMediaReviewsVisibility.md b/docs/Models/Requests/PostUsersSignInDataMediaReviewsVisibility.md index 01aff0f..234a440 100644 --- a/docs/Models/Requests/PostUsersSignInDataMediaReviewsVisibility.md +++ b/docs/Models/Requests/PostUsersSignInDataMediaReviewsVisibility.md @@ -1,9 +1,11 @@ # PostUsersSignInDataMediaReviewsVisibility +Whether or not the account has media reviews visibility enabled + ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/PostUsersSignInDataRequest.md b/docs/Models/Requests/PostUsersSignInDataRequest.md deleted file mode 100644 index 5e22c5d..0000000 --- a/docs/Models/Requests/PostUsersSignInDataRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# PostUsersSignInDataRequest - - -## 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 | -| `RequestBody` | [PostUsersSignInDataRequestBody](../../Models/Requests/PostUsersSignInDataRequestBody.md) | :heavy_minus_sign: | Login credentials | | \ No newline at end of file diff --git a/docs/Models/Requests/PostUsersSignInDataUserPlexAccount.md b/docs/Models/Requests/PostUsersSignInDataUserPlexAccount.md index 8fa3f40..4dbbe30 100644 --- a/docs/Models/Requests/PostUsersSignInDataUserPlexAccount.md +++ b/docs/Models/Requests/PostUsersSignInDataUserPlexAccount.md @@ -26,7 +26,7 @@ Returns the user account data with a valid auth token | `HomeAdmin` | *bool* | :heavy_minus_sign: | If the account is the Plex Home admin | | | `HomeSize` | *int* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 | | `Id` | *int* | :heavy_check_mark: | The Plex account ID | 13692262 | -| `JoinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 1556281940 | +| `JoinedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | | `Locale` | *string* | :heavy_check_mark: | The account locale | | | `MailingListActive` | *bool* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | | | `MailingListStatus` | [PostUsersSignInDataMailingListStatus](../../Models/Requests/PostUsersSignInDataMailingListStatus.md) | :heavy_check_mark: | Your current mailing list status | | @@ -34,7 +34,7 @@ Returns the user account data with a valid auth token | ~~`Pin`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

[Might be removed] The hashed Plex Home PIN | | | `Profile` | [PostUsersSignInDataUserProfile](../../Models/Requests/PostUsersSignInDataUserProfile.md) | :heavy_check_mark: | N/A | | | `Protected` | *bool* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | | -| `RememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime | 1556281940 | +| `RememberExpiresAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | | `Restricted` | *bool* | :heavy_minus_sign: | If the account is a Plex Home managed user | | | `Roles` | List<*string*> | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | | | `ScrobbleTypes` | *string* | :heavy_check_mark: | Unknown | | diff --git a/docs/Models/Requests/PostUsersSignInDataUserProfile.md b/docs/Models/Requests/PostUsersSignInDataUserProfile.md index 720f1e3..76c761a 100644 --- a/docs/Models/Requests/PostUsersSignInDataUserProfile.md +++ b/docs/Models/Requests/PostUsersSignInDataUserProfile.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `AutoSelectAudio` | *bool* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true | -| `DefaultAudioLanguage` | *string* | :heavy_check_mark: | The preferred audio language for the account | ja | -| `DefaultSubtitleLanguage` | *string* | :heavy_check_mark: | The preferred subtitle language for the account | en | -| `AutoSelectSubtitle` | [PostUsersSignInDataAutoSelectSubtitle](../../Models/Requests/PostUsersSignInDataAutoSelectSubtitle.md) | :heavy_minus_sign: | The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) | 1 | -| `DefaultSubtitleAccessibility` | [PostUsersSignInDataDefaultSubtitleAccessibility](../../Models/Requests/PostUsersSignInDataDefaultSubtitleAccessibility.md) | :heavy_minus_sign: | The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) | 1 | -| `DefaultSubtitleForced` | [PostUsersSignInDataDefaultSubtitleForced](../../Models/Requests/PostUsersSignInDataDefaultSubtitleForced.md) | :heavy_minus_sign: | The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) | 0 | -| `WatchedIndicator` | [PostUsersSignInDataWatchedIndicator](../../Models/Requests/PostUsersSignInDataWatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 | -| `MediaReviewsVisibility` | [PostUsersSignInDataMediaReviewsVisibility](../../Models/Requests/PostUsersSignInDataMediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 0 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `AutoSelectAudio` | *bool* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true | +| `DefaultAudioLanguage` | *string* | :heavy_check_mark: | The preferred audio language for the account | ja | +| `DefaultSubtitleLanguage` | *string* | :heavy_check_mark: | The preferred subtitle language for the account | en | +| `AutoSelectSubtitle` | [PostUsersSignInDataAutoSelectSubtitle](../../Models/Requests/PostUsersSignInDataAutoSelectSubtitle.md) | :heavy_minus_sign: | N/A | 1 | +| `DefaultSubtitleAccessibility` | [PostUsersSignInDataDefaultSubtitleAccessibility](../../Models/Requests/PostUsersSignInDataDefaultSubtitleAccessibility.md) | :heavy_minus_sign: | N/A | 1 | +| `DefaultSubtitleForced` | [PostUsersSignInDataDefaultSubtitleForced](../../Models/Requests/PostUsersSignInDataDefaultSubtitleForced.md) | :heavy_minus_sign: | N/A | 1 | +| `WatchedIndicator` | [PostUsersSignInDataWatchedIndicator](../../Models/Requests/PostUsersSignInDataWatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 | +| `MediaReviewsVisibility` | [PostUsersSignInDataMediaReviewsVisibility](../../Models/Requests/PostUsersSignInDataMediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/PostUsersSignInDataWatchedIndicator.md b/docs/Models/Requests/PostUsersSignInDataWatchedIndicator.md index 9cce93e..fa6d450 100644 --- a/docs/Models/Requests/PostUsersSignInDataWatchedIndicator.md +++ b/docs/Models/Requests/PostUsersSignInDataWatchedIndicator.md @@ -1,9 +1,11 @@ # PostUsersSignInDataWatchedIndicator +Whether or not media watched indicators are enabled (little orange dot on media) + ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/Protocol.md b/docs/Models/Requests/Protocol.md new file mode 100644 index 0000000..41a611c --- /dev/null +++ b/docs/Models/Requests/Protocol.md @@ -0,0 +1,11 @@ +# Protocol + +The protocol used for the connection (http, https, etc) + + +## Values + +| Name | Value | +| ------- | ------- | +| `Http` | http | +| `Https` | https | \ No newline at end of file diff --git a/docs/Models/Requests/QueryParamType.md b/docs/Models/Requests/QueryParamType.md index 23780bc..65dedff 100644 --- a/docs/Models/Requests/QueryParamType.md +++ b/docs/Models/Requests/QueryParamType.md @@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season ## Values -| Name | Value | -| ------- | ------- | -| `One` | 1 | -| `Two` | 2 | -| `Three` | 3 | -| `Four` | 4 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Movie` | 1 | +| `Show` | 2 | +| `Season` | 3 | +| `Episode` | 4 | \ No newline at end of file diff --git a/docs/Models/Requests/Type.md b/docs/Models/Requests/Type.md index 95a0e83..9856d9e 100644 --- a/docs/Models/Requests/Type.md +++ b/docs/Models/Requests/Type.md @@ -11,9 +11,9 @@ E.g. A movie library will not return anything with type 3 as there are no season ## Values -| Name | Value | -| ------- | ------- | -| `One` | 1 | -| `Two` | 2 | -| `Three` | 3 | -| `Four` | 4 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Movie` | 1 | +| `Show` | 2 | +| `Season` | 3 | +| `Episode` | 4 | \ No newline at end of file diff --git a/docs/Models/Requests/UploadPlaylistRequest.md b/docs/Models/Requests/UploadPlaylistRequest.md index 2d7afda..0a96e0f 100644 --- a/docs/Models/Requests/UploadPlaylistRequest.md +++ b/docs/Models/Requests/UploadPlaylistRequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
| /home/barkley/playlist.m3u | -| `Force` | [QueryParamForce](../../Models/Requests/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
| | \ No newline at end of file +| `Force` | [QueryParamForce](../../Models/Requests/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
| | +| `SectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/UserProfile.md b/docs/Models/Requests/UserProfile.md index 303b3d0..d5d4296 100644 --- a/docs/Models/Requests/UserProfile.md +++ b/docs/Models/Requests/UserProfile.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `AutoSelectAudio` | *bool* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true | -| `DefaultAudioLanguage` | *string* | :heavy_check_mark: | The preferred audio language for the account | ja | -| `DefaultSubtitleLanguage` | *string* | :heavy_check_mark: | The preferred subtitle language for the account | en | -| `AutoSelectSubtitle` | [AutoSelectSubtitle](../../Models/Requests/AutoSelectSubtitle.md) | :heavy_minus_sign: | The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) | 1 | -| `DefaultSubtitleAccessibility` | [DefaultSubtitleAccessibility](../../Models/Requests/DefaultSubtitleAccessibility.md) | :heavy_minus_sign: | The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) | 1 | -| `DefaultSubtitleForced` | [DefaultSubtitleForced](../../Models/Requests/DefaultSubtitleForced.md) | :heavy_minus_sign: | The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) | 0 | -| `WatchedIndicator` | [WatchedIndicator](../../Models/Requests/WatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 | -| `MediaReviewsVisibility` | [MediaReviewsVisibility](../../Models/Requests/MediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 0 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `AutoSelectAudio` | *bool* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true | +| `DefaultAudioLanguage` | *string* | :heavy_check_mark: | The preferred audio language for the account | ja | +| `DefaultSubtitleLanguage` | *string* | :heavy_check_mark: | The preferred subtitle language for the account | en | +| `AutoSelectSubtitle` | [AutoSelectSubtitle](../../Models/Requests/AutoSelectSubtitle.md) | :heavy_minus_sign: | N/A | 1 | +| `DefaultSubtitleAccessibility` | [DefaultSubtitleAccessibility](../../Models/Requests/DefaultSubtitleAccessibility.md) | :heavy_minus_sign: | N/A | 1 | +| `DefaultSubtitleForced` | [DefaultSubtitleForced](../../Models/Requests/DefaultSubtitleForced.md) | :heavy_minus_sign: | N/A | 1 | +| `WatchedIndicator` | [WatchedIndicator](../../Models/Requests/WatchedIndicator.md) | :heavy_minus_sign: | N/A | 1 | +| `MediaReviewsVisibility` | [MediaReviewsVisibility](../../Models/Requests/MediaReviewsVisibility.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/WatchedIndicator.md b/docs/Models/Requests/WatchedIndicator.md index 1ad0cbe..5a931a7 100644 --- a/docs/Models/Requests/WatchedIndicator.md +++ b/docs/Models/Requests/WatchedIndicator.md @@ -1,9 +1,11 @@ # WatchedIndicator +Whether or not media watched indicators are enabled (little orange dot on media) + ## Values -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index cf7990a..27ba3c6 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -84,7 +84,7 @@ var sdk = new PlexAPI( deviceName: "Linux" ); -var res = await sdk.Authentication.GetSourceConnectionInformationAsync(source: "server://client-identifier"); +var res = await sdk.Authentication.GetSourceConnectionInformationAsync(source: "provider://provider-identifier"); // handle response ``` @@ -170,25 +170,23 @@ var sdk = new PlexAPI( deviceName: "Linux" ); -var res = await sdk.Authentication.PostUsersSignInDataAsync( - clientID: "gcgzw5rz2xovp84b4vha3a40", - requestBody: new PostUsersSignInDataRequestBody() { - Login = "username@email.com", - Password = "password123", - VerificationCode = "123456", - } -); +PostUsersSignInDataRequestBody req = new PostUsersSignInDataRequestBody() { + Login = "username@email.com", + Password = "password123", + VerificationCode = "123456", +}; + +var res = await sdk.Authentication.PostUsersSignInDataAsync(req); // handle response ``` ### Parameters -| Parameter | 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 | -| `RequestBody` | [PostUsersSignInDataRequestBody](../../Models/Requests/PostUsersSignInDataRequestBody.md) | :heavy_minus_sign: | Login credentials | | -| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `request` | [PostUsersSignInDataRequestBody](../../Models/Requests/PostUsersSignInDataRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | +| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | ### Response diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index 6d9117c..e33f2a8 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -82,8 +82,8 @@ var sdk = new PlexAPI( var res = await sdk.Hubs.GetLibraryHubsAsync( sectionId: 6728.76D, - count: 9010.22D, - onlyTransient: LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamOnlyTransient.Zero + count: 639.24D, + onlyTransient: LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamOnlyTransient.One ); // handle response diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index b1b3ca3..3e02056 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -335,9 +335,9 @@ var sdk = new PlexAPI( GetLibraryItemsRequest req = new GetLibraryItemsRequest() { SectionKey = 9518, Tag = LukeHagar.PlexAPI.SDK.Models.Requests.Tag.Edition, - Type = LukeHagar.PlexAPI.SDK.Models.Requests.Type.Two, - IncludeGuids = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeGuids.One, - IncludeMeta = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeMeta.One, + Type = LukeHagar.PlexAPI.SDK.Models.Requests.Type.Show, + IncludeGuids = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeGuids.Enable, + IncludeMeta = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeMeta.Enable, XPlexContainerStart = 0, XPlexContainerSize = 50, }; @@ -455,7 +455,7 @@ var sdk = new PlexAPI( var res = await sdk.Library.GetSearchLibraryAsync( sectionKey: 9518, - type: LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamType.Two + type: LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamType.Show ); // handle response @@ -548,7 +548,7 @@ var sdk = new PlexAPI( ); var res = await sdk.Library.GetMetadataChildrenAsync( - ratingKey: 1539.14D, + ratingKey: 1539.15D, includeElements: "" ); @@ -597,7 +597,7 @@ var sdk = new PlexAPI( ); var res = await sdk.Library.GetTopWatchedContentAsync( - type: LukeHagar.PlexAPI.SDK.Models.Requests.GetTopWatchedContentQueryParamType.Two, + type: LukeHagar.PlexAPI.SDK.Models.Requests.GetTopWatchedContentQueryParamType.Show, includeGuids: 1 ); diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index ff039d7..8800344 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -48,7 +48,7 @@ CreatePlaylistRequest req = new CreatePlaylistRequest() { Title = "", Type = LukeHagar.PlexAPI.SDK.Models.Requests.CreatePlaylistQueryParamType.Photo, Smart = LukeHagar.PlexAPI.SDK.Models.Requests.Smart.One, - Uri = "https://inborn-brochure.biz", + Uri = "https://hoarse-testing.info/", }; var res = await sdk.Playlists.CreatePlaylistAsync(req); @@ -236,7 +236,7 @@ var sdk = new PlexAPI( ); var res = await sdk.Playlists.UpdatePlaylistAsync( - playlistID: 3915D, + playlistID: 3915.00D, title: "", summary: "" ); @@ -291,7 +291,7 @@ var sdk = new PlexAPI( var res = await sdk.Playlists.GetPlaylistContentsAsync( playlistID: 5004.46D, - type: LukeHagar.PlexAPI.SDK.Models.Requests.GetPlaylistContentsQueryParamType.Two + type: LukeHagar.PlexAPI.SDK.Models.Requests.GetPlaylistContentsQueryParamType.Show ); // handle response @@ -385,7 +385,7 @@ var sdk = new PlexAPI( ); var res = await sdk.Playlists.AddPlaylistContentsAsync( - playlistID: 8502.01D, + playlistID: 8502.00D, uri: "server://12345/com.plexapp.plugins.library/library/metadata/1", playQueueID: 123D ); @@ -437,7 +437,8 @@ var sdk = new PlexAPI( var res = await sdk.Playlists.UploadPlaylistAsync( path: "/home/barkley/playlist.m3u", - force: LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamForce.Zero + force: LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamForce.Zero, + sectionID: 1 ); // handle response @@ -449,6 +450,7 @@ var res = await sdk.Playlists.UploadPlaylistAsync( | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
| /home/barkley/playlist.m3u | | `Force` | [QueryParamForce](../../Models/Requests/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
| | +| `SectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 | ### Response diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index 967e97a..53f732b 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -202,10 +202,9 @@ var sdk = new PlexAPI( ); var res = await sdk.Plex.GetServerResourcesAsync( - clientID: "gcgzw5rz2xovp84b4vha3a40", - includeHttps: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeHttps.One, - includeRelay: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeRelay.One, - includeIPv6: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeIPv6.One + includeHttps: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeHttps.Enable, + includeRelay: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeRelay.Enable, + includeIPv6: LukeHagar.PlexAPI.SDK.Models.Requests.IncludeIPv6.Enable ); // handle response @@ -213,13 +212,12 @@ var res = await sdk.Plex.GetServerResourcesAsync( ### Parameters -| Parameter | 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 | -| `IncludeHttps` | [IncludeHttps](../../Models/Requests/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | -| `IncludeRelay` | [IncludeRelay](../../Models/Requests/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | -| `IncludeIPv6` | [IncludeIPv6](../../Models/Requests/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | -| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `IncludeHttps` | [IncludeHttps](../../Models/Requests/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | +| `IncludeRelay` | [IncludeRelay](../../Models/Requests/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | +| `IncludeIPv6` | [IncludeIPv6](../../Models/Requests/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | +| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | ### Response @@ -298,21 +296,17 @@ var sdk = new PlexAPI( deviceName: "Linux" ); -var res = await sdk.Plex.GetTokenByPinIdAsync( - pinID: 408895, - clientID: "gcgzw5rz2xovp84b4vha3a40" -); +var res = await sdk.Plex.GetTokenByPinIdAsync(pinID: 408895); // handle response ``` ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `PinID` | *long* | :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 | -| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | +| Parameter | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `PinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | +| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | ### Response diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 29362cc..83a49ee 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -45,8 +45,8 @@ var sdk = new PlexAPI( ); var res = await sdk.Search.PerformSearchAsync( - query: "arnold", - sectionId: 9372.7D, + query: "dylan", + sectionId: 5838.67D, limit: 5D ); @@ -100,7 +100,7 @@ var sdk = new PlexAPI( var res = await sdk.Search.PerformVoiceSearchAsync( query: "dead+poop", - sectionId: 4094.8D, + sectionId: 4094.80D, limit: 5D ); diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index 091cfd8..ff0527b 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -263,9 +263,9 @@ GetResizedPhotoRequest req = new GetResizedPhotoRequest() { Width = 110D, Height = 165D, Opacity = 100, - Blur = 4000D, - MinSize = LukeHagar.PlexAPI.SDK.Models.Requests.MinSize.Zero, - Upscale = LukeHagar.PlexAPI.SDK.Models.Requests.Upscale.Zero, + Blur = 0D, + MinSize = LukeHagar.PlexAPI.SDK.Models.Requests.MinSize.One, + Upscale = LukeHagar.PlexAPI.SDK.Models.Requests.Upscale.One, Url = "/library/metadata/49564/thumb/1654258204", };