From 2b03eae316bac81b6e166b151eab680e099036c6 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 6 Sep 2024 00:00:16 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.390.7 --- .speakeasy/gen.lock | 307 +++++++++++------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 12 +- NUGET.md | 57 +++- PlexAPI/Activities.cs | 6 +- PlexAPI/Authentication.cs | 125 ++++++- PlexAPI/Butler.cs | 6 +- PlexAPI/Hubs.cs | 6 +- PlexAPI/Library.cs | 113 ++++--- PlexAPI/Log.cs | 6 +- PlexAPI/Media.cs | 204 +++++++++++- PlexAPI/Models/Components/Security.cs | 2 +- ...urcesErrors.cs => GetBannerImageErrors.cs} | 2 +- ...eBody.cs => GetBannerImageResponseBody.cs} | 4 +- ...tyErrors.cs => GetMediaProvidersErrors.cs} | 2 +- .../Errors/GetMediaProvidersResponseBody.cs | 34 ++ .../Errors/GetMetaDataByRatingKeyErrors.cs | 27 ++ .../GetMetaDataByRatingKeyResponseBody.cs | 34 ++ ...aryErrors.cs => GetSearchLibraryErrors.cs} | 2 +- ...ody.cs => GetSearchLibraryResponseBody.cs} | 4 +- .../Errors/GetServerIdentityResponseBody.cs | 12 +- .../Models/Errors/GetServerResourcesErrors.cs | 27 ++ .../Errors/GetServerResourcesResponseBody.cs | 34 ++ ...chlistErrors.cs => GetThumbImageErrors.cs} | 2 +- ...seBody.cs => GetThumbImageResponseBody.cs} | 4 +- .../Models/Errors/GetTokenByPinIdErrors.cs | 3 + .../Errors/GetTokenByPinIdPlexErrors.cs | 24 ++ .../Errors/GetTokenByPinIdPlexResponseBody.cs | 34 ++ .../Errors/GetTokenByPinIdResponseBody.cs | 2 +- .../Errors/GetTopWatchedContentErrors.cs | 27 ++ .../GetTopWatchedContentResponseBody.cs | 34 ++ ...etadataErrors.cs => GetWatchListErrors.cs} | 2 +- ...nseBody.cs => GetWatchListResponseBody.cs} | 4 +- .../Models/Requests/ApplyUpdatesRequest.cs | 2 +- PlexAPI/Models/Requests/Connections.cs | 14 +- ...ter.cs => CreatePlaylistQueryParamType.cs} | 30 +- .../Models/Requests/CreatePlaylistRequest.cs | 2 +- .../Models/Requests/DeleteLibraryRequest.cs | 11 +- PlexAPI/Models/Requests/Feature.cs | 29 ++ PlexAPI/Models/Requests/Filter.cs | 51 ++- .../Models/Requests/GetBannerImageRequest.cs | 41 +++ .../Models/Requests/GetBannerImageResponse.cs | 42 +++ .../Requests/GetLibraryDetailsRequest.cs | 11 +- .../Models/Requests/GetLibraryItemsRequest.cs | 62 +++- .../Requests/GetMediaProvidersDirectory.cs | 62 ++++ .../GetMediaProvidersMediaContainer.cs | 152 +++++++++ .../Requests/GetMediaProvidersRequest.cs | 23 ++ .../Requests/GetMediaProvidersResponse.cs | 40 +++ .../Requests/GetMediaProvidersResponseBody.cs | 25 ++ ...ry.cs => GetMetaDataByRatingKeyCountry.cs} | 2 +- ...r.cs => GetMetaDataByRatingKeyDirector.cs} | 2 +- ...enre.cs => GetMetaDataByRatingKeyGenre.cs} | 2 +- ...edia.cs => GetMetaDataByRatingKeyMedia.cs} | 4 +- ...> GetMetaDataByRatingKeyMediaContainer.cs} | 4 +- ...a.cs => GetMetaDataByRatingKeyMetadata.cs} | 14 +- ...aPart.cs => GetMetaDataByRatingKeyPart.cs} | 2 +- ...st.cs => GetMetaDataByRatingKeyRequest.cs} | 4 +- ...e.cs => GetMetaDataByRatingKeyResponse.cs} | 4 +- ... => GetMetaDataByRatingKeyResponseBody.cs} | 4 +- ...aRole.cs => GetMetaDataByRatingKeyRole.cs} | 2 +- ...ter.cs => GetMetaDataByRatingKeyWriter.cs} | 2 +- PlexAPI/Models/Requests/GetPinRequest.cs | 15 +- .../GetPlaylistContentsQueryParamType.cs | 34 ++ .../Requests/GetPlaylistContentsRequest.cs | 14 +- .../Requests/GetRecentlyAddedRequest.cs | 41 +++ .../GetRefreshLibraryMetadataRequest.cs | 11 +- ...r.cs => GetSearchLibraryMediaContainer.cs} | 4 +- ...etadata.cs => GetSearchLibraryMetadata.cs} | 2 +- ...yRequest.cs => GetSearchLibraryRequest.cs} | 26 +- ...esponse.cs => GetSearchLibraryResponse.cs} | 4 +- ...ody.cs => GetSearchLibraryResponseBody.cs} | 4 +- ...equest.cs => GetServerResourcesRequest.cs} | 23 +- ...ponse.cs => GetServerResourcesResponse.cs} | 2 +- .../Requests/GetSessionHistoryRequest.cs | 2 +- .../Models/Requests/GetThumbImageRequest.cs | 41 +++ .../Models/Requests/GetThumbImageResponse.cs | 42 +++ .../Models/Requests/GetTokenByPinIdRequest.cs | 2 +- .../GetTopWatchedContentQueryParamType.cs | 34 ++ .../Requests/GetTopWatchedContentRequest.cs | 14 +- .../Requests/GetTopWatchedContentResponse.cs | 2 +- ...serDetailsAuthenticationResponseStatus.cs} | 16 +- ... => GetUserDetailsAuthenticationStatus.cs} | 16 +- .../Models/Requests/GetUserDetailsRequest.cs | 23 ++ .../Requests/GetUserDetailsSubscription.cs | 2 +- ...hlistRequest.cs => GetWatchListRequest.cs} | 12 +- ...istResponse.cs => GetWatchListResponse.cs} | 4 +- ...nseBody.cs => GetWatchListResponseBody.cs} | 2 +- PlexAPI/Models/Requests/IncludeGuids.cs | 27 ++ PlexAPI/Models/Requests/IncludeMeta.cs | 27 ++ PlexAPI/Models/Requests/IncludeRelay.cs | 7 +- PlexAPI/Models/Requests/MediaProvider.cs | 35 ++ PlexAPI/Models/Requests/Pivot.cs | 36 ++ PlexAPI/Models/Requests/PlexDevice.cs | 45 +-- .../Requests/PostUsersSignInDataRequest.cs | 2 +- PlexAPI/Models/Requests/QueryParamFilter.cs | 25 ++ PlexAPI/Models/Requests/QueryParamType.cs | 56 +--- PlexAPI/Models/Requests/Skip.cs | 2 +- PlexAPI/Models/Requests/Subscription.cs | 2 +- PlexAPI/Models/Requests/Type.cs | 11 +- PlexAPI/Playlists.cs | 10 +- PlexAPI/Plex.cs | 162 ++------- PlexAPI/PlexAPI.csproj | 4 +- PlexAPI/PlexAPISDK.cs | 38 +-- PlexAPI/Search.cs | 6 +- PlexAPI/Server.cs | 131 +++++++- PlexAPI/Sessions.cs | 10 +- PlexAPI/Statistics.cs | 6 +- PlexAPI/Updater.cs | 6 +- PlexAPI/Video.cs | 6 +- PlexAPI/Watchlist.cs | 24 +- README.md | 79 ++++- RELEASES.md | 12 +- USAGE.md | 2 +- ...braryErrors.md => GetBannerImageErrors.md} | 2 +- ...eBody.md => GetBannerImageResponseBody.md} | 4 +- ...tyErrors.md => GetMediaProvidersErrors.md} | 2 +- .../Errors/GetMediaProvidersResponseBody.md | 11 + .../Errors/GetMetaDataByRatingKeyErrors.md | 10 + .../GetMetaDataByRatingKeyResponseBody.md | 11 + ...istErrors.md => GetSearchLibraryErrors.md} | 2 +- ...ody.md => GetSearchLibraryResponseBody.md} | 4 +- .../Errors/GetServerIdentityResponseBody.md | 11 +- .../Models/Errors/GetServerResourcesErrors.md | 10 + .../Errors/GetServerResourcesResponseBody.md | 11 + ...ourcesErrors.md => GetThumbImageErrors.md} | 2 +- ...seBody.md => GetThumbImageResponseBody.md} | 4 +- docs/Models/Errors/GetTokenByPinIdErrors.md | 9 +- .../Errors/GetTokenByPinIdPlexErrors.md | 9 + .../Errors/GetTokenByPinIdPlexResponseBody.md | 11 + .../Errors/GetTokenByPinIdResponseBody.md | 2 +- .../Errors/GetTopWatchedContentErrors.md | 10 + .../GetTopWatchedContentResponseBody.md | 11 + ...etadataErrors.md => GetWatchListErrors.md} | 2 +- ...nseBody.md => GetWatchListResponseBody.md} | 4 +- docs/Models/Requests/ApplyUpdatesRequest.md | 2 +- docs/Models/Requests/Connections.md | 14 +- .../Requests/CreatePlaylistQueryParamType.md | 12 + docs/Models/Requests/CreatePlaylistRequest.md | 14 +- docs/Models/Requests/DeleteLibraryRequest.md | 6 +- docs/Models/Requests/Feature.md | 10 + docs/Models/Requests/Filter.md | 13 +- docs/Models/Requests/GetBannerImageRequest.md | 13 + .../Models/Requests/GetBannerImageResponse.md | 12 + .../Requests/GetLibraryDetailsRequest.md | 2 +- .../Models/Requests/GetLibraryItemsRequest.md | 14 +- .../Requests/GetMediaProvidersDirectory.md | 21 ++ .../GetMediaProvidersMediaContainer.md | 51 +++ .../Requests/GetMediaProvidersRequest.md | 8 + .../Requests/GetMediaProvidersResponse.md | 11 + .../Requests/GetMediaProvidersResponseBody.md | 10 + ...ry.md => GetMetaDataByRatingKeyCountry.md} | 2 +- ...r.md => GetMetaDataByRatingKeyDirector.md} | 2 +- ...enre.md => GetMetaDataByRatingKeyGenre.md} | 2 +- .../Requests/GetMetaDataByRatingKeyMedia.md | 24 ++ .../GetMetaDataByRatingKeyMediaContainer.md | 16 + ...a.md => GetMetaDataByRatingKeyMetadata.md} | 14 +- ...aPart.md => GetMetaDataByRatingKeyPart.md} | 2 +- ...st.md => GetMetaDataByRatingKeyRequest.md} | 8 +- ...e.md => GetMetaDataByRatingKeyResponse.md} | 4 +- .../GetMetaDataByRatingKeyResponseBody.md | 10 + ...aRole.md => GetMetaDataByRatingKeyRole.md} | 2 +- ...ter.md => GetMetaDataByRatingKeyWriter.md} | 2 +- docs/Models/Requests/GetMetadataMedia.md | 24 -- .../Requests/GetMetadataMediaContainer.md | 16 - .../Requests/GetMetadataResponseBody.md | 10 - docs/Models/Requests/GetPinRequest.md | 4 +- .../GetPlaylistContentsQueryParamType.md | 19 ++ .../Requests/GetPlaylistContentsRequest.md | 8 +- .../Requests/GetRecentlyAddedRequest.md | 9 + .../GetRefreshLibraryMetadataRequest.md | 8 +- .../GetSearchLibraryMediaContainer.md | 20 ++ ...etadata.md => GetSearchLibraryMetadata.md} | 2 +- .../Requests/GetSearchLibraryRequest.md | 9 + ...esponse.md => GetSearchLibraryResponse.md} | 4 +- .../Requests/GetSearchLibraryResponseBody.md | 10 + ...equest.md => GetServerResourcesRequest.md} | 11 +- ...ponse.md => GetServerResourcesResponse.md} | 2 +- .../Requests/GetSessionHistoryRequest.md | 2 +- docs/Models/Requests/GetThumbImageRequest.md | 13 + docs/Models/Requests/GetThumbImageResponse.md | 12 + .../Models/Requests/GetTokenByPinIdRequest.md | 2 +- .../GetTopWatchedContentQueryParamType.md | 19 ++ .../Requests/GetTopWatchedContentRequest.md | 8 +- .../Requests/GetTopWatchedContentResponse.md | 2 +- ...serDetailsAuthenticationResponseStatus.md} | 2 +- ... => GetUserDetailsAuthenticationStatus.md} | 2 +- docs/Models/Requests/GetUserDetailsRequest.md | 8 + .../Requests/GetUserDetailsSubscription.md | 16 +- ...hlistRequest.md => GetWatchListRequest.md} | 24 +- ...istResponse.md => GetWatchListResponse.md} | 4 +- ...nseBody.md => GetWatchListResponseBody.md} | 2 +- docs/Models/Requests/IncludeGuids.md | 12 + docs/Models/Requests/IncludeMeta.md | 12 + docs/Models/Requests/IncludeRelay.md | 4 +- docs/Models/Requests/MediaProvider.md | 12 + docs/Models/Requests/PathParamFilter.md | 12 - docs/Models/Requests/Pivot.md | 13 + docs/Models/Requests/PlexDevice.md | 28 +- .../Requests/PostUsersSignInDataRequest.md | 2 +- docs/Models/Requests/QueryParamFilter.md | 11 + docs/Models/Requests/QueryParamType.md | 15 +- .../Requests/SearchLibraryMediaContainer.md | 20 -- docs/Models/Requests/SearchLibraryRequest.md | 9 - .../Requests/SearchLibraryResponseBody.md | 10 - docs/Models/Requests/Skip.md | 2 +- docs/Models/Requests/StatisticsBandwidth.md | 2 +- docs/Models/Requests/Subscription.md | 16 +- docs/Models/Requests/Type.md | 8 +- docs/sdks/activities/README.md | 4 +- docs/sdks/authentication/README.md | 51 ++- docs/sdks/butler/README.md | 10 +- docs/sdks/hubs/README.md | 4 +- docs/sdks/library/README.md | 150 +++++---- docs/sdks/log/README.md | 6 +- docs/sdks/media/README.md | 106 +++++- docs/sdks/playlists/README.md | 30 +- docs/sdks/plex/README.md | 118 +++---- docs/sdks/plexapi/README.md | 2 +- docs/sdks/search/README.md | 10 +- docs/sdks/server/README.md | 63 +++- docs/sdks/sessions/README.md | 12 +- docs/sdks/statistics/README.md | 6 +- docs/sdks/updater/README.md | 8 +- docs/sdks/video/README.md | 4 +- docs/sdks/watchlist/README.md | 22 +- 225 files changed, 3354 insertions(+), 1125 deletions(-) rename PlexAPI/Models/Errors/{GetResourcesErrors.cs => GetBannerImageErrors.cs} (95%) rename PlexAPI/Models/Errors/{SearchLibraryResponseBody.cs => GetBannerImageResponseBody.cs} (89%) rename PlexAPI/Models/Errors/{GetServerIdentityErrors.cs => GetMediaProvidersErrors.cs} (94%) create mode 100644 PlexAPI/Models/Errors/GetMediaProvidersResponseBody.cs create mode 100644 PlexAPI/Models/Errors/GetMetaDataByRatingKeyErrors.cs create mode 100644 PlexAPI/Models/Errors/GetMetaDataByRatingKeyResponseBody.cs rename PlexAPI/Models/Errors/{SearchLibraryErrors.cs => GetSearchLibraryErrors.cs} (94%) rename PlexAPI/Models/Errors/{GetResourcesResponseBody.cs => GetSearchLibraryResponseBody.cs} (88%) create mode 100644 PlexAPI/Models/Errors/GetServerResourcesErrors.cs create mode 100644 PlexAPI/Models/Errors/GetServerResourcesResponseBody.cs rename PlexAPI/Models/Errors/{GetWatchlistErrors.cs => GetThumbImageErrors.cs} (95%) rename PlexAPI/Models/Errors/{GetMetadataResponseBody.cs => GetThumbImageResponseBody.cs} (89%) create mode 100644 PlexAPI/Models/Errors/GetTokenByPinIdPlexErrors.cs create mode 100644 PlexAPI/Models/Errors/GetTokenByPinIdPlexResponseBody.cs create mode 100644 PlexAPI/Models/Errors/GetTopWatchedContentErrors.cs create mode 100644 PlexAPI/Models/Errors/GetTopWatchedContentResponseBody.cs rename PlexAPI/Models/Errors/{GetMetadataErrors.cs => GetWatchListErrors.cs} (95%) rename PlexAPI/Models/Errors/{GetWatchlistResponseBody.cs => GetWatchListResponseBody.cs} (89%) rename PlexAPI/Models/Requests/{PathParamFilter.cs => CreatePlaylistQueryParamType.cs} (66%) create mode 100644 PlexAPI/Models/Requests/Feature.cs create mode 100644 PlexAPI/Models/Requests/GetBannerImageRequest.cs create mode 100644 PlexAPI/Models/Requests/GetBannerImageResponse.cs create mode 100644 PlexAPI/Models/Requests/GetMediaProvidersDirectory.cs create mode 100644 PlexAPI/Models/Requests/GetMediaProvidersMediaContainer.cs create mode 100644 PlexAPI/Models/Requests/GetMediaProvidersRequest.cs create mode 100644 PlexAPI/Models/Requests/GetMediaProvidersResponse.cs create mode 100644 PlexAPI/Models/Requests/GetMediaProvidersResponseBody.cs rename PlexAPI/Models/Requests/{GetMetadataCountry.cs => GetMetaDataByRatingKeyCountry.cs} (93%) rename PlexAPI/Models/Requests/{GetMetadataDirector.cs => GetMetaDataByRatingKeyDirector.cs} (94%) rename PlexAPI/Models/Requests/{GetMetadataGenre.cs => GetMetaDataByRatingKeyGenre.cs} (94%) rename PlexAPI/Models/Requests/{GetMetadataMedia.cs => GetMetaDataByRatingKeyMedia.cs} (94%) rename PlexAPI/Models/Requests/{GetMetadataMediaContainer.cs => GetMetaDataByRatingKeyMediaContainer.cs} (91%) rename PlexAPI/Models/Requests/{GetMetadataMetadata.cs => GetMetaDataByRatingKeyMetadata.cs} (86%) rename PlexAPI/Models/Requests/{GetMetadataPart.cs => GetMetaDataByRatingKeyPart.cs} (97%) rename PlexAPI/Models/Requests/{GetMetadataRequest.cs => GetMetaDataByRatingKeyRequest.cs} (86%) rename PlexAPI/Models/Requests/{GetMetadataResponse.cs => GetMetaDataByRatingKeyResponse.cs} (89%) rename PlexAPI/Models/Requests/{GetMetadataResponseBody.cs => GetMetaDataByRatingKeyResponseBody.cs} (83%) rename PlexAPI/Models/Requests/{GetMetadataRole.cs => GetMetaDataByRatingKeyRole.cs} (95%) rename PlexAPI/Models/Requests/{GetMetadataWriter.cs => GetMetaDataByRatingKeyWriter.cs} (95%) create mode 100644 PlexAPI/Models/Requests/GetPlaylistContentsQueryParamType.cs create mode 100644 PlexAPI/Models/Requests/GetRecentlyAddedRequest.cs rename PlexAPI/Models/Requests/{SearchLibraryMediaContainer.cs => GetSearchLibraryMediaContainer.cs} (93%) rename PlexAPI/Models/Requests/{SearchLibraryMetadata.cs => GetSearchLibraryMetadata.cs} (98%) rename PlexAPI/Models/Requests/{SearchLibraryRequest.cs => GetSearchLibraryRequest.cs} (50%) rename PlexAPI/Models/Requests/{SearchLibraryResponse.cs => GetSearchLibraryResponse.cs} (90%) rename PlexAPI/Models/Requests/{SearchLibraryResponseBody.cs => GetSearchLibraryResponseBody.cs} (84%) rename PlexAPI/Models/Requests/{GetResourcesRequest.cs => GetServerResourcesRequest.cs} (61%) rename PlexAPI/Models/Requests/{GetResourcesResponse.cs => GetServerResourcesResponse.cs} (96%) create mode 100644 PlexAPI/Models/Requests/GetThumbImageRequest.cs create mode 100644 PlexAPI/Models/Requests/GetThumbImageResponse.cs create mode 100644 PlexAPI/Models/Requests/GetTopWatchedContentQueryParamType.cs rename PlexAPI/Models/Requests/{GetUserDetailsPlexStatus.cs => GetUserDetailsAuthenticationResponseStatus.cs} (71%) rename PlexAPI/Models/Requests/{GetUserDetailsPlexResponseStatus.cs => GetUserDetailsAuthenticationStatus.cs} (73%) create mode 100644 PlexAPI/Models/Requests/GetUserDetailsRequest.cs rename PlexAPI/Models/Requests/{GetWatchlistRequest.cs => GetWatchListRequest.cs} (91%) rename PlexAPI/Models/Requests/{GetWatchlistResponse.cs => GetWatchListResponse.cs} (91%) rename PlexAPI/Models/Requests/{GetWatchlistResponseBody.cs => GetWatchListResponseBody.cs} (96%) create mode 100644 PlexAPI/Models/Requests/IncludeGuids.cs create mode 100644 PlexAPI/Models/Requests/IncludeMeta.cs create mode 100644 PlexAPI/Models/Requests/MediaProvider.cs create mode 100644 PlexAPI/Models/Requests/Pivot.cs create mode 100644 PlexAPI/Models/Requests/QueryParamFilter.cs rename docs/Models/Errors/{SearchLibraryErrors.md => GetBannerImageErrors.md} (97%) rename docs/Models/Errors/{GetWatchlistResponseBody.md => GetBannerImageResponseBody.md} (92%) rename docs/Models/Errors/{GetServerIdentityErrors.md => GetMediaProvidersErrors.md} (97%) create mode 100644 docs/Models/Errors/GetMediaProvidersResponseBody.md create mode 100644 docs/Models/Errors/GetMetaDataByRatingKeyErrors.md create mode 100644 docs/Models/Errors/GetMetaDataByRatingKeyResponseBody.md rename docs/Models/Errors/{GetWatchlistErrors.md => GetSearchLibraryErrors.md} (97%) rename docs/Models/Errors/{SearchLibraryResponseBody.md => GetSearchLibraryResponseBody.md} (89%) create mode 100644 docs/Models/Errors/GetServerResourcesErrors.md create mode 100644 docs/Models/Errors/GetServerResourcesResponseBody.md rename docs/Models/Errors/{GetResourcesErrors.md => GetThumbImageErrors.md} (97%) rename docs/Models/Errors/{GetResourcesResponseBody.md => GetThumbImageResponseBody.md} (95%) create mode 100644 docs/Models/Errors/GetTokenByPinIdPlexErrors.md create mode 100644 docs/Models/Errors/GetTokenByPinIdPlexResponseBody.md create mode 100644 docs/Models/Errors/GetTopWatchedContentErrors.md create mode 100644 docs/Models/Errors/GetTopWatchedContentResponseBody.md rename docs/Models/Errors/{GetMetadataErrors.md => GetWatchListErrors.md} (97%) rename docs/Models/Errors/{GetMetadataResponseBody.md => GetWatchListResponseBody.md} (95%) create mode 100644 docs/Models/Requests/CreatePlaylistQueryParamType.md create mode 100644 docs/Models/Requests/Feature.md create mode 100644 docs/Models/Requests/GetBannerImageRequest.md create mode 100644 docs/Models/Requests/GetBannerImageResponse.md create mode 100644 docs/Models/Requests/GetMediaProvidersDirectory.md create mode 100644 docs/Models/Requests/GetMediaProvidersMediaContainer.md create mode 100644 docs/Models/Requests/GetMediaProvidersRequest.md create mode 100644 docs/Models/Requests/GetMediaProvidersResponse.md create mode 100644 docs/Models/Requests/GetMediaProvidersResponseBody.md rename docs/Models/Requests/{GetMetadataCountry.md => GetMetaDataByRatingKeyCountry.md} (95%) rename docs/Models/Requests/{GetMetadataDirector.md => GetMetaDataByRatingKeyDirector.md} (98%) rename docs/Models/Requests/{GetMetadataGenre.md => GetMetaDataByRatingKeyGenre.md} (94%) create mode 100644 docs/Models/Requests/GetMetaDataByRatingKeyMedia.md create mode 100644 docs/Models/Requests/GetMetaDataByRatingKeyMediaContainer.md rename docs/Models/Requests/{GetMetadataMetadata.md => GetMetaDataByRatingKeyMetadata.md} (98%) rename docs/Models/Requests/{GetMetadataPart.md => GetMetaDataByRatingKeyPart.md} (99%) rename docs/Models/Requests/{GetMetadataRequest.md => GetMetaDataByRatingKeyRequest.md} (51%) rename docs/Models/Requests/{GetMetadataResponse.md => GetMetaDataByRatingKeyResponse.md} (94%) create mode 100644 docs/Models/Requests/GetMetaDataByRatingKeyResponseBody.md rename docs/Models/Requests/{GetMetadataRole.md => GetMetaDataByRatingKeyRole.md} (99%) rename docs/Models/Requests/{GetMetadataWriter.md => GetMetaDataByRatingKeyWriter.md} (98%) delete mode 100644 docs/Models/Requests/GetMetadataMedia.md delete mode 100644 docs/Models/Requests/GetMetadataMediaContainer.md delete mode 100644 docs/Models/Requests/GetMetadataResponseBody.md create mode 100644 docs/Models/Requests/GetPlaylistContentsQueryParamType.md create mode 100644 docs/Models/Requests/GetRecentlyAddedRequest.md create mode 100644 docs/Models/Requests/GetSearchLibraryMediaContainer.md rename docs/Models/Requests/{SearchLibraryMetadata.md => GetSearchLibraryMetadata.md} (99%) create mode 100644 docs/Models/Requests/GetSearchLibraryRequest.md rename docs/Models/Requests/{SearchLibraryResponse.md => GetSearchLibraryResponse.md} (94%) create mode 100644 docs/Models/Requests/GetSearchLibraryResponseBody.md rename docs/Models/Requests/{GetResourcesRequest.md => GetServerResourcesRequest.md} (79%) rename docs/Models/Requests/{GetResourcesResponse.md => GetServerResourcesResponse.md} (99%) create mode 100644 docs/Models/Requests/GetThumbImageRequest.md create mode 100644 docs/Models/Requests/GetThumbImageResponse.md create mode 100644 docs/Models/Requests/GetTopWatchedContentQueryParamType.md rename docs/Models/Requests/{GetUserDetailsPlexStatus.md => GetUserDetailsAuthenticationResponseStatus.md} (78%) rename docs/Models/Requests/{GetUserDetailsPlexResponseStatus.md => GetUserDetailsAuthenticationStatus.md} (82%) create mode 100644 docs/Models/Requests/GetUserDetailsRequest.md rename docs/Models/Requests/{GetWatchlistRequest.md => GetWatchListRequest.md} (74%) rename docs/Models/Requests/{GetWatchlistResponse.md => GetWatchListResponse.md} (94%) rename docs/Models/Requests/{GetWatchlistResponseBody.md => GetWatchListResponseBody.md} (98%) create mode 100644 docs/Models/Requests/IncludeGuids.md create mode 100644 docs/Models/Requests/IncludeMeta.md create mode 100644 docs/Models/Requests/MediaProvider.md delete mode 100644 docs/Models/Requests/PathParamFilter.md create mode 100644 docs/Models/Requests/Pivot.md create mode 100644 docs/Models/Requests/QueryParamFilter.md delete mode 100644 docs/Models/Requests/SearchLibraryMediaContainer.md delete mode 100644 docs/Models/Requests/SearchLibraryRequest.md delete mode 100644 docs/Models/Requests/SearchLibraryResponseBody.md diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index e0f5f82..af04d73 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: cd46763b91ada69afbe49fa20517839a + docChecksum: f627107f2ac6c53325be4f291ae2dea7 docVersion: 0.0.3 - speakeasyVersion: 1.383.2 - generationVersion: 2.407.0 - releaseVersion: 0.4.2 - configChecksum: 74b77ec64d814262085e1afc1ea50fbb + speakeasyVersion: 1.390.7 + generationVersion: 2.409.8 + releaseVersion: 0.5.0 + configChecksum: 4bb12ec49dacd5ee7587cdd901280ff9 repoURL: https://github.com/LukeHagar/plexcsharp.git repoSubDirectory: . published: true @@ -28,7 +28,6 @@ features: nullables: 0.1.0 responseFormat: 0.0.4 sdkHooks: 0.1.0 - typeOverrides: 2.81.1 unions: 0.2.1 generatedFiles: - PlexAPI/Server.cs @@ -40,13 +39,13 @@ generatedFiles: - PlexAPI/Hubs.cs - PlexAPI/Search.cs - PlexAPI/Library.cs + - PlexAPI/Watchlist.cs - PlexAPI/Log.cs - PlexAPI/Playlists.cs - PlexAPI/Authentication.cs - PlexAPI/Statistics.cs - PlexAPI/Sessions.cs - PlexAPI/Updater.cs - - PlexAPI/Watchlist.cs - PlexAPI/PlexAPISDK.cs - global.json - PlexAPI.sln @@ -95,6 +94,14 @@ generatedFiles: - PlexAPI/Models/Requests/Upscale.cs - PlexAPI/Models/Requests/GetResizedPhotoRequest.cs - PlexAPI/Models/Requests/GetResizedPhotoResponse.cs + - PlexAPI/Models/Requests/GetMediaProvidersRequest.cs + - PlexAPI/Models/Requests/Pivot.cs + - PlexAPI/Models/Requests/GetMediaProvidersDirectory.cs + - PlexAPI/Models/Requests/Feature.cs + - PlexAPI/Models/Requests/MediaProvider.cs + - PlexAPI/Models/Requests/GetMediaProvidersMediaContainer.cs + - PlexAPI/Models/Requests/GetMediaProvidersResponseBody.cs + - PlexAPI/Models/Requests/GetMediaProvidersResponse.cs - PlexAPI/Models/Requests/GetServerListServer.cs - PlexAPI/Models/Requests/GetServerListMediaContainer.cs - PlexAPI/Models/Requests/GetServerListResponseBody.cs @@ -105,6 +112,10 @@ generatedFiles: - PlexAPI/Models/Requests/MarkUnplayedResponse.cs - PlexAPI/Models/Requests/UpdatePlayProgressRequest.cs - PlexAPI/Models/Requests/UpdatePlayProgressResponse.cs + - PlexAPI/Models/Requests/GetBannerImageRequest.cs + - PlexAPI/Models/Requests/GetBannerImageResponse.cs + - PlexAPI/Models/Requests/GetThumbImageRequest.cs + - PlexAPI/Models/Requests/GetThumbImageResponse.cs - PlexAPI/Models/Requests/State.cs - PlexAPI/Models/Requests/GetTimelineRequest.cs - PlexAPI/Models/Requests/GetTimelineResponse.cs @@ -143,10 +154,10 @@ generatedFiles: - PlexAPI/Models/Requests/IncludeHttps.cs - PlexAPI/Models/Requests/IncludeRelay.cs - PlexAPI/Models/Requests/IncludeIPv6.cs - - PlexAPI/Models/Requests/GetResourcesRequest.cs + - PlexAPI/Models/Requests/GetServerResourcesRequest.cs - PlexAPI/Models/Requests/Connections.cs - PlexAPI/Models/Requests/PlexDevice.cs - - PlexAPI/Models/Requests/GetResourcesResponse.cs + - PlexAPI/Models/Requests/GetServerResourcesResponse.cs - PlexAPI/Models/Requests/GetPinRequest.cs - PlexAPI/Models/Requests/GeoData.cs - PlexAPI/Models/Requests/GetPinAuthPinContainer.cs @@ -155,23 +166,6 @@ generatedFiles: - PlexAPI/Models/Requests/GetTokenByPinIdGeoData.cs - PlexAPI/Models/Requests/GetTokenByPinIdAuthPinContainer.cs - PlexAPI/Models/Requests/GetTokenByPinIdResponse.cs - - PlexAPI/Models/Requests/MailingListStatus.cs - - PlexAPI/Models/Requests/AutoSelectSubtitle.cs - - PlexAPI/Models/Requests/DefaultSubtitleAccessibility.cs - - PlexAPI/Models/Requests/DefaultSubtitleForced.cs - - PlexAPI/Models/Requests/WatchedIndicator.cs - - PlexAPI/Models/Requests/MediaReviewsVisibility.cs - - PlexAPI/Models/Requests/UserProfile.cs - - PlexAPI/Models/Requests/GetUserDetailsStatus.cs - - PlexAPI/Models/Requests/Services.cs - - PlexAPI/Models/Requests/Features.cs - - PlexAPI/Models/Requests/GetUserDetailsPlexStatus.cs - - PlexAPI/Models/Requests/Subscription.cs - - PlexAPI/Models/Requests/GetUserDetailsFeatures.cs - - PlexAPI/Models/Requests/GetUserDetailsPlexResponseStatus.cs - - PlexAPI/Models/Requests/GetUserDetailsSubscription.cs - - PlexAPI/Models/Requests/GetUserDetailsUserPlexAccount.cs - - PlexAPI/Models/Requests/GetUserDetailsResponse.cs - PlexAPI/Models/Requests/OnlyTransient.cs - PlexAPI/Models/Requests/GetGlobalHubsRequest.cs - PlexAPI/Models/Requests/GetGlobalHubsMetadata.cs @@ -212,6 +206,7 @@ generatedFiles: - PlexAPI/Models/Requests/GetSearchResultsResponse.cs - PlexAPI/Models/Requests/GetFileHashRequest.cs - PlexAPI/Models/Requests/GetFileHashResponse.cs + - PlexAPI/Models/Requests/GetRecentlyAddedRequest.cs - PlexAPI/Models/Requests/Part.cs - PlexAPI/Models/Requests/Media.cs - PlexAPI/Models/Requests/Genre.cs @@ -243,6 +238,9 @@ generatedFiles: - PlexAPI/Models/Requests/DeleteLibraryRequest.cs - PlexAPI/Models/Requests/DeleteLibraryResponse.cs - PlexAPI/Models/Requests/Tag.cs + - PlexAPI/Models/Requests/IncludeGuids.cs + - PlexAPI/Models/Requests/IncludeMeta.cs + - PlexAPI/Models/Requests/Type.cs - PlexAPI/Models/Requests/GetLibraryItemsRequest.cs - PlexAPI/Models/Requests/LibrarySectionID.cs - PlexAPI/Models/Requests/GetLibraryItemsPart.cs @@ -259,34 +257,35 @@ generatedFiles: - PlexAPI/Models/Requests/Force.cs - PlexAPI/Models/Requests/GetRefreshLibraryMetadataRequest.cs - PlexAPI/Models/Requests/GetRefreshLibraryMetadataResponse.cs - - PlexAPI/Models/Requests/Type.cs - - PlexAPI/Models/Requests/SearchLibraryRequest.cs - - PlexAPI/Models/Requests/SearchLibraryMetadata.cs - - PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs - - PlexAPI/Models/Requests/SearchLibraryResponseBody.cs - - PlexAPI/Models/Requests/SearchLibraryResponse.cs - - PlexAPI/Models/Requests/GetMetadataRequest.cs + - PlexAPI/Models/Requests/QueryParamType.cs + - PlexAPI/Models/Requests/GetSearchLibraryRequest.cs + - PlexAPI/Models/Requests/GetSearchLibraryMetadata.cs + - PlexAPI/Models/Requests/GetSearchLibraryMediaContainer.cs + - PlexAPI/Models/Requests/GetSearchLibraryResponseBody.cs + - PlexAPI/Models/Requests/GetSearchLibraryResponse.cs + - PlexAPI/Models/Requests/GetMetaDataByRatingKeyRequest.cs - PlexAPI/Models/Requests/Stream.cs - - PlexAPI/Models/Requests/GetMetadataPart.cs - - PlexAPI/Models/Requests/GetMetadataMedia.cs - - PlexAPI/Models/Requests/GetMetadataGenre.cs - - PlexAPI/Models/Requests/GetMetadataCountry.cs + - PlexAPI/Models/Requests/GetMetaDataByRatingKeyPart.cs + - PlexAPI/Models/Requests/GetMetaDataByRatingKeyMedia.cs + - PlexAPI/Models/Requests/GetMetaDataByRatingKeyGenre.cs + - PlexAPI/Models/Requests/GetMetaDataByRatingKeyCountry.cs - PlexAPI/Models/Requests/Guids.cs - PlexAPI/Models/Requests/Ratings.cs - - PlexAPI/Models/Requests/GetMetadataDirector.cs - - PlexAPI/Models/Requests/GetMetadataWriter.cs - - PlexAPI/Models/Requests/GetMetadataRole.cs + - PlexAPI/Models/Requests/GetMetaDataByRatingKeyDirector.cs + - PlexAPI/Models/Requests/GetMetaDataByRatingKeyWriter.cs + - PlexAPI/Models/Requests/GetMetaDataByRatingKeyRole.cs - PlexAPI/Models/Requests/Producer.cs - - PlexAPI/Models/Requests/GetMetadataMetadata.cs - - PlexAPI/Models/Requests/GetMetadataMediaContainer.cs - - PlexAPI/Models/Requests/GetMetadataResponseBody.cs - - PlexAPI/Models/Requests/GetMetadataResponse.cs + - PlexAPI/Models/Requests/GetMetaDataByRatingKeyMetadata.cs + - PlexAPI/Models/Requests/GetMetaDataByRatingKeyMediaContainer.cs + - PlexAPI/Models/Requests/GetMetaDataByRatingKeyResponseBody.cs + - PlexAPI/Models/Requests/GetMetaDataByRatingKeyResponse.cs - PlexAPI/Models/Requests/GetMetadataChildrenRequest.cs - PlexAPI/Models/Requests/GetMetadataChildrenDirectory.cs - PlexAPI/Models/Requests/GetMetadataChildrenMetadata.cs - PlexAPI/Models/Requests/GetMetadataChildrenMediaContainer.cs - PlexAPI/Models/Requests/GetMetadataChildrenResponseBody.cs - PlexAPI/Models/Requests/GetMetadataChildrenResponse.cs + - PlexAPI/Models/Requests/GetTopWatchedContentQueryParamType.cs - PlexAPI/Models/Requests/GetTopWatchedContentRequest.cs - PlexAPI/Models/Requests/GetTopWatchedContentGenre.cs - PlexAPI/Models/Requests/GetTopWatchedContentCountry.cs @@ -305,12 +304,21 @@ generatedFiles: - PlexAPI/Models/Requests/GetOnDeckMediaContainer.cs - PlexAPI/Models/Requests/GetOnDeckResponseBody.cs - PlexAPI/Models/Requests/GetOnDeckResponse.cs + - PlexAPI/Models/Requests/Filter.cs + - PlexAPI/Models/Requests/Libtype.cs + - PlexAPI/Models/Requests/IncludeCollections.cs + - PlexAPI/Models/Requests/IncludeExternalMedia.cs + - PlexAPI/Models/Requests/GetWatchListRequest.cs + - PlexAPI/Models/Requests/Image.cs + - PlexAPI/Models/Requests/Metadata.cs + - PlexAPI/Models/Requests/GetWatchListResponseBody.cs + - PlexAPI/Models/Requests/GetWatchListResponse.cs - PlexAPI/Models/Requests/Level.cs - PlexAPI/Models/Requests/LogLineRequest.cs - PlexAPI/Models/Requests/LogLineResponse.cs - PlexAPI/Models/Requests/LogMultiLineResponse.cs - PlexAPI/Models/Requests/EnablePaperTrailResponse.cs - - PlexAPI/Models/Requests/QueryParamType.cs + - PlexAPI/Models/Requests/CreatePlaylistQueryParamType.cs - PlexAPI/Models/Requests/Smart.cs - PlexAPI/Models/Requests/CreatePlaylistRequest.cs - PlexAPI/Models/Requests/CreatePlaylistMetadata.cs @@ -333,6 +341,7 @@ generatedFiles: - PlexAPI/Models/Requests/DeletePlaylistResponse.cs - PlexAPI/Models/Requests/UpdatePlaylistRequest.cs - PlexAPI/Models/Requests/UpdatePlaylistResponse.cs + - PlexAPI/Models/Requests/GetPlaylistContentsQueryParamType.cs - PlexAPI/Models/Requests/GetPlaylistContentsRequest.cs - PlexAPI/Models/Requests/GetPlaylistContentsPart.cs - PlexAPI/Models/Requests/GetPlaylistContentsMedia.cs @@ -361,6 +370,24 @@ generatedFiles: - PlexAPI/Models/Requests/GetTransientTokenResponse.cs - PlexAPI/Models/Requests/GetSourceConnectionInformationRequest.cs - PlexAPI/Models/Requests/GetSourceConnectionInformationResponse.cs + - PlexAPI/Models/Requests/GetUserDetailsRequest.cs + - PlexAPI/Models/Requests/MailingListStatus.cs + - PlexAPI/Models/Requests/AutoSelectSubtitle.cs + - PlexAPI/Models/Requests/DefaultSubtitleAccessibility.cs + - PlexAPI/Models/Requests/DefaultSubtitleForced.cs + - PlexAPI/Models/Requests/WatchedIndicator.cs + - PlexAPI/Models/Requests/MediaReviewsVisibility.cs + - PlexAPI/Models/Requests/UserProfile.cs + - PlexAPI/Models/Requests/GetUserDetailsStatus.cs + - PlexAPI/Models/Requests/Services.cs + - PlexAPI/Models/Requests/Features.cs + - PlexAPI/Models/Requests/GetUserDetailsAuthenticationStatus.cs + - PlexAPI/Models/Requests/Subscription.cs + - PlexAPI/Models/Requests/GetUserDetailsFeatures.cs + - PlexAPI/Models/Requests/GetUserDetailsAuthenticationResponseStatus.cs + - PlexAPI/Models/Requests/GetUserDetailsSubscription.cs + - PlexAPI/Models/Requests/GetUserDetailsUserPlexAccount.cs + - PlexAPI/Models/Requests/GetUserDetailsResponse.cs - PlexAPI/Models/Requests/PostUsersSignInDataRequestBody.cs - PlexAPI/Models/Requests/PostUsersSignInDataRequest.cs - PlexAPI/Models/Requests/PostUsersSignInDataMailingListStatus.cs @@ -414,7 +441,7 @@ generatedFiles: - PlexAPI/Models/Requests/GetSessionsMediaContainer.cs - PlexAPI/Models/Requests/GetSessionsResponseBody.cs - PlexAPI/Models/Requests/GetSessionsResponse.cs - - PlexAPI/Models/Requests/Filter.cs + - PlexAPI/Models/Requests/QueryParamFilter.cs - PlexAPI/Models/Requests/GetSessionHistoryRequest.cs - PlexAPI/Models/Requests/GetSessionHistoryMetadata.cs - PlexAPI/Models/Requests/GetSessionHistoryMediaContainer.cs @@ -437,15 +464,6 @@ generatedFiles: - PlexAPI/Models/Requests/Skip.cs - PlexAPI/Models/Requests/ApplyUpdatesRequest.cs - PlexAPI/Models/Requests/ApplyUpdatesResponse.cs - - PlexAPI/Models/Requests/PathParamFilter.cs - - PlexAPI/Models/Requests/Libtype.cs - - PlexAPI/Models/Requests/IncludeCollections.cs - - PlexAPI/Models/Requests/IncludeExternalMedia.cs - - PlexAPI/Models/Requests/GetWatchlistRequest.cs - - PlexAPI/Models/Requests/Image.cs - - PlexAPI/Models/Requests/Metadata.cs - - PlexAPI/Models/Requests/GetWatchlistResponseBody.cs - - PlexAPI/Models/Requests/GetWatchlistResponse.cs - PlexAPI/Models/Errors/Errors.cs - PlexAPI/Models/Errors/GetServerCapabilitiesResponseBody.cs - PlexAPI/Models/Errors/GetServerPreferencesErrors.cs @@ -454,12 +472,13 @@ generatedFiles: - PlexAPI/Models/Errors/GetAvailableClientsResponseBody.cs - PlexAPI/Models/Errors/GetDevicesErrors.cs - PlexAPI/Models/Errors/GetDevicesResponseBody.cs - - PlexAPI/Models/Errors/GetServerIdentityErrors.cs - PlexAPI/Models/Errors/GetServerIdentityResponseBody.cs - PlexAPI/Models/Errors/GetMyPlexAccountErrors.cs - PlexAPI/Models/Errors/GetMyPlexAccountResponseBody.cs - PlexAPI/Models/Errors/GetResizedPhotoErrors.cs - PlexAPI/Models/Errors/GetResizedPhotoResponseBody.cs + - PlexAPI/Models/Errors/GetMediaProvidersErrors.cs + - PlexAPI/Models/Errors/GetMediaProvidersResponseBody.cs - PlexAPI/Models/Errors/GetServerListErrors.cs - PlexAPI/Models/Errors/GetServerListResponseBody.cs - PlexAPI/Models/Errors/MarkPlayedErrors.cs @@ -468,6 +487,10 @@ generatedFiles: - PlexAPI/Models/Errors/MarkUnplayedResponseBody.cs - PlexAPI/Models/Errors/UpdatePlayProgressErrors.cs - PlexAPI/Models/Errors/UpdatePlayProgressResponseBody.cs + - PlexAPI/Models/Errors/GetBannerImageErrors.cs + - PlexAPI/Models/Errors/GetBannerImageResponseBody.cs + - PlexAPI/Models/Errors/GetThumbImageErrors.cs + - PlexAPI/Models/Errors/GetThumbImageResponseBody.cs - PlexAPI/Models/Errors/GetTimelineErrors.cs - PlexAPI/Models/Errors/GetTimelineResponseBody.cs - PlexAPI/Models/Errors/StartUniversalTranscodeErrors.cs @@ -494,14 +517,14 @@ generatedFiles: - PlexAPI/Models/Errors/GetGeoDataResponseBody.cs - PlexAPI/Models/Errors/GetHomeDataErrors.cs - PlexAPI/Models/Errors/GetHomeDataResponseBody.cs - - PlexAPI/Models/Errors/GetResourcesErrors.cs - - PlexAPI/Models/Errors/GetResourcesResponseBody.cs + - PlexAPI/Models/Errors/GetServerResourcesErrors.cs + - PlexAPI/Models/Errors/GetServerResourcesResponseBody.cs - PlexAPI/Models/Errors/GetPinErrors.cs - PlexAPI/Models/Errors/GetPinResponseBody.cs + - PlexAPI/Models/Errors/GetTokenByPinIdPlexErrors.cs + - PlexAPI/Models/Errors/GetTokenByPinIdPlexResponseBody.cs - PlexAPI/Models/Errors/GetTokenByPinIdErrors.cs - PlexAPI/Models/Errors/GetTokenByPinIdResponseBody.cs - - PlexAPI/Models/Errors/GetUserDetailsErrors.cs - - PlexAPI/Models/Errors/GetUserDetailsResponseBody.cs - PlexAPI/Models/Errors/GetGlobalHubsErrors.cs - PlexAPI/Models/Errors/GetGlobalHubsResponseBody.cs - PlexAPI/Models/Errors/GetLibraryHubsErrors.cs @@ -526,14 +549,18 @@ generatedFiles: - PlexAPI/Models/Errors/GetLibraryItemsResponseBody.cs - PlexAPI/Models/Errors/GetRefreshLibraryMetadataErrors.cs - PlexAPI/Models/Errors/GetRefreshLibraryMetadataResponseBody.cs - - PlexAPI/Models/Errors/SearchLibraryErrors.cs - - PlexAPI/Models/Errors/SearchLibraryResponseBody.cs - - PlexAPI/Models/Errors/GetMetadataErrors.cs - - PlexAPI/Models/Errors/GetMetadataResponseBody.cs + - PlexAPI/Models/Errors/GetSearchLibraryErrors.cs + - PlexAPI/Models/Errors/GetSearchLibraryResponseBody.cs + - PlexAPI/Models/Errors/GetMetaDataByRatingKeyErrors.cs + - PlexAPI/Models/Errors/GetMetaDataByRatingKeyResponseBody.cs - PlexAPI/Models/Errors/GetMetadataChildrenErrors.cs - PlexAPI/Models/Errors/GetMetadataChildrenResponseBody.cs + - PlexAPI/Models/Errors/GetTopWatchedContentErrors.cs + - PlexAPI/Models/Errors/GetTopWatchedContentResponseBody.cs - PlexAPI/Models/Errors/GetOnDeckErrors.cs - PlexAPI/Models/Errors/GetOnDeckResponseBody.cs + - PlexAPI/Models/Errors/GetWatchListErrors.cs + - PlexAPI/Models/Errors/GetWatchListResponseBody.cs - PlexAPI/Models/Errors/LogLineErrors.cs - PlexAPI/Models/Errors/LogLineResponseBody.cs - PlexAPI/Models/Errors/LogMultiLineErrors.cs @@ -562,6 +589,8 @@ generatedFiles: - PlexAPI/Models/Errors/GetTransientTokenResponseBody.cs - PlexAPI/Models/Errors/GetSourceConnectionInformationErrors.cs - PlexAPI/Models/Errors/GetSourceConnectionInformationResponseBody.cs + - PlexAPI/Models/Errors/GetUserDetailsErrors.cs + - PlexAPI/Models/Errors/GetUserDetailsResponseBody.cs - PlexAPI/Models/Errors/PostUsersSignInDataErrors.cs - PlexAPI/Models/Errors/PostUsersSignInDataResponseBody.cs - PlexAPI/Models/Errors/GetStatisticsErrors.cs @@ -584,8 +613,6 @@ generatedFiles: - PlexAPI/Models/Errors/CheckForUpdatesResponseBody.cs - PlexAPI/Models/Errors/ApplyUpdatesErrors.cs - PlexAPI/Models/Errors/ApplyUpdatesResponseBody.cs - - PlexAPI/Models/Errors/GetWatchlistErrors.cs - - PlexAPI/Models/Errors/GetWatchlistResponseBody.cs - PlexAPI/Models/Components/Security.cs - docs/Models/Requests/Directory.md - docs/Models/Requests/MediaContainer.md @@ -613,6 +640,14 @@ generatedFiles: - docs/Models/Requests/Upscale.md - docs/Models/Requests/GetResizedPhotoRequest.md - docs/Models/Requests/GetResizedPhotoResponse.md + - docs/Models/Requests/GetMediaProvidersRequest.md + - docs/Models/Requests/Pivot.md + - docs/Models/Requests/GetMediaProvidersDirectory.md + - docs/Models/Requests/Feature.md + - docs/Models/Requests/MediaProvider.md + - docs/Models/Requests/GetMediaProvidersMediaContainer.md + - docs/Models/Requests/GetMediaProvidersResponseBody.md + - docs/Models/Requests/GetMediaProvidersResponse.md - docs/Models/Requests/GetServerListServer.md - docs/Models/Requests/GetServerListMediaContainer.md - docs/Models/Requests/GetServerListResponseBody.md @@ -623,6 +658,10 @@ generatedFiles: - docs/Models/Requests/MarkUnplayedResponse.md - docs/Models/Requests/UpdatePlayProgressRequest.md - docs/Models/Requests/UpdatePlayProgressResponse.md + - docs/Models/Requests/GetBannerImageRequest.md + - docs/Models/Requests/GetBannerImageResponse.md + - docs/Models/Requests/GetThumbImageRequest.md + - docs/Models/Requests/GetThumbImageResponse.md - docs/Models/Requests/State.md - docs/Models/Requests/GetTimelineRequest.md - docs/Models/Requests/GetTimelineResponse.md @@ -661,10 +700,10 @@ generatedFiles: - docs/Models/Requests/IncludeHttps.md - docs/Models/Requests/IncludeRelay.md - docs/Models/Requests/IncludeIPv6.md - - docs/Models/Requests/GetResourcesRequest.md + - docs/Models/Requests/GetServerResourcesRequest.md - docs/Models/Requests/Connections.md - docs/Models/Requests/PlexDevice.md - - docs/Models/Requests/GetResourcesResponse.md + - docs/Models/Requests/GetServerResourcesResponse.md - docs/Models/Requests/GetPinRequest.md - docs/Models/Requests/GeoData.md - docs/Models/Requests/GetPinAuthPinContainer.md @@ -673,23 +712,6 @@ generatedFiles: - docs/Models/Requests/GetTokenByPinIdGeoData.md - docs/Models/Requests/GetTokenByPinIdAuthPinContainer.md - docs/Models/Requests/GetTokenByPinIdResponse.md - - docs/Models/Requests/MailingListStatus.md - - docs/Models/Requests/AutoSelectSubtitle.md - - docs/Models/Requests/DefaultSubtitleAccessibility.md - - docs/Models/Requests/DefaultSubtitleForced.md - - docs/Models/Requests/WatchedIndicator.md - - docs/Models/Requests/MediaReviewsVisibility.md - - docs/Models/Requests/UserProfile.md - - docs/Models/Requests/GetUserDetailsStatus.md - - docs/Models/Requests/Services.md - - docs/Models/Requests/Features.md - - docs/Models/Requests/GetUserDetailsPlexStatus.md - - docs/Models/Requests/Subscription.md - - docs/Models/Requests/GetUserDetailsFeatures.md - - docs/Models/Requests/GetUserDetailsPlexResponseStatus.md - - docs/Models/Requests/GetUserDetailsSubscription.md - - docs/Models/Requests/GetUserDetailsUserPlexAccount.md - - docs/Models/Requests/GetUserDetailsResponse.md - docs/Models/Requests/OnlyTransient.md - docs/Models/Requests/GetGlobalHubsRequest.md - docs/Models/Requests/GetGlobalHubsMetadata.md @@ -730,6 +752,7 @@ generatedFiles: - docs/Models/Requests/GetSearchResultsResponse.md - docs/Models/Requests/GetFileHashRequest.md - docs/Models/Requests/GetFileHashResponse.md + - docs/Models/Requests/GetRecentlyAddedRequest.md - docs/Models/Requests/Part.md - docs/Models/Requests/Media.md - docs/Models/Requests/Genre.md @@ -761,6 +784,9 @@ generatedFiles: - docs/Models/Requests/DeleteLibraryRequest.md - docs/Models/Requests/DeleteLibraryResponse.md - docs/Models/Requests/Tag.md + - docs/Models/Requests/IncludeGuids.md + - docs/Models/Requests/IncludeMeta.md + - docs/Models/Requests/Type.md - docs/Models/Requests/GetLibraryItemsRequest.md - docs/Models/Requests/LibrarySectionID.md - docs/Models/Requests/GetLibraryItemsPart.md @@ -777,34 +803,35 @@ generatedFiles: - docs/Models/Requests/Force.md - docs/Models/Requests/GetRefreshLibraryMetadataRequest.md - docs/Models/Requests/GetRefreshLibraryMetadataResponse.md - - docs/Models/Requests/Type.md - - docs/Models/Requests/SearchLibraryRequest.md - - docs/Models/Requests/SearchLibraryMetadata.md - - docs/Models/Requests/SearchLibraryMediaContainer.md - - docs/Models/Requests/SearchLibraryResponseBody.md - - docs/Models/Requests/SearchLibraryResponse.md - - docs/Models/Requests/GetMetadataRequest.md + - docs/Models/Requests/QueryParamType.md + - docs/Models/Requests/GetSearchLibraryRequest.md + - docs/Models/Requests/GetSearchLibraryMetadata.md + - docs/Models/Requests/GetSearchLibraryMediaContainer.md + - docs/Models/Requests/GetSearchLibraryResponseBody.md + - docs/Models/Requests/GetSearchLibraryResponse.md + - docs/Models/Requests/GetMetaDataByRatingKeyRequest.md - docs/Models/Requests/Stream.md - - docs/Models/Requests/GetMetadataPart.md - - docs/Models/Requests/GetMetadataMedia.md - - docs/Models/Requests/GetMetadataGenre.md - - docs/Models/Requests/GetMetadataCountry.md + - docs/Models/Requests/GetMetaDataByRatingKeyPart.md + - docs/Models/Requests/GetMetaDataByRatingKeyMedia.md + - docs/Models/Requests/GetMetaDataByRatingKeyGenre.md + - docs/Models/Requests/GetMetaDataByRatingKeyCountry.md - docs/Models/Requests/Guids.md - docs/Models/Requests/Ratings.md - - docs/Models/Requests/GetMetadataDirector.md - - docs/Models/Requests/GetMetadataWriter.md - - docs/Models/Requests/GetMetadataRole.md + - docs/Models/Requests/GetMetaDataByRatingKeyDirector.md + - docs/Models/Requests/GetMetaDataByRatingKeyWriter.md + - docs/Models/Requests/GetMetaDataByRatingKeyRole.md - docs/Models/Requests/Producer.md - - docs/Models/Requests/GetMetadataMetadata.md - - docs/Models/Requests/GetMetadataMediaContainer.md - - docs/Models/Requests/GetMetadataResponseBody.md - - docs/Models/Requests/GetMetadataResponse.md + - docs/Models/Requests/GetMetaDataByRatingKeyMetadata.md + - docs/Models/Requests/GetMetaDataByRatingKeyMediaContainer.md + - docs/Models/Requests/GetMetaDataByRatingKeyResponseBody.md + - docs/Models/Requests/GetMetaDataByRatingKeyResponse.md - docs/Models/Requests/GetMetadataChildrenRequest.md - docs/Models/Requests/GetMetadataChildrenDirectory.md - docs/Models/Requests/GetMetadataChildrenMetadata.md - docs/Models/Requests/GetMetadataChildrenMediaContainer.md - docs/Models/Requests/GetMetadataChildrenResponseBody.md - docs/Models/Requests/GetMetadataChildrenResponse.md + - docs/Models/Requests/GetTopWatchedContentQueryParamType.md - docs/Models/Requests/GetTopWatchedContentRequest.md - docs/Models/Requests/GetTopWatchedContentGenre.md - docs/Models/Requests/GetTopWatchedContentCountry.md @@ -823,12 +850,21 @@ generatedFiles: - docs/Models/Requests/GetOnDeckMediaContainer.md - docs/Models/Requests/GetOnDeckResponseBody.md - docs/Models/Requests/GetOnDeckResponse.md + - docs/Models/Requests/Filter.md + - docs/Models/Requests/Libtype.md + - docs/Models/Requests/IncludeCollections.md + - docs/Models/Requests/IncludeExternalMedia.md + - docs/Models/Requests/GetWatchListRequest.md + - docs/Models/Requests/Image.md + - docs/Models/Requests/Metadata.md + - docs/Models/Requests/GetWatchListResponseBody.md + - docs/Models/Requests/GetWatchListResponse.md - docs/Models/Requests/Level.md - docs/Models/Requests/LogLineRequest.md - docs/Models/Requests/LogLineResponse.md - docs/Models/Requests/LogMultiLineResponse.md - docs/Models/Requests/EnablePaperTrailResponse.md - - docs/Models/Requests/QueryParamType.md + - docs/Models/Requests/CreatePlaylistQueryParamType.md - docs/Models/Requests/Smart.md - docs/Models/Requests/CreatePlaylistRequest.md - docs/Models/Requests/CreatePlaylistMetadata.md @@ -851,6 +887,7 @@ generatedFiles: - docs/Models/Requests/DeletePlaylistResponse.md - docs/Models/Requests/UpdatePlaylistRequest.md - docs/Models/Requests/UpdatePlaylistResponse.md + - docs/Models/Requests/GetPlaylistContentsQueryParamType.md - docs/Models/Requests/GetPlaylistContentsRequest.md - docs/Models/Requests/GetPlaylistContentsPart.md - docs/Models/Requests/GetPlaylistContentsMedia.md @@ -879,6 +916,24 @@ generatedFiles: - docs/Models/Requests/GetTransientTokenResponse.md - docs/Models/Requests/GetSourceConnectionInformationRequest.md - docs/Models/Requests/GetSourceConnectionInformationResponse.md + - docs/Models/Requests/GetUserDetailsRequest.md + - docs/Models/Requests/MailingListStatus.md + - docs/Models/Requests/AutoSelectSubtitle.md + - docs/Models/Requests/DefaultSubtitleAccessibility.md + - docs/Models/Requests/DefaultSubtitleForced.md + - docs/Models/Requests/WatchedIndicator.md + - docs/Models/Requests/MediaReviewsVisibility.md + - docs/Models/Requests/UserProfile.md + - docs/Models/Requests/GetUserDetailsStatus.md + - docs/Models/Requests/Services.md + - docs/Models/Requests/Features.md + - docs/Models/Requests/GetUserDetailsAuthenticationStatus.md + - docs/Models/Requests/Subscription.md + - docs/Models/Requests/GetUserDetailsFeatures.md + - docs/Models/Requests/GetUserDetailsAuthenticationResponseStatus.md + - docs/Models/Requests/GetUserDetailsSubscription.md + - docs/Models/Requests/GetUserDetailsUserPlexAccount.md + - docs/Models/Requests/GetUserDetailsResponse.md - docs/Models/Requests/PostUsersSignInDataRequestBody.md - docs/Models/Requests/PostUsersSignInDataRequest.md - docs/Models/Requests/PostUsersSignInDataMailingListStatus.md @@ -932,7 +987,7 @@ generatedFiles: - docs/Models/Requests/GetSessionsMediaContainer.md - docs/Models/Requests/GetSessionsResponseBody.md - docs/Models/Requests/GetSessionsResponse.md - - docs/Models/Requests/Filter.md + - docs/Models/Requests/QueryParamFilter.md - docs/Models/Requests/GetSessionHistoryRequest.md - docs/Models/Requests/GetSessionHistoryMetadata.md - docs/Models/Requests/GetSessionHistoryMediaContainer.md @@ -955,15 +1010,6 @@ generatedFiles: - docs/Models/Requests/Skip.md - docs/Models/Requests/ApplyUpdatesRequest.md - docs/Models/Requests/ApplyUpdatesResponse.md - - docs/Models/Requests/PathParamFilter.md - - docs/Models/Requests/Libtype.md - - docs/Models/Requests/IncludeCollections.md - - docs/Models/Requests/IncludeExternalMedia.md - - docs/Models/Requests/GetWatchlistRequest.md - - docs/Models/Requests/Image.md - - docs/Models/Requests/Metadata.md - - docs/Models/Requests/GetWatchlistResponseBody.md - - docs/Models/Requests/GetWatchlistResponse.md - docs/Models/Errors/Errors.md - docs/Models/Errors/GetServerCapabilitiesResponseBody.md - docs/Models/Errors/GetServerPreferencesErrors.md @@ -972,12 +1018,13 @@ generatedFiles: - docs/Models/Errors/GetAvailableClientsResponseBody.md - docs/Models/Errors/GetDevicesErrors.md - docs/Models/Errors/GetDevicesResponseBody.md - - docs/Models/Errors/GetServerIdentityErrors.md - docs/Models/Errors/GetServerIdentityResponseBody.md - docs/Models/Errors/GetMyPlexAccountErrors.md - docs/Models/Errors/GetMyPlexAccountResponseBody.md - docs/Models/Errors/GetResizedPhotoErrors.md - docs/Models/Errors/GetResizedPhotoResponseBody.md + - docs/Models/Errors/GetMediaProvidersErrors.md + - docs/Models/Errors/GetMediaProvidersResponseBody.md - docs/Models/Errors/GetServerListErrors.md - docs/Models/Errors/GetServerListResponseBody.md - docs/Models/Errors/MarkPlayedErrors.md @@ -986,6 +1033,10 @@ generatedFiles: - docs/Models/Errors/MarkUnplayedResponseBody.md - docs/Models/Errors/UpdatePlayProgressErrors.md - docs/Models/Errors/UpdatePlayProgressResponseBody.md + - docs/Models/Errors/GetBannerImageErrors.md + - docs/Models/Errors/GetBannerImageResponseBody.md + - docs/Models/Errors/GetThumbImageErrors.md + - docs/Models/Errors/GetThumbImageResponseBody.md - docs/Models/Errors/GetTimelineErrors.md - docs/Models/Errors/GetTimelineResponseBody.md - docs/Models/Errors/StartUniversalTranscodeErrors.md @@ -1012,14 +1063,14 @@ generatedFiles: - docs/Models/Errors/GetGeoDataResponseBody.md - docs/Models/Errors/GetHomeDataErrors.md - docs/Models/Errors/GetHomeDataResponseBody.md - - docs/Models/Errors/GetResourcesErrors.md - - docs/Models/Errors/GetResourcesResponseBody.md + - docs/Models/Errors/GetServerResourcesErrors.md + - docs/Models/Errors/GetServerResourcesResponseBody.md - docs/Models/Errors/GetPinErrors.md - docs/Models/Errors/GetPinResponseBody.md + - docs/Models/Errors/GetTokenByPinIdPlexErrors.md + - docs/Models/Errors/GetTokenByPinIdPlexResponseBody.md - docs/Models/Errors/GetTokenByPinIdErrors.md - docs/Models/Errors/GetTokenByPinIdResponseBody.md - - docs/Models/Errors/GetUserDetailsErrors.md - - docs/Models/Errors/GetUserDetailsResponseBody.md - docs/Models/Errors/GetGlobalHubsErrors.md - docs/Models/Errors/GetGlobalHubsResponseBody.md - docs/Models/Errors/GetLibraryHubsErrors.md @@ -1044,14 +1095,18 @@ generatedFiles: - docs/Models/Errors/GetLibraryItemsResponseBody.md - docs/Models/Errors/GetRefreshLibraryMetadataErrors.md - docs/Models/Errors/GetRefreshLibraryMetadataResponseBody.md - - docs/Models/Errors/SearchLibraryErrors.md - - docs/Models/Errors/SearchLibraryResponseBody.md - - docs/Models/Errors/GetMetadataErrors.md - - docs/Models/Errors/GetMetadataResponseBody.md + - docs/Models/Errors/GetSearchLibraryErrors.md + - docs/Models/Errors/GetSearchLibraryResponseBody.md + - docs/Models/Errors/GetMetaDataByRatingKeyErrors.md + - docs/Models/Errors/GetMetaDataByRatingKeyResponseBody.md - docs/Models/Errors/GetMetadataChildrenErrors.md - docs/Models/Errors/GetMetadataChildrenResponseBody.md + - docs/Models/Errors/GetTopWatchedContentErrors.md + - docs/Models/Errors/GetTopWatchedContentResponseBody.md - docs/Models/Errors/GetOnDeckErrors.md - docs/Models/Errors/GetOnDeckResponseBody.md + - docs/Models/Errors/GetWatchListErrors.md + - docs/Models/Errors/GetWatchListResponseBody.md - docs/Models/Errors/LogLineErrors.md - docs/Models/Errors/LogLineResponseBody.md - docs/Models/Errors/LogMultiLineErrors.md @@ -1080,6 +1135,8 @@ generatedFiles: - docs/Models/Errors/GetTransientTokenResponseBody.md - docs/Models/Errors/GetSourceConnectionInformationErrors.md - docs/Models/Errors/GetSourceConnectionInformationResponseBody.md + - docs/Models/Errors/GetUserDetailsErrors.md + - docs/Models/Errors/GetUserDetailsResponseBody.md - docs/Models/Errors/PostUsersSignInDataErrors.md - docs/Models/Errors/PostUsersSignInDataResponseBody.md - docs/Models/Errors/GetStatisticsErrors.md @@ -1102,8 +1159,6 @@ generatedFiles: - docs/Models/Errors/CheckForUpdatesResponseBody.md - docs/Models/Errors/ApplyUpdatesErrors.md - docs/Models/Errors/ApplyUpdatesResponseBody.md - - docs/Models/Errors/GetWatchlistErrors.md - - docs/Models/Errors/GetWatchlistResponseBody.md - docs/Models/Components/Security.md - docs/sdks/plexapi/README.md - docs/sdks/server/README.md @@ -1115,13 +1170,13 @@ generatedFiles: - docs/sdks/hubs/README.md - docs/sdks/search/README.md - docs/sdks/library/README.md + - docs/sdks/watchlist/README.md - docs/sdks/log/README.md - docs/sdks/playlists/README.md - docs/sdks/authentication/README.md - docs/sdks/statistics/README.md - docs/sdks/sessions/README.md - docs/sdks/updater/README.md - - docs/sdks/watchlist/README.md - NUGET.md - USAGE.md - .gitattributes diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 1b1dcdf..3dcf383 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true csharp: - version: 0.4.2 + version: 0.5.0 additionalDependencies: [] author: LukeHagar clientServerStatusCodesAsErrors: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 92d3464..a8acf35 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.383.2 +speakeasyVersion: 1.390.7 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:c6e5a38f9c953eb820ac1b5cb6d5aade8ee11a7bdb5b568147fd677d61b3a3c5 - sourceBlobDigest: sha256:730391fe626304e22e265f9470902fc083d5e6110d20d87cdc3ac7da6b4982de + sourceRevisionDigest: sha256:b6aa1692c74a84d3ce118d305f77944189e0749c6f95a2c57bddb8c606ab8df6 + sourceBlobDigest: sha256:370cb4409748c4811372a81d94f1a84f60b538087c23f2cb24f72082bcc827f6 tags: - latest - main @@ -11,8 +11,8 @@ targets: plexcsharp: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:c6e5a38f9c953eb820ac1b5cb6d5aade8ee11a7bdb5b568147fd677d61b3a3c5 - sourceBlobDigest: sha256:730391fe626304e22e265f9470902fc083d5e6110d20d87cdc3ac7da6b4982de + sourceRevisionDigest: sha256:b6aa1692c74a84d3ce118d305f77944189e0749c6f95a2c57bddb8c606ab8df6 + sourceBlobDigest: sha256:370cb4409748c4811372a81d94f1a84f60b538087c23f2cb24f72082bcc827f6 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 @@ -20,7 +20,7 @@ workflow: sources: my-source: inputs: - - location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml + - location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/output/plex-media-server-spec-dereferenced.yaml registry: location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source targets: diff --git a/NUGET.md b/NUGET.md index 4a4241f..82f94c9 100644 --- a/NUGET.md +++ b/NUGET.md @@ -12,7 +12,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Server.GetServerCapabilitiesAsync(); @@ -21,6 +21,53 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); ``` + +## Global Parameters + +## Global Parameters + +A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed. + +For example, you can set `X-Plex-Client-Identifier` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetServerResources`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration. + + +### Available Globals + +The following global parameter is available. + +| Name | Type | Required | Description | +| ---- | ---- |:--------:| ----------- | +| xPlexClientIdentifier | string | | The unique identifier for the client application +This is used to track the client application and its usage +(UUID, serial number, or other number unique per device) + | + + +### Example + +```csharp +using PlexAPI; +using PlexAPI.Models.Requests; +using PlexAPI.Models.Components; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" +); + +GetServerResourcesRequest req = new GetServerResourcesRequest() { + XPlexToken = "CV5xoxjTpFKUzBTShsaf", + IncludeHttps = PlexAPI.Models.Requests.IncludeHttps.One, + IncludeRelay = PlexAPI.Models.Requests.IncludeRelay.One, + IncludeIPv6 = PlexAPI.Models.Requests.IncludeIPv6.One, +}; + +var res = await sdk.Plex.GetServerResourcesAsync(req); + +// handle response +``` + + ## Error Handling @@ -41,7 +88,7 @@ using PlexAPI.Models.Errors; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); try @@ -73,7 +120,7 @@ You can override the default server globally by passing a server index to the `s | # | Server | Variables | | - | ------ | --------- | -| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) | +| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `https`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) | @@ -98,7 +145,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Plex.GetCompanionsDataAsync(serverUrl: "https://plex.tv/api/v2"); @@ -125,7 +172,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Server.GetServerCapabilitiesAsync(); diff --git a/PlexAPI/Activities.cs b/PlexAPI/Activities.cs index c8cbc50..0c74c2d 100644 --- a/PlexAPI/Activities.cs +++ b/PlexAPI/Activities.cs @@ -74,10 +74,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/PlexAPI/Authentication.cs b/PlexAPI/Authentication.cs index 773f405..4e89724 100644 --- a/PlexAPI/Authentication.cs +++ b/PlexAPI/Authentication.cs @@ -53,6 +53,15 @@ namespace PlexAPI /// Task GetSourceConnectionInformationAsync(string source); + /// + /// Get User Data By Token + /// + /// + /// Get the User data from the provided X-Plex-Token + /// + /// + Task GetUserDetailsAsync(string xPlexToken, string? serverUrl = null); + /// /// Get User SignIn Data /// @@ -72,6 +81,12 @@ namespace PlexAPI /// public class Authentication: IAuthentication { + /// + /// List of server URLs available for the getUserDetails operation. + /// + public static readonly string[] GetUserDetailsServerList = { + "https://plex.tv/api/v2", + }; /// /// List of server URLs available for the post-users-sign-in-data operation. /// @@ -80,10 +95,10 @@ namespace PlexAPI }; public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -267,6 +282,106 @@ namespace PlexAPI } } + public async Task GetUserDetailsAsync(string xPlexToken, string? serverUrl = null) + { + var request = new GetUserDetailsRequest() + { + XPlexToken = xPlexToken, + }; + string baseUrl = Utilities.TemplateUrl(GetUserDetailsServerList[0], new Dictionary(){ + }); + if (serverUrl != null) + { + baseUrl = serverUrl; + } + var urlString = URLBuilder.Build(baseUrl, "/user", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("getUserDetails", null, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetUserDetailsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.UserPlexAccount = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 401) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + obj!.RawResponse = httpResponse; + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + public async Task PostUsersSignInDataAsync(string? xPlexClientIdentifier = null, PostUsersSignInDataRequestBody? requestBody = null, string? serverUrl = null) { var request = new PostUsersSignInDataRequest() @@ -282,12 +397,10 @@ namespace PlexAPI { baseUrl = serverUrl; } - - var urlString = baseUrl + "/users/signin"; + var urlString = URLBuilder.Build(baseUrl, "/users/signin", request); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - HeaderSerializer.PopulateHeaders(ref httpRequest, request); var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "form", false, true); if (serializedBody != null) diff --git a/PlexAPI/Butler.cs b/PlexAPI/Butler.cs index 6c44fa7..925b2f0 100644 --- a/PlexAPI/Butler.cs +++ b/PlexAPI/Butler.cs @@ -101,10 +101,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/PlexAPI/Hubs.cs b/PlexAPI/Hubs.cs index 1143675..864e075 100644 --- a/PlexAPI/Hubs.cs +++ b/PlexAPI/Hubs.cs @@ -63,10 +63,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/PlexAPI/Library.cs b/PlexAPI/Library.cs index 2dc9d69..9395712 100644 --- a/PlexAPI/Library.cs +++ b/PlexAPI/Library.cs @@ -49,7 +49,7 @@ namespace PlexAPI /// /// /// - Task GetRecentlyAddedAsync(); + Task GetRecentlyAddedAsync(int? xPlexContainerStart = null, int? xPlexContainerSize = null); /// /// Get All Libraries @@ -112,7 +112,7 @@ namespace PlexAPI /// /// /// - Task GetLibraryDetailsAsync(double sectionId, IncludeDetails? includeDetails = null); + Task GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = null); /// /// Delete Library Section @@ -121,7 +121,7 @@ namespace PlexAPI /// Delete a library using a specific section id /// /// - Task DeleteLibraryAsync(double sectionId); + Task DeleteLibraryAsync(int sectionKey); /// /// Get Library Items @@ -150,7 +150,7 @@ namespace PlexAPI /// /// /// - Task GetLibraryItemsAsync(object sectionId, Tag tag, long? includeGuids = null); + Task GetLibraryItemsAsync(GetLibraryItemsRequest request); /// /// Refresh Metadata Of The Library @@ -160,7 +160,7 @@ namespace PlexAPI /// /// /// - Task GetRefreshLibraryMetadataAsync(double sectionId, Force? force = null); + Task GetRefreshLibraryMetadataAsync(int sectionKey, Force? force = null); /// /// Search Library @@ -187,17 +187,17 @@ namespace PlexAPI /// /// /// - Task SearchLibraryAsync(long sectionId, Models.Requests.Type type); + Task GetSearchLibraryAsync(int sectionKey, QueryParamType type); /// - /// Get Items Metadata + /// Get Metadata by RatingKey /// /// /// This endpoint will return the metadata of a library item specified with the ratingKey.
/// ///
///
- Task GetMetadataAsync(double ratingKey); + Task GetMetaDataByRatingKeyAsync(long ratingKey); /// /// Get Items Children @@ -217,7 +217,7 @@ namespace PlexAPI /// /// /// - Task GetTopWatchedContentAsync(long type, long? includeGuids = null); + Task GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null); /// /// Get On Deck @@ -241,10 +241,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -343,11 +343,15 @@ namespace PlexAPI } } - public async Task GetRecentlyAddedAsync() + public async Task GetRecentlyAddedAsync(int? xPlexContainerStart = null, int? xPlexContainerSize = null) { + var request = new GetRecentlyAddedRequest() + { + XPlexContainerStart = xPlexContainerStart, + XPlexContainerSize = xPlexContainerSize, + }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - - var urlString = baseUrl + "/library/recentlyAdded"; + var urlString = URLBuilder.Build(baseUrl, "/library/recentlyAdded", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); @@ -527,15 +531,15 @@ namespace PlexAPI } } - public async Task GetLibraryDetailsAsync(double sectionId, IncludeDetails? includeDetails = null) + public async Task GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = null) { var request = new GetLibraryDetailsRequest() { - SectionId = sectionId, + SectionKey = sectionKey, IncludeDetails = includeDetails, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}", request); + var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); @@ -623,14 +627,14 @@ namespace PlexAPI } } - public async Task DeleteLibraryAsync(double sectionId) + public async Task DeleteLibraryAsync(int sectionKey) { var request = new DeleteLibraryRequest() { - SectionId = sectionId, + SectionKey = sectionKey, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}", request); + var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", _userAgent); @@ -708,16 +712,10 @@ namespace PlexAPI } } - public async Task GetLibraryItemsAsync(object sectionId, Tag tag, long? includeGuids = null) + public async Task GetLibraryItemsAsync(GetLibraryItemsRequest request) { - var request = new GetLibraryItemsRequest() - { - SectionId = sectionId, - Tag = tag, - IncludeGuids = includeGuids, - }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}/{tag}", request); + var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/{tag}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); @@ -727,7 +725,7 @@ namespace PlexAPI httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getLibraryItems", null, _securitySource); + var hookCtx = new HookContext("get-library-items", null, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -805,15 +803,15 @@ namespace PlexAPI } } - public async Task GetRefreshLibraryMetadataAsync(double sectionId, Force? force = null) + public async Task GetRefreshLibraryMetadataAsync(int sectionKey, Force? force = null) { var request = new GetRefreshLibraryMetadataRequest() { - SectionId = sectionId, + SectionKey = sectionKey, Force = force, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}/refresh", request); + var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/refresh", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); @@ -891,15 +889,15 @@ namespace PlexAPI } } - public async Task SearchLibraryAsync(long sectionId, Models.Requests.Type type) + public async Task GetSearchLibraryAsync(int sectionKey, QueryParamType type) { - var request = new SearchLibraryRequest() + var request = new GetSearchLibraryRequest() { - SectionId = sectionId, + SectionKey = sectionKey, Type = type, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}/search", request); + var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/search", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); @@ -909,7 +907,7 @@ namespace PlexAPI httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("searchLibrary", null, _securitySource); + var hookCtx = new HookContext("get-search-library", null, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -949,8 +947,8 @@ namespace PlexAPI { if(Utilities.IsContentTypeMatch("application/json", contentType)) { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); - var response = new SearchLibraryResponse() + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetSearchLibraryResponse() { StatusCode = responseStatusCode, ContentType = contentType, @@ -972,7 +970,7 @@ namespace PlexAPI { if(Utilities.IsContentTypeMatch("application/json", contentType)) { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); obj!.RawResponse = httpResponse; throw obj!; } @@ -987,9 +985,9 @@ namespace PlexAPI } } - public async Task GetMetadataAsync(double ratingKey) + public async Task GetMetaDataByRatingKeyAsync(long ratingKey) { - var request = new GetMetadataRequest() + var request = new GetMetaDataByRatingKeyRequest() { RatingKey = ratingKey, }; @@ -1004,7 +1002,7 @@ namespace PlexAPI httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getMetadata", null, _securitySource); + var hookCtx = new HookContext("get-meta-data-by-rating-key", null, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -1044,8 +1042,8 @@ namespace PlexAPI { if(Utilities.IsContentTypeMatch("application/json", contentType)) { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); - var response = new GetMetadataResponse() + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetMetaDataByRatingKeyResponse() { StatusCode = responseStatusCode, ContentType = contentType, @@ -1067,7 +1065,7 @@ namespace PlexAPI { if(Utilities.IsContentTypeMatch("application/json", contentType)) { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); obj!.RawResponse = httpResponse; throw obj!; } @@ -1178,7 +1176,7 @@ namespace PlexAPI } } - public async Task GetTopWatchedContentAsync(long type, long? includeGuids = null) + public async Task GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null) { var request = new GetTopWatchedContentRequest() { @@ -1206,7 +1204,7 @@ namespace PlexAPI httpResponse = await _client.SendAsync(httpRequest); int _statusCode = (int)httpResponse.StatusCode; - if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) { var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); if (_httpResponse != null) @@ -1236,7 +1234,7 @@ namespace PlexAPI { if(Utilities.IsContentTypeMatch("application/json", contentType)) { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); var response = new GetTopWatchedContentResponse() { StatusCode = responseStatusCode, @@ -1251,10 +1249,23 @@ namespace PlexAPI throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } - else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) { throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } + else if(responseStatusCode == 401) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + obj!.RawResponse = httpResponse; + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } else { throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); diff --git a/PlexAPI/Log.cs b/PlexAPI/Log.cs index 6701368..190a3b3 100644 --- a/PlexAPI/Log.cs +++ b/PlexAPI/Log.cs @@ -94,10 +94,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/PlexAPI/Media.cs b/PlexAPI/Media.cs index 496603c..65dfefe 100644 --- a/PlexAPI/Media.cs +++ b/PlexAPI/Media.cs @@ -59,6 +59,24 @@ namespace PlexAPI /// /// Task UpdatePlayProgressAsync(string key, double time, string state); + + /// + /// Get Banner Image + /// + /// + /// Gets the banner image of the media item + /// + /// + Task GetBannerImageAsync(GetBannerImageRequest request); + + /// + /// Get Thumb Image + /// + /// + /// Gets the thumbnail image of the media item + /// + /// + Task GetThumbImageAsync(GetThumbImageRequest request); } /// @@ -72,10 +90,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -344,5 +362,185 @@ namespace PlexAPI throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } + + public async Task GetBannerImageAsync(GetBannerImageRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/banner", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-banner-image", null, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("image/jpeg", contentType)) + { + var response = new GetBannerImageResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Bytes = await httpResponse.Content.ReadAsByteArrayAsync(); + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 401) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + obj!.RawResponse = httpResponse; + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetThumbImageAsync(GetThumbImageRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/thumb", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-thumb-image", null, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("image/jpeg", contentType)) + { + var response = new GetThumbImageResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Bytes = await httpResponse.Content.ReadAsByteArrayAsync(); + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 401) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + obj!.RawResponse = httpResponse; + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } } } \ No newline at end of file diff --git a/PlexAPI/Models/Components/Security.cs b/PlexAPI/Models/Components/Security.cs index 7cf8116..8eb74fa 100644 --- a/PlexAPI/Models/Components/Security.cs +++ b/PlexAPI/Models/Components/Security.cs @@ -14,7 +14,7 @@ namespace PlexAPI.Models.Components public class Security { - [SpeakeasyMetadata("security:scheme=true,type=apiKey,subType=header,name=X-Plex-Token")] + [SpeakeasyMetadata("security:scheme=true,type=apiKey,subType=query,name=X-Plex-Token")] public string? AccessToken { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Errors/GetResourcesErrors.cs b/PlexAPI/Models/Errors/GetBannerImageErrors.cs similarity index 95% rename from PlexAPI/Models/Errors/GetResourcesErrors.cs rename to PlexAPI/Models/Errors/GetBannerImageErrors.cs index da1bed7..0235c00 100644 --- a/PlexAPI/Models/Errors/GetResourcesErrors.cs +++ b/PlexAPI/Models/Errors/GetBannerImageErrors.cs @@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors using Newtonsoft.Json; using PlexAPI.Utils; - public class GetResourcesErrors + public class GetBannerImageErrors { [JsonProperty("code")] diff --git a/PlexAPI/Models/Errors/SearchLibraryResponseBody.cs b/PlexAPI/Models/Errors/GetBannerImageResponseBody.cs similarity index 89% rename from PlexAPI/Models/Errors/SearchLibraryResponseBody.cs rename to PlexAPI/Models/Errors/GetBannerImageResponseBody.cs index e8dd47d..4c9cfcb 100644 --- a/PlexAPI/Models/Errors/SearchLibraryResponseBody.cs +++ b/PlexAPI/Models/Errors/GetBannerImageResponseBody.cs @@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors /// /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. /// - public class SearchLibraryResponseBody : Exception + public class GetBannerImageResponseBody : Exception { [JsonProperty("errors")] - public List? Errors { get; set; } + public List? Errors { get; set; } /// /// Raw HTTP response; suitable for custom response parsing diff --git a/PlexAPI/Models/Errors/GetServerIdentityErrors.cs b/PlexAPI/Models/Errors/GetMediaProvidersErrors.cs similarity index 94% rename from PlexAPI/Models/Errors/GetServerIdentityErrors.cs rename to PlexAPI/Models/Errors/GetMediaProvidersErrors.cs index 87b2cb3..6e9b1eb 100644 --- a/PlexAPI/Models/Errors/GetServerIdentityErrors.cs +++ b/PlexAPI/Models/Errors/GetMediaProvidersErrors.cs @@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors using Newtonsoft.Json; using PlexAPI.Utils; - public class GetServerIdentityErrors + public class GetMediaProvidersErrors { [JsonProperty("code")] diff --git a/PlexAPI/Models/Errors/GetMediaProvidersResponseBody.cs b/PlexAPI/Models/Errors/GetMediaProvidersResponseBody.cs new file mode 100644 index 0000000..159b8bb --- /dev/null +++ b/PlexAPI/Models/Errors/GetMediaProvidersResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Errors +{ + using Newtonsoft.Json; + using PlexAPI.Models.Errors; + using PlexAPI.Utils; + using System.Collections.Generic; + using System.Net.Http; + using System; + + /// + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + /// + public class GetMediaProvidersResponseBody : Exception + { + + [JsonProperty("errors")] + public List? Errors { get; set; } + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + [JsonProperty("-")] + public HttpResponseMessage? RawResponse { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Errors/GetMetaDataByRatingKeyErrors.cs b/PlexAPI/Models/Errors/GetMetaDataByRatingKeyErrors.cs new file mode 100644 index 0000000..cf8043e --- /dev/null +++ b/PlexAPI/Models/Errors/GetMetaDataByRatingKeyErrors.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Errors +{ + using Newtonsoft.Json; + using PlexAPI.Utils; + + public class GetMetaDataByRatingKeyErrors + { + + [JsonProperty("code")] + public double? Code { get; set; } + + [JsonProperty("message")] + public string? Message { get; set; } + + [JsonProperty("status")] + public double? Status { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Errors/GetMetaDataByRatingKeyResponseBody.cs b/PlexAPI/Models/Errors/GetMetaDataByRatingKeyResponseBody.cs new file mode 100644 index 0000000..4ccb43c --- /dev/null +++ b/PlexAPI/Models/Errors/GetMetaDataByRatingKeyResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Errors +{ + using Newtonsoft.Json; + using PlexAPI.Models.Errors; + using PlexAPI.Utils; + using System.Collections.Generic; + using System.Net.Http; + using System; + + /// + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + /// + public class GetMetaDataByRatingKeyResponseBody : Exception + { + + [JsonProperty("errors")] + public List? Errors { get; set; } + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + [JsonProperty("-")] + public HttpResponseMessage? RawResponse { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Errors/SearchLibraryErrors.cs b/PlexAPI/Models/Errors/GetSearchLibraryErrors.cs similarity index 94% rename from PlexAPI/Models/Errors/SearchLibraryErrors.cs rename to PlexAPI/Models/Errors/GetSearchLibraryErrors.cs index 5174700..ccc015d 100644 --- a/PlexAPI/Models/Errors/SearchLibraryErrors.cs +++ b/PlexAPI/Models/Errors/GetSearchLibraryErrors.cs @@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors using Newtonsoft.Json; using PlexAPI.Utils; - public class SearchLibraryErrors + public class GetSearchLibraryErrors { [JsonProperty("code")] diff --git a/PlexAPI/Models/Errors/GetResourcesResponseBody.cs b/PlexAPI/Models/Errors/GetSearchLibraryResponseBody.cs similarity index 88% rename from PlexAPI/Models/Errors/GetResourcesResponseBody.cs rename to PlexAPI/Models/Errors/GetSearchLibraryResponseBody.cs index 3543600..2b71330 100644 --- a/PlexAPI/Models/Errors/GetResourcesResponseBody.cs +++ b/PlexAPI/Models/Errors/GetSearchLibraryResponseBody.cs @@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors /// /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. /// - public class GetResourcesResponseBody : Exception + public class GetSearchLibraryResponseBody : Exception { [JsonProperty("errors")] - public List? Errors { get; set; } + public List? Errors { get; set; } /// /// Raw HTTP response; suitable for custom response parsing diff --git a/PlexAPI/Models/Errors/GetServerIdentityResponseBody.cs b/PlexAPI/Models/Errors/GetServerIdentityResponseBody.cs index 3a758cf..cab7594 100644 --- a/PlexAPI/Models/Errors/GetServerIdentityResponseBody.cs +++ b/PlexAPI/Models/Errors/GetServerIdentityResponseBody.cs @@ -10,20 +10,22 @@ namespace PlexAPI.Models.Errors { using Newtonsoft.Json; - using PlexAPI.Models.Errors; using PlexAPI.Utils; - using System.Collections.Generic; using System.Net.Http; using System; /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + /// Request Timeout /// public class GetServerIdentityResponseBody : Exception { - [JsonProperty("errors")] - public List? Errors { get; set; } + [JsonProperty("code")] + public long? Code { get; set; } + + [JsonProperty("message")] + private string? _message { get; set; } + public override string Message { get {return _message ?? "";} } /// /// Raw HTTP response; suitable for custom response parsing diff --git a/PlexAPI/Models/Errors/GetServerResourcesErrors.cs b/PlexAPI/Models/Errors/GetServerResourcesErrors.cs new file mode 100644 index 0000000..129ebb1 --- /dev/null +++ b/PlexAPI/Models/Errors/GetServerResourcesErrors.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Errors +{ + using Newtonsoft.Json; + using PlexAPI.Utils; + + public class GetServerResourcesErrors + { + + [JsonProperty("code")] + public double? Code { get; set; } + + [JsonProperty("message")] + public string? Message { get; set; } + + [JsonProperty("status")] + public double? Status { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Errors/GetServerResourcesResponseBody.cs b/PlexAPI/Models/Errors/GetServerResourcesResponseBody.cs new file mode 100644 index 0000000..9baf994 --- /dev/null +++ b/PlexAPI/Models/Errors/GetServerResourcesResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Errors +{ + using Newtonsoft.Json; + using PlexAPI.Models.Errors; + using PlexAPI.Utils; + using System.Collections.Generic; + using System.Net.Http; + using System; + + /// + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + /// + public class GetServerResourcesResponseBody : Exception + { + + [JsonProperty("errors")] + public List? Errors { get; set; } + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + [JsonProperty("-")] + public HttpResponseMessage? RawResponse { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Errors/GetWatchlistErrors.cs b/PlexAPI/Models/Errors/GetThumbImageErrors.cs similarity index 95% rename from PlexAPI/Models/Errors/GetWatchlistErrors.cs rename to PlexAPI/Models/Errors/GetThumbImageErrors.cs index 464279a..a4a3fc9 100644 --- a/PlexAPI/Models/Errors/GetWatchlistErrors.cs +++ b/PlexAPI/Models/Errors/GetThumbImageErrors.cs @@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors using Newtonsoft.Json; using PlexAPI.Utils; - public class GetWatchlistErrors + public class GetThumbImageErrors { [JsonProperty("code")] diff --git a/PlexAPI/Models/Errors/GetMetadataResponseBody.cs b/PlexAPI/Models/Errors/GetThumbImageResponseBody.cs similarity index 89% rename from PlexAPI/Models/Errors/GetMetadataResponseBody.cs rename to PlexAPI/Models/Errors/GetThumbImageResponseBody.cs index aaefc32..aa63a95 100644 --- a/PlexAPI/Models/Errors/GetMetadataResponseBody.cs +++ b/PlexAPI/Models/Errors/GetThumbImageResponseBody.cs @@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors /// /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. /// - public class GetMetadataResponseBody : Exception + public class GetThumbImageResponseBody : Exception { [JsonProperty("errors")] - public List? Errors { get; set; } + public List? Errors { get; set; } /// /// Raw HTTP response; suitable for custom response parsing diff --git a/PlexAPI/Models/Errors/GetTokenByPinIdErrors.cs b/PlexAPI/Models/Errors/GetTokenByPinIdErrors.cs index de5f4f3..7c92530 100644 --- a/PlexAPI/Models/Errors/GetTokenByPinIdErrors.cs +++ b/PlexAPI/Models/Errors/GetTokenByPinIdErrors.cs @@ -20,5 +20,8 @@ namespace PlexAPI.Models.Errors [JsonProperty("message")] public string? Message { get; set; } + + [JsonProperty("status")] + public long? Status { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Errors/GetTokenByPinIdPlexErrors.cs b/PlexAPI/Models/Errors/GetTokenByPinIdPlexErrors.cs new file mode 100644 index 0000000..859c552 --- /dev/null +++ b/PlexAPI/Models/Errors/GetTokenByPinIdPlexErrors.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 PlexAPI.Models.Errors +{ + using Newtonsoft.Json; + using PlexAPI.Utils; + + public class GetTokenByPinIdPlexErrors + { + + [JsonProperty("code")] + public long? Code { get; set; } + + [JsonProperty("message")] + public string? Message { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Errors/GetTokenByPinIdPlexResponseBody.cs b/PlexAPI/Models/Errors/GetTokenByPinIdPlexResponseBody.cs new file mode 100644 index 0000000..46cabae --- /dev/null +++ b/PlexAPI/Models/Errors/GetTokenByPinIdPlexResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Errors +{ + using Newtonsoft.Json; + using PlexAPI.Models.Errors; + using PlexAPI.Utils; + using System.Collections.Generic; + using System.Net.Http; + using System; + + /// + /// Not Found or Expired + /// + public class GetTokenByPinIdPlexResponseBody : Exception + { + + [JsonProperty("errors")] + public List? Errors { get; set; } + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + [JsonProperty("-")] + public HttpResponseMessage? RawResponse { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Errors/GetTokenByPinIdResponseBody.cs b/PlexAPI/Models/Errors/GetTokenByPinIdResponseBody.cs index d6d6755..8c0ede3 100644 --- a/PlexAPI/Models/Errors/GetTokenByPinIdResponseBody.cs +++ b/PlexAPI/Models/Errors/GetTokenByPinIdResponseBody.cs @@ -17,7 +17,7 @@ namespace PlexAPI.Models.Errors using System; /// - /// Not Found or Expired + /// Bad Request response when the X-Plex-Client-Identifier is missing /// public class GetTokenByPinIdResponseBody : Exception { diff --git a/PlexAPI/Models/Errors/GetTopWatchedContentErrors.cs b/PlexAPI/Models/Errors/GetTopWatchedContentErrors.cs new file mode 100644 index 0000000..8d474f6 --- /dev/null +++ b/PlexAPI/Models/Errors/GetTopWatchedContentErrors.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Errors +{ + using Newtonsoft.Json; + using PlexAPI.Utils; + + public class GetTopWatchedContentErrors + { + + [JsonProperty("code")] + public double? Code { get; set; } + + [JsonProperty("message")] + public string? Message { get; set; } + + [JsonProperty("status")] + public double? Status { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Errors/GetTopWatchedContentResponseBody.cs b/PlexAPI/Models/Errors/GetTopWatchedContentResponseBody.cs new file mode 100644 index 0000000..afb92bd --- /dev/null +++ b/PlexAPI/Models/Errors/GetTopWatchedContentResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Errors +{ + using Newtonsoft.Json; + using PlexAPI.Models.Errors; + using PlexAPI.Utils; + using System.Collections.Generic; + using System.Net.Http; + using System; + + /// + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + /// + public class GetTopWatchedContentResponseBody : Exception + { + + [JsonProperty("errors")] + public List? Errors { get; set; } + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + [JsonProperty("-")] + public HttpResponseMessage? RawResponse { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Errors/GetMetadataErrors.cs b/PlexAPI/Models/Errors/GetWatchListErrors.cs similarity index 95% rename from PlexAPI/Models/Errors/GetMetadataErrors.cs rename to PlexAPI/Models/Errors/GetWatchListErrors.cs index 514590c..d4c6857 100644 --- a/PlexAPI/Models/Errors/GetMetadataErrors.cs +++ b/PlexAPI/Models/Errors/GetWatchListErrors.cs @@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors using Newtonsoft.Json; using PlexAPI.Utils; - public class GetMetadataErrors + public class GetWatchListErrors { [JsonProperty("code")] diff --git a/PlexAPI/Models/Errors/GetWatchlistResponseBody.cs b/PlexAPI/Models/Errors/GetWatchListResponseBody.cs similarity index 89% rename from PlexAPI/Models/Errors/GetWatchlistResponseBody.cs rename to PlexAPI/Models/Errors/GetWatchListResponseBody.cs index 0b4f609..3531b46 100644 --- a/PlexAPI/Models/Errors/GetWatchlistResponseBody.cs +++ b/PlexAPI/Models/Errors/GetWatchListResponseBody.cs @@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors /// /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. /// - public class GetWatchlistResponseBody : Exception + public class GetWatchListResponseBody : Exception { [JsonProperty("errors")] - public List? Errors { get; set; } + public List? Errors { get; set; } /// /// Raw HTTP response; suitable for custom response parsing diff --git a/PlexAPI/Models/Requests/ApplyUpdatesRequest.cs b/PlexAPI/Models/Requests/ApplyUpdatesRequest.cs index ec54b54..72597d9 100644 --- a/PlexAPI/Models/Requests/ApplyUpdatesRequest.cs +++ b/PlexAPI/Models/Requests/ApplyUpdatesRequest.cs @@ -22,7 +22,7 @@ namespace PlexAPI.Models.Requests public Tonight? Tonight { get; set; } /// - /// Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. + /// Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=skip")] public Skip? Skip { get; set; } diff --git a/PlexAPI/Models/Requests/Connections.cs b/PlexAPI/Models/Requests/Connections.cs index dbbb651..328fb04 100644 --- a/PlexAPI/Models/Requests/Connections.cs +++ b/PlexAPI/Models/Requests/Connections.cs @@ -16,24 +16,24 @@ namespace PlexAPI.Models.Requests { [JsonProperty("protocol")] - public string? Protocol { get; set; } + public string Protocol { get; set; } = default!; [JsonProperty("address")] - public string? Address { get; set; } + public string Address { get; set; } = default!; [JsonProperty("port")] - public double? Port { get; set; } + public double Port { get; set; } = default!; [JsonProperty("uri")] - public string? Uri { get; set; } + public string Uri { get; set; } = default!; [JsonProperty("local")] - public bool? Local { get; set; } + public bool Local { get; set; } = default!; [JsonProperty("relay")] - public bool? Relay { get; set; } + public bool Relay { get; set; } = default!; [JsonProperty("IPv6")] - public bool? IPv6 { get; set; } + public bool IPv6 { get; set; } = default!; } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/PathParamFilter.cs b/PlexAPI/Models/Requests/CreatePlaylistQueryParamType.cs similarity index 66% rename from PlexAPI/Models/Requests/PathParamFilter.cs rename to PlexAPI/Models/Requests/CreatePlaylistQueryParamType.cs index 8bb4c61..a512776 100644 --- a/PlexAPI/Models/Requests/PathParamFilter.cs +++ b/PlexAPI/Models/Requests/CreatePlaylistQueryParamType.cs @@ -14,28 +14,28 @@ namespace PlexAPI.Models.Requests using System; /// - /// Filter + /// type of playlist to create /// - public enum PathParamFilter + public enum CreatePlaylistQueryParamType { - [JsonProperty("all")] - All, - [JsonProperty("available")] - Available, - [JsonProperty("released")] - Released, + [JsonProperty("audio")] + Audio, + [JsonProperty("video")] + Video, + [JsonProperty("photo")] + Photo, } - public static class PathParamFilterExtension + public static class CreatePlaylistQueryParamTypeExtension { - public static string Value(this PathParamFilter value) + public static string Value(this CreatePlaylistQueryParamType value) { return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); } - public static PathParamFilter ToEnum(this string value) + public static CreatePlaylistQueryParamType ToEnum(this string value) { - foreach(var field in typeof(PathParamFilter).GetFields()) + foreach(var field in typeof(CreatePlaylistQueryParamType).GetFields()) { var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); if (attributes.Length == 0) @@ -48,14 +48,14 @@ namespace PlexAPI.Models.Requests { var enumVal = field.GetValue(null); - if (enumVal is PathParamFilter) + if (enumVal is CreatePlaylistQueryParamType) { - return (PathParamFilter)enumVal; + return (CreatePlaylistQueryParamType)enumVal; } } } - throw new Exception($"Unknown value {value} for enum PathParamFilter"); + throw new Exception($"Unknown value {value} for enum CreatePlaylistQueryParamType"); } } diff --git a/PlexAPI/Models/Requests/CreatePlaylistRequest.cs b/PlexAPI/Models/Requests/CreatePlaylistRequest.cs index a36d1ea..5de1892 100644 --- a/PlexAPI/Models/Requests/CreatePlaylistRequest.cs +++ b/PlexAPI/Models/Requests/CreatePlaylistRequest.cs @@ -25,7 +25,7 @@ namespace PlexAPI.Models.Requests /// type of playlist to create /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")] - public QueryParamType Type { get; set; } = default!; + public CreatePlaylistQueryParamType Type { get; set; } = default!; /// /// whether the playlist is smart or not diff --git a/PlexAPI/Models/Requests/DeleteLibraryRequest.cs b/PlexAPI/Models/Requests/DeleteLibraryRequest.cs index fe01aca..a002f67 100644 --- a/PlexAPI/Models/Requests/DeleteLibraryRequest.cs +++ b/PlexAPI/Models/Requests/DeleteLibraryRequest.cs @@ -15,9 +15,14 @@ namespace PlexAPI.Models.Requests { /// - /// The id of the library + /// The unique key of the Plex library.
+ /// + /// + /// Note: This is unique in the context of the Plex server.
+ /// + ///
///
- [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")] - public double SectionId { get; set; } = default!; + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")] + public int SectionKey { get; set; } = default!; } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Feature.cs b/PlexAPI/Models/Requests/Feature.cs new file mode 100644 index 0000000..e895af3 --- /dev/null +++ b/PlexAPI/Models/Requests/Feature.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 PlexAPI.Models.Requests +{ + using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; + using System.Collections.Generic; + + public class Feature + { + + [JsonProperty("key")] + public string? Key { get; set; } + + [JsonProperty("type")] + public string? Type { get; set; } + + [JsonProperty("Directory")] + public List? Directory { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Filter.cs b/PlexAPI/Models/Requests/Filter.cs index 858b132..050d0de 100644 --- a/PlexAPI/Models/Requests/Filter.cs +++ b/PlexAPI/Models/Requests/Filter.cs @@ -9,17 +9,54 @@ #nullable enable namespace PlexAPI.Models.Requests { + using Newtonsoft.Json; using PlexAPI.Utils; + using System; /// - /// Filters content by field and direction/equality
- /// - /// - /// (Unknown if viewedAt is the only supported column)
- /// - ///
+ /// Filter ///
- public class Filter + public enum Filter { + [JsonProperty("all")] + All, + [JsonProperty("available")] + Available, + [JsonProperty("released")] + Released, } + + public static class FilterExtension + { + public static string Value(this Filter value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static Filter ToEnum(this string value) + { + foreach(var field in typeof(Filter).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 Filter) + { + return (Filter)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum Filter"); + } + } + } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetBannerImageRequest.cs b/PlexAPI/Models/Requests/GetBannerImageRequest.cs new file mode 100644 index 0000000..7bbf1e5 --- /dev/null +++ b/PlexAPI/Models/Requests/GetBannerImageRequest.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 PlexAPI.Models.Requests +{ + using PlexAPI.Utils; + + public class GetBannerImageRequest + { + + /// + /// the id of the library item to return the children of. + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey")] + public long RatingKey { get; set; } = default!; + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=width")] + public long Width { get; set; } = default!; + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=height")] + public long Height { get; set; } = default!; + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=minSize")] + public long MinSize { get; set; } = default!; + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=upscale")] + public long Upscale { get; set; } = default!; + + /// + /// Plex Authentication Token + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")] + public string XPlexToken { get; set; } = default!; + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetBannerImageResponse.cs b/PlexAPI/Models/Requests/GetBannerImageResponse.cs new file mode 100644 index 0000000..c4e21cd --- /dev/null +++ b/PlexAPI/Models/Requests/GetBannerImageResponse.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using PlexAPI.Utils; + using System.Collections.Generic; + using System.Net.Http; + using System; + + public class GetBannerImageResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + + /// + /// Successful response returning an image + /// + public byte[]? Bytes { get; set; } + + public Dictionary> Headers { get; set; } = default!; + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetLibraryDetailsRequest.cs b/PlexAPI/Models/Requests/GetLibraryDetailsRequest.cs index cfe26e0..f3ae5c7 100644 --- a/PlexAPI/Models/Requests/GetLibraryDetailsRequest.cs +++ b/PlexAPI/Models/Requests/GetLibraryDetailsRequest.cs @@ -16,10 +16,15 @@ namespace PlexAPI.Models.Requests { /// - /// The id of the library + /// The unique key of the Plex library.
+ /// + /// + /// Note: This is unique in the context of the Plex server.
+ /// + ///
///
- [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")] - public double SectionId { get; set; } = default!; + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")] + public int SectionKey { get; set; } = default!; /// /// Whether or not to include details for a section (types, filters, and sorts).
diff --git a/PlexAPI/Models/Requests/GetLibraryItemsRequest.cs b/PlexAPI/Models/Requests/GetLibraryItemsRequest.cs index ebb3f82..9db872d 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsRequest.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsRequest.cs @@ -16,10 +16,15 @@ namespace PlexAPI.Models.Requests { /// - /// the Id of the library to query + /// The unique key of the Plex library.
+ /// + /// + /// Note: This is unique in the context of the Plex server.
+ /// + ///
///
- [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")] - public object SectionId { get; set; } = default!; + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")] + public int SectionKey { get; set; } = default!; /// /// A key representing a specific tag within the section. @@ -27,6 +32,21 @@ namespace PlexAPI.Models.Requests [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=tag")] public Tag Tag { get; set; } = default!; + /// + /// The type of media to retrieve.
+ /// + /// + /// 1 = movie
+ /// 2 = show
+ /// 3 = season
+ /// 4 = episode
+ /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")] + public Models.Requests.Type Type { get; set; } = default!; + /// /// Adds the Guids object to the response
/// @@ -35,6 +55,40 @@ namespace PlexAPI.Models.Requests /// ///
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGuids")] - public long? IncludeGuids { get; set; } + public IncludeGuids? IncludeGuids { get; set; } + + /// + /// Adds the Meta object to the response
+ /// + /// + /// + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeMeta")] + public IncludeMeta? IncludeMeta { get; set; } + + /// + /// The index of the first item to return. If not specified, the first item will be returned.
+ /// + /// + /// If the number of items exceeds the limit, the response will be paginated.
+ /// By default this is 0
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Start")] + public int? XPlexContainerStart { get; set; } = 0; + + /// + /// The number of items to return. If not specified, all items will be returned.
+ /// + /// + /// If the number of items exceeds the limit, the response will be paginated.
+ /// By default this is 50
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Size")] + public int? XPlexContainerSize { get; set; } = 50; } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMediaProvidersDirectory.cs b/PlexAPI/Models/Requests/GetMediaProvidersDirectory.cs new file mode 100644 index 0000000..ab678b1 --- /dev/null +++ b/PlexAPI/Models/Requests/GetMediaProvidersDirectory.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; + using System.Collections.Generic; + + public class GetMediaProvidersDirectory + { + + [JsonProperty("hubKey")] + public string? HubKey { get; set; } + + [JsonProperty("title")] + public string? Title { get; set; } + + [JsonProperty("agent")] + public string? Agent { get; set; } + + [JsonProperty("language")] + public string? Language { get; set; } + + [JsonProperty("refreshing")] + public bool? Refreshing { get; set; } + + [JsonProperty("scanner")] + public string? Scanner { get; set; } + + [JsonProperty("uuid")] + public string? Uuid { get; set; } + + [JsonProperty("id")] + public string? Id { get; set; } + + [JsonProperty("key")] + public string? Key { get; set; } + + [JsonProperty("type")] + public string? Type { get; set; } + + [JsonProperty("subtype")] + public string? Subtype { get; set; } + + [JsonProperty("updatedAt")] + public long? UpdatedAt { get; set; } + + [JsonProperty("scannedAt")] + public long? ScannedAt { get; set; } + + [JsonProperty("Pivot")] + public List? Pivot { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMediaProvidersMediaContainer.cs b/PlexAPI/Models/Requests/GetMediaProvidersMediaContainer.cs new file mode 100644 index 0000000..768a0cd --- /dev/null +++ b/PlexAPI/Models/Requests/GetMediaProvidersMediaContainer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; + using System.Collections.Generic; + + public class GetMediaProvidersMediaContainer + { + + [JsonProperty("size")] + public long? Size { get; set; } + + [JsonProperty("allowCameraUpload")] + public bool? AllowCameraUpload { get; set; } + + [JsonProperty("allowChannelAccess")] + public bool? AllowChannelAccess { get; set; } + + [JsonProperty("allowSharing")] + public bool? AllowSharing { get; set; } + + [JsonProperty("allowSync")] + public bool? AllowSync { get; set; } + + [JsonProperty("allowTuners")] + public bool? AllowTuners { get; set; } + + [JsonProperty("backgroundProcessing")] + public bool? BackgroundProcessing { get; set; } + + [JsonProperty("certificate")] + public bool? Certificate { get; set; } + + [JsonProperty("companionProxy")] + public bool? CompanionProxy { get; set; } + + [JsonProperty("countryCode")] + public string? CountryCode { get; set; } + + [JsonProperty("diagnostics")] + public string? Diagnostics { get; set; } + + [JsonProperty("eventStream")] + public bool? EventStream { get; set; } + + [JsonProperty("friendlyName")] + public string? FriendlyName { get; set; } + + [JsonProperty("livetv")] + public long? Livetv { get; set; } + + [JsonProperty("machineIdentifier")] + public string? MachineIdentifier { get; set; } + + [JsonProperty("musicAnalysis")] + public long? MusicAnalysis { get; set; } + + [JsonProperty("myPlex")] + public bool? MyPlex { get; set; } + + [JsonProperty("myPlexMappingState")] + public string? MyPlexMappingState { get; set; } + + [JsonProperty("myPlexSigninState")] + public string? MyPlexSigninState { get; set; } + + [JsonProperty("myPlexSubscription")] + public bool? MyPlexSubscription { get; set; } + + [JsonProperty("myPlexUsername")] + public string? MyPlexUsername { get; set; } + + [JsonProperty("offlineTranscode")] + public long? OfflineTranscode { get; set; } + + [JsonProperty("ownerFeatures")] + public string? OwnerFeatures { get; set; } + + [JsonProperty("platform")] + public string? Platform { get; set; } + + [JsonProperty("platformVersion")] + public string? PlatformVersion { get; set; } + + [JsonProperty("pluginHost")] + public bool? PluginHost { get; set; } + + [JsonProperty("pushNotifications")] + public bool? PushNotifications { get; set; } + + [JsonProperty("readOnlyLibraries")] + public bool? ReadOnlyLibraries { get; set; } + + [JsonProperty("streamingBrainABRVersion")] + public long? StreamingBrainABRVersion { get; set; } + + [JsonProperty("streamingBrainVersion")] + public long? StreamingBrainVersion { get; set; } + + [JsonProperty("sync")] + public bool? Sync { get; set; } + + [JsonProperty("transcoderActiveVideoSessions")] + public long? TranscoderActiveVideoSessions { get; set; } + + [JsonProperty("transcoderAudio")] + public bool? TranscoderAudio { get; set; } + + [JsonProperty("transcoderLyrics")] + public bool? TranscoderLyrics { get; set; } + + [JsonProperty("transcoderSubtitles")] + public bool? TranscoderSubtitles { get; set; } + + [JsonProperty("transcoderVideo")] + public bool? TranscoderVideo { get; set; } + + [JsonProperty("transcoderVideoBitrates")] + public string? TranscoderVideoBitrates { get; set; } + + [JsonProperty("transcoderVideoQualities")] + public string? TranscoderVideoQualities { get; set; } + + [JsonProperty("transcoderVideoResolutions")] + public string? TranscoderVideoResolutions { get; set; } + + [JsonProperty("updatedAt")] + public long? UpdatedAt { get; set; } + + [JsonProperty("updater")] + public bool? Updater { get; set; } + + [JsonProperty("version")] + public string? Version { get; set; } + + [JsonProperty("voiceSearch")] + public bool? VoiceSearch { get; set; } + + [JsonProperty("MediaProvider")] + public List? MediaProvider { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMediaProvidersRequest.cs b/PlexAPI/Models/Requests/GetMediaProvidersRequest.cs new file mode 100644 index 0000000..3b1ed82 --- /dev/null +++ b/PlexAPI/Models/Requests/GetMediaProvidersRequest.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using PlexAPI.Utils; + + public class GetMediaProvidersRequest + { + + /// + /// Plex Authentication Token + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")] + public string XPlexToken { get; set; } = default!; + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMediaProvidersResponse.cs b/PlexAPI/Models/Requests/GetMediaProvidersResponse.cs new file mode 100644 index 0000000..c532a88 --- /dev/null +++ b/PlexAPI/Models/Requests/GetMediaProvidersResponse.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using PlexAPI.Models.Requests; + using PlexAPI.Utils; + using System.Net.Http; + using System; + + public class GetMediaProvidersResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + + /// + /// Media providers and their features + /// + public Models.Requests.GetMediaProvidersResponseBody? Object { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMediaProvidersResponseBody.cs b/PlexAPI/Models/Requests/GetMediaProvidersResponseBody.cs new file mode 100644 index 0000000..7df161a --- /dev/null +++ b/PlexAPI/Models/Requests/GetMediaProvidersResponseBody.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; + + /// + /// Media providers and their features + /// + public class GetMediaProvidersResponseBody + { + + [JsonProperty("MediaContainer")] + public GetMediaProvidersMediaContainer? MediaContainer { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMetadataCountry.cs b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyCountry.cs similarity index 93% rename from PlexAPI/Models/Requests/GetMetadataCountry.cs rename to PlexAPI/Models/Requests/GetMetaDataByRatingKeyCountry.cs index ba2100d..4d3749f 100644 --- a/PlexAPI/Models/Requests/GetMetadataCountry.cs +++ b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyCountry.cs @@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests using Newtonsoft.Json; using PlexAPI.Utils; - public class GetMetadataCountry + public class GetMetaDataByRatingKeyCountry { [JsonProperty("id")] diff --git a/PlexAPI/Models/Requests/GetMetadataDirector.cs b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyDirector.cs similarity index 94% rename from PlexAPI/Models/Requests/GetMetadataDirector.cs rename to PlexAPI/Models/Requests/GetMetaDataByRatingKeyDirector.cs index e6755f5..1797c14 100644 --- a/PlexAPI/Models/Requests/GetMetadataDirector.cs +++ b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyDirector.cs @@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests using Newtonsoft.Json; using PlexAPI.Utils; - public class GetMetadataDirector + public class GetMetaDataByRatingKeyDirector { [JsonProperty("id")] diff --git a/PlexAPI/Models/Requests/GetMetadataGenre.cs b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyGenre.cs similarity index 94% rename from PlexAPI/Models/Requests/GetMetadataGenre.cs rename to PlexAPI/Models/Requests/GetMetaDataByRatingKeyGenre.cs index fc26054..2ecc0c9 100644 --- a/PlexAPI/Models/Requests/GetMetadataGenre.cs +++ b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyGenre.cs @@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests using Newtonsoft.Json; using PlexAPI.Utils; - public class GetMetadataGenre + public class GetMetaDataByRatingKeyGenre { [JsonProperty("id")] diff --git a/PlexAPI/Models/Requests/GetMetadataMedia.cs b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyMedia.cs similarity index 94% rename from PlexAPI/Models/Requests/GetMetadataMedia.cs rename to PlexAPI/Models/Requests/GetMetaDataByRatingKeyMedia.cs index c90c8fd..b4664e6 100644 --- a/PlexAPI/Models/Requests/GetMetadataMedia.cs +++ b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyMedia.cs @@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests using PlexAPI.Utils; using System.Collections.Generic; - public class GetMetadataMedia + public class GetMetaDataByRatingKeyMedia { [JsonProperty("id")] @@ -66,6 +66,6 @@ namespace PlexAPI.Models.Requests public string? VideoProfile { get; set; } [JsonProperty("Part")] - public List? Part { get; set; } + public List? Part { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMetadataMediaContainer.cs b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyMediaContainer.cs similarity index 91% rename from PlexAPI/Models/Requests/GetMetadataMediaContainer.cs rename to PlexAPI/Models/Requests/GetMetaDataByRatingKeyMediaContainer.cs index 1863a12..420a6f2 100644 --- a/PlexAPI/Models/Requests/GetMetadataMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyMediaContainer.cs @@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests using PlexAPI.Utils; using System.Collections.Generic; - public class GetMetadataMediaContainer + public class GetMetaDataByRatingKeyMediaContainer { [JsonProperty("size")] @@ -42,6 +42,6 @@ namespace PlexAPI.Models.Requests public int? MediaTagVersion { get; set; } [JsonProperty("Metadata")] - public List? Metadata { get; set; } + public List? Metadata { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMetadataMetadata.cs b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyMetadata.cs similarity index 86% rename from PlexAPI/Models/Requests/GetMetadataMetadata.cs rename to PlexAPI/Models/Requests/GetMetaDataByRatingKeyMetadata.cs index 7d43a3b..36faa73 100644 --- a/PlexAPI/Models/Requests/GetMetadataMetadata.cs +++ b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyMetadata.cs @@ -15,7 +15,7 @@ namespace PlexAPI.Models.Requests using PlexAPI.Utils; using System.Collections.Generic; - public class GetMetadataMetadata + public class GetMetaDataByRatingKeyMetadata { [JsonProperty("ratingKey")] @@ -91,13 +91,13 @@ namespace PlexAPI.Models.Requests public string? RatingImage { get; set; } [JsonProperty("Media")] - public List? Media { get; set; } + public List? Media { get; set; } [JsonProperty("Genre")] - public List? Genre { get; set; } + public List? Genre { get; set; } [JsonProperty("Country")] - public List? Country { get; set; } + public List? Country { get; set; } [JsonProperty("Guid")] public List? Guids { get; set; } @@ -106,13 +106,13 @@ namespace PlexAPI.Models.Requests public List? Ratings { get; set; } [JsonProperty("Director")] - public List? Director { get; set; } + public List? Director { get; set; } [JsonProperty("Writer")] - public List? Writer { get; set; } + public List? Writer { get; set; } [JsonProperty("Role")] - public List? Role { get; set; } + public List? Role { get; set; } [JsonProperty("Producer")] public List? Producer { get; set; } diff --git a/PlexAPI/Models/Requests/GetMetadataPart.cs b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyPart.cs similarity index 97% rename from PlexAPI/Models/Requests/GetMetadataPart.cs rename to PlexAPI/Models/Requests/GetMetaDataByRatingKeyPart.cs index 2b8adfc..62c6871 100644 --- a/PlexAPI/Models/Requests/GetMetadataPart.cs +++ b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyPart.cs @@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests using PlexAPI.Utils; using System.Collections.Generic; - public class GetMetadataPart + public class GetMetaDataByRatingKeyPart { [JsonProperty("id")] diff --git a/PlexAPI/Models/Requests/GetMetadataRequest.cs b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyRequest.cs similarity index 86% rename from PlexAPI/Models/Requests/GetMetadataRequest.cs rename to PlexAPI/Models/Requests/GetMetaDataByRatingKeyRequest.cs index e8f4aa3..2ab92d9 100644 --- a/PlexAPI/Models/Requests/GetMetadataRequest.cs +++ b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyRequest.cs @@ -11,13 +11,13 @@ namespace PlexAPI.Models.Requests { using PlexAPI.Utils; - public class GetMetadataRequest + public class GetMetaDataByRatingKeyRequest { /// /// the id of the library item to return the children of. /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey")] - public double RatingKey { get; set; } = default!; + public long RatingKey { get; set; } = default!; } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMetadataResponse.cs b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyResponse.cs similarity index 89% rename from PlexAPI/Models/Requests/GetMetadataResponse.cs rename to PlexAPI/Models/Requests/GetMetaDataByRatingKeyResponse.cs index 10083a4..0a50283 100644 --- a/PlexAPI/Models/Requests/GetMetadataResponse.cs +++ b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyResponse.cs @@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests using System.Net.Http; using System; - public class GetMetadataResponse + public class GetMetaDataByRatingKeyResponse { /// @@ -35,6 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The metadata of the library item. /// - public Models.Requests.GetMetadataResponseBody? Object { get; set; } + public Models.Requests.GetMetaDataByRatingKeyResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMetadataResponseBody.cs b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyResponseBody.cs similarity index 83% rename from PlexAPI/Models/Requests/GetMetadataResponseBody.cs rename to PlexAPI/Models/Requests/GetMetaDataByRatingKeyResponseBody.cs index bc578bc..00c53e7 100644 --- a/PlexAPI/Models/Requests/GetMetadataResponseBody.cs +++ b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyResponseBody.cs @@ -16,10 +16,10 @@ namespace PlexAPI.Models.Requests /// /// The metadata of the library item. /// - public class GetMetadataResponseBody + public class GetMetaDataByRatingKeyResponseBody { [JsonProperty("MediaContainer")] - public GetMetadataMediaContainer? MediaContainer { get; set; } + public GetMetaDataByRatingKeyMediaContainer? MediaContainer { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMetadataRole.cs b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyRole.cs similarity index 95% rename from PlexAPI/Models/Requests/GetMetadataRole.cs rename to PlexAPI/Models/Requests/GetMetaDataByRatingKeyRole.cs index 9b98b51..ff30b6e 100644 --- a/PlexAPI/Models/Requests/GetMetadataRole.cs +++ b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyRole.cs @@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests using Newtonsoft.Json; using PlexAPI.Utils; - public class GetMetadataRole + public class GetMetaDataByRatingKeyRole { [JsonProperty("id")] diff --git a/PlexAPI/Models/Requests/GetMetadataWriter.cs b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyWriter.cs similarity index 95% rename from PlexAPI/Models/Requests/GetMetadataWriter.cs rename to PlexAPI/Models/Requests/GetMetaDataByRatingKeyWriter.cs index b3839ea..1d69261 100644 --- a/PlexAPI/Models/Requests/GetMetadataWriter.cs +++ b/PlexAPI/Models/Requests/GetMetaDataByRatingKeyWriter.cs @@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests using Newtonsoft.Json; using PlexAPI.Utils; - public class GetMetadataWriter + public class GetMetaDataByRatingKeyWriter { [JsonProperty("id")] diff --git a/PlexAPI/Models/Requests/GetPinRequest.cs b/PlexAPI/Models/Requests/GetPinRequest.cs index 65da92a..09423c7 100644 --- a/PlexAPI/Models/Requests/GetPinRequest.cs +++ b/PlexAPI/Models/Requests/GetPinRequest.cs @@ -14,16 +14,6 @@ namespace PlexAPI.Models.Requests public class GetPinRequest { - /// - /// Product name of the application shown in the list of devices
- /// - /// - /// - /// - ///
- [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product")] - public string XPlexProduct { get; set; } = default!; - /// /// Determines the kind of code returned by the API call
/// @@ -45,7 +35,10 @@ namespace PlexAPI.Models.Requests /// /// ///
- [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier")] + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")] public string? XPlexClientIdentifier { get; set; } + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Product")] + public string? XPlexProduct { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsQueryParamType.cs b/PlexAPI/Models/Requests/GetPlaylistContentsQueryParamType.cs new file mode 100644 index 0000000..020ccc7 --- /dev/null +++ b/PlexAPI/Models/Requests/GetPlaylistContentsQueryParamType.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using PlexAPI.Utils; + + /// + /// The type of media to retrieve.
+ /// + /// + /// 1 = movie
+ /// 2 = show
+ /// 3 = season
+ /// 4 = episode
+ /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
+ /// + ///
+ ///
+ public enum GetPlaylistContentsQueryParamType + { + One = 1, + Two = 2, + Three = 3, + Four = 4, + } + +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsRequest.cs b/PlexAPI/Models/Requests/GetPlaylistContentsRequest.cs index 791141b..66c22ca 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsRequest.cs +++ b/PlexAPI/Models/Requests/GetPlaylistContentsRequest.cs @@ -9,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class GetPlaylistContentsRequest @@ -21,9 +22,18 @@ namespace PlexAPI.Models.Requests public double PlaylistID { get; set; } = default!; /// - /// the metadata type of the item to return + /// The type of media to retrieve.
+ /// + /// + /// 1 = movie
+ /// 2 = show
+ /// 3 = season
+ /// 4 = episode
+ /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
+ /// + ///
///
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")] - public double Type { get; set; } = default!; + public GetPlaylistContentsQueryParamType Type { get; set; } = default!; } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetRecentlyAddedRequest.cs b/PlexAPI/Models/Requests/GetRecentlyAddedRequest.cs new file mode 100644 index 0000000..d62f0e1 --- /dev/null +++ b/PlexAPI/Models/Requests/GetRecentlyAddedRequest.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 PlexAPI.Models.Requests +{ + using PlexAPI.Utils; + + public class GetRecentlyAddedRequest + { + + /// + /// The index of the first item to return. If not specified, the first item will be returned.
+ /// + /// + /// If the number of items exceeds the limit, the response will be paginated.
+ /// By default this is 0
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Start")] + public int? XPlexContainerStart { get; set; } = 0; + + /// + /// The number of items to return. If not specified, all items will be returned.
+ /// + /// + /// If the number of items exceeds the limit, the response will be paginated.
+ /// By default this is 50
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Size")] + public int? XPlexContainerSize { get; set; } = 50; + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetRefreshLibraryMetadataRequest.cs b/PlexAPI/Models/Requests/GetRefreshLibraryMetadataRequest.cs index 2d115ac..2a58ef9 100644 --- a/PlexAPI/Models/Requests/GetRefreshLibraryMetadataRequest.cs +++ b/PlexAPI/Models/Requests/GetRefreshLibraryMetadataRequest.cs @@ -16,10 +16,15 @@ namespace PlexAPI.Models.Requests { /// - /// The id of the library + /// The unique key of the Plex library.
+ /// + /// + /// Note: This is unique in the context of the Plex server.
+ /// + ///
///
- [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")] - public double SectionId { get; set; } = default!; + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")] + public int SectionKey { get; set; } = default!; /// /// Force the refresh even if the library is already being refreshed. diff --git a/PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs b/PlexAPI/Models/Requests/GetSearchLibraryMediaContainer.cs similarity index 93% rename from PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs rename to PlexAPI/Models/Requests/GetSearchLibraryMediaContainer.cs index 9166bd7..e0fec5d 100644 --- a/PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetSearchLibraryMediaContainer.cs @@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests using PlexAPI.Utils; using System.Collections.Generic; - public class SearchLibraryMediaContainer + public class GetSearchLibraryMediaContainer { [JsonProperty("size")] @@ -54,6 +54,6 @@ namespace PlexAPI.Models.Requests public int? ViewMode { get; set; } [JsonProperty("Metadata")] - public List? Metadata { get; set; } + public List? Metadata { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/SearchLibraryMetadata.cs b/PlexAPI/Models/Requests/GetSearchLibraryMetadata.cs similarity index 98% rename from PlexAPI/Models/Requests/SearchLibraryMetadata.cs rename to PlexAPI/Models/Requests/GetSearchLibraryMetadata.cs index 0b0b0c4..ed04f81 100644 --- a/PlexAPI/Models/Requests/SearchLibraryMetadata.cs +++ b/PlexAPI/Models/Requests/GetSearchLibraryMetadata.cs @@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests using Newtonsoft.Json; using PlexAPI.Utils; - public class SearchLibraryMetadata + public class GetSearchLibraryMetadata { [JsonProperty("ratingKey")] diff --git a/PlexAPI/Models/Requests/SearchLibraryRequest.cs b/PlexAPI/Models/Requests/GetSearchLibraryRequest.cs similarity index 50% rename from PlexAPI/Models/Requests/SearchLibraryRequest.cs rename to PlexAPI/Models/Requests/GetSearchLibraryRequest.cs index 975db48..feaadea 100644 --- a/PlexAPI/Models/Requests/SearchLibraryRequest.cs +++ b/PlexAPI/Models/Requests/GetSearchLibraryRequest.cs @@ -12,19 +12,33 @@ namespace PlexAPI.Models.Requests using PlexAPI.Models.Requests; using PlexAPI.Utils; - public class SearchLibraryRequest + public class GetSearchLibraryRequest { /// - /// the Id of the library to query + /// The unique key of the Plex library.
+ /// + /// + /// Note: This is unique in the context of the Plex server.
+ /// + ///
///
- [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")] - public long SectionId { get; set; } = default!; + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")] + public int SectionKey { get; set; } = default!; /// - /// Plex content type to search for + /// The type of media to retrieve.
+ /// + /// + /// 1 = movie
+ /// 2 = show
+ /// 3 = season
+ /// 4 = episode
+ /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
+ /// + ///
///
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")] - public Models.Requests.Type Type { get; set; } = default!; + public QueryParamType Type { get; set; } = default!; } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/SearchLibraryResponse.cs b/PlexAPI/Models/Requests/GetSearchLibraryResponse.cs similarity index 90% rename from PlexAPI/Models/Requests/SearchLibraryResponse.cs rename to PlexAPI/Models/Requests/GetSearchLibraryResponse.cs index 4989aed..918e270 100644 --- a/PlexAPI/Models/Requests/SearchLibraryResponse.cs +++ b/PlexAPI/Models/Requests/GetSearchLibraryResponse.cs @@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests using System.Net.Http; using System; - public class SearchLibraryResponse + public class GetSearchLibraryResponse { /// @@ -35,6 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The contents of the library by section and type /// - public Models.Requests.SearchLibraryResponseBody? Object { get; set; } + public Models.Requests.GetSearchLibraryResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/SearchLibraryResponseBody.cs b/PlexAPI/Models/Requests/GetSearchLibraryResponseBody.cs similarity index 84% rename from PlexAPI/Models/Requests/SearchLibraryResponseBody.cs rename to PlexAPI/Models/Requests/GetSearchLibraryResponseBody.cs index 286e48f..406fff5 100644 --- a/PlexAPI/Models/Requests/SearchLibraryResponseBody.cs +++ b/PlexAPI/Models/Requests/GetSearchLibraryResponseBody.cs @@ -16,10 +16,10 @@ namespace PlexAPI.Models.Requests /// /// The contents of the library by section and type /// - public class SearchLibraryResponseBody + public class GetSearchLibraryResponseBody { [JsonProperty("MediaContainer")] - public SearchLibraryMediaContainer? MediaContainer { get; set; } + public GetSearchLibraryMediaContainer? MediaContainer { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetResourcesRequest.cs b/PlexAPI/Models/Requests/GetServerResourcesRequest.cs similarity index 61% rename from PlexAPI/Models/Requests/GetResourcesRequest.cs rename to PlexAPI/Models/Requests/GetServerResourcesRequest.cs index 219f597..c9bf7e9 100644 --- a/PlexAPI/Models/Requests/GetResourcesRequest.cs +++ b/PlexAPI/Models/Requests/GetServerResourcesRequest.cs @@ -12,9 +12,15 @@ namespace PlexAPI.Models.Requests using PlexAPI.Models.Requests; using PlexAPI.Utils; - public class GetResourcesRequest + public class GetServerResourcesRequest { + /// + /// Plex Authentication Token + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")] + public string XPlexToken { get; set; } = default!; + /// /// The unique identifier for the client application
/// @@ -24,25 +30,30 @@ namespace PlexAPI.Models.Requests /// /// ///
- [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier")] + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")] public string? XPlexClientIdentifier { get; set; } /// /// Include Https entries in the results /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeHttps")] - public IncludeHttps? IncludeHttps { get; set; } + public IncludeHttps? IncludeHttps { get; set; } = PlexAPI.Models.Requests.IncludeHttps.Zero; /// - /// Include Relay addresses in the results + /// Include Relay addresses in the results
+ /// + /// + /// E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
+ /// + ///
///
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeRelay")] - public IncludeRelay? IncludeRelay { get; set; } + public IncludeRelay? IncludeRelay { get; set; } = PlexAPI.Models.Requests.IncludeRelay.Zero; /// /// Include IPv6 entries in the results /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeIPv6")] - public IncludeIPv6? IncludeIPv6 { get; set; } + public IncludeIPv6? IncludeIPv6 { get; set; } = PlexAPI.Models.Requests.IncludeIPv6.Zero; } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetResourcesResponse.cs b/PlexAPI/Models/Requests/GetServerResourcesResponse.cs similarity index 96% rename from PlexAPI/Models/Requests/GetResourcesResponse.cs rename to PlexAPI/Models/Requests/GetServerResourcesResponse.cs index d18ac99..153581a 100644 --- a/PlexAPI/Models/Requests/GetResourcesResponse.cs +++ b/PlexAPI/Models/Requests/GetServerResourcesResponse.cs @@ -15,7 +15,7 @@ namespace PlexAPI.Models.Requests using System.Net.Http; using System; - public class GetResourcesResponse + public class GetServerResourcesResponse { /// diff --git a/PlexAPI/Models/Requests/GetSessionHistoryRequest.cs b/PlexAPI/Models/Requests/GetSessionHistoryRequest.cs index 331a82c..3979d87 100644 --- a/PlexAPI/Models/Requests/GetSessionHistoryRequest.cs +++ b/PlexAPI/Models/Requests/GetSessionHistoryRequest.cs @@ -44,7 +44,7 @@ namespace PlexAPI.Models.Requests /// /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=filter")] - public Filter? Filter { get; set; } + public QueryParamFilter? Filter { get; set; } /// /// Filters the results based on the id of a valid library section
diff --git a/PlexAPI/Models/Requests/GetThumbImageRequest.cs b/PlexAPI/Models/Requests/GetThumbImageRequest.cs new file mode 100644 index 0000000..b07fae4 --- /dev/null +++ b/PlexAPI/Models/Requests/GetThumbImageRequest.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 PlexAPI.Models.Requests +{ + using PlexAPI.Utils; + + public class GetThumbImageRequest + { + + /// + /// the id of the library item to return the children of. + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey")] + public long RatingKey { get; set; } = default!; + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=width")] + public long Width { get; set; } = default!; + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=height")] + public long Height { get; set; } = default!; + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=minSize")] + public long MinSize { get; set; } = default!; + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=upscale")] + public long Upscale { get; set; } = default!; + + /// + /// Plex Authentication Token + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")] + public string XPlexToken { get; set; } = default!; + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetThumbImageResponse.cs b/PlexAPI/Models/Requests/GetThumbImageResponse.cs new file mode 100644 index 0000000..f79fcb6 --- /dev/null +++ b/PlexAPI/Models/Requests/GetThumbImageResponse.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using PlexAPI.Utils; + using System.Collections.Generic; + using System.Net.Http; + using System; + + public class GetThumbImageResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + + /// + /// Successful response returning an image + /// + public byte[]? Bytes { get; set; } + + public Dictionary> Headers { get; set; } = default!; + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTokenByPinIdRequest.cs b/PlexAPI/Models/Requests/GetTokenByPinIdRequest.cs index 3bd103d..329c91e 100644 --- a/PlexAPI/Models/Requests/GetTokenByPinIdRequest.cs +++ b/PlexAPI/Models/Requests/GetTokenByPinIdRequest.cs @@ -29,7 +29,7 @@ namespace PlexAPI.Models.Requests /// /// ///
- [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier")] + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")] public string? XPlexClientIdentifier { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTopWatchedContentQueryParamType.cs b/PlexAPI/Models/Requests/GetTopWatchedContentQueryParamType.cs new file mode 100644 index 0000000..5b45692 --- /dev/null +++ b/PlexAPI/Models/Requests/GetTopWatchedContentQueryParamType.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using PlexAPI.Utils; + + /// + /// The type of media to retrieve.
+ /// + /// + /// 1 = movie
+ /// 2 = show
+ /// 3 = season
+ /// 4 = episode
+ /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
+ /// + ///
+ ///
+ public enum GetTopWatchedContentQueryParamType + { + One = 1, + Two = 2, + Three = 3, + Four = 4, + } + +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTopWatchedContentRequest.cs b/PlexAPI/Models/Requests/GetTopWatchedContentRequest.cs index 686ec23..11cc21b 100644 --- a/PlexAPI/Models/Requests/GetTopWatchedContentRequest.cs +++ b/PlexAPI/Models/Requests/GetTopWatchedContentRequest.cs @@ -9,16 +9,26 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class GetTopWatchedContentRequest { /// - /// the library type (1 - movies, 2 - shows, 3 - music) + /// The type of media to retrieve.
+ /// + /// + /// 1 = movie
+ /// 2 = show
+ /// 3 = season
+ /// 4 = episode
+ /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
+ /// + ///
///
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")] - public long Type { get; set; } = default!; + public GetTopWatchedContentQueryParamType Type { get; set; } = default!; /// /// Adds the Guids object to the response
diff --git a/PlexAPI/Models/Requests/GetTopWatchedContentResponse.cs b/PlexAPI/Models/Requests/GetTopWatchedContentResponse.cs index f482e1b..f130b1d 100644 --- a/PlexAPI/Models/Requests/GetTopWatchedContentResponse.cs +++ b/PlexAPI/Models/Requests/GetTopWatchedContentResponse.cs @@ -35,6 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The metadata of the library item. /// - public GetTopWatchedContentResponseBody? Object { get; set; } + public Models.Requests.GetTopWatchedContentResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetUserDetailsPlexStatus.cs b/PlexAPI/Models/Requests/GetUserDetailsAuthenticationResponseStatus.cs similarity index 71% rename from PlexAPI/Models/Requests/GetUserDetailsPlexStatus.cs rename to PlexAPI/Models/Requests/GetUserDetailsAuthenticationResponseStatus.cs index 0716dcf..bb8149a 100644 --- a/PlexAPI/Models/Requests/GetUserDetailsPlexStatus.cs +++ b/PlexAPI/Models/Requests/GetUserDetailsAuthenticationResponseStatus.cs @@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests /// /// String representation of subscriptionActive /// - public enum GetUserDetailsPlexStatus + public enum GetUserDetailsAuthenticationResponseStatus { [JsonProperty("Inactive")] Inactive, @@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests Active, } - public static class GetUserDetailsPlexStatusExtension + public static class GetUserDetailsAuthenticationResponseStatusExtension { - public static string Value(this GetUserDetailsPlexStatus value) + public static string Value(this GetUserDetailsAuthenticationResponseStatus value) { return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); } - public static GetUserDetailsPlexStatus ToEnum(this string value) + public static GetUserDetailsAuthenticationResponseStatus ToEnum(this string value) { - foreach(var field in typeof(GetUserDetailsPlexStatus).GetFields()) + foreach(var field in typeof(GetUserDetailsAuthenticationResponseStatus).GetFields()) { var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); if (attributes.Length == 0) @@ -46,14 +46,14 @@ namespace PlexAPI.Models.Requests { var enumVal = field.GetValue(null); - if (enumVal is GetUserDetailsPlexStatus) + if (enumVal is GetUserDetailsAuthenticationResponseStatus) { - return (GetUserDetailsPlexStatus)enumVal; + return (GetUserDetailsAuthenticationResponseStatus)enumVal; } } } - throw new Exception($"Unknown value {value} for enum GetUserDetailsPlexStatus"); + throw new Exception($"Unknown value {value} for enum GetUserDetailsAuthenticationResponseStatus"); } } diff --git a/PlexAPI/Models/Requests/GetUserDetailsPlexResponseStatus.cs b/PlexAPI/Models/Requests/GetUserDetailsAuthenticationStatus.cs similarity index 73% rename from PlexAPI/Models/Requests/GetUserDetailsPlexResponseStatus.cs rename to PlexAPI/Models/Requests/GetUserDetailsAuthenticationStatus.cs index 45c39d5..10d409c 100644 --- a/PlexAPI/Models/Requests/GetUserDetailsPlexResponseStatus.cs +++ b/PlexAPI/Models/Requests/GetUserDetailsAuthenticationStatus.cs @@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests /// /// String representation of subscriptionActive /// - public enum GetUserDetailsPlexResponseStatus + public enum GetUserDetailsAuthenticationStatus { [JsonProperty("Inactive")] Inactive, @@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests Active, } - public static class GetUserDetailsPlexResponseStatusExtension + public static class GetUserDetailsAuthenticationStatusExtension { - public static string Value(this GetUserDetailsPlexResponseStatus value) + public static string Value(this GetUserDetailsAuthenticationStatus value) { return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); } - public static GetUserDetailsPlexResponseStatus ToEnum(this string value) + public static GetUserDetailsAuthenticationStatus ToEnum(this string value) { - foreach(var field in typeof(GetUserDetailsPlexResponseStatus).GetFields()) + foreach(var field in typeof(GetUserDetailsAuthenticationStatus).GetFields()) { var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); if (attributes.Length == 0) @@ -46,14 +46,14 @@ namespace PlexAPI.Models.Requests { var enumVal = field.GetValue(null); - if (enumVal is GetUserDetailsPlexResponseStatus) + if (enumVal is GetUserDetailsAuthenticationStatus) { - return (GetUserDetailsPlexResponseStatus)enumVal; + return (GetUserDetailsAuthenticationStatus)enumVal; } } } - throw new Exception($"Unknown value {value} for enum GetUserDetailsPlexResponseStatus"); + throw new Exception($"Unknown value {value} for enum GetUserDetailsAuthenticationStatus"); } } diff --git a/PlexAPI/Models/Requests/GetUserDetailsRequest.cs b/PlexAPI/Models/Requests/GetUserDetailsRequest.cs new file mode 100644 index 0000000..15e423c --- /dev/null +++ b/PlexAPI/Models/Requests/GetUserDetailsRequest.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using PlexAPI.Utils; + + public class GetUserDetailsRequest + { + + /// + /// Plex Authentication Token + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")] + public string XPlexToken { get; set; } = default!; + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetUserDetailsSubscription.cs b/PlexAPI/Models/Requests/GetUserDetailsSubscription.cs index 122fd15..fdbd075 100644 --- a/PlexAPI/Models/Requests/GetUserDetailsSubscription.cs +++ b/PlexAPI/Models/Requests/GetUserDetailsSubscription.cs @@ -39,7 +39,7 @@ namespace PlexAPI.Models.Requests /// String representation of subscriptionActive ///
[JsonProperty("status")] - public GetUserDetailsPlexResponseStatus? Status { get; set; } + public GetUserDetailsAuthenticationResponseStatus? Status { get; set; } /// /// Payment service used for your Plex Pass subscription diff --git a/PlexAPI/Models/Requests/GetWatchlistRequest.cs b/PlexAPI/Models/Requests/GetWatchListRequest.cs similarity index 91% rename from PlexAPI/Models/Requests/GetWatchlistRequest.cs rename to PlexAPI/Models/Requests/GetWatchListRequest.cs index eedf677..9e0827e 100644 --- a/PlexAPI/Models/Requests/GetWatchlistRequest.cs +++ b/PlexAPI/Models/Requests/GetWatchListRequest.cs @@ -12,17 +12,17 @@ namespace PlexAPI.Models.Requests using PlexAPI.Models.Requests; using PlexAPI.Utils; - public class GetWatchlistRequest + public class GetWatchListRequest { /// /// Filter /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=filter")] - public PathParamFilter Filter { get; set; } = default!; + public Filter Filter { get; set; } = default!; /// - /// User Token + /// Plex Authentication Token /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")] public string XPlexToken { get; set; } = default!; @@ -85,21 +85,23 @@ namespace PlexAPI.Models.Requests /// /// /// If the number of items exceeds the limit, the response will be paginated.
+ /// By default this is 0
/// ///
///
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Start")] - public int? XPlexContainerStart { get; set; } + public int? XPlexContainerStart { get; set; } = 0; /// /// The number of items to return. If not specified, all items will be returned.
/// /// /// If the number of items exceeds the limit, the response will be paginated.
+ /// By default this is 50
/// ///
///
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Size")] - public int? XPlexContainerSize { get; set; } + public int? XPlexContainerSize { get; set; } = 50; } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetWatchlistResponse.cs b/PlexAPI/Models/Requests/GetWatchListResponse.cs similarity index 91% rename from PlexAPI/Models/Requests/GetWatchlistResponse.cs rename to PlexAPI/Models/Requests/GetWatchListResponse.cs index c87e731..258bb9b 100644 --- a/PlexAPI/Models/Requests/GetWatchlistResponse.cs +++ b/PlexAPI/Models/Requests/GetWatchListResponse.cs @@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests using System.Net.Http; using System; - public class GetWatchlistResponse + public class GetWatchListResponse { /// @@ -35,6 +35,6 @@ namespace PlexAPI.Models.Requests /// /// Watchlist Data /// - public Models.Requests.GetWatchlistResponseBody? Object { get; set; } + public Models.Requests.GetWatchListResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetWatchlistResponseBody.cs b/PlexAPI/Models/Requests/GetWatchListResponseBody.cs similarity index 96% rename from PlexAPI/Models/Requests/GetWatchlistResponseBody.cs rename to PlexAPI/Models/Requests/GetWatchListResponseBody.cs index 564f287..debce97 100644 --- a/PlexAPI/Models/Requests/GetWatchlistResponseBody.cs +++ b/PlexAPI/Models/Requests/GetWatchListResponseBody.cs @@ -17,7 +17,7 @@ namespace PlexAPI.Models.Requests /// /// Watchlist Data /// - public class GetWatchlistResponseBody + public class GetWatchListResponseBody { [JsonProperty("librarySectionID")] diff --git a/PlexAPI/Models/Requests/IncludeGuids.cs b/PlexAPI/Models/Requests/IncludeGuids.cs new file mode 100644 index 0000000..9a50729 --- /dev/null +++ b/PlexAPI/Models/Requests/IncludeGuids.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using PlexAPI.Utils; + + /// + /// Adds the Guids object to the response
+ /// + /// + /// + /// + ///
+ public enum IncludeGuids + { + Zero = 0, + One = 1, + } + +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/IncludeMeta.cs b/PlexAPI/Models/Requests/IncludeMeta.cs new file mode 100644 index 0000000..ebe6c6d --- /dev/null +++ b/PlexAPI/Models/Requests/IncludeMeta.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using PlexAPI.Utils; + + /// + /// Adds the Meta object to the response
+ /// + /// + /// + /// + ///
+ public enum IncludeMeta + { + Zero = 0, + One = 1, + } + +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/IncludeRelay.cs b/PlexAPI/Models/Requests/IncludeRelay.cs index 6a77d23..ee42cee 100644 --- a/PlexAPI/Models/Requests/IncludeRelay.cs +++ b/PlexAPI/Models/Requests/IncludeRelay.cs @@ -12,7 +12,12 @@ namespace PlexAPI.Models.Requests using PlexAPI.Utils; /// - /// Include Relay addresses in the results + /// Include Relay addresses in the results
+ /// + /// + /// E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
+ /// + ///
///
public enum IncludeRelay { diff --git a/PlexAPI/Models/Requests/MediaProvider.cs b/PlexAPI/Models/Requests/MediaProvider.cs new file mode 100644 index 0000000..2a7f603 --- /dev/null +++ b/PlexAPI/Models/Requests/MediaProvider.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; + using System.Collections.Generic; + + public class MediaProvider + { + + [JsonProperty("identifier")] + public string? Identifier { get; set; } + + [JsonProperty("title")] + public string? Title { get; set; } + + [JsonProperty("types")] + public string? Types { get; set; } + + [JsonProperty("protocols")] + public string? Protocols { get; set; } + + [JsonProperty("Feature")] + public List? Feature { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Pivot.cs b/PlexAPI/Models/Requests/Pivot.cs new file mode 100644 index 0000000..e67bb92 --- /dev/null +++ b/PlexAPI/Models/Requests/Pivot.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 PlexAPI.Models.Requests +{ + using Newtonsoft.Json; + using PlexAPI.Utils; + + public class Pivot + { + + [JsonProperty("id")] + public string? Id { get; set; } + + [JsonProperty("key")] + public string? Key { get; set; } + + [JsonProperty("type")] + public string? Type { get; set; } + + [JsonProperty("title")] + public string? Title { get; set; } + + [JsonProperty("context")] + public string? Context { get; set; } + + [JsonProperty("symbol")] + public string? Symbol { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/PlexDevice.cs b/PlexAPI/Models/Requests/PlexDevice.cs index ca93af1..62a08d3 100644 --- a/PlexAPI/Models/Requests/PlexDevice.cs +++ b/PlexAPI/Models/Requests/PlexDevice.cs @@ -27,14 +27,14 @@ namespace PlexAPI.Models.Requests [JsonProperty("productVersion")] public string ProductVersion { get; set; } = default!; - [JsonProperty("platform")] - public string Platform { get; set; } = default!; + [JsonProperty("platform", NullValueHandling = NullValueHandling.Include)] + public string? Platform { get; set; } - [JsonProperty("platformVersion")] - public string PlatformVersion { get; set; } = default!; + [JsonProperty("platformVersion", NullValueHandling = NullValueHandling.Include)] + public string? PlatformVersion { get; set; } - [JsonProperty("device")] - public string Device { get; set; } = default!; + [JsonProperty("device", NullValueHandling = NullValueHandling.Include)] + public string? Device { get; set; } [JsonProperty("clientIdentifier")] public string ClientIdentifier { get; set; } = default!; @@ -48,46 +48,49 @@ namespace PlexAPI.Models.Requests [JsonProperty("provides")] public string Provides { get; set; } = default!; - [JsonProperty("ownerId")] - public string? OwnerId { get; set; } + /// + /// ownerId is null when the device is owned by the token used to send the request + /// + [JsonProperty("ownerId", NullValueHandling = NullValueHandling.Include)] + public long? OwnerId { get; set; } - [JsonProperty("sourceTitle")] + [JsonProperty("sourceTitle", NullValueHandling = NullValueHandling.Include)] public string? SourceTitle { get; set; } [JsonProperty("publicAddress")] - public string? PublicAddress { get; set; } + public string PublicAddress { get; set; } = default!; [JsonProperty("accessToken")] - public string? AccessToken { get; set; } + public string AccessToken { get; set; } = default!; [JsonProperty("owned")] - public bool? Owned { get; set; } + public bool Owned { get; set; } = default!; [JsonProperty("home")] - public bool? Home { get; set; } + public bool Home { get; set; } = default!; [JsonProperty("synced")] - public bool? Synced { get; set; } + public bool Synced { get; set; } = default!; [JsonProperty("relay")] - public bool? Relay { get; set; } + public bool Relay { get; set; } = default!; [JsonProperty("presence")] - public bool? Presence { get; set; } + public bool Presence { get; set; } = default!; [JsonProperty("httpsRequired")] - public bool? HttpsRequired { get; set; } + public bool HttpsRequired { get; set; } = default!; [JsonProperty("publicAddressMatches")] - public bool? PublicAddressMatches { get; set; } + public bool PublicAddressMatches { get; set; } = default!; [JsonProperty("dnsRebindingProtection")] - public bool? DnsRebindingProtection { get; set; } + public bool DnsRebindingProtection { get; set; } = default!; [JsonProperty("natLoopbackSupported")] - public bool? NatLoopbackSupported { get; set; } + public bool NatLoopbackSupported { get; set; } = default!; [JsonProperty("connections")] - public List? Connections { get; set; } + public List Connections { get; set; } = default!; } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/PostUsersSignInDataRequest.cs b/PlexAPI/Models/Requests/PostUsersSignInDataRequest.cs index 2f9a14b..f0e4b35 100644 --- a/PlexAPI/Models/Requests/PostUsersSignInDataRequest.cs +++ b/PlexAPI/Models/Requests/PostUsersSignInDataRequest.cs @@ -24,7 +24,7 @@ namespace PlexAPI.Models.Requests /// /// ///
- [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier")] + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")] public string? XPlexClientIdentifier { get; set; } /// diff --git a/PlexAPI/Models/Requests/QueryParamFilter.cs b/PlexAPI/Models/Requests/QueryParamFilter.cs new file mode 100644 index 0000000..fe74335 --- /dev/null +++ b/PlexAPI/Models/Requests/QueryParamFilter.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 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 PlexAPI.Models.Requests +{ + using PlexAPI.Utils; + + /// + /// Filters content by field and direction/equality
+ /// + /// + /// (Unknown if viewedAt is the only supported column)
+ /// + ///
+ ///
+ public class QueryParamFilter + { + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/QueryParamType.cs b/PlexAPI/Models/Requests/QueryParamType.cs index e0f4e8c..6a90a6c 100644 --- a/PlexAPI/Models/Requests/QueryParamType.cs +++ b/PlexAPI/Models/Requests/QueryParamType.cs @@ -9,54 +9,26 @@ #nullable enable namespace PlexAPI.Models.Requests { - using Newtonsoft.Json; using PlexAPI.Utils; - using System; /// - /// type of playlist to create + /// The type of media to retrieve.
+ /// + /// + /// 1 = movie
+ /// 2 = show
+ /// 3 = season
+ /// 4 = episode
+ /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
+ /// + ///
///
public enum QueryParamType { - [JsonProperty("audio")] - Audio, - [JsonProperty("video")] - Video, - [JsonProperty("photo")] - Photo, - } - - public static class QueryParamTypeExtension - { - public static string Value(this QueryParamType value) - { - return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); - } - - public static QueryParamType ToEnum(this string value) - { - foreach(var field in typeof(QueryParamType).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 QueryParamType) - { - return (QueryParamType)enumVal; - } - } - } - - throw new Exception($"Unknown value {value} for enum QueryParamType"); - } + One = 1, + Two = 2, + Three = 3, + Four = 4, } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Skip.cs b/PlexAPI/Models/Requests/Skip.cs index 3605f0f..1da839f 100644 --- a/PlexAPI/Models/Requests/Skip.cs +++ b/PlexAPI/Models/Requests/Skip.cs @@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests using PlexAPI.Utils; /// - /// Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. + /// Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. /// public enum Skip { diff --git a/PlexAPI/Models/Requests/Subscription.cs b/PlexAPI/Models/Requests/Subscription.cs index 0972ef6..9a79dff 100644 --- a/PlexAPI/Models/Requests/Subscription.cs +++ b/PlexAPI/Models/Requests/Subscription.cs @@ -42,7 +42,7 @@ namespace PlexAPI.Models.Requests /// String representation of subscriptionActive ///
[JsonProperty("status")] - public GetUserDetailsPlexStatus? Status { get; set; } + public GetUserDetailsAuthenticationStatus? Status { get; set; } /// /// Payment service used for your Plex Pass subscription diff --git a/PlexAPI/Models/Requests/Type.cs b/PlexAPI/Models/Requests/Type.cs index 71dd993..374bf4e 100644 --- a/PlexAPI/Models/Requests/Type.cs +++ b/PlexAPI/Models/Requests/Type.cs @@ -12,7 +12,16 @@ namespace PlexAPI.Models.Requests using PlexAPI.Utils; /// - /// Plex content type to search for + /// The type of media to retrieve.
+ /// + /// + /// 1 = movie
+ /// 2 = show
+ /// 3 = season
+ /// 4 = episode
+ /// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
+ /// + ///
///
public enum Type { diff --git a/PlexAPI/Playlists.cs b/PlexAPI/Playlists.cs index fa91c3e..141c6e8 100644 --- a/PlexAPI/Playlists.cs +++ b/PlexAPI/Playlists.cs @@ -98,7 +98,7 @@ namespace PlexAPI /// /// ///
- Task GetPlaylistContentsAsync(double playlistID, double type); + Task GetPlaylistContentsAsync(double playlistID, GetPlaylistContentsQueryParamType type); /// /// Delete Playlist Contents @@ -146,10 +146,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -616,7 +616,7 @@ namespace PlexAPI } } - public async Task GetPlaylistContentsAsync(double playlistID, double type) + public async Task GetPlaylistContentsAsync(double playlistID, GetPlaylistContentsQueryParamType type) { var request = new GetPlaylistContentsRequest() { diff --git a/PlexAPI/Plex.cs b/PlexAPI/Plex.cs index a953778..5264944 100644 --- a/PlexAPI/Plex.cs +++ b/PlexAPI/Plex.cs @@ -69,13 +69,13 @@ namespace PlexAPI Task GetHomeDataAsync(); /// - /// Get Resources + /// Get Server Resources /// /// - /// Get Resources + /// Get Plex server access tokens and server connections /// /// - Task GetResourcesAsync(string? xPlexClientIdentifier = null, IncludeHttps? includeHttps = null, IncludeRelay? includeRelay = null, IncludeIPv6? includeIPv6 = null, string? serverUrl = null); + Task GetServerResourcesAsync(GetServerResourcesRequest request, string? serverUrl = null); /// /// Get a Pin @@ -84,7 +84,7 @@ namespace PlexAPI /// Retrieve a Pin from Plex.tv for authentication flows /// /// - Task GetPinAsync(string xPlexProduct, bool? strong = null, string? xPlexClientIdentifier = null, string? serverUrl = null); + Task GetPinAsync(bool? strong = null, string? xPlexClientIdentifier = null, string? xPlexProduct = null, string? serverUrl = null); /// /// Get Access Token by PinId @@ -94,15 +94,6 @@ namespace PlexAPI /// /// Task GetTokenByPinIdAsync(long pinID, string? xPlexClientIdentifier = null, string? serverUrl = null); - - /// - /// Get UserData By Token - /// - /// - /// Get the User data from the provided X-Plex-Token - /// - /// - Task GetUserDetailsAsync(string? serverUrl = null); } /// @@ -133,9 +124,9 @@ namespace PlexAPI "https://plex.tv/api/v2", }; /// - /// List of server URLs available for the getResources operation. + /// List of server URLs available for the get-server-resources operation. /// - public static readonly string[] GetResourcesServerList = { + public static readonly string[] GetServerResourcesServerList = { "https://plex.tv/api/v2", }; /// @@ -150,18 +141,12 @@ namespace PlexAPI public static readonly string[] GetTokenByPinIdServerList = { "https://plex.tv/api/v2", }; - /// - /// List of server URLs available for the getUserDetails operation. - /// - public static readonly string[] GetUserDetailsServerList = { - "https://plex.tv/api/v2", - }; public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -552,18 +537,15 @@ namespace PlexAPI } } - public async Task GetResourcesAsync(string? xPlexClientIdentifier = null, IncludeHttps? includeHttps = null, IncludeRelay? includeRelay = null, IncludeIPv6? includeIPv6 = null, string? serverUrl = null) + public async Task GetServerResourcesAsync(GetServerResourcesRequest request, string? serverUrl = null) { - var request = new GetResourcesRequest() + if (request == null) { - XPlexClientIdentifier = xPlexClientIdentifier, - IncludeHttps = includeHttps, - IncludeRelay = includeRelay, - IncludeIPv6 = includeIPv6, - }; + request = new GetServerResourcesRequest(); + } request.XPlexClientIdentifier ??= SDKConfiguration.XPlexClientIdentifier; - string baseUrl = Utilities.TemplateUrl(GetResourcesServerList[0], new Dictionary(){ + string baseUrl = Utilities.TemplateUrl(GetServerResourcesServerList[0], new Dictionary(){ }); if (serverUrl != null) { @@ -573,9 +555,13 @@ namespace PlexAPI var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - HeaderSerializer.PopulateHeaders(ref httpRequest, request); - var hookCtx = new HookContext("getResources", null, null); + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-server-resources", null, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -616,7 +602,7 @@ namespace PlexAPI if(Utilities.IsContentTypeMatch("application/json", contentType)) { var obj = ResponseBodyDeserializer.Deserialize>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); - var response = new GetResourcesResponse() + var response = new GetServerResourcesResponse() { StatusCode = responseStatusCode, ContentType = contentType, @@ -638,7 +624,7 @@ namespace PlexAPI { if(Utilities.IsContentTypeMatch("application/json", contentType)) { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); obj!.RawResponse = httpResponse; throw obj!; } @@ -653,13 +639,13 @@ namespace PlexAPI } } - public async Task GetPinAsync(string xPlexProduct, bool? strong = null, string? xPlexClientIdentifier = null, string? serverUrl = null) + public async Task GetPinAsync(bool? strong = null, string? xPlexClientIdentifier = null, string? xPlexProduct = null, string? serverUrl = null) { var request = new GetPinRequest() { - XPlexProduct = xPlexProduct, Strong = strong, XPlexClientIdentifier = xPlexClientIdentifier, + XPlexProduct = xPlexProduct, }; request.XPlexClientIdentifier ??= SDKConfiguration.XPlexClientIdentifier; @@ -673,7 +659,6 @@ namespace PlexAPI var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - HeaderSerializer.PopulateHeaders(ref httpRequest, request); var hookCtx = new HookContext("getPin", null, null); @@ -772,7 +757,6 @@ namespace PlexAPI var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - HeaderSerializer.PopulateHeaders(ref httpRequest, request); var hookCtx = new HookContext("getTokenByPinId", null, null); @@ -829,11 +813,7 @@ namespace PlexAPI throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } - else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) - { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 404) + else if(responseStatusCode == 400) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { @@ -846,95 +826,11 @@ namespace PlexAPI throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } - else - { - throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - } - - public async Task GetUserDetailsAsync(string? serverUrl = null) - { - string baseUrl = Utilities.TemplateUrl(GetUserDetailsServerList[0], new Dictionary(){ - }); - if (serverUrl != null) - { - baseUrl = serverUrl; - } - - var urlString = baseUrl + "/user"; - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - if (_securitySource != null) - { - httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); - } - - var hookCtx = new HookContext("getUserDetails", null, _securitySource); - - httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); - - HttpResponseMessage httpResponse; - try - { - httpResponse = await _client.SendAsync(httpRequest); - int _statusCode = (int)httpResponse.StatusCode; - - if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) - { - var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); - if (_httpResponse != null) - { - httpResponse = _httpResponse; - } - } - } - catch (Exception error) - { - var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); - if (_httpResponse != null) - { - httpResponse = _httpResponse; - } - else - { - throw; - } - } - - httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - int responseStatusCode = (int)httpResponse.StatusCode; - if(responseStatusCode == 200) + else if(responseStatusCode == 404) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); - var response = new GetUserDetailsResponse() - { - StatusCode = responseStatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - response.UserPlexAccount = obj; - return response; - } - else - { - throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - } - else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) - { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 401) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); obj!.RawResponse = httpResponse; throw obj!; } @@ -943,6 +839,10 @@ namespace PlexAPI throw new 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); diff --git a/PlexAPI/PlexAPI.csproj b/PlexAPI/PlexAPI.csproj index b3c204d..0df09f2 100644 --- a/PlexAPI/PlexAPI.csproj +++ b/PlexAPI/PlexAPI.csproj @@ -3,13 +3,13 @@ true PlexAPI - 0.4.2 + 0.5.0 net5.0 LukeHagar Copyright (c) LukeHagar 2024 https://github.com/LukeHagar/plexcsharp.git git - Plex-API: An Open API Spec for interacting with Plex.tv + Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server diff --git a/PlexAPI/PlexAPISDK.cs b/PlexAPI/PlexAPISDK.cs index 0b50548..172d705 100644 --- a/PlexAPI/PlexAPISDK.cs +++ b/PlexAPI/PlexAPISDK.cs @@ -63,7 +63,7 @@ namespace PlexAPI } /// - /// Plex-API: An Open API Spec for interacting with Plex.tv + /// Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server /// public interface IPlexAPISDK { @@ -155,6 +155,15 @@ namespace PlexAPI /// public ILibrary Library { get; } + /// + /// API Calls that perform operations with Plex Media Server Watchlists
+ /// + /// + /// + /// + ///
+ public IWatchlist Watchlist { get; } + /// /// Submit logs to the Log Handler for Plex Media Server
/// @@ -212,15 +221,6 @@ namespace PlexAPI /// ///
public IUpdater Updater { get; } - - /// - /// API Calls that perform operations with Plex Media Server Watchlists
- /// - /// - /// - /// - ///
- public IWatchlist Watchlist { get; } } public class SDKConfig @@ -261,17 +261,17 @@ namespace PlexAPI } /// - /// Plex-API: An Open API Spec for interacting with Plex.tv + /// Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server /// public class PlexAPISDK: IPlexAPISDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private int _serverIndex = 0; private ISpeakeasyHttpClient _client; @@ -285,13 +285,13 @@ namespace PlexAPI public IHubs Hubs { get; private set; } public ISearch Search { get; private set; } public ILibrary Library { get; private set; } + public IWatchlist Watchlist { get; private set; } public ILog Log { get; private set; } public IPlaylists Playlists { get; private set; } public IAuthentication Authentication { get; private set; } public IStatistics Statistics { get; private set; } public ISessions Sessions { get; private set; } public IUpdater Updater { get; private set; } - public IWatchlist Watchlist { get; private set; } public PlexAPISDK(string? accessToken = null, Func? accessTokenSource = null, string? xPlexClientIdentifier = null, int? serverIndex = null, ServerProtocol? protocol = null, string? ip = null, string? port = null, string? serverUrl = null, Dictionary? urlParams = null, ISpeakeasyHttpClient? client = null, RetryConfig? retryConfig = null) { @@ -316,7 +316,7 @@ namespace PlexAPI { new Dictionary() { - {"protocol", protocol == null ? "http" : ServerProtocolExtension.Value(protocol.Value)}, + {"protocol", protocol == null ? "https" : ServerProtocolExtension.Value(protocol.Value)}, {"ip", ip == null ? "10.10.10.47" : ip}, {"port", port == null ? "32400" : port}, }, @@ -372,6 +372,9 @@ namespace PlexAPI Library = new Library(_client, _securitySource, _serverUrl, SDKConfiguration); + Watchlist = new Watchlist(_client, _securitySource, _serverUrl, SDKConfiguration); + + Log = new Log(_client, _securitySource, _serverUrl, SDKConfiguration); @@ -388,9 +391,6 @@ namespace PlexAPI Updater = new Updater(_client, _securitySource, _serverUrl, SDKConfiguration); - - - Watchlist = new Watchlist(_client, _securitySource, _serverUrl, SDKConfiguration); } } } \ No newline at end of file diff --git a/PlexAPI/Search.cs b/PlexAPI/Search.cs index 53399a0..ea4631b 100644 --- a/PlexAPI/Search.cs +++ b/PlexAPI/Search.cs @@ -87,10 +87,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/PlexAPI/Server.cs b/PlexAPI/Server.cs index 1633dde..95aa2d5 100644 --- a/PlexAPI/Server.cs +++ b/PlexAPI/Server.cs @@ -72,7 +72,7 @@ namespace PlexAPI /// Get Server Identity /// /// - /// Get Server Identity + /// This request is useful to determine if the server is online or offline /// ///
Task GetServerIdentityAsync(); @@ -96,6 +96,15 @@ namespace PlexAPI ///
Task GetResizedPhotoAsync(GetResizedPhotoRequest request); + /// + /// Get Media Providers + /// + /// + /// Retrieves media providers and their features from the Plex server. + /// + /// + Task GetMediaProvidersAsync(string xPlexToken); + /// /// Get Server List /// @@ -117,10 +126,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -510,12 +519,7 @@ namespace PlexAPI var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - if (_securitySource != null) - { - httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); - } - - var hookCtx = new HookContext("getServerIdentity", null, _securitySource); + var hookCtx = new HookContext("get-server-identity", null, null); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -525,7 +529,7 @@ namespace PlexAPI httpResponse = await _client.SendAsync(httpRequest); int _statusCode = (int)httpResponse.StatusCode; - if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + if (_statusCode == 408 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) { var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); if (_httpResponse != null) @@ -570,11 +574,7 @@ namespace PlexAPI throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } } - else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) - { - throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); - } - else if(responseStatusCode == 401) + else if(responseStatusCode == 408) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { @@ -587,6 +587,10 @@ namespace PlexAPI throw new 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); @@ -766,6 +770,101 @@ namespace PlexAPI } } + public async Task GetMediaProvidersAsync(string xPlexToken) + { + var request = new GetMediaProvidersRequest() + { + XPlexToken = xPlexToken, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/media/providers", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-media-providers", null, _securitySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetMediaProvidersResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 401) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + obj!.RawResponse = httpResponse; + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + public async Task GetServerListAsync() { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); diff --git a/PlexAPI/Sessions.cs b/PlexAPI/Sessions.cs index 153da49..5986e17 100644 --- a/PlexAPI/Sessions.cs +++ b/PlexAPI/Sessions.cs @@ -48,7 +48,7 @@ namespace PlexAPI /// This will Retrieve a listing of all history views. /// /// - Task GetSessionHistoryAsync(string? sort = null, long? accountId = null, Filter? filter = null, long? librarySectionID = null); + Task GetSessionHistoryAsync(string? sort = null, long? accountId = null, QueryParamFilter? filter = null, long? librarySectionID = null); /// /// Get Transcode Sessions @@ -80,10 +80,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -188,7 +188,7 @@ namespace PlexAPI } } - public async Task GetSessionHistoryAsync(string? sort = null, long? accountId = null, Filter? filter = null, long? librarySectionID = null) + public async Task GetSessionHistoryAsync(string? sort = null, long? accountId = null, QueryParamFilter? filter = null, long? librarySectionID = null) { var request = new GetSessionHistoryRequest() { diff --git a/PlexAPI/Statistics.cs b/PlexAPI/Statistics.cs index ae75b2c..7d3db2b 100644 --- a/PlexAPI/Statistics.cs +++ b/PlexAPI/Statistics.cs @@ -71,10 +71,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/PlexAPI/Updater.cs b/PlexAPI/Updater.cs index d730ff9..d969623 100644 --- a/PlexAPI/Updater.cs +++ b/PlexAPI/Updater.cs @@ -74,10 +74,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/PlexAPI/Video.cs b/PlexAPI/Video.cs index 3faf314..ccb3c93 100644 --- a/PlexAPI/Video.cs +++ b/PlexAPI/Video.cs @@ -62,10 +62,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/PlexAPI/Watchlist.cs b/PlexAPI/Watchlist.cs index 8e384cf..a3770fb 100644 --- a/PlexAPI/Watchlist.cs +++ b/PlexAPI/Watchlist.cs @@ -39,7 +39,7 @@ namespace PlexAPI /// Get User Watchlist /// /// - Task GetWatchlistAsync(GetWatchlistRequest request, string? serverUrl = null); + Task GetWatchListAsync(GetWatchListRequest request, string? serverUrl = null); } /// @@ -52,17 +52,17 @@ namespace PlexAPI public class Watchlist: IWatchlist { /// - /// List of server URLs available for the getWatchlist operation. + /// List of server URLs available for the get-watch-list operation. /// - public static readonly string[] GetWatchlistServerList = { + public static readonly string[] GetWatchListServerList = { "https://metadata.provider.plex.tv", }; public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.2"; - private const string _sdkGenVersion = "2.407.0"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.409.8"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.4.2 2.407.0 0.0.3 PlexAPI"; + private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -75,9 +75,9 @@ namespace PlexAPI SDKConfiguration = config; } - public async Task GetWatchlistAsync(GetWatchlistRequest request, string? serverUrl = null) + public async Task GetWatchListAsync(GetWatchListRequest request, string? serverUrl = null) { - string baseUrl = Utilities.TemplateUrl(GetWatchlistServerList[0], new Dictionary(){ + string baseUrl = Utilities.TemplateUrl(GetWatchListServerList[0], new Dictionary(){ }); if (serverUrl != null) { @@ -93,7 +93,7 @@ namespace PlexAPI httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var hookCtx = new HookContext("getWatchlist", null, _securitySource); + var hookCtx = new HookContext("get-watch-list", null, _securitySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); @@ -133,8 +133,8 @@ namespace PlexAPI { if(Utilities.IsContentTypeMatch("application/json", contentType)) { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); - var response = new GetWatchlistResponse() + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetWatchListResponse() { StatusCode = responseStatusCode, ContentType = contentType, @@ -156,7 +156,7 @@ namespace PlexAPI { if(Utilities.IsContentTypeMatch("application/json", contentType)) { - var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); obj!.RawResponse = httpResponse; throw obj!; } diff --git a/README.md b/README.md index ad267ed..5030e09 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Server.GetServerCapabilitiesAsync(); @@ -57,6 +57,7 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); * [GetServerIdentity](docs/sdks/server/README.md#getserveridentity) - Get Server Identity * [GetMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account * [GetResizedPhoto](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo +* [GetMediaProviders](docs/sdks/server/README.md#getmediaproviders) - Get Media Providers * [GetServerList](docs/sdks/server/README.md#getserverlist) - Get Server List ### [Media](docs/sdks/media/README.md) @@ -64,6 +65,8 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); * [MarkPlayed](docs/sdks/media/README.md#markplayed) - Mark Media Played * [MarkUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed * [UpdatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress +* [GetBannerImage](docs/sdks/media/README.md#getbannerimage) - Get Banner Image +* [GetThumbImage](docs/sdks/media/README.md#getthumbimage) - Get Thumb Image ### [Video](docs/sdks/video/README.md) @@ -89,10 +92,9 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); * [GetUserFriends](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in * [GetGeoData](docs/sdks/plex/README.md#getgeodata) - Get Geo Data * [GetHomeData](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data -* [GetResources](docs/sdks/plex/README.md#getresources) - Get Resources +* [GetServerResources](docs/sdks/plex/README.md#getserverresources) - Get Server Resources * [GetPin](docs/sdks/plex/README.md#getpin) - Get a Pin * [GetTokenByPinId](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId -* [GetUserDetails](docs/sdks/plex/README.md#getuserdetails) - Get UserData By Token ### [Hubs](docs/sdks/hubs/README.md) @@ -114,12 +116,16 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); * [DeleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section * [GetLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items * [GetRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library -* [SearchLibrary](docs/sdks/library/README.md#searchlibrary) - Search Library -* [GetMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata +* [GetSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library +* [GetMetaDataByRatingKey](docs/sdks/library/README.md#getmetadatabyratingkey) - Get Metadata by RatingKey * [GetMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children * [GetTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content * [GetOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck +### [Watchlist](docs/sdks/watchlist/README.md) + +* [GetWatchList](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist + ### [Log](docs/sdks/log/README.md) * [LogLine](docs/sdks/log/README.md#logline) - Logging a single line message. @@ -142,6 +148,7 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); * [GetTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token. * [GetSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information +* [GetUserDetails](docs/sdks/authentication/README.md#getuserdetails) - Get User Data By Token * [PostUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata) - Get User SignIn Data ### [Statistics](docs/sdks/statistics/README.md) @@ -162,10 +169,6 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); * [GetUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates * [CheckForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates * [ApplyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates - -### [Watchlist](docs/sdks/watchlist/README.md) - -* [GetWatchlist](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist @@ -177,7 +180,7 @@ You can override the default server globally by passing a server index to the `s | # | Server | Variables | | - | ------ | --------- | -| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) | +| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `https`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) | @@ -202,7 +205,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Plex.GetCompanionsDataAsync(serverUrl: "https://plex.tv/api/v2"); @@ -229,7 +232,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Server.GetServerCapabilitiesAsync(); @@ -238,6 +241,53 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); ``` + +## Global Parameters + +## Global Parameters + +A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed. + +For example, you can set `X-Plex-Client-Identifier` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetServerResources`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration. + + +### Available Globals + +The following global parameter is available. + +| Name | Type | Required | Description | +| ---- | ---- |:--------:| ----------- | +| xPlexClientIdentifier | string | | The unique identifier for the client application +This is used to track the client application and its usage +(UUID, serial number, or other number unique per device) + | + + +### Example + +```csharp +using PlexAPI; +using PlexAPI.Models.Requests; +using PlexAPI.Models.Components; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" +); + +GetServerResourcesRequest req = new GetServerResourcesRequest() { + XPlexToken = "CV5xoxjTpFKUzBTShsaf", + IncludeHttps = PlexAPI.Models.Requests.IncludeHttps.One, + IncludeRelay = PlexAPI.Models.Requests.IncludeRelay.One, + IncludeIPv6 = PlexAPI.Models.Requests.IncludeIPv6.One, +}; + +var res = await sdk.Plex.GetServerResourcesAsync(req); + +// handle response +``` + + ## Error Handling @@ -258,7 +308,7 @@ using PlexAPI.Models.Errors; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); try @@ -284,7 +334,7 @@ catch (Exception ex) ## Summary -Plex-API: An Open API Spec for interacting with Plex.tv +Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server @@ -293,6 +343,7 @@ Plex-API: An Open API Spec for interacting with Plex.tv * [SDK Installation](#sdk-installation) * [SDK Example Usage](#sdk-example-usage) * [Available Resources and Operations](#available-resources-and-operations) +* [Global Parameters](#global-parameters) * [Error Handling](#error-handling) * [Server Selection](#server-selection) * [Authentication](#authentication) diff --git a/RELEASES.md b/RELEASES.md index 0610d6f..d256245 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -84,4 +84,14 @@ Based on: ### Generated - [csharp v0.4.2] . ### Releases -- [NuGet v0.4.2] https://www.nuget.org/packages/PlexAPI/0.4.2 - . \ No newline at end of file +- [NuGet v0.4.2] https://www.nuget.org/packages/PlexAPI/0.4.2 - . + +## 2024-09-05 23:59:32 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.390.7 (2.409.8) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v0.5.0] . +### Releases +- [NuGet v0.5.0] https://www.nuget.org/packages/PlexAPI/0.5.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index eed3d0d..d7e7b3c 100644 --- a/USAGE.md +++ b/USAGE.md @@ -5,7 +5,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Server.GetServerCapabilitiesAsync(); diff --git a/docs/Models/Errors/SearchLibraryErrors.md b/docs/Models/Errors/GetBannerImageErrors.md similarity index 97% rename from docs/Models/Errors/SearchLibraryErrors.md rename to docs/Models/Errors/GetBannerImageErrors.md index 6787704..8316910 100644 --- a/docs/Models/Errors/SearchLibraryErrors.md +++ b/docs/Models/Errors/GetBannerImageErrors.md @@ -1,4 +1,4 @@ -# SearchLibraryErrors +# GetBannerImageErrors ## Fields diff --git a/docs/Models/Errors/GetWatchlistResponseBody.md b/docs/Models/Errors/GetBannerImageResponseBody.md similarity index 92% rename from docs/Models/Errors/GetWatchlistResponseBody.md rename to docs/Models/Errors/GetBannerImageResponseBody.md index 244d37a..d6f89f9 100644 --- a/docs/Models/Errors/GetWatchlistResponseBody.md +++ b/docs/Models/Errors/GetBannerImageResponseBody.md @@ -1,4 +1,4 @@ -# GetWatchlistResponseBody +# GetBannerImageResponseBody Unauthorized - Returned if the X-Plex-Token is missing from the header or query. @@ -7,5 +7,5 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Errors` | List<[GetWatchlistErrors](../../Models/Errors/GetWatchlistErrors.md)> | :heavy_minus_sign: | N/A | +| `Errors` | List<[GetBannerImageErrors](../../Models/Errors/GetBannerImageErrors.md)> | :heavy_minus_sign: | N/A | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Errors/GetServerIdentityErrors.md b/docs/Models/Errors/GetMediaProvidersErrors.md similarity index 97% rename from docs/Models/Errors/GetServerIdentityErrors.md rename to docs/Models/Errors/GetMediaProvidersErrors.md index 2b030bb..9f05461 100644 --- a/docs/Models/Errors/GetServerIdentityErrors.md +++ b/docs/Models/Errors/GetMediaProvidersErrors.md @@ -1,4 +1,4 @@ -# GetServerIdentityErrors +# GetMediaProvidersErrors ## Fields diff --git a/docs/Models/Errors/GetMediaProvidersResponseBody.md b/docs/Models/Errors/GetMediaProvidersResponseBody.md new file mode 100644 index 0000000..a95ca27 --- /dev/null +++ b/docs/Models/Errors/GetMediaProvidersResponseBody.md @@ -0,0 +1,11 @@ +# GetMediaProvidersResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetMediaProvidersErrors](../../Models/Errors/GetMediaProvidersErrors.md)> | :heavy_minus_sign: | N/A | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Errors/GetMetaDataByRatingKeyErrors.md b/docs/Models/Errors/GetMetaDataByRatingKeyErrors.md new file mode 100644 index 0000000..6bdbdfe --- /dev/null +++ b/docs/Models/Errors/GetMetaDataByRatingKeyErrors.md @@ -0,0 +1,10 @@ +# GetMetaDataByRatingKeyErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `Code` | *double* | :heavy_minus_sign: | N/A | 1001 | +| `Message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `Status` | *double* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/Models/Errors/GetMetaDataByRatingKeyResponseBody.md b/docs/Models/Errors/GetMetaDataByRatingKeyResponseBody.md new file mode 100644 index 0000000..03ae55c --- /dev/null +++ b/docs/Models/Errors/GetMetaDataByRatingKeyResponseBody.md @@ -0,0 +1,11 @@ +# GetMetaDataByRatingKeyResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetMetaDataByRatingKeyErrors](../../Models/Errors/GetMetaDataByRatingKeyErrors.md)> | :heavy_minus_sign: | N/A | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Errors/GetWatchlistErrors.md b/docs/Models/Errors/GetSearchLibraryErrors.md similarity index 97% rename from docs/Models/Errors/GetWatchlistErrors.md rename to docs/Models/Errors/GetSearchLibraryErrors.md index 0945ec5..d0d0715 100644 --- a/docs/Models/Errors/GetWatchlistErrors.md +++ b/docs/Models/Errors/GetSearchLibraryErrors.md @@ -1,4 +1,4 @@ -# GetWatchlistErrors +# GetSearchLibraryErrors ## Fields diff --git a/docs/Models/Errors/SearchLibraryResponseBody.md b/docs/Models/Errors/GetSearchLibraryResponseBody.md similarity index 89% rename from docs/Models/Errors/SearchLibraryResponseBody.md rename to docs/Models/Errors/GetSearchLibraryResponseBody.md index 98425fe..5945287 100644 --- a/docs/Models/Errors/SearchLibraryResponseBody.md +++ b/docs/Models/Errors/GetSearchLibraryResponseBody.md @@ -1,4 +1,4 @@ -# SearchLibraryResponseBody +# GetSearchLibraryResponseBody Unauthorized - Returned if the X-Plex-Token is missing from the header or query. @@ -7,5 +7,5 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Errors` | List<[SearchLibraryErrors](../../Models/Errors/SearchLibraryErrors.md)> | :heavy_minus_sign: | N/A | +| `Errors` | List<[GetSearchLibraryErrors](../../Models/Errors/GetSearchLibraryErrors.md)> | :heavy_minus_sign: | N/A | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Errors/GetServerIdentityResponseBody.md b/docs/Models/Errors/GetServerIdentityResponseBody.md index c5b3749..dc06749 100644 --- a/docs/Models/Errors/GetServerIdentityResponseBody.md +++ b/docs/Models/Errors/GetServerIdentityResponseBody.md @@ -1,11 +1,12 @@ # GetServerIdentityResponseBody -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Request Timeout ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Errors` | List<[GetServerIdentityErrors](../../Models/Errors/GetServerIdentityErrors.md)> | :heavy_minus_sign: | N/A | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Code` | *long* | :heavy_minus_sign: | N/A | 408 | +| `Message` | *string* | :heavy_minus_sign: | N/A | The server timed out waiting for the request. | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/Models/Errors/GetServerResourcesErrors.md b/docs/Models/Errors/GetServerResourcesErrors.md new file mode 100644 index 0000000..f55374d --- /dev/null +++ b/docs/Models/Errors/GetServerResourcesErrors.md @@ -0,0 +1,10 @@ +# GetServerResourcesErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `Code` | *double* | :heavy_minus_sign: | N/A | 1001 | +| `Message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `Status` | *double* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/Models/Errors/GetServerResourcesResponseBody.md b/docs/Models/Errors/GetServerResourcesResponseBody.md new file mode 100644 index 0000000..ce6e260 --- /dev/null +++ b/docs/Models/Errors/GetServerResourcesResponseBody.md @@ -0,0 +1,11 @@ +# GetServerResourcesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetServerResourcesErrors](../../Models/Errors/GetServerResourcesErrors.md)> | :heavy_minus_sign: | N/A | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Errors/GetResourcesErrors.md b/docs/Models/Errors/GetThumbImageErrors.md similarity index 97% rename from docs/Models/Errors/GetResourcesErrors.md rename to docs/Models/Errors/GetThumbImageErrors.md index 2c4b78b..a4455bd 100644 --- a/docs/Models/Errors/GetResourcesErrors.md +++ b/docs/Models/Errors/GetThumbImageErrors.md @@ -1,4 +1,4 @@ -# GetResourcesErrors +# GetThumbImageErrors ## Fields diff --git a/docs/Models/Errors/GetResourcesResponseBody.md b/docs/Models/Errors/GetThumbImageResponseBody.md similarity index 95% rename from docs/Models/Errors/GetResourcesResponseBody.md rename to docs/Models/Errors/GetThumbImageResponseBody.md index da17077..e3fdba2 100644 --- a/docs/Models/Errors/GetResourcesResponseBody.md +++ b/docs/Models/Errors/GetThumbImageResponseBody.md @@ -1,4 +1,4 @@ -# GetResourcesResponseBody +# GetThumbImageResponseBody Unauthorized - Returned if the X-Plex-Token is missing from the header or query. @@ -7,5 +7,5 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Errors` | List<[GetResourcesErrors](../../Models/Errors/GetResourcesErrors.md)> | :heavy_minus_sign: | N/A | +| `Errors` | List<[GetThumbImageErrors](../../Models/Errors/GetThumbImageErrors.md)> | :heavy_minus_sign: | N/A | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Errors/GetTokenByPinIdErrors.md b/docs/Models/Errors/GetTokenByPinIdErrors.md index 635382d..ad0f481 100644 --- a/docs/Models/Errors/GetTokenByPinIdErrors.md +++ b/docs/Models/Errors/GetTokenByPinIdErrors.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `Code` | *long* | :heavy_minus_sign: | N/A | 1020 | -| `Message` | *string* | :heavy_minus_sign: | N/A | Code not found or expired | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `Code` | *long* | :heavy_minus_sign: | N/A | 1000 | +| `Message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `Status` | *long* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/Models/Errors/GetTokenByPinIdPlexErrors.md b/docs/Models/Errors/GetTokenByPinIdPlexErrors.md new file mode 100644 index 0000000..31e6054 --- /dev/null +++ b/docs/Models/Errors/GetTokenByPinIdPlexErrors.md @@ -0,0 +1,9 @@ +# GetTokenByPinIdPlexErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `Code` | *long* | :heavy_minus_sign: | N/A | 1020 | +| `Message` | *string* | :heavy_minus_sign: | N/A | Code not found or expired | \ No newline at end of file diff --git a/docs/Models/Errors/GetTokenByPinIdPlexResponseBody.md b/docs/Models/Errors/GetTokenByPinIdPlexResponseBody.md new file mode 100644 index 0000000..bad0490 --- /dev/null +++ b/docs/Models/Errors/GetTokenByPinIdPlexResponseBody.md @@ -0,0 +1,11 @@ +# GetTokenByPinIdPlexResponseBody + +Not Found or Expired + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetTokenByPinIdPlexErrors](../../Models/Errors/GetTokenByPinIdPlexErrors.md)> | :heavy_minus_sign: | N/A | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Errors/GetTokenByPinIdResponseBody.md b/docs/Models/Errors/GetTokenByPinIdResponseBody.md index 8848339..c9ee2ca 100644 --- a/docs/Models/Errors/GetTokenByPinIdResponseBody.md +++ b/docs/Models/Errors/GetTokenByPinIdResponseBody.md @@ -1,6 +1,6 @@ # GetTokenByPinIdResponseBody -Not Found or Expired +Bad Request response when the X-Plex-Client-Identifier is missing ## Fields diff --git a/docs/Models/Errors/GetTopWatchedContentErrors.md b/docs/Models/Errors/GetTopWatchedContentErrors.md new file mode 100644 index 0000000..4b9db20 --- /dev/null +++ b/docs/Models/Errors/GetTopWatchedContentErrors.md @@ -0,0 +1,10 @@ +# GetTopWatchedContentErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `Code` | *double* | :heavy_minus_sign: | N/A | 1001 | +| `Message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `Status` | *double* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/Models/Errors/GetTopWatchedContentResponseBody.md b/docs/Models/Errors/GetTopWatchedContentResponseBody.md new file mode 100644 index 0000000..4546379 --- /dev/null +++ b/docs/Models/Errors/GetTopWatchedContentResponseBody.md @@ -0,0 +1,11 @@ +# GetTopWatchedContentResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetTopWatchedContentErrors](../../Models/Errors/GetTopWatchedContentErrors.md)> | :heavy_minus_sign: | N/A | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Errors/GetMetadataErrors.md b/docs/Models/Errors/GetWatchListErrors.md similarity index 97% rename from docs/Models/Errors/GetMetadataErrors.md rename to docs/Models/Errors/GetWatchListErrors.md index f462b5a..39e759b 100644 --- a/docs/Models/Errors/GetMetadataErrors.md +++ b/docs/Models/Errors/GetWatchListErrors.md @@ -1,4 +1,4 @@ -# GetMetadataErrors +# GetWatchListErrors ## Fields diff --git a/docs/Models/Errors/GetMetadataResponseBody.md b/docs/Models/Errors/GetWatchListResponseBody.md similarity index 95% rename from docs/Models/Errors/GetMetadataResponseBody.md rename to docs/Models/Errors/GetWatchListResponseBody.md index bb4b7e0..01e08a3 100644 --- a/docs/Models/Errors/GetMetadataResponseBody.md +++ b/docs/Models/Errors/GetWatchListResponseBody.md @@ -1,4 +1,4 @@ -# GetMetadataResponseBody +# GetWatchListResponseBody Unauthorized - Returned if the X-Plex-Token is missing from the header or query. @@ -7,5 +7,5 @@ Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Errors` | List<[GetMetadataErrors](../../Models/Errors/GetMetadataErrors.md)> | :heavy_minus_sign: | N/A | +| `Errors` | List<[GetWatchListErrors](../../Models/Errors/GetWatchListErrors.md)> | :heavy_minus_sign: | N/A | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Requests/ApplyUpdatesRequest.md b/docs/Models/Requests/ApplyUpdatesRequest.md index aa7a768..e6a3492 100644 --- a/docs/Models/Requests/ApplyUpdatesRequest.md +++ b/docs/Models/Requests/ApplyUpdatesRequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Tonight` | [Tonight](../../Models/Requests/Tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 | -| `Skip` | [Skip](../../Models/Requests/Skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. | 1 | \ No newline at end of file +| `Skip` | [Skip](../../Models/Requests/Skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/Connections.md b/docs/Models/Requests/Connections.md index afa7e6e..09f2e52 100644 --- a/docs/Models/Requests/Connections.md +++ b/docs/Models/Requests/Connections.md @@ -5,10 +5,10 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `Protocol` | *string* | :heavy_minus_sign: | N/A | -| `Address` | *string* | :heavy_minus_sign: | N/A | -| `Port` | *double* | :heavy_minus_sign: | N/A | -| `Uri` | *string* | :heavy_minus_sign: | N/A | -| `Local` | *bool* | :heavy_minus_sign: | N/A | -| `Relay` | *bool* | :heavy_minus_sign: | N/A | -| `IPv6` | *bool* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `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 diff --git a/docs/Models/Requests/CreatePlaylistQueryParamType.md b/docs/Models/Requests/CreatePlaylistQueryParamType.md new file mode 100644 index 0000000..5d1ab60 --- /dev/null +++ b/docs/Models/Requests/CreatePlaylistQueryParamType.md @@ -0,0 +1,12 @@ +# CreatePlaylistQueryParamType + +type of playlist to create + + +## Values + +| Name | Value | +| ------- | ------- | +| `Audio` | audio | +| `Video` | video | +| `Photo` | photo | \ No newline at end of file diff --git a/docs/Models/Requests/CreatePlaylistRequest.md b/docs/Models/Requests/CreatePlaylistRequest.md index 105958a..68f8fd0 100644 --- a/docs/Models/Requests/CreatePlaylistRequest.md +++ b/docs/Models/Requests/CreatePlaylistRequest.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `Title` | *string* | :heavy_check_mark: | name of the playlist | -| `Type` | [QueryParamType](../../Models/Requests/QueryParamType.md) | :heavy_check_mark: | type of playlist to create | -| `Smart` | [Smart](../../Models/Requests/Smart.md) | :heavy_check_mark: | whether the playlist is smart or not | -| `Uri` | *string* | :heavy_check_mark: | the content URI for the playlist | -| `PlayQueueID` | *double* | :heavy_minus_sign: | the play queue to copy to a playlist | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `Title` | *string* | :heavy_check_mark: | name of the playlist | +| `Type` | [CreatePlaylistQueryParamType](../../Models/Requests/CreatePlaylistQueryParamType.md) | :heavy_check_mark: | type of playlist to create | +| `Smart` | [Smart](../../Models/Requests/Smart.md) | :heavy_check_mark: | whether the playlist is smart or not | +| `Uri` | *string* | :heavy_check_mark: | the content URI for the playlist | +| `PlayQueueID` | *double* | :heavy_minus_sign: | the play queue to copy to a playlist | \ No newline at end of file diff --git a/docs/Models/Requests/DeleteLibraryRequest.md b/docs/Models/Requests/DeleteLibraryRequest.md index d88da70..c58fde2 100644 --- a/docs/Models/Requests/DeleteLibraryRequest.md +++ b/docs/Models/Requests/DeleteLibraryRequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | -| `SectionId` | *double* | :heavy_check_mark: | The id of the library | 15 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | \ No newline at end of file diff --git a/docs/Models/Requests/Feature.md b/docs/Models/Requests/Feature.md new file mode 100644 index 0000000..1138b9b --- /dev/null +++ b/docs/Models/Requests/Feature.md @@ -0,0 +1,10 @@ +# Feature + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `Key` | *string* | :heavy_minus_sign: | N/A | +| `Type` | *string* | :heavy_minus_sign: | N/A | +| `Directory` | List<[GetMediaProvidersDirectory](../../Models/Requests/GetMediaProvidersDirectory.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/Filter.md b/docs/Models/Requests/Filter.md index 6b3af5a..39e65cd 100644 --- a/docs/Models/Requests/Filter.md +++ b/docs/Models/Requests/Filter.md @@ -1,11 +1,12 @@ # Filter -Filters content by field and direction/equality -(Unknown if viewedAt is the only supported column) +Filter +## Values -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file +| Name | Value | +| ----------- | ----------- | +| `All` | all | +| `Available` | available | +| `Released` | released | \ No newline at end of file diff --git a/docs/Models/Requests/GetBannerImageRequest.md b/docs/Models/Requests/GetBannerImageRequest.md new file mode 100644 index 0000000..d0936fa --- /dev/null +++ b/docs/Models/Requests/GetBannerImageRequest.md @@ -0,0 +1,13 @@ +# GetBannerImageRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `RatingKey` | *long* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 | +| `Width` | *long* | :heavy_check_mark: | N/A | 396 | +| `Height` | *long* | :heavy_check_mark: | N/A | 396 | +| `MinSize` | *long* | :heavy_check_mark: | N/A | 1 | +| `Upscale` | *long* | :heavy_check_mark: | N/A | 1 | +| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/Models/Requests/GetBannerImageResponse.md b/docs/Models/Requests/GetBannerImageResponse.md new file mode 100644 index 0000000..0501ec9 --- /dev/null +++ b/docs/Models/Requests/GetBannerImageResponse.md @@ -0,0 +1,12 @@ +# GetBannerImageResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `Bytes` | *byte[]* | :heavy_minus_sign: | Successful response returning an image | +| `Headers` | Dictionary> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryDetailsRequest.md b/docs/Models/Requests/GetLibraryDetailsRequest.md index 9fd1651..799144e 100644 --- a/docs/Models/Requests/GetLibraryDetailsRequest.md +++ b/docs/Models/Requests/GetLibraryDetailsRequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `SectionId` | *double* | :heavy_check_mark: | The id of the library | 15 | +| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | | `IncludeDetails` | [IncludeDetails](../../Models/Requests/IncludeDetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsRequest.md b/docs/Models/Requests/GetLibraryItemsRequest.md index 7c52484..c36a913 100644 --- a/docs/Models/Requests/GetLibraryItemsRequest.md +++ b/docs/Models/Requests/GetLibraryItemsRequest.md @@ -3,8 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `SectionId` | *object* | :heavy_check_mark: | the Id of the library to query | | -| `Tag` | [Tag](../../Models/Requests/Tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | | -| `IncludeGuids` | *long* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | +| `Tag` | [Tag](../../Models/Requests/Tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | | +| `Type` | [Models.Requests.Type](../../Models/Requests/Type.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `IncludeGuids` | [IncludeGuids](../../Models/Requests/IncludeGuids.md) | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | +| `IncludeMeta` | [IncludeMeta](../../Models/Requests/IncludeMeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | +| `XPlexContainerStart` | *int* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | +| `XPlexContainerSize` | *int* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file diff --git a/docs/Models/Requests/GetMediaProvidersDirectory.md b/docs/Models/Requests/GetMediaProvidersDirectory.md new file mode 100644 index 0000000..0c4d524 --- /dev/null +++ b/docs/Models/Requests/GetMediaProvidersDirectory.md @@ -0,0 +1,21 @@ +# GetMediaProvidersDirectory + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `HubKey` | *string* | :heavy_minus_sign: | N/A | +| `Title` | *string* | :heavy_minus_sign: | N/A | +| `Agent` | *string* | :heavy_minus_sign: | N/A | +| `Language` | *string* | :heavy_minus_sign: | N/A | +| `Refreshing` | *bool* | :heavy_minus_sign: | N/A | +| `Scanner` | *string* | :heavy_minus_sign: | N/A | +| `Uuid` | *string* | :heavy_minus_sign: | N/A | +| `Id` | *string* | :heavy_minus_sign: | N/A | +| `Key` | *string* | :heavy_minus_sign: | N/A | +| `Type` | *string* | :heavy_minus_sign: | N/A | +| `Subtype` | *string* | :heavy_minus_sign: | N/A | +| `UpdatedAt` | *long* | :heavy_minus_sign: | N/A | +| `ScannedAt` | *long* | :heavy_minus_sign: | N/A | +| `Pivot` | List<[Pivot](../../Models/Requests/Pivot.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetMediaProvidersMediaContainer.md b/docs/Models/Requests/GetMediaProvidersMediaContainer.md new file mode 100644 index 0000000..c7e175b --- /dev/null +++ b/docs/Models/Requests/GetMediaProvidersMediaContainer.md @@ -0,0 +1,51 @@ +# GetMediaProvidersMediaContainer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `Size` | *long* | :heavy_minus_sign: | N/A | +| `AllowCameraUpload` | *bool* | :heavy_minus_sign: | N/A | +| `AllowChannelAccess` | *bool* | :heavy_minus_sign: | N/A | +| `AllowSharing` | *bool* | :heavy_minus_sign: | N/A | +| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | +| `AllowTuners` | *bool* | :heavy_minus_sign: | N/A | +| `BackgroundProcessing` | *bool* | :heavy_minus_sign: | N/A | +| `Certificate` | *bool* | :heavy_minus_sign: | N/A | +| `CompanionProxy` | *bool* | :heavy_minus_sign: | N/A | +| `CountryCode` | *string* | :heavy_minus_sign: | N/A | +| `Diagnostics` | *string* | :heavy_minus_sign: | N/A | +| `EventStream` | *bool* | :heavy_minus_sign: | N/A | +| `FriendlyName` | *string* | :heavy_minus_sign: | N/A | +| `Livetv` | *long* | :heavy_minus_sign: | N/A | +| `MachineIdentifier` | *string* | :heavy_minus_sign: | N/A | +| `MusicAnalysis` | *long* | :heavy_minus_sign: | N/A | +| `MyPlex` | *bool* | :heavy_minus_sign: | N/A | +| `MyPlexMappingState` | *string* | :heavy_minus_sign: | N/A | +| `MyPlexSigninState` | *string* | :heavy_minus_sign: | N/A | +| `MyPlexSubscription` | *bool* | :heavy_minus_sign: | N/A | +| `MyPlexUsername` | *string* | :heavy_minus_sign: | N/A | +| `OfflineTranscode` | *long* | :heavy_minus_sign: | N/A | +| `OwnerFeatures` | *string* | :heavy_minus_sign: | N/A | +| `Platform` | *string* | :heavy_minus_sign: | N/A | +| `PlatformVersion` | *string* | :heavy_minus_sign: | N/A | +| `PluginHost` | *bool* | :heavy_minus_sign: | N/A | +| `PushNotifications` | *bool* | :heavy_minus_sign: | N/A | +| `ReadOnlyLibraries` | *bool* | :heavy_minus_sign: | N/A | +| `StreamingBrainABRVersion` | *long* | :heavy_minus_sign: | N/A | +| `StreamingBrainVersion` | *long* | :heavy_minus_sign: | N/A | +| `Sync` | *bool* | :heavy_minus_sign: | N/A | +| `TranscoderActiveVideoSessions` | *long* | :heavy_minus_sign: | N/A | +| `TranscoderAudio` | *bool* | :heavy_minus_sign: | N/A | +| `TranscoderLyrics` | *bool* | :heavy_minus_sign: | N/A | +| `TranscoderSubtitles` | *bool* | :heavy_minus_sign: | N/A | +| `TranscoderVideo` | *bool* | :heavy_minus_sign: | N/A | +| `TranscoderVideoBitrates` | *string* | :heavy_minus_sign: | N/A | +| `TranscoderVideoQualities` | *string* | :heavy_minus_sign: | N/A | +| `TranscoderVideoResolutions` | *string* | :heavy_minus_sign: | N/A | +| `UpdatedAt` | *long* | :heavy_minus_sign: | N/A | +| `Updater` | *bool* | :heavy_minus_sign: | N/A | +| `Version` | *string* | :heavy_minus_sign: | N/A | +| `VoiceSearch` | *bool* | :heavy_minus_sign: | N/A | +| `MediaProvider` | List<[MediaProvider](../../Models/Requests/MediaProvider.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetMediaProvidersRequest.md b/docs/Models/Requests/GetMediaProvidersRequest.md new file mode 100644 index 0000000..2466085 --- /dev/null +++ b/docs/Models/Requests/GetMediaProvidersRequest.md @@ -0,0 +1,8 @@ +# GetMediaProvidersRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/Models/Requests/GetMediaProvidersResponse.md b/docs/Models/Requests/GetMediaProvidersResponse.md new file mode 100644 index 0000000..9545657 --- /dev/null +++ b/docs/Models/Requests/GetMediaProvidersResponse.md @@ -0,0 +1,11 @@ +# GetMediaProvidersResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `Object` | [Models.Requests.GetMediaProvidersResponseBody](../../Models/Requests/GetMediaProvidersResponseBody.md) | :heavy_minus_sign: | Media providers and their features | \ No newline at end of file diff --git a/docs/Models/Requests/GetMediaProvidersResponseBody.md b/docs/Models/Requests/GetMediaProvidersResponseBody.md new file mode 100644 index 0000000..c1de49d --- /dev/null +++ b/docs/Models/Requests/GetMediaProvidersResponseBody.md @@ -0,0 +1,10 @@ +# GetMediaProvidersResponseBody + +Media providers and their features + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `MediaContainer` | [GetMediaProvidersMediaContainer](../../Models/Requests/GetMediaProvidersMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataCountry.md b/docs/Models/Requests/GetMetaDataByRatingKeyCountry.md similarity index 95% rename from docs/Models/Requests/GetMetadataCountry.md rename to docs/Models/Requests/GetMetaDataByRatingKeyCountry.md index 8d8144e..ff7b8ea 100644 --- a/docs/Models/Requests/GetMetadataCountry.md +++ b/docs/Models/Requests/GetMetaDataByRatingKeyCountry.md @@ -1,4 +1,4 @@ -# GetMetadataCountry +# GetMetaDataByRatingKeyCountry ## Fields diff --git a/docs/Models/Requests/GetMetadataDirector.md b/docs/Models/Requests/GetMetaDataByRatingKeyDirector.md similarity index 98% rename from docs/Models/Requests/GetMetadataDirector.md rename to docs/Models/Requests/GetMetaDataByRatingKeyDirector.md index 0b0d3f1..d28c58e 100644 --- a/docs/Models/Requests/GetMetadataDirector.md +++ b/docs/Models/Requests/GetMetaDataByRatingKeyDirector.md @@ -1,4 +1,4 @@ -# GetMetadataDirector +# GetMetaDataByRatingKeyDirector ## Fields diff --git a/docs/Models/Requests/GetMetadataGenre.md b/docs/Models/Requests/GetMetaDataByRatingKeyGenre.md similarity index 94% rename from docs/Models/Requests/GetMetadataGenre.md rename to docs/Models/Requests/GetMetaDataByRatingKeyGenre.md index 56474ab..2f025bd 100644 --- a/docs/Models/Requests/GetMetadataGenre.md +++ b/docs/Models/Requests/GetMetaDataByRatingKeyGenre.md @@ -1,4 +1,4 @@ -# GetMetadataGenre +# GetMetaDataByRatingKeyGenre ## Fields diff --git a/docs/Models/Requests/GetMetaDataByRatingKeyMedia.md b/docs/Models/Requests/GetMetaDataByRatingKeyMedia.md new file mode 100644 index 0000000..2c3b9f4 --- /dev/null +++ b/docs/Models/Requests/GetMetaDataByRatingKeyMedia.md @@ -0,0 +1,24 @@ +# GetMetaDataByRatingKeyMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `Id` | *int* | :heavy_minus_sign: | N/A | 15 | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 141417 | +| `Bitrate` | *int* | :heavy_minus_sign: | N/A | 2278 | +| `Width` | *int* | :heavy_minus_sign: | N/A | 1920 | +| `Height` | *int* | :heavy_minus_sign: | N/A | 814 | +| `AspectRatio` | *double* | :heavy_minus_sign: | N/A | 2.35 | +| `AudioChannels` | *int* | :heavy_minus_sign: | N/A | 2 | +| `AudioCodec` | *string* | :heavy_minus_sign: | N/A | aac | +| `VideoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | +| `VideoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 | +| `Container` | *string* | :heavy_minus_sign: | N/A | mp4 | +| `VideoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | +| `OptimizedForStreaming` | *int* | :heavy_minus_sign: | N/A | 0 | +| `AudioProfile` | *string* | :heavy_minus_sign: | N/A | lc | +| `Has64bitOffsets` | *bool* | :heavy_minus_sign: | N/A | false | +| `VideoProfile` | *string* | :heavy_minus_sign: | N/A | high | +| `Part` | List<[GetMetaDataByRatingKeyPart](../../Models/Requests/GetMetaDataByRatingKeyPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetaDataByRatingKeyMediaContainer.md b/docs/Models/Requests/GetMetaDataByRatingKeyMediaContainer.md new file mode 100644 index 0000000..16983e9 --- /dev/null +++ b/docs/Models/Requests/GetMetaDataByRatingKeyMediaContainer.md @@ -0,0 +1,16 @@ +# GetMetaDataByRatingKeyMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 1 | +| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | true | +| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | +| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `LibrarySectionUUID` | *string* | :heavy_minus_sign: | N/A | cfc899d7-3000-46f6-8489-b9592714ada5 | +| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1698860922 | +| `Metadata` | List<[GetMetaDataByRatingKeyMetadata](../../Models/Requests/GetMetaDataByRatingKeyMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataMetadata.md b/docs/Models/Requests/GetMetaDataByRatingKeyMetadata.md similarity index 98% rename from docs/Models/Requests/GetMetadataMetadata.md rename to docs/Models/Requests/GetMetaDataByRatingKeyMetadata.md index a0dbb5b..4463003 100644 --- a/docs/Models/Requests/GetMetadataMetadata.md +++ b/docs/Models/Requests/GetMetaDataByRatingKeyMetadata.md @@ -1,4 +1,4 @@ -# GetMetadataMetadata +# GetMetaDataByRatingKeyMetadata ## Fields @@ -29,12 +29,12 @@ | `AudienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | | `HasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 | | `RatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `Media` | List<[GetMetadataMedia](../../Models/Requests/GetMetadataMedia.md)> | :heavy_minus_sign: | N/A | | -| `Genre` | List<[GetMetadataGenre](../../Models/Requests/GetMetadataGenre.md)> | :heavy_minus_sign: | N/A | | -| `Country` | List<[GetMetadataCountry](../../Models/Requests/GetMetadataCountry.md)> | :heavy_minus_sign: | N/A | | +| `Media` | List<[GetMetaDataByRatingKeyMedia](../../Models/Requests/GetMetaDataByRatingKeyMedia.md)> | :heavy_minus_sign: | N/A | | +| `Genre` | List<[GetMetaDataByRatingKeyGenre](../../Models/Requests/GetMetaDataByRatingKeyGenre.md)> | :heavy_minus_sign: | N/A | | +| `Country` | List<[GetMetaDataByRatingKeyCountry](../../Models/Requests/GetMetaDataByRatingKeyCountry.md)> | :heavy_minus_sign: | N/A | | | `Guids` | List<[Guids](../../Models/Requests/Guids.md)> | :heavy_minus_sign: | N/A | | | `Ratings` | List<[Ratings](../../Models/Requests/Ratings.md)> | :heavy_minus_sign: | N/A | | -| `Director` | List<[GetMetadataDirector](../../Models/Requests/GetMetadataDirector.md)> | :heavy_minus_sign: | N/A | | -| `Writer` | List<[GetMetadataWriter](../../Models/Requests/GetMetadataWriter.md)> | :heavy_minus_sign: | N/A | | -| `Role` | List<[GetMetadataRole](../../Models/Requests/GetMetadataRole.md)> | :heavy_minus_sign: | N/A | | +| `Director` | List<[GetMetaDataByRatingKeyDirector](../../Models/Requests/GetMetaDataByRatingKeyDirector.md)> | :heavy_minus_sign: | N/A | | +| `Writer` | List<[GetMetaDataByRatingKeyWriter](../../Models/Requests/GetMetaDataByRatingKeyWriter.md)> | :heavy_minus_sign: | N/A | | +| `Role` | List<[GetMetaDataByRatingKeyRole](../../Models/Requests/GetMetaDataByRatingKeyRole.md)> | :heavy_minus_sign: | N/A | | | `Producer` | List<[Producer](../../Models/Requests/Producer.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataPart.md b/docs/Models/Requests/GetMetaDataByRatingKeyPart.md similarity index 99% rename from docs/Models/Requests/GetMetadataPart.md rename to docs/Models/Requests/GetMetaDataByRatingKeyPart.md index 40aa94d..1dd0587 100644 --- a/docs/Models/Requests/GetMetadataPart.md +++ b/docs/Models/Requests/GetMetaDataByRatingKeyPart.md @@ -1,4 +1,4 @@ -# GetMetadataPart +# GetMetaDataByRatingKeyPart ## Fields diff --git a/docs/Models/Requests/GetMetadataRequest.md b/docs/Models/Requests/GetMetaDataByRatingKeyRequest.md similarity index 51% rename from docs/Models/Requests/GetMetadataRequest.md rename to docs/Models/Requests/GetMetaDataByRatingKeyRequest.md index acfc012..66fe508 100644 --- a/docs/Models/Requests/GetMetadataRequest.md +++ b/docs/Models/Requests/GetMetaDataByRatingKeyRequest.md @@ -1,8 +1,8 @@ -# GetMetadataRequest +# GetMetaDataByRatingKeyRequest ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `RatingKey` | *double* | :heavy_check_mark: | the id of the library item to return the children of. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `RatingKey` | *long* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataResponse.md b/docs/Models/Requests/GetMetaDataByRatingKeyResponse.md similarity index 94% rename from docs/Models/Requests/GetMetadataResponse.md rename to docs/Models/Requests/GetMetaDataByRatingKeyResponse.md index f807d46..6878b07 100644 --- a/docs/Models/Requests/GetMetadataResponse.md +++ b/docs/Models/Requests/GetMetaDataByRatingKeyResponse.md @@ -1,4 +1,4 @@ -# GetMetadataResponse +# GetMetaDataByRatingKeyResponse ## Fields @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `Object` | [Models.Requests.GetMetadataResponseBody](../../Models/Requests/GetMetadataResponseBody.md) | :heavy_minus_sign: | The metadata of the library item. | \ No newline at end of file +| `Object` | [Models.Requests.GetMetaDataByRatingKeyResponseBody](../../Models/Requests/GetMetaDataByRatingKeyResponseBody.md) | :heavy_minus_sign: | The metadata of the library item. | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetaDataByRatingKeyResponseBody.md b/docs/Models/Requests/GetMetaDataByRatingKeyResponseBody.md new file mode 100644 index 0000000..4b41380 --- /dev/null +++ b/docs/Models/Requests/GetMetaDataByRatingKeyResponseBody.md @@ -0,0 +1,10 @@ +# GetMetaDataByRatingKeyResponseBody + +The metadata of the library item. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `MediaContainer` | [GetMetaDataByRatingKeyMediaContainer](../../Models/Requests/GetMetaDataByRatingKeyMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataRole.md b/docs/Models/Requests/GetMetaDataByRatingKeyRole.md similarity index 99% rename from docs/Models/Requests/GetMetadataRole.md rename to docs/Models/Requests/GetMetaDataByRatingKeyRole.md index 9aae319..f590998 100644 --- a/docs/Models/Requests/GetMetadataRole.md +++ b/docs/Models/Requests/GetMetaDataByRatingKeyRole.md @@ -1,4 +1,4 @@ -# GetMetadataRole +# GetMetaDataByRatingKeyRole ## Fields diff --git a/docs/Models/Requests/GetMetadataWriter.md b/docs/Models/Requests/GetMetaDataByRatingKeyWriter.md similarity index 98% rename from docs/Models/Requests/GetMetadataWriter.md rename to docs/Models/Requests/GetMetaDataByRatingKeyWriter.md index 5f31403..772f05c 100644 --- a/docs/Models/Requests/GetMetadataWriter.md +++ b/docs/Models/Requests/GetMetaDataByRatingKeyWriter.md @@ -1,4 +1,4 @@ -# GetMetadataWriter +# GetMetaDataByRatingKeyWriter ## Fields diff --git a/docs/Models/Requests/GetMetadataMedia.md b/docs/Models/Requests/GetMetadataMedia.md deleted file mode 100644 index 4cb5811..0000000 --- a/docs/Models/Requests/GetMetadataMedia.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetMetadataMedia - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `Id` | *int* | :heavy_minus_sign: | N/A | 15 | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 141417 | -| `Bitrate` | *int* | :heavy_minus_sign: | N/A | 2278 | -| `Width` | *int* | :heavy_minus_sign: | N/A | 1920 | -| `Height` | *int* | :heavy_minus_sign: | N/A | 814 | -| `AspectRatio` | *double* | :heavy_minus_sign: | N/A | 2.35 | -| `AudioChannels` | *int* | :heavy_minus_sign: | N/A | 2 | -| `AudioCodec` | *string* | :heavy_minus_sign: | N/A | aac | -| `VideoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | -| `VideoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 | -| `Container` | *string* | :heavy_minus_sign: | N/A | mp4 | -| `VideoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | -| `OptimizedForStreaming` | *int* | :heavy_minus_sign: | N/A | 0 | -| `AudioProfile` | *string* | :heavy_minus_sign: | N/A | lc | -| `Has64bitOffsets` | *bool* | :heavy_minus_sign: | N/A | false | -| `VideoProfile` | *string* | :heavy_minus_sign: | N/A | high | -| `Part` | List<[GetMetadataPart](../../Models/Requests/GetMetadataPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataMediaContainer.md b/docs/Models/Requests/GetMetadataMediaContainer.md deleted file mode 100644 index e807f90..0000000 --- a/docs/Models/Requests/GetMetadataMediaContainer.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetMetadataMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 1 | -| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | true | -| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | -| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `LibrarySectionUUID` | *string* | :heavy_minus_sign: | N/A | cfc899d7-3000-46f6-8489-b9592714ada5 | -| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1698860922 | -| `Metadata` | List<[GetMetadataMetadata](../../Models/Requests/GetMetadataMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataResponseBody.md b/docs/Models/Requests/GetMetadataResponseBody.md deleted file mode 100644 index d7c81eb..0000000 --- a/docs/Models/Requests/GetMetadataResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMetadataResponseBody - -The metadata of the library item. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `MediaContainer` | [GetMetadataMediaContainer](../../Models/Requests/GetMetadataMediaContainer.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 282a0f6..96718af 100644 --- a/docs/Models/Requests/GetPinRequest.md +++ b/docs/Models/Requests/GetPinRequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `XPlexProduct` | *string* | :heavy_check_mark: | Product name of the application shown in the list of devices
| Postman | | `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`
| | -| `XPlexClientIdentifier` | *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)
| Postman | \ No newline at end of file +| `XPlexClientIdentifier` | *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 | +| `XPlexProduct` | *string* | :heavy_minus_sign: | N/A | Plex Web | \ No newline at end of file diff --git a/docs/Models/Requests/GetPlaylistContentsQueryParamType.md b/docs/Models/Requests/GetPlaylistContentsQueryParamType.md new file mode 100644 index 0000000..695573b --- /dev/null +++ b/docs/Models/Requests/GetPlaylistContentsQueryParamType.md @@ -0,0 +1,19 @@ +# GetPlaylistContentsQueryParamType + +The type of media to retrieve. +1 = movie +2 = show +3 = season +4 = episode +E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + + +## Values + +| Name | Value | +| ------- | ------- | +| `One` | 1 | +| `Two` | 2 | +| `Three` | 3 | +| `Four` | 4 | \ No newline at end of file diff --git a/docs/Models/Requests/GetPlaylistContentsRequest.md b/docs/Models/Requests/GetPlaylistContentsRequest.md index 47d29ae..28f2d42 100644 --- a/docs/Models/Requests/GetPlaylistContentsRequest.md +++ b/docs/Models/Requests/GetPlaylistContentsRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist | -| `Type` | *double* | :heavy_check_mark: | the metadata type of the item to return | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist | | +| `Type` | [GetPlaylistContentsQueryParamType](../../Models/Requests/GetPlaylistContentsQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | \ No newline at end of file diff --git a/docs/Models/Requests/GetRecentlyAddedRequest.md b/docs/Models/Requests/GetRecentlyAddedRequest.md new file mode 100644 index 0000000..9a4adb7 --- /dev/null +++ b/docs/Models/Requests/GetRecentlyAddedRequest.md @@ -0,0 +1,9 @@ +# GetRecentlyAddedRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `XPlexContainerStart` | *int* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | +| `XPlexContainerSize` | *int* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file diff --git a/docs/Models/Requests/GetRefreshLibraryMetadataRequest.md b/docs/Models/Requests/GetRefreshLibraryMetadataRequest.md index 5fb0dbf..e7469b4 100644 --- a/docs/Models/Requests/GetRefreshLibraryMetadataRequest.md +++ b/docs/Models/Requests/GetRefreshLibraryMetadataRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `SectionId` | *double* | :heavy_check_mark: | The id of the library | 15 | -| `Force` | [Force](../../Models/Requests/Force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | +| `Force` | [Force](../../Models/Requests/Force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 | \ No newline at end of file diff --git a/docs/Models/Requests/GetSearchLibraryMediaContainer.md b/docs/Models/Requests/GetSearchLibraryMediaContainer.md new file mode 100644 index 0000000..c33c5c5 --- /dev/null +++ b/docs/Models/Requests/GetSearchLibraryMediaContainer.md @@ -0,0 +1,20 @@ +# GetSearchLibraryMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 2 | +| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | false | +| `Art` | *string* | :heavy_minus_sign: | N/A | /:/resources/show-fanart.jpg | +| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1698860922 | +| `Nocache` | *bool* | :heavy_minus_sign: | N/A | true | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/show.png | +| `Title1` | *string* | :heavy_minus_sign: | N/A | TV Shows | +| `Title2` | *string* | :heavy_minus_sign: | N/A | Search for '' | +| `ViewGroup` | *string* | :heavy_minus_sign: | N/A | season | +| `ViewMode` | *int* | :heavy_minus_sign: | N/A | 65593 | +| `Metadata` | List<[GetSearchLibraryMetadata](../../Models/Requests/GetSearchLibraryMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/SearchLibraryMetadata.md b/docs/Models/Requests/GetSearchLibraryMetadata.md similarity index 99% rename from docs/Models/Requests/SearchLibraryMetadata.md rename to docs/Models/Requests/GetSearchLibraryMetadata.md index 1641823..7e97bb3 100644 --- a/docs/Models/Requests/SearchLibraryMetadata.md +++ b/docs/Models/Requests/GetSearchLibraryMetadata.md @@ -1,4 +1,4 @@ -# SearchLibraryMetadata +# GetSearchLibraryMetadata ## Fields diff --git a/docs/Models/Requests/GetSearchLibraryRequest.md b/docs/Models/Requests/GetSearchLibraryRequest.md new file mode 100644 index 0000000..4292bf3 --- /dev/null +++ b/docs/Models/Requests/GetSearchLibraryRequest.md @@ -0,0 +1,9 @@ +# GetSearchLibraryRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | +| `Type` | [QueryParamType](../../Models/Requests/QueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | \ No newline at end of file diff --git a/docs/Models/Requests/SearchLibraryResponse.md b/docs/Models/Requests/GetSearchLibraryResponse.md similarity index 94% rename from docs/Models/Requests/SearchLibraryResponse.md rename to docs/Models/Requests/GetSearchLibraryResponse.md index 731b335..fb4e3b3 100644 --- a/docs/Models/Requests/SearchLibraryResponse.md +++ b/docs/Models/Requests/GetSearchLibraryResponse.md @@ -1,4 +1,4 @@ -# SearchLibraryResponse +# GetSearchLibraryResponse ## Fields @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `Object` | [Models.Requests.SearchLibraryResponseBody](../../Models/Requests/SearchLibraryResponseBody.md) | :heavy_minus_sign: | The contents of the library by section and type | \ No newline at end of file +| `Object` | [Models.Requests.GetSearchLibraryResponseBody](../../Models/Requests/GetSearchLibraryResponseBody.md) | :heavy_minus_sign: | The contents of the library by section and type | \ No newline at end of file diff --git a/docs/Models/Requests/GetSearchLibraryResponseBody.md b/docs/Models/Requests/GetSearchLibraryResponseBody.md new file mode 100644 index 0000000..97a8b3f --- /dev/null +++ b/docs/Models/Requests/GetSearchLibraryResponseBody.md @@ -0,0 +1,10 @@ +# GetSearchLibraryResponseBody + +The contents of the library by section and type + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `MediaContainer` | [GetSearchLibraryMediaContainer](../../Models/Requests/GetSearchLibraryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetResourcesRequest.md b/docs/Models/Requests/GetServerResourcesRequest.md similarity index 79% rename from docs/Models/Requests/GetResourcesRequest.md rename to docs/Models/Requests/GetServerResourcesRequest.md index 8756772..dbc3d85 100644 --- a/docs/Models/Requests/GetResourcesRequest.md +++ b/docs/Models/Requests/GetServerResourcesRequest.md @@ -1,11 +1,12 @@ -# GetResourcesRequest +# GetServerResourcesRequest ## Fields | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `XPlexClientIdentifier` | *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)
| Postman | -| `IncludeHttps` | [IncludeHttps](../../Models/Requests/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | | -| `IncludeRelay` | [IncludeRelay](../../Models/Requests/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results | | -| `IncludeIPv6` | [IncludeIPv6](../../Models/Requests/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | | \ No newline at end of file +| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | +| `XPlexClientIdentifier` | *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 diff --git a/docs/Models/Requests/GetResourcesResponse.md b/docs/Models/Requests/GetServerResourcesResponse.md similarity index 99% rename from docs/Models/Requests/GetResourcesResponse.md rename to docs/Models/Requests/GetServerResourcesResponse.md index 9ac2d40..20fed0f 100644 --- a/docs/Models/Requests/GetResourcesResponse.md +++ b/docs/Models/Requests/GetServerResourcesResponse.md @@ -1,4 +1,4 @@ -# GetResourcesResponse +# GetServerResourcesResponse ## Fields diff --git a/docs/Models/Requests/GetSessionHistoryRequest.md b/docs/Models/Requests/GetSessionHistoryRequest.md index f35c032..4fa54bc 100644 --- a/docs/Models/Requests/GetSessionHistoryRequest.md +++ b/docs/Models/Requests/GetSessionHistoryRequest.md @@ -7,5 +7,5 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Sort` | *string* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)
| | | `AccountId` | *long* | :heavy_minus_sign: | Filter results by those that are related to a specific users id
| 1 | -| `Filter` | [Filter](../../Models/Requests/Filter.md) | :heavy_minus_sign: | Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
| {
"viewed-at-greater-than": {
"value": "viewedAt\u003e"
},
"viewed-at-greater-than-or-equal-to": {
"value": "viewedAt\u003e=\u003e"
},
"viewed-at-less-than": {
"value": "viewedAt\u003c"
}
} | +| `Filter` | [QueryParamFilter](../../Models/Requests/QueryParamFilter.md) | :heavy_minus_sign: | Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
| {
"viewed-at-greater-than": {
"value": "viewedAt\u003e"
},
"viewed-at-greater-than-or-equal-to": {
"value": "viewedAt\u003e=\u003e"
},
"viewed-at-less-than": {
"value": "viewedAt\u003c"
}
} | | `LibrarySectionID` | *long* | :heavy_minus_sign: | Filters the results based on the id of a valid library section
| 12 | \ No newline at end of file diff --git a/docs/Models/Requests/GetThumbImageRequest.md b/docs/Models/Requests/GetThumbImageRequest.md new file mode 100644 index 0000000..4347572 --- /dev/null +++ b/docs/Models/Requests/GetThumbImageRequest.md @@ -0,0 +1,13 @@ +# GetThumbImageRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `RatingKey` | *long* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 | +| `Width` | *long* | :heavy_check_mark: | N/A | 396 | +| `Height` | *long* | :heavy_check_mark: | N/A | 396 | +| `MinSize` | *long* | :heavy_check_mark: | N/A | 1 | +| `Upscale` | *long* | :heavy_check_mark: | N/A | 1 | +| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/Models/Requests/GetThumbImageResponse.md b/docs/Models/Requests/GetThumbImageResponse.md new file mode 100644 index 0000000..2745bcb --- /dev/null +++ b/docs/Models/Requests/GetThumbImageResponse.md @@ -0,0 +1,12 @@ +# GetThumbImageResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `Bytes` | *byte[]* | :heavy_minus_sign: | Successful response returning an image | +| `Headers` | Dictionary> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetTokenByPinIdRequest.md b/docs/Models/Requests/GetTokenByPinIdRequest.md index cddb3e0..1c9f5cb 100644 --- a/docs/Models/Requests/GetTokenByPinIdRequest.md +++ b/docs/Models/Requests/GetTokenByPinIdRequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `PinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | | -| `XPlexClientIdentifier` | *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)
| Postman | \ No newline at end of file +| `XPlexClientIdentifier` | *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 diff --git a/docs/Models/Requests/GetTopWatchedContentQueryParamType.md b/docs/Models/Requests/GetTopWatchedContentQueryParamType.md new file mode 100644 index 0000000..af56352 --- /dev/null +++ b/docs/Models/Requests/GetTopWatchedContentQueryParamType.md @@ -0,0 +1,19 @@ +# GetTopWatchedContentQueryParamType + +The type of media to retrieve. +1 = movie +2 = show +3 = season +4 = episode +E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + + +## Values + +| Name | Value | +| ------- | ------- | +| `One` | 1 | +| `Two` | 2 | +| `Three` | 3 | +| `Four` | 4 | \ No newline at end of file diff --git a/docs/Models/Requests/GetTopWatchedContentRequest.md b/docs/Models/Requests/GetTopWatchedContentRequest.md index a0115ae..46c8985 100644 --- a/docs/Models/Requests/GetTopWatchedContentRequest.md +++ b/docs/Models/Requests/GetTopWatchedContentRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `Type` | *long* | :heavy_check_mark: | the library type (1 - movies, 2 - shows, 3 - music) | | -| `IncludeGuids` | *long* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Type` | [GetTopWatchedContentQueryParamType](../../Models/Requests/GetTopWatchedContentQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `IncludeGuids` | *long* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | \ No newline at end of file diff --git a/docs/Models/Requests/GetTopWatchedContentResponse.md b/docs/Models/Requests/GetTopWatchedContentResponse.md index 286fd56..6a5a429 100644 --- a/docs/Models/Requests/GetTopWatchedContentResponse.md +++ b/docs/Models/Requests/GetTopWatchedContentResponse.md @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `Object` | [GetTopWatchedContentResponseBody](../../Models/Requests/GetTopWatchedContentResponseBody.md) | :heavy_minus_sign: | The metadata of the library item. | \ No newline at end of file +| `Object` | [Models.Requests.GetTopWatchedContentResponseBody](../../Models/Requests/GetTopWatchedContentResponseBody.md) | :heavy_minus_sign: | The metadata of the library item. | \ No newline at end of file diff --git a/docs/Models/Requests/GetUserDetailsPlexStatus.md b/docs/Models/Requests/GetUserDetailsAuthenticationResponseStatus.md similarity index 78% rename from docs/Models/Requests/GetUserDetailsPlexStatus.md rename to docs/Models/Requests/GetUserDetailsAuthenticationResponseStatus.md index f66d1f6..b38582f 100644 --- a/docs/Models/Requests/GetUserDetailsPlexStatus.md +++ b/docs/Models/Requests/GetUserDetailsAuthenticationResponseStatus.md @@ -1,4 +1,4 @@ -# GetUserDetailsPlexStatus +# GetUserDetailsAuthenticationResponseStatus String representation of subscriptionActive diff --git a/docs/Models/Requests/GetUserDetailsPlexResponseStatus.md b/docs/Models/Requests/GetUserDetailsAuthenticationStatus.md similarity index 82% rename from docs/Models/Requests/GetUserDetailsPlexResponseStatus.md rename to docs/Models/Requests/GetUserDetailsAuthenticationStatus.md index 3843300..e04bb78 100644 --- a/docs/Models/Requests/GetUserDetailsPlexResponseStatus.md +++ b/docs/Models/Requests/GetUserDetailsAuthenticationStatus.md @@ -1,4 +1,4 @@ -# GetUserDetailsPlexResponseStatus +# GetUserDetailsAuthenticationStatus String representation of subscriptionActive diff --git a/docs/Models/Requests/GetUserDetailsRequest.md b/docs/Models/Requests/GetUserDetailsRequest.md new file mode 100644 index 0000000..6ab3cdd --- /dev/null +++ b/docs/Models/Requests/GetUserDetailsRequest.md @@ -0,0 +1,8 @@ +# GetUserDetailsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/Models/Requests/GetUserDetailsSubscription.md b/docs/Models/Requests/GetUserDetailsSubscription.md index e9c7713..7296458 100644 --- a/docs/Models/Requests/GetUserDetailsSubscription.md +++ b/docs/Models/Requests/GetUserDetailsSubscription.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `Features` | List<[GetUserDetailsFeatures](../../Models/Requests/GetUserDetailsFeatures.md)> | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | -| `Active` | *bool* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | -| `SubscribedAt` | *string* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | -| `Status` | [GetUserDetailsPlexResponseStatus](../../Models/Requests/GetUserDetailsPlexResponseStatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | -| `PaymentService` | *string* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | -| `Plan` | *string* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `Features` | List<[GetUserDetailsFeatures](../../Models/Requests/GetUserDetailsFeatures.md)> | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | +| `Active` | *bool* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | +| `SubscribedAt` | *string* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | +| `Status` | [GetUserDetailsAuthenticationResponseStatus](../../Models/Requests/GetUserDetailsAuthenticationResponseStatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | +| `PaymentService` | *string* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | +| `Plan` | *string* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file diff --git a/docs/Models/Requests/GetWatchlistRequest.md b/docs/Models/Requests/GetWatchListRequest.md similarity index 74% rename from docs/Models/Requests/GetWatchlistRequest.md rename to docs/Models/Requests/GetWatchListRequest.md index e1100f0..a5a5e89 100644 --- a/docs/Models/Requests/GetWatchlistRequest.md +++ b/docs/Models/Requests/GetWatchListRequest.md @@ -1,16 +1,16 @@ -# GetWatchlistRequest +# GetWatchListRequest ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Filter` | [PathParamFilter](../../Models/Requests/PathParamFilter.md) | :heavy_check_mark: | Filter | -| `XPlexToken` | *string* | :heavy_check_mark: | User Token | -| `Sort` | *string* | :heavy_minus_sign: | In the format "field:dir". Available fields are "watchlistedAt" (Added At),
"titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating).
"dir" can be "asc" or "desc"
| -| `Libtype` | [Libtype](../../Models/Requests/Libtype.md) | :heavy_minus_sign: | The type of library to filter. Can be "movie" or "show", or all if not present.
| -| `Maxresults` | *int* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
| -| `IncludeCollections` | [IncludeCollections](../../Models/Requests/IncludeCollections.md) | :heavy_minus_sign: | include collections in the results
| -| `IncludeExternalMedia` | [IncludeExternalMedia](../../Models/Requests/IncludeExternalMedia.md) | :heavy_minus_sign: | include external media in the results
| -| `XPlexContainerStart` | *int* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
| -| `XPlexContainerSize` | *int* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
| \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Filter` | [Filter](../../Models/Requests/Filter.md) | :heavy_check_mark: | Filter | | +| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | +| `Sort` | *string* | :heavy_minus_sign: | In the format "field:dir". Available fields are "watchlistedAt" (Added At),
"titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating).
"dir" can be "asc" or "desc"
| | +| `Libtype` | [Libtype](../../Models/Requests/Libtype.md) | :heavy_minus_sign: | The type of library to filter. Can be "movie" or "show", or all if not present.
| | +| `Maxresults` | *int* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
| | +| `IncludeCollections` | [IncludeCollections](../../Models/Requests/IncludeCollections.md) | :heavy_minus_sign: | include collections in the results
| | +| `IncludeExternalMedia` | [IncludeExternalMedia](../../Models/Requests/IncludeExternalMedia.md) | :heavy_minus_sign: | include external media in the results
| | +| `XPlexContainerStart` | *int* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | +| `XPlexContainerSize` | *int* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file diff --git a/docs/Models/Requests/GetWatchlistResponse.md b/docs/Models/Requests/GetWatchListResponse.md similarity index 94% rename from docs/Models/Requests/GetWatchlistResponse.md rename to docs/Models/Requests/GetWatchListResponse.md index 9673298..9f6a220 100644 --- a/docs/Models/Requests/GetWatchlistResponse.md +++ b/docs/Models/Requests/GetWatchListResponse.md @@ -1,4 +1,4 @@ -# GetWatchlistResponse +# GetWatchListResponse ## Fields @@ -8,4 +8,4 @@ | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `Object` | [Models.Requests.GetWatchlistResponseBody](../../Models/Requests/GetWatchlistResponseBody.md) | :heavy_minus_sign: | Watchlist Data | \ No newline at end of file +| `Object` | [Models.Requests.GetWatchListResponseBody](../../Models/Requests/GetWatchListResponseBody.md) | :heavy_minus_sign: | Watchlist Data | \ No newline at end of file diff --git a/docs/Models/Requests/GetWatchlistResponseBody.md b/docs/Models/Requests/GetWatchListResponseBody.md similarity index 98% rename from docs/Models/Requests/GetWatchlistResponseBody.md rename to docs/Models/Requests/GetWatchListResponseBody.md index 9a52a1e..4d7c979 100644 --- a/docs/Models/Requests/GetWatchlistResponseBody.md +++ b/docs/Models/Requests/GetWatchListResponseBody.md @@ -1,4 +1,4 @@ -# GetWatchlistResponseBody +# GetWatchListResponseBody Watchlist Data diff --git a/docs/Models/Requests/IncludeGuids.md b/docs/Models/Requests/IncludeGuids.md new file mode 100644 index 0000000..1c116a3 --- /dev/null +++ b/docs/Models/Requests/IncludeGuids.md @@ -0,0 +1,12 @@ +# IncludeGuids + +Adds the Guids object to the response + + + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/IncludeMeta.md b/docs/Models/Requests/IncludeMeta.md new file mode 100644 index 0000000..4ea608c --- /dev/null +++ b/docs/Models/Requests/IncludeMeta.md @@ -0,0 +1,12 @@ +# IncludeMeta + +Adds the Meta object to the response + + + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/IncludeRelay.md b/docs/Models/Requests/IncludeRelay.md index 4b3e243..3fd2058 100644 --- a/docs/Models/Requests/IncludeRelay.md +++ b/docs/Models/Requests/IncludeRelay.md @@ -1,6 +1,8 @@ # IncludeRelay -Include Relay addresses in the results +Include Relay addresses in the results +E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 + ## Values diff --git a/docs/Models/Requests/MediaProvider.md b/docs/Models/Requests/MediaProvider.md new file mode 100644 index 0000000..20d2684 --- /dev/null +++ b/docs/Models/Requests/MediaProvider.md @@ -0,0 +1,12 @@ +# MediaProvider + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `Identifier` | *string* | :heavy_minus_sign: | N/A | +| `Title` | *string* | :heavy_minus_sign: | N/A | +| `Types` | *string* | :heavy_minus_sign: | N/A | +| `Protocols` | *string* | :heavy_minus_sign: | N/A | +| `Feature` | List<[Feature](../../Models/Requests/Feature.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/PathParamFilter.md b/docs/Models/Requests/PathParamFilter.md deleted file mode 100644 index 150c2a3..0000000 --- a/docs/Models/Requests/PathParamFilter.md +++ /dev/null @@ -1,12 +0,0 @@ -# PathParamFilter - -Filter - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `All` | all | -| `Available` | available | -| `Released` | released | \ No newline at end of file diff --git a/docs/Models/Requests/Pivot.md b/docs/Models/Requests/Pivot.md new file mode 100644 index 0000000..2b9e05e --- /dev/null +++ b/docs/Models/Requests/Pivot.md @@ -0,0 +1,13 @@ +# Pivot + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Id` | *string* | :heavy_minus_sign: | N/A | +| `Key` | *string* | :heavy_minus_sign: | N/A | +| `Type` | *string* | :heavy_minus_sign: | N/A | +| `Title` | *string* | :heavy_minus_sign: | N/A | +| `Context` | *string* | :heavy_minus_sign: | N/A | +| `Symbol` | *string* | :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 6804c4b..4776791 100644 --- a/docs/Models/Requests/PlexDevice.md +++ b/docs/Models/Requests/PlexDevice.md @@ -15,17 +15,17 @@ | `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` | *string* | :heavy_minus_sign: | N/A | -| `SourceTitle` | *string* | :heavy_minus_sign: | N/A | -| `PublicAddress` | *string* | :heavy_minus_sign: | N/A | -| `AccessToken` | *string* | :heavy_minus_sign: | N/A | -| `Owned` | *bool* | :heavy_minus_sign: | N/A | -| `Home` | *bool* | :heavy_minus_sign: | N/A | -| `Synced` | *bool* | :heavy_minus_sign: | N/A | -| `Relay` | *bool* | :heavy_minus_sign: | N/A | -| `Presence` | *bool* | :heavy_minus_sign: | N/A | -| `HttpsRequired` | *bool* | :heavy_minus_sign: | N/A | -| `PublicAddressMatches` | *bool* | :heavy_minus_sign: | N/A | -| `DnsRebindingProtection` | *bool* | :heavy_minus_sign: | N/A | -| `NatLoopbackSupported` | *bool* | :heavy_minus_sign: | N/A | -| `Connections` | List<[Connections](../../Models/Requests/Connections.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file +| `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/PostUsersSignInDataRequest.md b/docs/Models/Requests/PostUsersSignInDataRequest.md index 48b4c03..8558027 100644 --- a/docs/Models/Requests/PostUsersSignInDataRequest.md +++ b/docs/Models/Requests/PostUsersSignInDataRequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `XPlexClientIdentifier` | *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)
| Postman | +| `XPlexClientIdentifier` | *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/QueryParamFilter.md b/docs/Models/Requests/QueryParamFilter.md new file mode 100644 index 0000000..7167549 --- /dev/null +++ b/docs/Models/Requests/QueryParamFilter.md @@ -0,0 +1,11 @@ +# QueryParamFilter + +Filters content by field and direction/equality +(Unknown if viewedAt is the only supported column) + + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Requests/QueryParamType.md b/docs/Models/Requests/QueryParamType.md index 549a0c1..23780bc 100644 --- a/docs/Models/Requests/QueryParamType.md +++ b/docs/Models/Requests/QueryParamType.md @@ -1,12 +1,19 @@ # QueryParamType -type of playlist to create +The type of media to retrieve. +1 = movie +2 = show +3 = season +4 = episode +E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + ## Values | Name | Value | | ------- | ------- | -| `Audio` | audio | -| `Video` | video | -| `Photo` | photo | \ No newline at end of file +| `One` | 1 | +| `Two` | 2 | +| `Three` | 3 | +| `Four` | 4 | \ No newline at end of file diff --git a/docs/Models/Requests/SearchLibraryMediaContainer.md b/docs/Models/Requests/SearchLibraryMediaContainer.md deleted file mode 100644 index 4c7926e..0000000 --- a/docs/Models/Requests/SearchLibraryMediaContainer.md +++ /dev/null @@ -1,20 +0,0 @@ -# SearchLibraryMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 2 | -| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | false | -| `Art` | *string* | :heavy_minus_sign: | N/A | /:/resources/show-fanart.jpg | -| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1698860922 | -| `Nocache` | *bool* | :heavy_minus_sign: | N/A | true | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/show.png | -| `Title1` | *string* | :heavy_minus_sign: | N/A | TV Shows | -| `Title2` | *string* | :heavy_minus_sign: | N/A | Search for '' | -| `ViewGroup` | *string* | :heavy_minus_sign: | N/A | season | -| `ViewMode` | *int* | :heavy_minus_sign: | N/A | 65593 | -| `Metadata` | List<[SearchLibraryMetadata](../../Models/Requests/SearchLibraryMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/SearchLibraryRequest.md b/docs/Models/Requests/SearchLibraryRequest.md deleted file mode 100644 index f27c306..0000000 --- a/docs/Models/Requests/SearchLibraryRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# SearchLibraryRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `SectionId` | *long* | :heavy_check_mark: | the Id of the library to query | -| `Type` | [Models.Requests.Type](../../Models/Requests/Type.md) | :heavy_check_mark: | Plex content type to search for | \ No newline at end of file diff --git a/docs/Models/Requests/SearchLibraryResponseBody.md b/docs/Models/Requests/SearchLibraryResponseBody.md deleted file mode 100644 index 557d503..0000000 --- a/docs/Models/Requests/SearchLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# SearchLibraryResponseBody - -The contents of the library by section and type - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `MediaContainer` | [SearchLibraryMediaContainer](../../Models/Requests/SearchLibraryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/Skip.md b/docs/Models/Requests/Skip.md index bdc10b9..83cdee9 100644 --- a/docs/Models/Requests/Skip.md +++ b/docs/Models/Requests/Skip.md @@ -1,6 +1,6 @@ # Skip -Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. +Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. ## Values diff --git a/docs/Models/Requests/StatisticsBandwidth.md b/docs/Models/Requests/StatisticsBandwidth.md index 44cd9ce..fd87269 100644 --- a/docs/Models/Requests/StatisticsBandwidth.md +++ b/docs/Models/Requests/StatisticsBandwidth.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | | `AccountID` | *int* | :heavy_minus_sign: | N/A | 238960586 | -| `DeviceID` | *int* | :heavy_minus_sign: | N/A | | +| `DeviceID` | *int* | :heavy_minus_sign: | N/A | 208 | | `Timespan` | *long* | :heavy_minus_sign: | N/A | 6 | | `At` | *int* | :heavy_minus_sign: | N/A | 1718387650 | | `Lan` | *bool* | :heavy_minus_sign: | N/A | true | diff --git a/docs/Models/Requests/Subscription.md b/docs/Models/Requests/Subscription.md index 5d4ad29..96c912e 100644 --- a/docs/Models/Requests/Subscription.md +++ b/docs/Models/Requests/Subscription.md @@ -5,11 +5,11 @@ If the account’s Plex Pass subscription is active ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `Features` | List<[Features](../../Models/Requests/Features.md)> | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | -| `Active` | *bool* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | -| `SubscribedAt` | *string* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | -| `Status` | [GetUserDetailsPlexStatus](../../Models/Requests/GetUserDetailsPlexStatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | -| `PaymentService` | *string* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | -| `Plan` | *string* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `Features` | List<[Features](../../Models/Requests/Features.md)> | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | +| `Active` | *bool* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | +| `SubscribedAt` | *string* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | +| `Status` | [GetUserDetailsAuthenticationStatus](../../Models/Requests/GetUserDetailsAuthenticationStatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | +| `PaymentService` | *string* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | +| `Plan` | *string* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file diff --git a/docs/Models/Requests/Type.md b/docs/Models/Requests/Type.md index 19bb07c..95a0e83 100644 --- a/docs/Models/Requests/Type.md +++ b/docs/Models/Requests/Type.md @@ -1,6 +1,12 @@ # Type -Plex content type to search for +The type of media to retrieve. +1 = movie +2 = show +3 = season +4 = episode +E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + ## Values diff --git a/docs/sdks/activities/README.md b/docs/sdks/activities/README.md index 0156f58..8512c70 100644 --- a/docs/sdks/activities/README.md +++ b/docs/sdks/activities/README.md @@ -29,7 +29,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Activities.GetServerActivitiesAsync(); @@ -62,7 +62,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Activities.CancelServerActivitiesAsync(activityUUID: "25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index 282ccf7..8e35bb4 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -10,6 +10,7 @@ API Calls regarding authentication for Plex Media Server * [GetTransientToken](#gettransienttoken) - Get a Transient Token. * [GetSourceConnectionInformation](#getsourceconnectioninformation) - Get Source Connection Information +* [GetUserDetails](#getuserdetails) - Get User Data By Token * [PostUsersSignInData](#postuserssignindata) - Get User SignIn Data ## GetTransientToken @@ -26,7 +27,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Authentication.GetTransientTokenAsync( @@ -71,7 +72,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Authentication.GetSourceConnectionInformationAsync(source: "server://client-identifier"); @@ -97,6 +98,46 @@ var res = await sdk.Authentication.GetSourceConnectionInformationAsync(source: " | PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | +## GetUserDetails + +Get the User data from the provided X-Plex-Token + +### Example Usage + +```csharp +using PlexAPI; +using PlexAPI.Models.Requests; +using PlexAPI.Models.Components; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" +); + +var res = await sdk.Authentication.GetUserDetailsAsync(xPlexToken: "CV5xoxjTpFKUzBTShsaf"); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | +| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | + +### Response + +**[GetUserDetailsResponse](../../Models/Requests/GetUserDetailsResponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| PlexAPI.Models.Errors.GetUserDetailsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | + + ## PostUsersSignInData Sign in user with username and password and return user data with Plex authentication token @@ -108,10 +149,10 @@ using PlexAPI; using PlexAPI.Models.Requests; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman"); +var sdk = new PlexAPISDK(xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"); var res = await sdk.Authentication.PostUsersSignInDataAsync( - xPlexClientIdentifier: "Postman", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", requestBody: new PostUsersSignInDataRequestBody() { Login = "username@email.com", Password = "password123", @@ -125,7 +166,7 @@ var res = await sdk.Authentication.PostUsersSignInDataAsync( | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `XPlexClientIdentifier` | *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)
| Postman | +| `XPlexClientIdentifier` | *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 | diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index 2ab5491..20c5008 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -26,7 +26,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Butler.GetButlerTasksAsync(); @@ -63,7 +63,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Butler.StartAllTasksAsync(); @@ -96,7 +96,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Butler.StopAllTasksAsync(); @@ -134,7 +134,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Butler.StartTaskAsync(taskName: PlexAPI.Models.Requests.TaskName.CleanOldBundles); @@ -174,7 +174,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Butler.StopTaskAsync(taskName: PlexAPI.Models.Requests.PathParamTaskName.BackupDatabase); diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index 80a85fb..b7caa7f 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -24,7 +24,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Hubs.GetGlobalHubsAsync( @@ -68,7 +68,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Hubs.GetLibraryHubsAsync( diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index dd7d7fb..383f626 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -15,8 +15,8 @@ API Calls interacting with Plex Media Server Libraries * [DeleteLibrary](#deletelibrary) - Delete Library Section * [GetLibraryItems](#getlibraryitems) - Get Library Items * [GetRefreshLibraryMetadata](#getrefreshlibrarymetadata) - Refresh Metadata Of The Library -* [SearchLibrary](#searchlibrary) - Search Library -* [GetMetadata](#getmetadata) - Get Items Metadata +* [GetSearchLibrary](#getsearchlibrary) - Search Library +* [GetMetaDataByRatingKey](#getmetadatabyratingkey) - Get Metadata by RatingKey * [GetMetadataChildren](#getmetadatachildren) - Get Items Children * [GetTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content * [GetOnDeck](#getondeck) - Get On Deck @@ -34,7 +34,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Library.GetFileHashAsync( @@ -73,18 +73,29 @@ This endpoint will return the recently added content. ```csharp using PlexAPI; +using PlexAPI.Models.Requests; using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); -var res = await sdk.Library.GetRecentlyAddedAsync(); +var res = await sdk.Library.GetRecentlyAddedAsync( + xPlexContainerStart: 0, + xPlexContainerSize: 50 +); // handle response ``` +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `XPlexContainerStart` | *int* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | +| `XPlexContainerSize` | *int* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | + ### Response **[GetRecentlyAddedResponse](../../Models/Requests/GetRecentlyAddedResponse.md)** @@ -115,7 +126,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Library.GetAllLibrariesAsync(); @@ -187,11 +198,11 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Library.GetLibraryDetailsAsync( - sectionId: 15D, + sectionKey: 9518, includeDetails: PlexAPI.Models.Requests.IncludeDetails.Zero ); @@ -202,7 +213,7 @@ var res = await sdk.Library.GetLibraryDetailsAsync( | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `SectionId` | *double* | :heavy_check_mark: | The id of the library | 15 | +| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | | `IncludeDetails` | [IncludeDetails](../../Models/Requests/IncludeDetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | ### Response @@ -230,19 +241,19 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); -var res = await sdk.Library.DeleteLibraryAsync(sectionId: 15D); +var res = await sdk.Library.DeleteLibraryAsync(sectionKey: 9518); // handle response ``` ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | -| `SectionId` | *double* | :heavy_check_mark: | The id of the library | 15 | +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | ### Response @@ -289,25 +300,29 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); -var res = await sdk.Library.GetLibraryItemsAsync( - sectionId: "", - tag: PlexAPI.Models.Requests.Tag.Genre, - includeGuids: 1 -); +GetLibraryItemsRequest req = new GetLibraryItemsRequest() { + SectionKey = 9518, + Tag = PlexAPI.Models.Requests.Tag.Edition, + Type = PlexAPI.Models.Requests.Type.Two, + IncludeGuids = PlexAPI.Models.Requests.IncludeGuids.One, + IncludeMeta = PlexAPI.Models.Requests.IncludeMeta.One, + XPlexContainerStart = 0, + XPlexContainerSize = 50, +}; + +var res = await sdk.Library.GetLibraryItemsAsync(req); // handle response ``` ### Parameters -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `SectionId` | *object* | :heavy_check_mark: | the Id of the library to query | | -| `Tag` | [Tag](../../Models/Requests/Tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | | -| `IncludeGuids` | *long* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [GetLibraryItemsRequest](../../Models/Requests/GetLibraryItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response @@ -335,11 +350,11 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Library.GetRefreshLibraryMetadataAsync( - sectionId: 15D, + sectionKey: 9518, force: PlexAPI.Models.Requests.Force.One ); @@ -348,10 +363,10 @@ var res = await sdk.Library.GetRefreshLibraryMetadataAsync( ### Parameters -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `SectionId` | *double* | :heavy_check_mark: | The id of the library | 15 | -| `Force` | [Force](../../Models/Requests/Force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 | +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | +| `Force` | [Force](../../Models/Requests/Force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 | ### Response @@ -365,7 +380,7 @@ var res = await sdk.Library.GetRefreshLibraryMetadataAsync( | PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | -## SearchLibrary +## GetSearchLibrary Search for content within a specific section of the library. @@ -396,12 +411,12 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); -var res = await sdk.Library.SearchLibraryAsync( - sectionId: 933505, - type: PlexAPI.Models.Requests.Type.Four +var res = await sdk.Library.GetSearchLibraryAsync( + sectionKey: 9518, + type: PlexAPI.Models.Requests.QueryParamType.Two ); // handle response @@ -409,24 +424,24 @@ var res = await sdk.Library.SearchLibraryAsync( ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `SectionId` | *long* | :heavy_check_mark: | the Id of the library to query | -| `Type` | [Models.Requests.Type](../../Models/Requests/Type.md) | :heavy_check_mark: | Plex content type to search for | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | +| `Type` | [QueryParamType](../../Models/Requests/QueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | ### Response -**[SearchLibraryResponse](../../Models/Requests/SearchLibraryResponse.md)** +**[GetSearchLibraryResponse](../../Models/Requests/GetSearchLibraryResponse.md)** ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| PlexAPI.Models.Errors.SearchLibraryResponseBody | 401 | application/json | -| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| PlexAPI.Models.Errors.GetSearchLibraryResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | -## GetMetadata +## GetMetaDataByRatingKey This endpoint will return the metadata of a library item specified with the ratingKey. @@ -440,30 +455,30 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); -var res = await sdk.Library.GetMetadataAsync(ratingKey: 8382.31D); +var res = await sdk.Library.GetMetaDataByRatingKeyAsync(ratingKey: 9518); // handle response ``` ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `RatingKey` | *double* | :heavy_check_mark: | the id of the library item to return the children of. | +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `RatingKey` | *long* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 | ### Response -**[GetMetadataResponse](../../Models/Requests/GetMetadataResponse.md)** +**[GetMetaDataByRatingKeyResponse](../../Models/Requests/GetMetaDataByRatingKeyResponse.md)** ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| PlexAPI.Models.Errors.GetMetadataResponseBody | 401 | application/json | -| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| PlexAPI.Models.Errors.GetMetaDataByRatingKeyResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetMetadataChildren @@ -480,7 +495,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Library.GetMetadataChildrenAsync( @@ -524,11 +539,11 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Library.GetTopWatchedContentAsync( - type: 505531, + type: PlexAPI.Models.Requests.GetTopWatchedContentQueryParamType.Two, includeGuids: 1 ); @@ -537,10 +552,10 @@ var res = await sdk.Library.GetTopWatchedContentAsync( ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `Type` | *long* | :heavy_check_mark: | the library type (1 - movies, 2 - shows, 3 - music) | | -| `IncludeGuids` | *long* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Type` | [GetTopWatchedContentQueryParamType](../../Models/Requests/GetTopWatchedContentQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `IncludeGuids` | *long* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | ### Response @@ -548,9 +563,10 @@ var res = await sdk.Library.GetTopWatchedContentAsync( ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| PlexAPI.Models.Errors.GetTopWatchedContentResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetOnDeck @@ -566,7 +582,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Library.GetOnDeckAsync(); diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index fc9baef..ee2502b 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -26,7 +26,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Log.LogLineAsync( @@ -91,7 +91,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); string req = "level=4&message=Test%20message%201&source=postman @@ -134,7 +134,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Log.EnablePaperTrailAsync(); diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md index a8740ce..1492410 100644 --- a/docs/sdks/media/README.md +++ b/docs/sdks/media/README.md @@ -11,6 +11,8 @@ API Calls interacting with Plex Media Server Media * [MarkPlayed](#markplayed) - Mark Media Played * [MarkUnplayed](#markunplayed) - Mark Media Unplayed * [UpdatePlayProgress](#updateplayprogress) - Update Media Play Progress +* [GetBannerImage](#getbannerimage) - Get Banner Image +* [GetThumbImage](#getthumbimage) - Get Thumb Image ## MarkPlayed @@ -25,7 +27,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Media.MarkPlayedAsync(key: 59398D); @@ -64,7 +66,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Media.MarkUnplayedAsync(key: 59398D); @@ -104,11 +106,11 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Media.UpdatePlayProgressAsync( - key: "", + key: "", time: 90000D, state: "played" ); @@ -134,3 +136,99 @@ var res = await sdk.Media.UpdatePlayProgressAsync( | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | | PlexAPI.Models.Errors.UpdatePlayProgressResponseBody | 401 | application/json | | PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | + + +## GetBannerImage + +Gets the banner image of the media item + +### Example Usage + +```csharp +using PlexAPI; +using PlexAPI.Models.Requests; +using PlexAPI.Models.Components; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" +); + +GetBannerImageRequest req = new GetBannerImageRequest() { + RatingKey = 9518, + Width = 396, + Height = 396, + MinSize = 1, + Upscale = 1, + XPlexToken = "CV5xoxjTpFKUzBTShsaf", +}; + +var res = await sdk.Media.GetBannerImageAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [GetBannerImageRequest](../../Models/Requests/GetBannerImageRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetBannerImageResponse](../../Models/Requests/GetBannerImageResponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| PlexAPI.Models.Errors.GetBannerImageResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | + + +## GetThumbImage + +Gets the thumbnail image of the media item + +### Example Usage + +```csharp +using PlexAPI; +using PlexAPI.Models.Requests; +using PlexAPI.Models.Components; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" +); + +GetThumbImageRequest req = new GetThumbImageRequest() { + RatingKey = 9518, + Width = 396, + Height = 396, + MinSize = 1, + Upscale = 1, + XPlexToken = "CV5xoxjTpFKUzBTShsaf", +}; + +var res = await sdk.Media.GetThumbImageAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [GetThumbImageRequest](../../Models/Requests/GetThumbImageRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetThumbImageResponse](../../Models/Requests/GetThumbImageResponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| PlexAPI.Models.Errors.GetThumbImageResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index 1dcd264..fd535f9 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -37,12 +37,12 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); CreatePlaylistRequest req = new CreatePlaylistRequest() { Title = "", - Type = PlexAPI.Models.Requests.QueryParamType.Photo, + Type = PlexAPI.Models.Requests.CreatePlaylistQueryParamType.Photo, Smart = PlexAPI.Models.Requests.Smart.One, Uri = "https://inborn-brochure.biz", }; @@ -83,7 +83,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Playlists.GetPlaylistsAsync( @@ -128,7 +128,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Playlists.GetPlaylistAsync(playlistID: 4109.48D); @@ -168,7 +168,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Playlists.DeletePlaylistAsync(playlistID: 216.22D); @@ -208,7 +208,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Playlists.UpdatePlaylistAsync( @@ -257,12 +257,12 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Playlists.GetPlaylistContentsAsync( playlistID: 5004.46D, - type: 9403.59D + type: PlexAPI.Models.Requests.GetPlaylistContentsQueryParamType.Two ); // handle response @@ -270,10 +270,10 @@ var res = await sdk.Playlists.GetPlaylistContentsAsync( ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist | -| `Type` | *double* | :heavy_check_mark: | the metadata type of the item to return | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `PlaylistID` | *double* | :heavy_check_mark: | the ID of the playlist | | +| `Type` | [GetPlaylistContentsQueryParamType](../../Models/Requests/GetPlaylistContentsQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | ### Response @@ -301,7 +301,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Playlists.ClearPlaylistContentsAsync(playlistID: 1893.18D); @@ -342,7 +342,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Playlists.AddPlaylistContentsAsync( @@ -388,7 +388,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Playlists.UploadPlaylistAsync( diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index af5b056..f37eff8 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -12,10 +12,9 @@ API Calls that perform operations directly against https://Plex.tv * [GetUserFriends](#getuserfriends) - Get list of friends of the user logged in * [GetGeoData](#getgeodata) - Get Geo Data * [GetHomeData](#gethomedata) - Get Plex Home Data -* [GetResources](#getresources) - Get Resources +* [GetServerResources](#getserverresources) - Get Server Resources * [GetPin](#getpin) - Get a Pin * [GetTokenByPinId](#gettokenbypinid) - Get Access Token by PinId -* [GetUserDetails](#getuserdetails) - Get UserData By Token ## GetCompanionsData @@ -29,7 +28,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Plex.GetCompanionsDataAsync(); @@ -67,7 +66,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Plex.GetUserFriendsAsync(); @@ -103,7 +102,7 @@ Returns the geolocation and locale data of the caller using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman"); +var sdk = new PlexAPISDK(xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"); var res = await sdk.Plex.GetGeoDataAsync(); @@ -140,7 +139,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Plex.GetHomeDataAsync(); @@ -160,9 +159,9 @@ var res = await sdk.Plex.GetHomeDataAsync(); | PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | -## GetResources +## GetServerResources -Get Resources +Get Plex server access tokens and server connections ### Example Usage @@ -171,38 +170,40 @@ using PlexAPI; using PlexAPI.Models.Requests; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman"); - -var res = await sdk.Plex.GetResourcesAsync( - xPlexClientIdentifier: "Postman", - includeHttps: PlexAPI.Models.Requests.IncludeHttps.Zero, - includeRelay: PlexAPI.Models.Requests.IncludeRelay.Zero, - includeIPv6: PlexAPI.Models.Requests.IncludeIPv6.One +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); +GetServerResourcesRequest req = new GetServerResourcesRequest() { + XPlexToken = "CV5xoxjTpFKUzBTShsaf", + IncludeHttps = PlexAPI.Models.Requests.IncludeHttps.One, + IncludeRelay = PlexAPI.Models.Requests.IncludeRelay.One, + IncludeIPv6 = PlexAPI.Models.Requests.IncludeIPv6.One, +}; + +var res = await sdk.Plex.GetServerResourcesAsync(req); + // handle response ``` ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `XPlexClientIdentifier` | *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)
| Postman | -| `IncludeHttps` | [IncludeHttps](../../Models/Requests/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | | -| `IncludeRelay` | [IncludeRelay](../../Models/Requests/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results | | -| `IncludeIPv6` | [IncludeIPv6](../../Models/Requests/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | | -| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [GetServerResourcesRequest](../../Models/Requests/GetServerResourcesRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | ### Response -**[GetResourcesResponse](../../Models/Requests/GetResourcesResponse.md)** +**[GetServerResourcesResponse](../../Models/Requests/GetServerResourcesResponse.md)** ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| PlexAPI.Models.Errors.GetResourcesResponseBody | 401 | application/json | -| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| PlexAPI.Models.Errors.GetServerResourcesResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetPin @@ -216,12 +217,12 @@ using PlexAPI; using PlexAPI.Models.Requests; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman"); +var sdk = new PlexAPISDK(xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"); var res = await sdk.Plex.GetPinAsync( - xPlexProduct: "Postman", strong: false, - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", + xPlexProduct: "Plex Web" ); // handle response @@ -231,9 +232,9 @@ var res = await sdk.Plex.GetPinAsync( | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `XPlexProduct` | *string* | :heavy_check_mark: | Product name of the application shown in the list of devices
| Postman | | `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`
| | -| `XPlexClientIdentifier` | *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)
| Postman | +| `XPlexClientIdentifier` | *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 | +| `XPlexProduct` | *string* | :heavy_minus_sign: | N/A | Plex Web | | `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | ### Response @@ -259,11 +260,11 @@ using PlexAPI; using PlexAPI.Models.Requests; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman"); +var sdk = new PlexAPISDK(xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"); var res = await sdk.Plex.GetTokenByPinIdAsync( pinID: 408895, - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); // handle response @@ -274,7 +275,7 @@ var res = await sdk.Plex.GetTokenByPinIdAsync( | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `PinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | | -| `XPlexClientIdentifier` | *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)
| Postman | +| `XPlexClientIdentifier` | *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 | ### Response @@ -283,45 +284,8 @@ var res = await sdk.Plex.GetTokenByPinIdAsync( ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| PlexAPI.Models.Errors.GetTokenByPinIdResponseBody | 404 | application/json | -| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | - - -## GetUserDetails - -Get the User data from the provided X-Plex-Token - -### Example Usage - -```csharp -using PlexAPI; -using PlexAPI.Models.Components; - -var sdk = new PlexAPISDK( - accessToken: "", - xPlexClientIdentifier: "Postman" -); - -var res = await sdk.Plex.GetUserDetailsAsync(); - -// handle response -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | - -### Response - -**[GetUserDetailsResponse](../../Models/Requests/GetUserDetailsResponse.md)** - -### Errors - -| Error Object | Status Code | Content Type | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| PlexAPI.Models.Errors.GetUserDetailsResponseBody | 401 | application/json | -| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| PlexAPI.Models.Errors.GetTokenByPinIdResponseBody | 400 | application/json | +| PlexAPI.Models.Errors.GetTokenByPinIdPlexResponseBody | 404 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/plexapi/README.md b/docs/sdks/plexapi/README.md index 16ebfce..2fd26ab 100644 --- a/docs/sdks/plexapi/README.md +++ b/docs/sdks/plexapi/README.md @@ -2,4 +2,4 @@ ## Overview -Plex-API: An Open API Spec for interacting with Plex.tv \ No newline at end of file +Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server \ No newline at end of file diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 2a31b7f..433096f 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -37,12 +37,12 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Search.PerformSearchAsync( - query: "dylan", - sectionId: 1516.53D, + query: "arnold", + sectionId: 9372.7D, limit: 5D ); @@ -86,7 +86,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Search.PerformVoiceSearchAsync( @@ -131,7 +131,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Search.GetSearchResultsAsync(query: "110"); diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index 6c335c3..3d019f8 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -15,6 +15,7 @@ Operations against the Plex Media Server System. * [GetServerIdentity](#getserveridentity) - Get Server Identity * [GetMyPlexAccount](#getmyplexaccount) - Get MyPlex Account * [GetResizedPhoto](#getresizedphoto) - Get a Resized Photo +* [GetMediaProviders](#getmediaproviders) - Get Media Providers * [GetServerList](#getserverlist) - Get Server List ## GetServerCapabilities @@ -29,7 +30,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Server.GetServerCapabilitiesAsync(); @@ -61,7 +62,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Server.GetServerPreferencesAsync(); @@ -93,7 +94,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Server.GetAvailableClientsAsync(); @@ -125,7 +126,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Server.GetDevicesAsync(); @@ -147,7 +148,7 @@ var res = await sdk.Server.GetDevicesAsync(); ## GetServerIdentity -Get Server Identity +This request is useful to determine if the server is online or offline ### Example Usage @@ -155,10 +156,7 @@ Get Server Identity using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK( - accessToken: "", - xPlexClientIdentifier: "Postman" -); +var sdk = new PlexAPISDK(xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"); var res = await sdk.Server.GetServerIdentityAsync(); @@ -173,7 +171,7 @@ var res = await sdk.Server.GetServerIdentityAsync(); | Error Object | Status Code | Content Type | | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| PlexAPI.Models.Errors.GetServerIdentityResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.GetServerIdentityResponseBody | 408 | application/json | | PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | @@ -189,7 +187,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Server.GetMyPlexAccountAsync(); @@ -223,7 +221,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); GetResizedPhotoRequest req = new GetResizedPhotoRequest() { @@ -259,6 +257,45 @@ var res = await sdk.Server.GetResizedPhotoAsync(req); | PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | +## GetMediaProviders + +Retrieves media providers and their features from the Plex server. + +### Example Usage + +```csharp +using PlexAPI; +using PlexAPI.Models.Requests; +using PlexAPI.Models.Components; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" +); + +var res = await sdk.Server.GetMediaProvidersAsync(xPlexToken: "CV5xoxjTpFKUzBTShsaf"); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `XPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | + +### Response + +**[GetMediaProvidersResponse](../../Models/Requests/GetMediaProvidersResponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| PlexAPI.Models.Errors.GetMediaProvidersResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | + + ## GetServerList Get Server List @@ -271,7 +308,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Server.GetServerListAsync(); diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index ccec3b8..3b353c0 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -25,7 +25,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Sessions.GetSessionsAsync(); @@ -58,13 +58,13 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Sessions.GetSessionHistoryAsync( sort: "", accountId: 1, - filter: new Filter() {}, + filter: new QueryParamFilter() {}, librarySectionID: 12 ); @@ -77,7 +77,7 @@ var res = await sdk.Sessions.GetSessionHistoryAsync( | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Sort` | *string* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)
| | | `AccountId` | *long* | :heavy_minus_sign: | Filter results by those that are related to a specific users id
| 1 | -| `Filter` | [Filter](../../Models/Requests/Filter.md) | :heavy_minus_sign: | Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
| {
"viewed-at-greater-than": {
"value": "viewedAt\u003e"
},
"viewed-at-greater-than-or-equal-to": {
"value": "viewedAt\u003e=\u003e"
},
"viewed-at-less-than": {
"value": "viewedAt\u003c"
}
} | +| `Filter` | [QueryParamFilter](../../Models/Requests/QueryParamFilter.md) | :heavy_minus_sign: | Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
| {
"viewed-at-greater-than": {
"value": "viewedAt\u003e"
},
"viewed-at-greater-than-or-equal-to": {
"value": "viewedAt\u003e=\u003e"
},
"viewed-at-less-than": {
"value": "viewedAt\u003c"
}
} | | `LibrarySectionID` | *long* | :heavy_minus_sign: | Filters the results based on the id of a valid library section
| 12 | ### Response @@ -104,7 +104,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Sessions.GetTranscodeSessionsAsync(); @@ -137,7 +137,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Sessions.StopTranscodeSessionAsync(sessionKey: "zz7llzqlx8w9vnrsbnwhbmep"); diff --git a/docs/sdks/statistics/README.md b/docs/sdks/statistics/README.md index b9a917e..ef15518 100644 --- a/docs/sdks/statistics/README.md +++ b/docs/sdks/statistics/README.md @@ -25,7 +25,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Statistics.GetStatisticsAsync(timespan: 4); @@ -64,7 +64,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Statistics.GetResourcesStatisticsAsync(timespan: 4); @@ -103,7 +103,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Statistics.GetBandwidthStatisticsAsync(timespan: 4); diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md index b771694..b72ffbf 100644 --- a/docs/sdks/updater/README.md +++ b/docs/sdks/updater/README.md @@ -25,7 +25,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Updater.GetUpdateStatusAsync(); @@ -58,7 +58,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Updater.CheckForUpdatesAsync(download: PlexAPI.Models.Requests.Download.One); @@ -98,7 +98,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); var res = await sdk.Updater.ApplyUpdatesAsync( @@ -114,7 +114,7 @@ var res = await sdk.Updater.ApplyUpdatesAsync( | Parameter | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Tonight` | [Tonight](../../Models/Requests/Tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 | -| `Skip` | [Skip](../../Models/Requests/Skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. | 1 | +| `Skip` | [Skip](../../Models/Requests/Skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. | 1 | ### Response diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md index 4ff591c..70a6c7f 100644 --- a/docs/sdks/video/README.md +++ b/docs/sdks/video/README.md @@ -24,7 +24,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); GetTimelineRequest req = new GetTimelineRequest() { @@ -76,7 +76,7 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); StartUniversalTranscodeRequest req = new StartUniversalTranscodeRequest() { diff --git a/docs/sdks/watchlist/README.md b/docs/sdks/watchlist/README.md index 1f512ba..c4023a0 100644 --- a/docs/sdks/watchlist/README.md +++ b/docs/sdks/watchlist/README.md @@ -8,9 +8,9 @@ API Calls that perform operations with Plex Media Server Watchlists ### Available Operations -* [GetWatchlist](#getwatchlist) - Get User Watchlist +* [GetWatchList](#getwatchlist) - Get User Watchlist -## GetWatchlist +## GetWatchList Get User Watchlist @@ -23,15 +23,17 @@ using PlexAPI.Models.Components; var sdk = new PlexAPISDK( accessToken: "", - xPlexClientIdentifier: "Postman" + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40" ); -GetWatchlistRequest req = new GetWatchlistRequest() { - Filter = PlexAPI.Models.Requests.PathParamFilter.Released, - XPlexToken = "", +GetWatchListRequest req = new GetWatchListRequest() { + Filter = PlexAPI.Models.Requests.Filter.Available, + XPlexToken = "CV5xoxjTpFKUzBTShsaf", + XPlexContainerStart = 0, + XPlexContainerSize = 50, }; -var res = await sdk.Watchlist.GetWatchlistAsync(req); +var res = await sdk.Watchlist.GetWatchListAsync(req); // handle response ``` @@ -40,16 +42,16 @@ var res = await sdk.Watchlist.GetWatchlistAsync(req); | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `request` | [GetWatchlistRequest](../../Models/Requests/GetWatchlistRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [GetWatchListRequest](../../Models/Requests/GetWatchListRequest.md) | :heavy_check_mark: | The request object to use for the request. | | `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | ### Response -**[GetWatchlistResponse](../../Models/Requests/GetWatchlistResponse.md)** +**[GetWatchListResponse](../../Models/Requests/GetWatchListResponse.md)** ### Errors | Error Object | Status Code | Content Type | | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| PlexAPI.Models.Errors.GetWatchlistResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.GetWatchListResponseBody | 401 | application/json | | PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* |